diff options
Diffstat (limited to 'recipes-test/test-nohz-stability/files/test-nohz-stability')
-rwxr-xr-x | recipes-test/test-nohz-stability/files/test-nohz-stability | 37 |
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 | |||
3 | partitioning_done=false | ||
4 | |||
5 | cleanup () { | ||
6 | $partitioning_done && partrt undo | ||
7 | exit $1 | ||
8 | } | ||
9 | |||
10 | cd /opt/ltp || cleanup 1 | ||
11 | |||
12 | # Perform partitioning, if not already done | ||
13 | if [ ! -d /sys/fs/cgroup/cpuset/rt ]; then | ||
14 | partrt create $(list2mask --nohz) || cleanup 1 | ||
15 | partitioning_done=true | ||
16 | fi | ||
17 | |||
18 | echo | ||
19 | echo "*******" | ||
20 | echo "* NRT *" | ||
21 | echo "*******" | ||
22 | echo | ||
23 | |||
24 | partrt run rt stress -i 1 || cleanup 1 & | ||
25 | CHILD_PID=$! | ||
26 | partrt run nrt systest-runner || cleanup 1 | ||
27 | kill $CHILD_PID || cleanup 1 | ||
28 | |||
29 | echo | ||
30 | echo "******" | ||
31 | echo "* RT *" | ||
32 | echo "******" | ||
33 | echo | ||
34 | |||
35 | partrt run rt systest-runner || cleanup 1 | ||
36 | |||
37 | cleanup 0 | ||