diff options
| author | Rod Smith <rod.smith@canonical.com> | 2017-02-23 13:21:14 -0500 |
|---|---|---|
| committer | Rod Smith <rod.smith@canonical.com> | 2017-02-23 13:21:14 -0500 |
| commit | 4cfbd35b20fb48ccb551b3aa1d9caf17a4acde9b (patch) | |
| tree | 0f6a619184956e9f4fd61581973e33c74a81051f | |
| parent | 6f9ef79166f72bdd7050ea6b7e8917721635f8c6 (diff) | |
Fix memory_stress_ng test to not rely on numactl; if that binary is
absent, set the # of NUMA nodes to 1.
| -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: |
