Merge ~rodsmith/plainbox-provider-checkbox:add-numa-testing into plainbox-provider-checkbox:master

Proposed by Rod Smith
Status: Merged
Approved by: Jeff Lane 
Approved revision: 2f5fb1b9e0748ca063f025ba830f38451d713f45
Merged at revision: 21a3309f3edc5d6043d2ef990388848d1eb0edf7
Proposed branch: ~rodsmith/plainbox-provider-checkbox:add-numa-testing
Merge into: plainbox-provider-checkbox:master
Diff against target: 32 lines (+6/-1)
1 file modified
bin/memory_stress_ng (+6/-1)
Reviewer Review Type Date Requested Status
Jeff Lane  Approve
Review via email: mp+315037@code.launchpad.net

Description of the change

The primary purpose of this MR is to add NUMA testing to the memory_stress_ng test. This test will run if and only if the system supports NUMA. I also corrected a minor bug in the reporting of error numbers in the output (bug #1657511). Note that this MR requires another MR (to be submitted shortly) to plainbox-provider-certification-server, since the change to memory_stress_ng adds a dependency on the numactl package.

To post a comment you must log in.
Revision history for this message
Rod Smith (rodsmith) wrote :
Revision history for this message
Jeff Lane  (bladernr) wrote :

Tested and it works.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/memory_stress_ng b/bin/memory_stress_ng
2index ab65e86..e619772 100755
3--- a/bin/memory_stress_ng
4+++ b/bin/memory_stress_ng
5@@ -114,6 +114,8 @@ echo "Variable run time is $variable_time seconds per stressor"
6
7 had_error=0
8
9+numa_nodes=$(numactl --hardware | grep available | head -n 1 | cut -f 2 -d " ")
10+
11 # NOTE: Specify stressors in two arrays rather than rely on stress-ng's
12 # --class memory,vm option for two reasons:
13 # 1. We want to run some stressors (those that exhaust all memory)
14@@ -130,6 +132,9 @@ crt_stressors=("bsearch" "context" "hsearch" "lsearch" "matrix" \
15 "memcpy" "null" "pipe" "qsort" "stack" "str" "stream" \
16 "tsearch" "vm-rw" "wcs" "zero" "mlock" "mmapfork" "mmapmany" \
17 "mremap" "shm-sysv" "vm-splice")
18+if [ "$numa_nodes" -gt 1 ]; then
19+ crt_stressors+=("numa")
20+fi
21 crt_runtime=$((${#crt_stressors[@]}*$base_time))
22
23 # Variable-run-time stressors -- run them longer on systems with more RAM....
24@@ -152,7 +157,7 @@ echo "*******************************************************************"
25 if [ $had_error = "0" ] ; then
26 echo "** stress-ng memory test passed!"
27 else
28- echo "** stress-ng memory test failed; most recent error was $return_code"
29+ echo "** stress-ng memory test failed; most recent error was $result"
30 fi
31 echo "*******************************************************************"
32 exit $result

Subscribers

People subscribed via source and target branches