summaryrefslogtreecommitdiffstats
path: root/recipes-test/test-nohz-stability/files/test-nohz-stability
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-test/test-nohz-stability/files/test-nohz-stability')
-rwxr-xr-xrecipes-test/test-nohz-stability/files/test-nohz-stability37
1 files changed, 37 insertions, 0 deletions
diff --git a/recipes-test/test-nohz-stability/files/test-nohz-stability b/recipes-test/test-nohz-stability/files/test-nohz-stability
new file mode 100755
index 0000000..b65fd96
--- /dev/null
+++ b/recipes-test/test-nohz-stability/files/test-nohz-stability
@@ -0,0 +1,37 @@
1#!/bin/sh
2
3partitioning_done=false
4
5cleanup () {
6 $partitioning_done && partrt undo
7 exit $1
8}
9
10cd /opt/ltp || cleanup 1
11
12# Perform partitioning, if not already done
13if [ ! -d /sys/fs/cgroup/cpuset/rt ]; then
14 partrt create $(list2mask --nohz) || cleanup 1
15 partitioning_done=true
16fi
17
18echo
19echo "*******"
20echo "* NRT *"
21echo "*******"
22echo
23
24partrt run rt stress -i 1 || cleanup 1 &
25CHILD_PID=$!
26partrt run nrt systest-runner || cleanup 1
27kill $CHILD_PID || cleanup 1
28
29echo
30echo "******"
31echo "* RT *"
32echo "******"
33echo
34
35partrt run rt systest-runner || cleanup 1
36
37cleanup 0