Whamcloud - gitweb
LU-10717 tests: minor fixes to conf-sanity 55/53455/5
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 14 Dec 2023 04:13:29 +0000 (21:13 -0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 30 Apr 2024 06:54:02 +0000 (06:54 +0000)
Remove use of fancy quotation marks in conf-sanity test_102.
Quiet other minor shellcheck warnings in test_30a and test_84.
Fix incorrect variable in error message in test_133.

Test-Parameters: trivial testlist=conf-sanity env=ONLY="30a 84 102"
Fixes: aa9f9344fc ("LU-10717 tests: tests should not start mgs")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I9825157c6b72addc6883e8bc44aea53b483ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53455
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/conf-sanity.sh

index 7976086..9f5f3b1 100755 (executable)
@@ -1270,7 +1270,7 @@ test_30a() {
 
        local orig=$($LCTL get_param -n $test)
        local list=(1 2 3 4 5 4 3 2 1 2 3 4 5 4 3 2 1 2 3 4 5)
-       for i in ${list[@]}; do
+       for i in ${list[*]}; do
                set_persistent_param_and_check client $test $conf $i
        done
        # make sure client restart still works
@@ -7026,8 +7026,7 @@ test_84() {
        local wrap_up=5
 
        echo "start mds service on $(facet_active_host $facet)"
-       start_mds \
-       "-o recovery_time_hard=$time_min,recovery_time_soft=$time_min" $@ ||
+       start_mds "-o recovery_time_hard=$time_min,recovery_time_soft=$time_min" ||
                error "start MDS failed"
 
        start_ost || error "start OST0000 failed"
@@ -8285,8 +8284,8 @@ run_test 101b "Race events DISCONNECT and ACTIVE in osp"
 test_102() {
        [[ "$MDS1_VERSION" -gt $(version_code 2.9.53) ]] ||
                skip "Need server version greater than 2.9.53"
-       [[ “$(mdsdevname 1)” != “$(mgsdevname)” ]] &&
-               [[ “$(facet_host mds1)” = “$(facet_host mgs)” ]] &&
+       [[ "$(mdsdevname 1)" != "$(mgsdevname)" ]] &&
+               [[ "$(facet_host mds1)" == "$(facet_host mgs)" ]] &&
                skip "MGS must be on different node or combined"
 
        cleanup || error "cleanup failed with $?"
@@ -8305,19 +8304,22 @@ test_102() {
 
        # unload all and only load libcfs to allow fail_loc setting
        do_facet mds1 $LUSTRE_RMMOD || error "unable to unload modules"
-       do_facet mds1 modprobe libcfs || error "libcfs not loaded"
-       do_facet mds1 lsmod \| grep libcfs || error "libcfs not loaded"
+       do_rpc_nodes $(facet_active_host mds1) load_module ../libcfs/libcfs/libcfs
+       do_facet mds1 lsmod | grep libcfs || error "libcfs not loaded"
 
        #define OBD_FAIL_OBDCLASS_MODULE_LOAD    0x60a
        do_facet mds1 "$LCTL set_param fail_loc=0x8000060a"
 
        do_facet mds1 $MOUNT_CMD $mds1dev $mds1mnt $mds1opts &&
-               error "mdt start must fail"
-       do_facet mds1 lsmod \| grep  obdclass && error "obdclass must not load"
+               error "mdt start must fail" || log "mount failed as expected"
+       do_facet mds1 lsmod | grep obdclass && error "obdclass must not load" ||
+               log "obdclass not loaded as expected"
 
        do_facet mds1 "$LCTL set_param fail_loc=0x0"
 
-       do_facet mds1 $MOUNT_CMD $mds1dev $mds1mnt $mds1opts ||
+       do_rpc_nodes $(facet_active_host mds1) load_modules
+       do_facet mds1 $MOUNT_CMD $mds1dev $mds1mnt $mds1opts &&
+               log "mds1 mounted properly" ||
                error "mdt start must not fail"
 
        cleanup || error "cleanup failed with $?"
@@ -10651,7 +10653,7 @@ test_133() {
        filecount=$((OSTCOUNT * filenum))
        for ((i = 1; i < filecount; i++)); do
                $LFS setstripe $testfile-$i.2 ||
-                       error "failed to setstripe $testilfe-$i.2"
+                       error "failed to setstripe $testfile-$i.2"
        done
        $LFS getstripe -i $testfile-*.2 > /tmp/$tfile.log
        local qos_used=""