Whamcloud - gitweb
LU-17856 tests: ignore sanity stripe-count off-by-1 27/55427/3
authorFrederick Dilger <fdilger@whamcloud.com>
Fri, 14 Jun 2024 03:29:10 +0000 (23:29 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 25 Jun 2024 03:33:46 +0000 (03:33 +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.

parse_layout_param was modified to change the output value of
stripe count to be $OSTCOUNT if the stripe_count=$OSTCOUNT - 1.

Even if the stripe_count was meant to be $OSTCOUNT - 1 this
shouldn't fail any tests as both tested values will be modified.

Test-Parameters: trivial testlist=sanity env=ONLY=56xd-56xe,ONLY_REPEAT=100
Test-Parameters: trivial testlist=sanity env=ONLY=65n,ONLY_REPEAT=100
Test-Parameters: trivial testlist=sanity env=ONLY=184d,ONLY_REPEAT=100
Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: Ie908a07d21b75e3ba60b7e6ca326675684ee2037
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55427
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/tests/test-framework.sh

index 94ed56f..6711d59 100755 (executable)
@@ -10551,7 +10551,8 @@ parse_plain_dir_param()
        local param=""
 
        if [[ ${invalues[0]} =~ "stripe_count:" ]]; then
-               param="-c ${invalues[1]}"
+               (( ${invalues[1]} == $OSTCOUNT - 1 )) &&
+                       param="-c $OSTCOUNT" || param="-c ${invalues[1]}"
        fi
        if [[ ${invalues[2]} =~ "stripe_size:" ]]; then
                param="$param -S ${invalues[3]}"
@@ -10574,6 +10575,8 @@ parse_plain_param()
        local val=$(awk '{print $2}' <<< $line)
 
        if [[ $line =~ ^"lmm_stripe_count:" ]]; then
+               (( $val == $OSTCOUNT - 1 )) &&
+                       param="-c $OSTCOUNT" || param="-c $val"
                echo "-c $val"
        elif [[ $line =~ ^"lmm_stripe_size:" ]]; then
                echo "-S $val"