Whamcloud - gitweb
LU-15626 tests: Fix "error" reported by shellcheck for sanity-hsm 98/46798/2
authorArshad Hussain <arshad.hussain@aeoncomputing.com>
Thu, 10 Mar 2022 07:19:28 +0000 (12:49 +0530)
committerOleg Drokin <green@whamcloud.com>
Wed, 30 Mar 2022 06:17:16 +0000 (06:17 +0000)
This patch fixes "error" issues reported by shellcheck
for file lustre/tests/sanity-hsm

Test-Parameters: trivial testlist=sanity-hsm
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I14b12affb9ec8b8c943569cedf103d8d5c8ec207
Reviewed-on: https://review.whamcloud.com/46798
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-hsm.sh

index 8402063..1830789 100755 (executable)
@@ -11,7 +11,7 @@ ONLY=${ONLY:-"$*"}
 
 LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
-init_test_env $@
+init_test_env "$@"
 init_logging
 
 ALWAYS_EXCEPT="$SANITY_HSM_EXCEPT "
@@ -3174,7 +3174,7 @@ test_60() {
        local sleep=1
 
        echo -n "Expecting a progress update within $progress_timeout seconds... "
-       while [ true ]; do
+       while true; do
                RESULT=$(do_node $(facet_active_host $mds) "$cmd")
                if [ -n "$RESULT" ] && [ "$RESULT" -gt 0 ]; then
                        echo "$RESULT bytes copied in $WAIT seconds."
@@ -5683,7 +5683,7 @@ test_606() {
        [ -n "$nid" ] || error "nid is empty"
        echo "Got NID $nid"
        [ -n "$nid" ] && [[ "${CLIENT_NIDS[*]}" =~ $nid ]] ||
-               error "nid '$nid' does not match any NID ${CLIENT_NIDS[@]}"
+               error "nid '$nid' does not match any NID ${CLIENT_NIDS[*]}"
 }
 run_test 606 "llog_reader groks changelog fields"