From 156bc091d8ddd258a2e0d8ab3f4531f398865863 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Sun, 14 Apr 2024 01:07:21 -0600 Subject: [PATCH] EX-9482 tests: skip sanity-pfl tests if no compression Skip sanity-pfl test_100* for servers that do not understand CSDC. Test-Parameters: trivial Test-Parameters: testlist=sanity-pfl Test-Parameters: testlist=sanity-pfl serverjob=lustre-master serverbuildno=4521 serverdistro=el8.9 Signed-off-by: Andreas Dilger Change-Id: Ib3fcfd77e9e7ffb122ed6ade9015b02d42ea8319 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54781 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Artem Blagodarenko --- lustre/tests/sanity-pfl.sh | 45 +++++++++++++++++---------------------------- 1 file changed, 17 insertions(+), 28 deletions(-) diff --git a/lustre/tests/sanity-pfl.sh b/lustre/tests/sanity-pfl.sh index 985880e..c3fe357 100644 --- a/lustre/tests/sanity-pfl.sh +++ b/lustre/tests/sanity-pfl.sh @@ -2545,13 +2545,12 @@ export LFS_SETSTRIPE_COMPR_OK="yes" test_100a() { (( $MDS1_VERSION >= $(version_code 2.14.0.92) )) || skip "Need MDS >= 2.14.0.92 for compression support" + compression_enabled || skip "compression is disabled ($(uname -a))" local tf=$DIR/$tdir/$tfile local p="$TMP/$TESTSUITE-$TESTNAME.parameters" test_mkdir $DIR/$tdir - save_lustre_params client "llite.*.enable_compression" > $p - stack_trap "restore_lustre_params < $p" EXIT $LCTL set_param llite.*.enable_compression=1 @@ -2573,6 +2572,7 @@ run_test 100a "set stripe component with nocompr" test_100b() { (( $MDS1_VERSION >= $(version_code 2.14.0.92) )) || skip "Need MDS >= 2.14.0.92 for compression support" + compression_enabled || skip "compression is disabled ($(uname -a))" local tf=$DIR/$tdir/$tfile # putting lz4 twice: @@ -2585,9 +2585,7 @@ test_100b() { local c1="64" local p="$TMP/$TESTSUITE-$TESTNAME.parameters" - save_lustre_params client "llite.*.enable_compression" > $p - stack_trap "rm -rf $DIR/$tdir; restore_lustre_params < $p" EXIT - $LCTL set_param llite.*.enable_compression=1 + stack_trap "rm -rf $DIR/$tdir" test_mkdir $DIR/$tdir @@ -2661,14 +2659,13 @@ run_test 100b "create with compress component" test_100c() { (( $MDS1_VERSION >= $(version_code 2.14.0.92) )) || skip "Need MDS >= 2.14.0.92 for compression support" + compression_enabled || skip "compression is disabled ($(uname -a))" local tf=$DIR/$tdir/$tfile local d1=$DIR/$tdir/dir-1 local p="$TMP/$TESTSUITE-$TESTNAME.parameters" - save_lustre_params client "llite.*.enable_compression" > $p - stack_trap "rm -rf $DIR/$tdir; restore_lustre_params < $p" EXIT - $LCTL set_param llite.*.enable_compression=1 + stack_trap "rm -rf $DIR/$tdir" test_mkdir $DIR/$tdir @@ -2754,6 +2751,7 @@ run_test 100c "create compress file with improper compress arguments" test_100d() { (( $MDS1_VERSION >= $(version_code 2.14.0.92) )) || skip "Need MDS >= 2.14.0.92 for compression support" + compression_enabled || skip "compression is disabled ($(uname -a))" local tf=$DIR/$tdir/$tfile # putting lz4 twice: @@ -2769,9 +2767,7 @@ test_100d() { local p="$TMP/$TESTSUITE-$TESTNAME.parameters" local expect - save_lustre_params client "llite.*.enable_compression" > $p - stack_trap "rm -rf $DIR/$tdir; restore_lustre_params < $p" EXIT - $LCTL set_param llite.*.enable_compression=1 + stack_trap "rm -rf $DIR/$tdir" test_mkdir $DIR/$tdir $LFS setstripe -c-1 $DIR/$tdir || @@ -2906,12 +2902,13 @@ run_test 100d "lfs find compress component" test_100e() { (( $MDS1_VERSION >= $(version_code 2.14.0.92) )) || skip "Need MDS >= 2.14.0.92 for compression support" + compression_enabled || skip "compression is disabled ($(uname -a))" local tf=$DIR/$tdir/$tfile local p="$TMP/$TESTSUITE-$TESTNAME.parameters" - save_lustre_params client "llite.*.enable_compression" > $p - stack_trap "rm -rf $DIR/$tdir; restore_lustre_params < $p" EXIT + stack_trap "rm -rf $DIR/$tdir" + stack_trap "$LCTL set_param llite.*.enable_compression=1" $LCTL set_param llite.*.enable_compression=0 test_mkdir $DIR/$tdir @@ -2929,13 +2926,12 @@ run_test 100e "don't set compress file with llite.*.enable_compression=0" test_100f() { (( $MDS1_VERSION >= $(version_code 2.14.0.91) )) || skip "Need MDS >= 2.14.0.91 for compression support" + compression_enabled || skip "compression is disabled ($(uname -a))" local tf=$DIR/$tdir/$tfile local p="$TMP/$TESTSUITE-$TESTNAME.parameters" - save_lustre_params client "llite.*.enable_compression" > $p - stack_trap "rm -rf $DIR/$tdir; restore_lustre_params < $p" EXIT - $LCTL set_param llite.*.enable_compression=1 + stack_trap "rm -rf $DIR/$tdir" test_mkdir $DIR/$tdir $LFS setstripe -E1M -Z gzip:1 -E4M -E6M -Z none -Eeof -Z gzip:4 $tf || @@ -2974,6 +2970,7 @@ run_test 100f "lfs find -printf %LZ support" test_100j() { (( $MDS1_VERSION >= $(version_code 2.14.0.92) )) || skip "Need MDS >= 2.14.0.92 for compression support" + compression_enabled || skip "compression is disabled ($(uname -a))" local tf=$DIR/$tdir/$tfile local p="$TMP/$TESTSUITE-$TESTNAME.parameters" @@ -2981,8 +2978,6 @@ test_100j() { local tmp_hdf_128k=$TMP/$tfile.128k local hdf=$LUSTRE/tests/AMSR_E_L3_DailyOcean_V05_20111003.hdf - export LFS_SETSTRIPE_COMPR_OK="yes" - [[ -s $hdf.bz2 ]] || skip_env "HDF file not present" if type -p bzcat >/dev/null; then @@ -2995,10 +2990,6 @@ test_100j() { fi test_mkdir $DIR/$tdir - save_lustre_params client "llite.*.enable_compression" > $p - - $LCTL set_param llite.*.enable_compression=1 - stack_trap "restore_lustre_params < $p; rm -f $p" EXIT $LFS setstripe -E eof -Z lz4 $tf || error "setstripe lz4 failed" $LFS getstripe $tf @@ -3017,13 +3008,12 @@ run_test 100j "basic debug test for compression" test_100k() { (( $MDS1_VERSION >= $(version_code 2.14.0.92) )) || skip "Need MDS >= 2.14.0.92 for compression support" + compression_enabled || skip "compression is disabled ($(uname -a))" local tf=$DIR/$tdir/$tfile local p="$TMP/$TESTSUITE-$TESTNAME.parameters" - save_lustre_params client "llite.*.enable_compression" > $p - stack_trap "rm -rf $DIR/$tdir; restore_lustre_params < $p" EXIT - $LCTL set_param llite.*.enable_compression=1 + stack_trap "rm -rf $DIR/$tdir" test_mkdir $DIR/$tdir @@ -3041,15 +3031,14 @@ run_test 100k "create with DoM compression component" test_100l() { (( $MDS1_VERSION >= $(version_code 2.14.0.91) )) || skip "Need MDS >= 2.14.0.91 for compression support" + compression_enabled || skip "compression is disabled ($(uname -a))" local tf=$DIR/$tdir/$tfile local tf2=$DIR/$tdir/${tfile}_compr local flags local p="$TMP/$TESTSUITE-$TESTNAME.parameters" - save_lustre_params client "llite.*.enable_compression" > $p - stack_trap "rm -rf $DIR/$tdir; restore_lustre_params < $p" EXIT - $LCTL set_param llite.*.enable_compression=1 + stack_trap "rm -rf $DIR/$tdir" test_mkdir $DIR/$tdir -- 1.8.3.1