From 1cc354d559d1df90a2eaa886eb0e3956bf385a9e Mon Sep 17 00:00:00 2001 From: James Nunez Date: Mon, 21 Aug 2017 17:43:19 -0600 Subject: [PATCH] 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 --- lustre/tests/sanity.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 ]] && -- 1.8.3.1