From a2347e8ad72b721c54707b943be34f70e1fca21e Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Sun, 14 Apr 2024 00:03:24 -0600 Subject: [PATCH] LU-16623 tests: ignore sanity-pfl stripe-count off-by-1 In some cases the MDS may not create all stripes on a file, if the MDT-OST connection does not have precreated objects. This is OK, so the tests should not fail the stripe-count check if trying to create a fully-striped file and one of the stripes is missing. Lustre-change: https://review.whamcloud.com/54778 Lustre-commit: TBD (from 6380f3f13f7ffe854365bf55410bb34db801529a) Test-Parameters: trivial testlist=sanity-flr Signed-off-by: Andreas Dilger Change-Id: Ie482fdf86f82e7a2292c021761885249a6c551f1 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54779 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Lai Siyao Reviewed-by: Alex Zhuravlev --- lustre/tests/sanity-flr.sh | 8 ++++++-- lustre/tests/test-framework.sh | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lustre/tests/sanity-flr.sh b/lustre/tests/sanity-flr.sh index 5ec9be8..e2d82f6 100644 --- a/lustre/tests/sanity-flr.sh +++ b/lustre/tests/sanity-flr.sh @@ -149,7 +149,9 @@ verify_comp_attr_with_parent() { value=$($tf_cmd $opt $tf) [[ $value = -1 ]] && value=$OSTCOUNT - [[ $value = $expected ]] || { + [[ $value = $expected ]] || + # file sometimes one stripe short if MDS-OST didn't precreate, LU-16623 + [[ $attr == "stripe-count" && $value == $((OSTCOUNT - 1)) ]] || { $td_cmd -d $td $tf_cmd -v $tf error "verify $attr failed with parent on $tf:" \ @@ -188,7 +190,9 @@ verify_comp_attr_with_default() { value=$($tf_cmd $opt $tf) [[ $value = -1 ]] && value=$OSTCOUNT - [[ $value = $expected ]] || { + [[ $value = $expected ]] || + # file sometimes one stripe short if MDS-OST didn't precreate, LU-16623 + [[ $attr == "stripe-count" && $value == $((OSTCOUNT - 1)) ]] || { $tf_cmd -v $tf error "verify $attr failed with default value on $tf:" \ "$value != $expected" diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index cb5ef4e..0f1aa28 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -10826,7 +10826,9 @@ verify_comp_attr() { return } - [[ $value = $expected ]] || { + (( $value == $expected )) || + # file sometimes one stripe short if MDS-OST didn't precreate + [[ $attr == "stripe-count" && $value == $((OSTCOUNT - 1)) ]] || { $getstripe_cmd $tf error "verify $attr failed on $tf: $value != $expected" } -- 1.8.3.1