From: Wei Liu Date: Thu, 11 Jan 2024 20:07:24 +0000 (-0800) Subject: LU-16904 tests: use 2-component layout in sanity-compr X-Git-Tag: 2.16.52~106 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F51%2F53651%2F9;p=fs%2Flustre-release.git LU-16904 tests: use 2-component layout in sanity-compr Set system with 2-component PFL layout (1 stripe each) to see if only using a PFL layout is causing any test-script issues. Allow compr_STRIPEPARAMS/fs_STRIPEPARAMS to change layout instead of COMPR_EXTRA_LAYOUT for consistency with other test scripts. Fix issue in setstripe_getstripe funtion to only print layout of given dir/file Test-Parameters: trivial testlist=sanity-compr Test-Parameters: testlist=sanity-compr env=compr_STRIPEPARAMS="-E 64k -c 1 -E eof" Test-Parameters: testlist=sanity-compr env=compr_STRIPEPARAMS="-E 64k -c 1 -E eof -c 2" Test-Parameters: testlist=sanity-compr env=compr_STRIPEPARAMS="-E 64k -c 1 -E 1M -c 2 -E eof -c 4 -S 4M" Signed-off-by: Wei Liu Change-Id: I8fa60c104bc69876be8805edbaab1574207d6cc2 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53651 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Reviewed-by: Artem Blagodarenko --- diff --git a/lustre/tests/functions.sh b/lustre/tests/functions.sh index 1e8d9ad..de86b5f 100644 --- a/lustre/tests/functions.sh +++ b/lustre/tests/functions.sh @@ -295,10 +295,11 @@ setstripe_getstripe () { is_lustre $file || return 0 if [ -n "$params" ]; then + echo "setstripe option: $params" $LFS setstripe $params $file || error "setstripe $params failed" fi - $LFS getstripe $file || + $LFS getstripe -d $file || error "getstripe $file failed" } diff --git a/lustre/tests/sanity-compr.sh b/lustre/tests/sanity-compr.sh index c6b2029..71cc120 100644 --- a/lustre/tests/sanity-compr.sh +++ b/lustre/tests/sanity-compr.sh @@ -29,9 +29,11 @@ fi check_runas_id $RUNAS_ID $RUNAS_GID $RUNAS save_layout_restore_at_exit $MOUNT +# allow COMPR_EXTRA_LAYOUT for backward compatibility +compr_STRIPEPARAMS=${compr_STRIPEPARAMS:-$COMPR_EXTRA_LAYOUT} +compr_STRIPEPARAMS=${compr_STRIPEPARAMS:-${fs_STRIPEPARAMS:-"-E 1M -c1 -E eof"}} # Set file system with different layout -COMPR_EXTRA_LAYOUT=${COMPR_EXTRA_LAYOUT:-"-E EOF -c 1"} -$LFS setstripe $COMPR_EXTRA_LAYOUT $MOUNT +setstripe_getstripe $MOUNT $compr_STRIPEPARAMS test_sanity() {