From: Wei Liu Date: Mon, 1 Apr 2024 17:51:56 +0000 (-0700) Subject: LU-16904 tests: Fix sanity test 56a and 65a when PFL layout is used X-Git-Tag: 2.15.63~72 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;ds=inline;h=ae68041334e410a9bed297e0bd2dd5bcb8d90b8c;p=fs%2Flustre-release.git LU-16904 tests: Fix sanity test 56a and 65a when PFL layout is used 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 Change-Id: I0c17a0aceed7894f4eefa7336bd4a11e8fd7bc9e Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54644 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Timothy Day Reviewed-by: Oleg Drokin Reviewed-by: Andreas Dilger --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 9b64b2b..c035a66 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -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"