Whamcloud - gitweb
LU-16904 tests: use 2-component layout in sanity-compr 51/53651/9
authorWei Liu <sarah@whamcloud.com>
Thu, 11 Jan 2024 20:07:24 +0000 (12:07 -0800)
committerOleg Drokin <green@whamcloud.com>
Sat, 18 Jan 2025 22:03:36 +0000 (22:03 +0000)
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 <sarah@whamcloud.com>
Change-Id: I8fa60c104bc69876be8805edbaab1574207d6cc2
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53651
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
lustre/tests/functions.sh
lustre/tests/sanity-compr.sh

index 1e8d9ad..de86b5f 100644 (file)
@@ -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"
 }
 
index c6b2029..71cc120 100644 (file)
@@ -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()
 {