Whamcloud - gitweb
LU-16623 tests: ignore sanity-pfl stripe-count off-by-1
authorAndreas Dilger <adilger@whamcloud.com>
Sun, 14 Apr 2024 06:03:24 +0000 (00:03 -0600)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 15 Apr 2024 09:53:39 +0000 (09:53 +0000)
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 <adilger@whamcloud.com>
Change-Id: Ie482fdf86f82e7a2292c021761885249a6c551f1
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54779
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
lustre/tests/sanity-flr.sh
lustre/tests/test-framework.sh

index 5ec9be8..e2d82f6 100644 (file)
@@ -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"
index cb5ef4e..0f1aa28 100755 (executable)
@@ -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"
        }