From b0427df4a9335a2371ad40d034c0b908568d182f Mon Sep 17 00:00:00 2001 From: Jian Yu Date: Mon, 5 Feb 2024 13:02:18 -0800 Subject: [PATCH] EX-9125 tests: get stats_compr param in sanity-compr/1007 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 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53927 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Vitaliy Kuznetsov --- lustre/tests/sanity-compr.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lustre/tests/sanity-compr.sh b/lustre/tests/sanity-compr.sh index b0f1bfc..9134242 100644 --- a/lustre/tests/sanity-compr.sh +++ b/lustre/tests/sanity-compr.sh @@ -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 )) } -- 1.8.3.1