Whamcloud - gitweb
EX-9125 tests: get stats_compr param in sanity-compr/1007
authorJian Yu <yujian@whamcloud.com>
Mon, 5 Feb 2024 21:02:18 +0000 (13:02 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 23 Mar 2024 20:29:23 +0000 (20:29 +0000)
This patch adds getting stats_compr param in sanity-compr
test 1007 and 1008 to track data compression statistics.

Test-Parameters: trivial testlist=sanity-compr env=ONLY="1007 1008",ONLY_REPEAT=3

Change-Id: I7df25d36c8c89ec5a568bf1e8d5694a97dd18ecc
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53927
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Vitaliy Kuznetsov <vkuznetsov@ddn.com>
lustre/tests/sanity-compr.sh

index b0f1bfc..9134242 100644 (file)
@@ -1029,6 +1029,8 @@ test_1007() {
                [[ -z $has_level ]] || compr_info+=", level $compr_level"
                compr_info+=", and chunsksize ${chunksize}K"
 
+               $LCTL set_param -n osc.*.stats_compr=0
+
                echo "Compression, using $compr_info"
                $LFS setstripe -E -1 \
                        -Z ${compr_type}${has_level:+":${compr_level}"} \
@@ -1064,6 +1066,9 @@ test_1007() {
                        error_msg+="margin ${real_margin}% exceeded ${margin}%"
                        error_ignore_no_dump EX-7795 "$error_msg"
 
+                       $LCTL get_param -n osc.*.stats_compr |
+                               grep -v 'compr: 0'
+
                        (( failed_estimates += 1 ))
                }
 
@@ -1144,6 +1149,8 @@ test_1008() {
                [[ -z $has_level ]] || compr_info+=", level $compr_level"
                compr_info+=", and chunsksize ${chunksize}K"
 
+               $LCTL set_param -n osc.*.stats_compr=0
+
                echo "Compression, using $compr_info"
                $LFS setstripe -E -1 \
                        -Z ${compr_type}${has_level:+":${compr_level}"} \
@@ -1179,6 +1186,9 @@ test_1008() {
                        error_msg+="margin ${real_margin}% exceeded ${margin}%"
                        error_ignore_no_dump EX-7795 "$error_msg"
 
+                       $LCTL get_param -n osc.*.stats_compr |
+                               grep -v 'compr: 0'
+
                        (( failed_estimates += 1 ))
                }