diff --git a/scripts/systemtap/kem/kem_run.sh b/scripts/systemtap/kem/kem_run.sh index 6416d97483a..f1e8653f578 100755 --- a/scripts/systemtap/kem/kem_run.sh +++ b/scripts/systemtap/kem/kem_run.sh @@ -25,7 +25,7 @@ # # $ make -KEM_DIR="$(readlink -f $0)" +KEM_DIR=$(readlink -f "$0") KEM_DIR="${KEM_DIR%/*}" if [ "$EUID" -ne 0 ]; then @@ -34,15 +34,15 @@ if [ "$EUID" -ne 0 ]; then fi echo Inserting kemd.ko -insmod $KEM_DIR/kemd.ko +insmod "$KEM_DIR/kemd.ko" for i in $(seq 0 $(($(nproc)-1))) do - mknod /dev/kemd$i c 60 $i + mknod "/dev/kemd$i" c 60 "$i" done echo Running Systemtap -stap -g $KEM_DIR/kemd.stp & +stap -g "$KEM_DIR/kemd.stp" & stapPID=$! # Wait stap for start @@ -51,7 +51,7 @@ sleep 20 echo Running KEM clients for i in $(seq 0 $(($(nproc)-1))) do - $KEM_DIR/m0kemc $i > kemc_cpu$i.log 2>&1 & + "$KEM_DIR/m0kemc" "$i" > kemc_cpu"$i".log 2>&1 & kemcPIDs[$i]=$! done @@ -70,14 +70,14 @@ sleep 2 for i in $(seq 0 $(($(nproc)-1))) do - rm -f /dev/kemd$i + rm -f "/dev/kemd$i" done echo Removing kemd.ko -rmmod $KEM_DIR/kemd.ko +rmmod "$KEM_DIR/kemd.ko" for i in $(seq 0 $(($(nproc)-1))) do - $KEM_DIR/../../../utils/m0run m0addb2dump $PWD/_kemc$i/o/100000000000000:2 | grep pagefault -A 1 | head -n 40 - $KEM_DIR/../../../utils/m0run m0addb2dump $PWD/_kemc$i/o/100000000000000:2 | grep ctx_switch -A 1 | head -n 40 + "$KEM_DIR/../../../utils/m0run m0addb2dump" "$PWD"/_kemc"$i"/o/100000000000000:2 | grep pagefault -A 1 | head -n 40 + "$KEM_DIR/../../../utils/m0run m0addb2dump" "$PWD"/_kemc"$i"/o/100000000000000:2 | grep ctx_switch -A 1 | head -n 40 done