From: Andreas Dilger Date: Wed, 8 Nov 2023 22:39:28 +0000 (-0700) Subject: EX-7601 tests: improve/skip sanity test_460a X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=ef7ea190785a0aa1fa34271bfdbbf337bbb09a85;p=fs%2Flustre-release.git EX-7601 tests: improve/skip sanity test_460a Skip sanity test_460a for el9.2 clients, since they appear to be failing that test regularly, but no other distro client is. Improve the log messages to see what stage is currently running. Limit the "cmp --verbose" messages to one chunk, otherwise it may print the entire 14MB test file (about 80 MiB of ASCII). Move enable_compression() and disable_compression() functions into test-framework.sh so that they can be used for all tests. Set LFS_SETSTRIPE_COMPR_OK=y in enable_compression() since we already know this is a preview and don't need it printed. Allow sanity-compr.sh to specify SANITY_ONLY and/or SANITYN_ONLY, and skip the other test script run if only one of them is set. Test-Parameters: trivial Test-Parameters: testlist=sanity env=ONLY=460,HONOR_EXCEPT=y clientdistro=el9.2 Test-Parameters: testlist=sanity-compr env=SANITY_ONLY=460 clientdistro=ubuntu2204 Signed-off-by: Andreas Dilger Change-Id: I8cb2f67689824513335f3fa65e9ea7519e3ebbe5 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53043 Tested-by: jenkins --- diff --git a/lustre/tests/sanity-compr.sh b/lustre/tests/sanity-compr.sh index 8ee26c7..d186672 100644 --- a/lustre/tests/sanity-compr.sh +++ b/lustre/tests/sanity-compr.sh @@ -41,9 +41,11 @@ test_sanity() always_except LU-16928 56wb always_except LU-16904 906 always_except EX-7938 100 - local rc=0 + local rc - SANITY_EXCEPT=$ALWAYS_EXCEPT bash sanity.sh + [[ -n "$SANITYN_ONLY" && -z "$SANITY_ONLY" ]] && return 0 + + SANITY_EXCEPT=$ALWAYS_EXCEPT ONLY=$SANITY_ONLY bash sanity.sh rc=$? return $rc } @@ -51,9 +53,11 @@ run_test sanity "Run sanity with PFL layout" test_sanityn() { - local rc=0 + local rc + + [[ -n "$SANITY_ONLY" && -z "$SANITYN_ONLY" ]] && return 0 - bash sanityn.sh + SANITYN_EXCEPT=$ALWAYS_EXCEPT ONLY=$SANITYN_ONLY bash sanityn.sh rc=$? return $rc } diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 0fc63be..d1f1437 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -112,13 +112,18 @@ if [ -r /etc/SuSE-release ] || [ -r /etc/SUSE-brand ]; then [ $sles_version -lt $(version_code 12.0.0) ] && always_except LU-3703 234 elif [ -r /etc/os-release ]; then - if grep -qi ubuntu /etc/os-release; then - ubuntu_version=$(version_code $(sed -n -e 's/"//g' \ - -e 's/^VERSION=//p' \ - /etc/os-release | - awk '{ print $1 }')) + os_version=$(version_code $(sed -n -e 's/"//g' -e 's/^VERSION_ID=//p' \ + /etc/os-release)) + if grep -qi rhel /etc/os-release; then + el_version=$os_version - if [[ $ubuntu_version -gt $(version_code 16.0.0) ]]; then + if (( $el_version >= $(version_code 9.2) )); then + always_except EX-7601 460a + fi + elif grep -qi ubuntu /etc/os-release; then + ubuntu_version=$os_version + + if (( $ubuntu_version > $(version_code 16.0.0) )); then always_except LU-10366 410 fi fi @@ -28091,67 +28096,67 @@ compress_type() { --compress-chunk=$c1 $stored_dir || error "set a compress component in $stored failed" - echo ">>>>>" + echo ">>>>> type=$t1 level=$l1 chunk=$c1 src=$orig tgt=$stored" dd if=$orig of=$stored bs=65536 &>/dev/null || - error "dd to $stored failed" + error "(1) dd to $stored failed" sync; echo 3 > /proc/sys/vm/drop_caches echo "<<<<<" dd if=$stored of=$decomp1 bs=65536 &>/dev/null || - error "dd to $decomp1 failed" + error "(2) dd to $decomp1 failed" # fiomap case - cp $stored $decomp2 || - error "dd to $decomp2 failed" + cp $stored $decomp2 || error "(3) dd to $decomp2 failed" size1=$(stat -c %s $orig) size2=$(stat -c %s $decomp1) echo size1: $size1 echo size2: $size2 - [ $size1 -eq $size2 ] || error "sizes differ" + [ $size1 -eq $size2 ] || error "(4) sizes differ" size2=$(stat -c %s $decomp2) echo size2: $size2 - [ $size1 -eq $size2 ] || error "sizes differ" + [ $size1 -eq $size2 ] || error "(5) sizes differ" blocks1=$(stat -c %b $orig) blocks2=$(stat -c %b $stored) echo blocks1: $blocks1 echo blocks2: $blocks2 - $random_data || [ $blocks2 -lt $blocks1 ] || \ - error "blocks count should be less" + $random_data || [ $blocks2 -lt $blocks1 ] || + error "(6) blocks count should be less" - cmp --verbose $orig $decomp1 || - error "decompression failed" + cmp --verbose $orig $decomp1 || error "(7) decompression failed" - diff $orig $decomp2 || - error "decompression failed" + diff $orig $decomp2 || error "(8) decompression failed" # Reading starting the 480K offset # on compressed/plain data board dd if=$stored of=$decomp3 \ bs=32k count=2 skip=15 &>/dev/null || - error "dd to $decomp3 failed" + error "(9) dd to $decomp3 failed" dd if=$orig of=$decomp4 \ bs=32k count=2 skip=15 &>/dev/null || - error "dd to $decomp4 failed" + error "(10) dd to $decomp4 failed" - cmp --verbose $decomp3 $decomp4 || error "decompression failed" + cmp --verbose $decomp3 $decomp4 | head -$((${c1%k} * 1024 + 16)) + (( ${PIPESTATUS[0]} == 0 )) || error "(11) decompression failed" # Copy file with direct I/O dd if=$orig of=$stored3 bs=$c1 oflag=direct || - error "dd to $stored3 failed" + error "(12) dd to $stored3 failed" - cmp --verbose $orig $stored3 || error "decompression failed" + cmp --verbose $orig $stored3 | head -$((${c1%k} * 1024 + 16)) + (( ${PIPESTATUS[0]} == 0 )) || error "(13) decompression failed" # Flush cache and verify contents on disk are correct as well sync echo 3 > /proc/sys/vm/drop_caches - cmp --verbose $orig $stored3 || error "decompression failed" + cmp --verbose $orig $stored3 | head -$((${c1%k} * 1024 + 16)) + (( ${PIPESTATUS[0]} == 0 )) || error "(14) decompression failed" } compress_content() { @@ -28162,14 +28167,6 @@ compress_content() { t1="gzip" l1=5 c1="64k" compress_type $1 } -enable_compression() { - $LCTL set_param -n llite.*.enable_compression 1 -} - -disable_compression() { - $LCTL set_param -n llite.*.enable_compression 0 -} - test_460a() { (( MDS1_VERSION >= $(version_code 2.14.0.91) )) || skip "Need MDS version at least 2.14.0.91" diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index f873593..e959a09 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -10674,6 +10674,16 @@ verify_comp_attr() { } } +enable_compression() { + $LCTL set_param -n llite.*.enable_compression=1 + export LFS_SETSTRIPE_COMPR_OK=y +} + +disable_compression() { + $LCTL set_param -n llite.*.enable_compression=0 + unset LFS_SETSTRIPE_COMPR_OK +} + is_project_quota_supported() { $ENABLE_PROJECT_QUOTAS || return 1