From: Andreas Dilger Date: Sun, 14 Apr 2024 19:18:55 +0000 (-0600) Subject: EX-8981 tests: fix compression_enabled check X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=717e7a1a6f9d2ff43dcdc42f0874ecb1ae29cc48;p=fs%2Flustre-release.git EX-8981 tests: fix compression_enabled check The compression_enabled() check was returning "true" and "false" but these are invalid return values for bash, and need to be numeric values. As such, the function was essentially always returning "false" and causing every subtest using this function to be skipped during testing since it was introduced. Change it to return a numeric value as it should. Run testing for affected tests both x86_64 and aarch64 to test that it is working both ways. Test-Parameters: testlist=sanity-compr env=SANITY_ONLY="460",ONLY="0 1 1000-1080",HONOR_EXCEPT=y Test-Parameters: testlist=hot-pools env=ONLY=80,HONOR_EXCEPT=y Test-Parameters: testlist=sanity-flr env=ONLY=43,HONOR_EXCEPT=y Test-Parameters: testlist=sanity-sec env=ONLY="66 67",HONOR_EXCEPT=y Test-Parameters: testlist=sanity-pfl env=ONLY=100,HONOR_EXCEPT=y Test-Parameters: testlist=sanity-pfl env=ONLY=100,HONOR_EXCEPT=y clientdistro=el8.8 clientarch=aarch64 Fixes: 8465bfa296 ("EX-8981 csdc: execute tests if compression is enabled") Signed-off-by: Andreas Dilger Change-Id: Ice87f55617038b5c34da0bc1f76c3998d3ec639f Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54786 Tested-by: jenkins Reviewed-by: Artem Blagodarenko Reviewed-by: Alex Zhuravlev --- diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 2186c18..cb5ef4e 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -10838,7 +10838,7 @@ compression_enabled() { local supported=($($LCTL get_param -n $facet.*.import | grep -c compress_types)) - (( $enabled && $supported )) && return true || return false + (( $enabled && $supported )) } enable_compression() {