diff options
author | Rod Smith <rod.smith@canonical.com> | 2017-01-18 11:36:58 -0500 |
---|---|---|
committer | Rod Smith <rod.smith@canonical.com> | 2017-01-18 11:36:58 -0500 |
commit | 97398b845dff818d4530b85aa4436537bcefc989 (patch) | |
tree | 5f116606472eeb240aab852fb9f0505286f0342d | |
parent | a3e460b7a10f6af6b91b090c1e4a4709c035625b (diff) |
Add NUMA test to memory_stress_ng test and fix minor error number reporting bug LP:#1657511
-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 ab65e86..e619772 100755 --- a/bin/memory_stress_ng +++ b/bin/memory_stress_ng @@ -114,6 +114,8 @@ 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 " ") + # NOTE: Specify stressors in two arrays rather than rely on stress-ng's # --class memory,vm option for two reasons: # 1. We want to run some stressors (those that exhaust all memory) @@ -130,6 +132,9 @@ crt_stressors=("bsearch" "context" "hsearch" "lsearch" "matrix" \ "memcpy" "null" "pipe" "qsort" "stack" "str" "stream" \ "tsearch" "vm-rw" "wcs" "zero" "mlock" "mmapfork" "mmapmany" \ "mremap" "shm-sysv" "vm-splice") +if [ "$numa_nodes" -gt 1 ]; then + crt_stressors+=("numa") +fi crt_runtime=$((${#crt_stressors[@]}*$base_time)) # Variable-run-time stressors -- run them longer on systems with more RAM.... @@ -152,7 +157,7 @@ echo "*******************************************************************" if [ $had_error = "0" ] ; then echo "** stress-ng memory test passed!" else - echo "** stress-ng memory test failed; most recent error was $return_code" + echo "** stress-ng memory test failed; most recent error was $result" fi echo "*******************************************************************" exit $result |