diff options
author | Joshua Bakita <jbakita@cs.unc.edu> | 2021-03-08 22:30:50 -0500 |
---|---|---|
committer | Joshua Bakita <jbakita@cs.unc.edu> | 2021-03-08 22:30:50 -0500 |
commit | feb4d5e540216dea5902c2af765ac48254336226 (patch) | |
tree | dc5d3c09492aebe3846d683d8bc13c1a2bf95e4f | |
parent | a8c5f757d249ddd5f2aecc10d76690dfeeb1a34a (diff) |
Case Study: Add more validation and flexible paths to the runner script
-rwxr-xr-x | rtas21-ae-case-study.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/rtas21-ae-case-study.sh b/rtas21-ae-case-study.sh index f1b39c4..866a68e 100755 --- a/rtas21-ae-case-study.sh +++ b/rtas21-ae-case-study.sh | |||
@@ -2,12 +2,23 @@ | |||
2 | # Copyright 2021 Joshua Bakita | 2 | # Copyright 2021 Joshua Bakita |
3 | # Developed to run the case study as documented in the RTAS'21 paper, | 3 | # Developed to run the case study as documented in the RTAS'21 paper, |
4 | # "Simultaneous Multithreading in Real-Time Mixed-Criticality Systems" | 4 | # "Simultaneous Multithreading in Real-Time Mixed-Criticality Systems" |
5 | LIBLITMUS="${LIBLITMUS:=/playpen/mc2/liblitmus}" | ||
5 | 6 | ||
6 | if [[ "$EUID" != 0 ]]; then | 7 | if [[ "$EUID" != 0 ]]; then |
7 | echo "You need to be root to run realtime tasks with LITMUS-RT!" | 8 | echo "You need to be root to run realtime tasks with LITMUS-RT!" |
8 | exit | 9 | exit |
9 | fi | 10 | fi |
10 | 11 | ||
12 | if ! grep -q mc2 /proc/version; then | ||
13 | echo "You must first install the MC^2 kernel!" | ||
14 | exit | ||
15 | fi | ||
16 | |||
17 | if ! grep -q MC2 /proc/litmus/active_plugin; then | ||
18 | echo "You must first switch to the MC^2 kernel!" | ||
19 | exit | ||
20 | fi | ||
21 | |||
11 | # Parameter validation | 22 | # Parameter validation |
12 | if [ $# -lt 1 ]; then | 23 | if [ $# -lt 1 ]; then |
13 | taskset_root=ABmod_light_TACle-SDVBS_5.5 | 24 | taskset_root=ABmod_light_TACle-SDVBS_5.5 |
@@ -37,7 +48,7 @@ for (( i = 1; i <= $num_studies; i++ )); do | |||
37 | ./run_case_study.py $taskset_root/$i/ & | 48 | ./run_case_study.py $taskset_root/$i/ & |
38 | sleep 600 | 49 | sleep 600 |
39 | echo "Releasing taskset $i" | 50 | echo "Releasing taskset $i" |
40 | /playpen/mc2/liblitmus/release_ts | 51 | $LIBLITMUS/release_ts |
41 | sleep 3600 | 52 | sleep 3600 |
42 | echo "Killing taskset $i" | 53 | echo "Killing taskset $i" |
43 | kill $(cat pids.txt) | 54 | kill $(cat pids.txt) |