diff options
Diffstat (limited to 'recipes-core/numad/numad-0.6/run-ptest')
-rwxr-xr-x | recipes-core/numad/numad-0.6/run-ptest | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/recipes-core/numad/numad-0.6/run-ptest b/recipes-core/numad/numad-0.6/run-ptest new file mode 100755 index 0000000..5c49181 --- /dev/null +++ b/recipes-core/numad/numad-0.6/run-ptest | |||
@@ -0,0 +1,20 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | CPUSET_PATH="/tmp/numad-cpuset" | ||
4 | |||
5 | /etc/init.d/numad.init status | ||
6 | STATUS=$? | ||
7 | /etc/init.d/numad.init stop | ||
8 | mkdir $CPUSET_PATH; mount -t cgroup -ocpuset cpuset $CPUSET_PATH | ||
9 | ./test 2>&1& | ||
10 | TEST_PID=$! | ||
11 | sleep 2 | ||
12 | numad -d -S 0 -u 50 -i 5:5 -p $TEST_PID -D $CPUSET_PATH | ||
13 | wait | ||
14 | numad -i 0 | ||
15 | sleep 1 | ||
16 | umount $CPUSET_PATH ; rmdir $CPUSET_PATH | ||
17 | if [ "$STATUS" = "0" ]; then | ||
18 | /etc/init.d/numad.init start | ||
19 | fi | ||
20 | |||