From: James Nunez Date: Mon, 21 Aug 2017 23:43:19 +0000 (-0600) Subject: LU-9741 test: Correct check of stripe count for directories X-Git-Tag: 2.10.55~59 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F80%2F27980%2F3;p=fs%2Flustre-release.git LU-9741 test: Correct check of stripe count for directories With the progressive file layout feature, the 'lfs getstripe -d' output will report stripe count for each component. Since sanity test 27w checks that there is only one "stripe_count" line in the 'lfs getstripe -d' output, this needs to be changed to check that there is at least one "stripe_count" reported. Test-Parameters: trivial Signed-off-by: James Nunez Change-Id: I51f141b2542e65d1bc296cb2cb14c12f22afdcec Reviewed-on: https://review.whamcloud.com/27980 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Saurabh Tandan Reviewed-by: Wei Liu --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 2200a39..6ccaba7 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -1712,10 +1712,10 @@ test_27w() { # bug 10997 $LFS setstripe -S 65536 $DIR/$tdir/f0 || error "setstripe failed" [ $($LFS getstripe -S $DIR/$tdir/f0) -ne 65536 ] && error "stripe size $size != 65536" || true - [ $($LFS getstripe -d $DIR/$tdir | grep -c "stripe_count") -ne 1 ] && - error "$LFS getstripe -d $DIR/$tdir failed" || true + [ $($LFS getstripe -d $DIR/$tdir | grep -c "stripe_count") -eq 0 ] && + error "$LFS getstripe -d $DIR/$tdir no 'stripe_count'" || true } -run_test 27w "check $LFS setstripe -S option" +run_test 27w "check $LFS setstripe -S and getstrip -d options" test_27wa() { [[ $OSTCOUNT -lt 2 ]] &&