Merge ~canonical-kernel-team/+git/autotest-client-tests:phlin/stress-smoke-cleanup into ~canonical-kernel-team/+git/autotest-client-tests:master

Proposed by Po-Hsu Lin
Status: Merged
Merge reported by: Po-Hsu Lin
Merged at revision: 1544304f287d9f4ce772abc2c5d7fdd242f6dffb
Proposed branch: ~canonical-kernel-team/+git/autotest-client-tests:phlin/stress-smoke-cleanup
Merge into: ~canonical-kernel-team/+git/autotest-client-tests:master
Diff against target: 70 lines (+3/-29)
3 files modified
ubuntu_stress_smoke_test/ubuntu_stress_single_smoke_test.sh (+1/-25)
ubuntu_stress_smoke_test/ubuntu_stress_smoke_test_cleanup.sh (+1/-1)
ubuntu_stress_smoke_test/ubuntu_stress_smoke_test_init.sh (+1/-3)
Reviewer Review Type Date Requested Status
Paolo Pisati Approve
Andrei Gherzan Approve
Review via email: mp+457411@code.launchpad.net

Commit message

The set_max_oom_level() along with the sleep and sync commands have been
moved to ubuntu_stress_smoke_test_init.sh already. We don't need them
anymore in ubuntu_stress_single_smoke_test.sh.

Also remove extra spaces from shebang.

To post a comment you must log in.
Revision history for this message
Andrei Gherzan (agherzan) wrote :

Looks good!

review: Approve
Revision history for this message
Paolo Pisati (p-pisati) wrote :

LGTM.

review: Approve
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Applied and pushed, thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/ubuntu_stress_smoke_test/ubuntu_stress_single_smoke_test.sh b/ubuntu_stress_smoke_test/ubuntu_stress_single_smoke_test.sh
2index e3be957..5ba3f9d 100755
3--- a/ubuntu_stress_smoke_test/ubuntu_stress_single_smoke_test.sh
4+++ b/ubuntu_stress_smoke_test/ubuntu_stress_single_smoke_test.sh
5@@ -1,4 +1,4 @@
6-#!/bin/bash
7+#!/bin/bash
8
9 [ $# -lt 1 ] && echo "$0 requires STRESSOR name to be run" && exit 1
10 STRESSOR=${1}
11@@ -150,27 +150,6 @@ secs_now()
12 date "+%s"
13 }
14
15-#
16-# Try an ensure that this script and parent won't be oom'd
17-#
18-set_max_oom_level()
19-{
20- if [ -e /proc/self/oom_score_adj ]; then
21- echo -900 > /proc/self/oom_score_adj
22- echo -900 > /proc/$PPID/oom_score_adj
23- elif [ -e /proc/self/oom_adj ]; then
24- echo -14 > /proc/self/oom_adj
25- echo -14 > /proc/$PPID/oom_adj
26- fi
27- #
28- # Ensure oom killer kills the stressor hogs rather
29- # than the wrong random process (e.g. autotest!)
30- #
31- if [ -e /proc/sys/vm/oom_kill_allocating_task ]; then
32- echo 0 > /proc/sys/vm/oom_kill_allocating_task
33- fi
34-}
35-
36 check_machine
37
38 passed=""
39@@ -207,9 +186,6 @@ echo "Number of CPUs Online: $(getconf _NPROCESSORS_ONLN)"
40 echo
41 echo "Maximum bogo ops: ${MAX_BOGO_OPS}"
42 echo " "
43-set_max_oom_level
44-sleep 15
45-sync
46
47 #
48 # Handle cases where cgroup settings are enabled or not
49diff --git a/ubuntu_stress_smoke_test/ubuntu_stress_smoke_test_cleanup.sh b/ubuntu_stress_smoke_test/ubuntu_stress_smoke_test_cleanup.sh
50index 6c43281..754844f 100755
51--- a/ubuntu_stress_smoke_test/ubuntu_stress_smoke_test_cleanup.sh
52+++ b/ubuntu_stress_smoke_test/ubuntu_stress_smoke_test_cleanup.sh
53@@ -1,4 +1,4 @@
54-#!/bin/bash
55+#!/bin/bash
56
57 #
58 # Garbage collect swap file
59diff --git a/ubuntu_stress_smoke_test/ubuntu_stress_smoke_test_init.sh b/ubuntu_stress_smoke_test/ubuntu_stress_smoke_test_init.sh
60index 0471fb7..d037df6 100755
61--- a/ubuntu_stress_smoke_test/ubuntu_stress_smoke_test_init.sh
62+++ b/ubuntu_stress_smoke_test/ubuntu_stress_smoke_test_init.sh
63@@ -1,6 +1,4 @@
64-#!/bin/bash
65-
66-SYS_ZSWAP_ENABLED=/sys/module/zswap/parameters/enabled
67+#!/bin/bash
68
69 #
70 # Try an ensure that this script and parent won't be oom'd

Subscribers

People subscribed via source and target branches

to all changes: