diff options
author | Rod Smith <rod.smith@canonical.com> | 2017-02-23 13:21:14 -0500 |
---|---|---|
committer | Sylvain Pineau <sylvain.pineau@canonical.com> | 2017-04-03 09:39:22 +0200 |
commit | 95fe2f4b34dd64fd92c1da499fe85c6fa75a00cd (patch) | |
tree | 8d4ad8cd01a2e6324d55f1c845947eb60afe92a4 /bin | |
parent | 8d4e2eeaf3e493933652925c1db21551efadd366 (diff) |
Fix memory_stress_ng test to not rely on numactl; if that binary is
absent, set the # of NUMA nodes to 1.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/memory_stress_ng | 7 |
1 files changed, 6 insertions, 1 deletions
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: |