Merge ~rodsmith/plainbox-provider-checkbox:fix-no-numactl into plainbox-provider-checkbox:master

Proposed by Rod Smith
Status: Merged
Approved by: Jeff Lane 
Approved revision: 4cfbd35b20fb48ccb551b3aa1d9caf17a4acde9b
Merged at revision: b8e5fb6158ef5ee9b819228aee58266a3b23506b
Proposed branch: ~rodsmith/plainbox-provider-checkbox:fix-no-numactl
Merge into: plainbox-provider-checkbox:master
Diff against target: 18 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+318144@code.launchpad.net

Description of the change

Since numactl is not available on s390, this patch modifies memory_stress_ng to work if that binary is missing by configuring it to assume a single NUMA node.

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

Great! thanks for fixing that.

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 e619772..35c7725 100755
3--- a/bin/memory_stress_ng
4+++ b/bin/memory_stress_ng
5@@ -114,7 +114,12 @@ 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+command -v numactl >/dev/null 2>&1
11+if [ $? == 0 ] ; then
12+ numa_nodes=$(numactl --hardware | grep available | head -n 1 | cut -f 2 -d " ")
13+else
14+ numa_nodes=1
15+fi
16
17 # NOTE: Specify stressors in two arrays rather than rely on stress-ng's
18 # --class memory,vm option for two reasons:

Subscribers

People subscribed via source and target branches