Whamcloud - gitweb
EX-8981 tests: fix compression_enabled check
authorAndreas Dilger <adilger@whamcloud.com>
Sun, 14 Apr 2024 19:18:55 +0000 (13:18 -0600)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 15 Apr 2024 09:53:17 +0000 (09:53 +0000)
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 <adilger@whamcloud.com>
Change-Id: Ice87f55617038b5c34da0bc1f76c3998d3ec639f
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54786
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
lustre/tests/test-framework.sh

index 2186c18..cb5ef4e 100755 (executable)
@@ -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() {