From: Andreas Dilger Date: Wed, 11 Nov 2020 00:56:38 +0000 (-0700) Subject: LU-13390 tests: add debugging to sanity test_65n X-Git-Tag: 2.13.57~43 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=039821a5da4e019e921cce5081d4459b02a14954 LU-13390 tests: add debugging to sanity test_65n Print out the layouts used in comparisons in case of error, so that it is possible to debug intermittent test failures. Test-Parameters: trivial Signed-off-by: Andreas Dilger Change-Id: Ib81b10ff704998518275f737f028fb16391654ed Reviewed-on: https://review.whamcloud.com/40600 Tested-by: jenkins Reviewed-by: Olaf Faaland-LLNL Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 91e86e0..d8ae9b3 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -8389,7 +8389,11 @@ test_65n() { local file2_stripe_size=$($LFS getstripe -S $file2) [[ $file2_stripe_size -eq $new_def_stripe_size ]] || + { + echo "file2_stripe_size: '$file2_stripe_size'" + echo "new_def_stripe_size: '$new_def_stripe_size'" error "$file2 didn't inherit stripe size $new_def_stripe_size" + } local dir3=$MOUNT/$tdir-3 mkdir $dir3 || error "mkdir $dir3 failed" @@ -8399,7 +8403,11 @@ test_65n() { local dir3_layout=$(get_layout_param $dir3) local root_dir_layout=$(get_layout_param $MOUNT) [[ "$dir3_layout" = "$root_dir_layout" ]] || + { + echo "dir3_layout: '$dir3_layout'" + echo "root_dir_layout: '$root_dir_layout'" error "$dir3 should show the default layout from $MOUNT" + } # set OST pool on root directory local pool=$TESTNAME @@ -8417,7 +8425,7 @@ test_65n() { local file3_pool=$($LFS getstripe -p $file3) [[ "$file3_pool" = "$pool" ]] || - error "$file3 didn't inherit OST pool $pool" + error "$file3 ('$file3_pool') didn't inherit OST pool '$pool'" local dir4=$MOUNT/$tdir-4 mkdir $dir4 || error "mkdir $dir4 failed" @@ -8428,7 +8436,11 @@ test_65n() { echo "$LFS getstripe -d $MOUNT" $LFS getstripe -d $MOUNT [[ "$dir4_layout" = "$root_dir_layout" ]] || + { + echo "dir4_layout: '$dir4_layout'" + echo "root_dir_layout: '$root_dir_layout'" error "$dir4 should show the default layout from $MOUNT" + } # new file created in $dir4 should inherit the pool from # the filesystem default @@ -8437,7 +8449,7 @@ test_65n() { local file4_pool=$($LFS getstripe -p $file4) [[ "$file4_pool" = "$pool" ]] || - error "$file4 didn't inherit OST pool $pool" + error "$file4 ('$file4_pool') didn't inherit OST pool $pool" # new subdirectory under non-root directory should inherit # the default layout from its parent directory @@ -8450,7 +8462,11 @@ test_65n() { dir4_layout=$(get_layout_param $dir4) local dir5_layout=$(get_layout_param $dir5) [[ "$dir4_layout" = "$dir5_layout" ]] || + { + echo "dir4_layout: '$dir4_layout'" + echo "dir5_layout: '$dir5_layout'" error "$dir5 should inherit the default layout from $dir4" + } # though subdir under ROOT doesn't inherit default layout, but # its sub dir/file should be created with default layout.