From 99c1dce2e705bcbd18ac16674658339f94f1d58e Mon Sep 17 00:00:00 2001 From: Sayed Alfhad Shah Date: Fri, 26 Aug 2022 23:31:03 +0530 Subject: [PATCH] CORTX-30751: Codacy code cleanup (#1606) (#1923) This patch fixes some of the codacy warnings. warning fixed : "Double quote to prevent globing and words splitting". --- spiel/st/m0t1fs_spiel_st.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/spiel/st/m0t1fs_spiel_st.sh b/spiel/st/m0t1fs_spiel_st.sh index d3e25f04cd3..570c879388c 100755 --- a/spiel/st/m0t1fs_spiel_st.sh +++ b/spiel/st/m0t1fs_spiel_st.sh @@ -66,8 +66,8 @@ iosloopdevs() { EOF for i in $(seq $DEV_NR); do dd if=/dev/zero of="$SANDBOX_DIR"/"${i}".img bs="$DEV_SIZE" seek="$DEV_SIZE" count=1 - losetup -d /dev/loop"$i" &> /dev/null || true - losetup /dev/loop"$i" "$SANDBOX_DIR"/"${i}".img + losetup -d "/dev/loop$i" &> /dev/null || true + losetup "/dev/loop$i" "$SANDBOX_DIR"/"${i}".img cat >> "$CONF_DRIVES" << EOF - id: $i filename: /dev/loop$i @@ -117,7 +117,7 @@ _fini() { losetup -d /dev/loop"$i" done m0_modules_remove - cd $M0_SRC_DIR/utils/spiel + cd "$M0_SRC_DIR"/utils/spiel cat $INSTALLED_FILES | xargs rm -rf rm -rf build/ $INSTALLED_FILES } @@ -239,10 +239,10 @@ test_m0mkfs() { -m $MAX_RPC_MSG_SIZE -q $TM_MIN_RECV_QUEUE_LEN -w 3 \ -f $PROC_FID2 -d $CONF_DRIVES -H $M0D2_ENDPOINT" - cd $path + cd "$path" - echo $M0_SRC_DIR/utils/mkfs/m0mkfs $OPTS - $M0_SRC_DIR/utils/mkfs/m0mkfs $OPTS >>$path/mkfs.log || + echo "$M0_SRC_DIR"/utils/mkfs/m0mkfs $OPTS + "$M0_SRC_DIR"/utils/mkfs/m0mkfs $OPTS >>$path/mkfs.log || error 'm0mkfs failed' } @@ -254,7 +254,7 @@ test_m0d_start() { -m $MAX_RPC_MSG_SIZE -q $TM_MIN_RECV_QUEUE_LEN -w 3 \ -f $PROC_FID2 -d $CONF_DRIVES -H $M0D2_ENDPOINT" - cd $path + cd "$path" echo "$M0_SRC_DIR"/motr/m0d $OPTS "$M0_SRC_DIR"/motr/m0d $OPTS >>"$path"/m0d.log 2>&1 & @@ -449,7 +449,7 @@ EOF validate_health() { say 'Validate health' - $M0_SRC_DIR/utils/spiel/m0spiel $M0_SPIEL_OPTS < $TEST_FILE || die "m0t1fs: Can't write to file" + echo "$TEST_STR" > "$TEST_FILE" || die "m0t1fs: Can't write to file" [ "`cat $TEST_FILE`" == "$TEST_STR" ] || die "IO error" } fs_stats_fetch() { - $M0_SRC_DIR/utils/spiel/m0spiel $M0_SPIEL_OPTS <