From feb4d5e540216dea5902c2af765ac48254336226 Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Mon, 8 Mar 2021 22:30:50 -0500 Subject: Case Study: Add more validation and flexible paths to the runner script --- rtas21-ae-case-study.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'rtas21-ae-case-study.sh') 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 @@ # Copyright 2021 Joshua Bakita # Developed to run the case study as documented in the RTAS'21 paper, # "Simultaneous Multithreading in Real-Time Mixed-Criticality Systems" +LIBLITMUS="${LIBLITMUS:=/playpen/mc2/liblitmus}" if [[ "$EUID" != 0 ]]; then echo "You need to be root to run realtime tasks with LITMUS-RT!" exit fi +if ! grep -q mc2 /proc/version; then + echo "You must first install the MC^2 kernel!" + exit +fi + +if ! grep -q MC2 /proc/litmus/active_plugin; then + echo "You must first switch to the MC^2 kernel!" + exit +fi + # Parameter validation if [ $# -lt 1 ]; then taskset_root=ABmod_light_TACle-SDVBS_5.5 @@ -37,7 +48,7 @@ for (( i = 1; i <= $num_studies; i++ )); do ./run_case_study.py $taskset_root/$i/ & sleep 600 echo "Releasing taskset $i" - /playpen/mc2/liblitmus/release_ts + $LIBLITMUS/release_ts sleep 3600 echo "Killing taskset $i" kill $(cat pids.txt) -- cgit v1.2.2