summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Bakita <jbakita@cs.unc.edu>2021-03-08 22:30:50 -0500
committerJoshua Bakita <jbakita@cs.unc.edu>2021-03-08 22:30:50 -0500
commitfeb4d5e540216dea5902c2af765ac48254336226 (patch)
treedc5d3c09492aebe3846d683d8bc13c1a2bf95e4f
parenta8c5f757d249ddd5f2aecc10d76690dfeeb1a34a (diff)
Case Study: Add more validation and flexible paths to the runner script
-rwxr-xr-xrtas21-ae-case-study.sh13
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"
5LIBLITMUS="${LIBLITMUS:=/playpen/mc2/liblitmus}"
5 6
6if [[ "$EUID" != 0 ]]; then 7if [[ "$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
9fi 10fi
10 11
12if ! grep -q mc2 /proc/version; then
13 echo "You must first install the MC^2 kernel!"
14 exit
15fi
16
17if ! grep -q MC2 /proc/litmus/active_plugin; then
18 echo "You must first switch to the MC^2 kernel!"
19 exit
20fi
21
11# Parameter validation 22# Parameter validation
12if [ $# -lt 1 ]; then 23if [ $# -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)