Whamcloud - gitweb
LU-16904 tests: Fix sanity test 56a and 65a when PFL layout is used 44/54644/3
authorWei Liu <sarah@whamcloud.com>
Mon, 1 Apr 2024 17:51:56 +0000 (10:51 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 15 Apr 2024 16:54:41 +0000 (16:54 +0000)
Fix sanity test_56a to use correct operator order
Skip sanity test_65a if PFL layout is set since it is a test of
directory with no stripe info

Test-Parameters: trivial testlist=sanity-compr env=ONLY="56a 65a",compr_STRIPEPARAMS="-E 1M -c1 -E eof"
Test-Parameters: testlist=sanity-compr env=ONLY="56a 65a",compr_STRIPEPARAMS="-E 64k -c 1 -E eof"
Test-Parameters: testlist=sanity-compr env=ONLY="56a 65a",compr_STRIPEPARAMS="-E 64k -c 1 -E eof -c 2"
Test-Parameters: testlist=sanity-compr env=ONLY="56a 65a",compr_STRIPEPARAMS="-E 64k -c 1 -E 1M -c 2 -E eof -c 4 -S 4M"

Signed-off-by: Wei Liu <sarah@whamcloud.com>
Change-Id: I0c17a0aceed7894f4eefa7336bd4a11e8fd7bc9e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54644
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/tests/sanity.sh

index 9b64b2b..c035a66 100755 (executable)
@@ -6529,7 +6529,7 @@ test_56a() {
 
        #test lfs getstripe with -v prints lmm_fid
        filenum=$($LFS getstripe -v $dir | grep -c lmm_fid)
-       local countfids=$((numdirs + numfiles * numcomp))
+       local countfids=$(((numdirs + numfiles) * numcomp))
        [[ $filenum -eq $countfids ]] ||
                error "$LFS getstripe -v $dir: "\
                      "got $filenum want $countfids lmm_fid"
@@ -10033,6 +10033,10 @@ run_test 64i "shrink on reconnect"
 test_65a() {
        [ $PARALLEL == "yes" ] && skip "skip parallel run"
 
+       # LU-16904 check if the root is set as PFL layout
+       local numcomp=$($LFS getstripe --component-count $MOUNT)
+       [ $numcomp -eq 0 ] || skip "Skip test_65a for PFL layout"
+
        test_mkdir $DIR/$tdir
        touch $DIR/$tdir/f1
        $LVERIFY $DIR/$tdir $DIR/$tdir/f1 || error "lverify failed"