Fix the method of getting the number of numa nodes.

Signed-off-by: Wanlong Gao <[email protected]>
---
 testcases/kernel/numa/numa01.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/numa/numa01.sh b/testcases/kernel/numa/numa01.sh
index 9790ef4..9b491fc 100644
--- a/testcases/kernel/numa/numa01.sh
+++ b/testcases/kernel/numa/numa01.sh
@@ -807,7 +807,7 @@ test010()
         fi
 
             col=2                       #column represents node0 in numastat 
o/p
-        numnodes=$(ls /sys/devices/system/node | wc -l)
+        numnodes=$(ls /sys/devices/system/node | grep -Ec "node?")
         Preferred_node=$[$[$numnodes/2]-1]
         col=$[$Preferred_node+2]
         numastat > $LTPTMP/numalog
-- 
1.8.0


------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to