Whamcloud - gitweb
EX-8212 tests: fix conf-sanity_33c
authorSergey Cheremencev <scherementsev@ddn.com>
Fri, 8 Sep 2023 14:54:58 +0000 (17:54 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 8 Sep 2023 22:18:04 +0000 (22:18 +0000)
Fix conf-sanity.sh test_33c failure in case of MDSCOUNT > 1.
This test is not yet on master, so this patch not needed there.

Test-Parameters: trivial testlist=conf-sanity
Fixes: 6a7a2de555 ("LU-17034 tests: memory corruption in PQ")
Signed-off-by: Sergey Cheremencev <scherementsev@ddn.com>
Change-Id: I37b73a4827895f00cf325cb5cb2da3157a27dc47
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52319
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/tests/conf-sanity.sh

index 79fa3b1..49be4e0 100644 (file)
@@ -2622,9 +2622,9 @@ test_33b() {      # was test_34
 run_test 33b "Drop cancel during umount"
 
 test_33c() {
-       #local FSNAME2=test-$testnum
        local MDSDEV=$(mdsdevname ${SINGLEMDS//mds/})
        local tstid=${TSTID:-"$(id -u $TSTUSR)"}
+       local old_MDSCOUNT=$MDSCOUNT
        local mkfsoptions
        local qpool="qpool1"
 
@@ -2651,10 +2651,13 @@ test_33c() {
                $fs2ostvdev || exit 10
 
 
-       start fs2mds $fs2mdsdev $MDS_MOUNT_OPTS && trap cleanup_fs2 EXIT INT
+       start fs2mds $fs2mdsdev $MDS_MOUNT_OPTS
+       stack_trap "stop fs2mds -f"
        start fs2ost $fs2ostdev $OST_MOUNT_OPTS
+       stack_trap "stop fs2ost -f"
 
        mount_client $MOUNT || error "client start failed"
+       stack_trap "umount_client $MOUNT"
        mkdir_on_mdt0 $DIR/$tdir || "cannot create $DIR/$tdir"
        chmod 0777 $DIR/$tdir || "chown failed"
        if [[ $PERM_CMD == *"set_param -P"* ]]; then
@@ -2665,6 +2668,9 @@ test_33c() {
                        error "set ost quota type failed"
        fi
 
+       MDSCOUNT=1
+       stack_trap "MDSCOUNT=$old_MDSCOUNT"
+
        pool_add $qpool || error "pool_add failed"
        pool_add_targets $qpool 0x7c6
 
@@ -2681,10 +2687,6 @@ test_33c() {
        done
 
        destroy_pools
-       umount_client $MOUNT || error "client start failed"
-       stop fs2ost -f
-       stop fs2mds -f
-       cleanup_nocli || error "cleanup_nocli failed with $?"
 }
 run_test 33c "Mount ost with a large index number"