From 786cfcaee82e690dc9f1e56a8aa4dcab61ed9c05 Mon Sep 17 00:00:00 2001 From: Rinku Kothiya Date: Mon, 22 Aug 2022 10:47:42 +0530 Subject: [PATCH] CORTX-30751: Codacy code cleanup (#1606) (#1956) This patch fixes some of the codacy warnings. warning fixed : "Double quote to prevent globing and words splitting". Signed-off-by: Rinku Kothiya --- scripts/systemtap/kem/kem_run.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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