From ae68041334e410a9bed297e0bd2dd5bcb8d90b8c Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Mon, 1 Apr 2024 10:51:56 -0700 Subject: [PATCH] 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 --- lustre/tests/sanity.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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" -- 1.8.3.1