From 95fe2f4b34dd64fd92c1da499fe85c6fa75a00cd Mon Sep 17 00:00:00 2001 From: Rod Smith Date: Thu, 23 Feb 2017 13:21:14 -0500 Subject: Fix memory_stress_ng test to not rely on numactl; if that binary is absent, set the # of NUMA nodes to 1. --- bin/memory_stress_ng | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/memory_stress_ng b/bin/memory_stress_ng index e619772..35c7725 100755 --- a/bin/memory_stress_ng +++ b/bin/memory_stress_ng @@ -114,7 +114,12 @@ echo "Variable run time is $variable_time seconds per stressor" had_error=0 -numa_nodes=$(numactl --hardware | grep available | head -n 1 | cut -f 2 -d " ") +command -v numactl >/dev/null 2>&1 +if [ $? == 0 ] ; then + numa_nodes=$(numactl --hardware | grep available | head -n 1 | cut -f 2 -d " ") +else + numa_nodes=1 +fi # NOTE: Specify stressors in two arrays rather than rely on stress-ng's # --class memory,vm option for two reasons: -- cgit v1.2.3