From f5dbea71828d3d940e509daadee6ef15c60be0fd Mon Sep 17 00:00:00 2001 From: Erwan Velu Date: Fri, 1 Oct 2021 21:37:29 +0200 Subject: [PATCH] t/one-core-peak: Report numa as off if missing Some systems doesn't have numa enabled, if so don't report an error but report numa as off. Signed-off-by: Erwan Velu --- t/one-core-peak.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/one-core-peak.sh b/t/one-core-peak.sh index 57c45451..fda870ab 100755 --- a/t/one-core-peak.sh +++ b/t/one-core-peak.sh @@ -192,7 +192,7 @@ show_nvme() { pci_dir="/sys/bus/pci/devices/${pci_addr}/" link_speed=$(cat ${pci_dir}/current_link_speed) irq=$(cat ${pci_dir}/irq) - numa=$(cat ${pci_dir}/numa_node) + numa=$([ -f ${pci_dir}/numa_node ] && cat ${pci_dir}/numa_node || echo "off") cpus=$(cat ${pci_dir}/local_cpulist) model=$(cat ${device_dir}/model | xargs) #xargs for trimming spaces fw=$(cat ${device_dir}/firmware_rev | xargs) #xargs for trimming spaces -- 2.25.1