From: Wei Liu Date: Sat, 17 May 2014 04:45:18 +0000 (-0700) Subject: LU-4991 test: check files in sanity 56s X-Git-Tag: 2.5.60~67 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=b48b921a5f36771bacdb0094d7ec4fe94cdf0c48 LU-4991 test: check files in sanity 56s In sanity 56s, run lfs getstripe -R to check files in case of failure. Change-Id: I52a55aae4e669c4b6af0bea869d75cc2cfff85c3 Signed-off-by: Wei Liu Reviewed-on: http://review.whamcloud.com/10360 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Jian Yu --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index c0a039a..4af836c 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -4491,31 +4491,41 @@ test_56s() { # LU-611 EXPECTED=$(((NUMDIRS + 1) * NUMFILES)) CMD="$LFIND -stripe-count $OSTCOUNT -type f $TDIR" NUMS=$($CMD | wc -l) - [ $NUMS -eq $EXPECTED ] || + [ $NUMS -eq $EXPECTED ] || { + $GETSTRIPE -R $TDIR error "\"$CMD\" wrong: found $NUMS, expected $EXPECTED" + } EXPECTED=$(((NUMDIRS + 1) * NUMFILES + EXTRA)) CMD="$LFIND -stripe-count +0 -type f $TDIR" NUMS=$($CMD | wc -l) - [ $NUMS -eq $EXPECTED ] || + [ $NUMS -eq $EXPECTED ] || { + $GETSTRIPE -R $TDIR error "\"$CMD\" wrong: found $NUMS, expected $EXPECTED" + } EXPECTED=$ONESTRIPE CMD="$LFIND -stripe-count 1 -type f $TDIR" NUMS=$($CMD | wc -l) - [ $NUMS -eq $EXPECTED ] || + [ $NUMS -eq $EXPECTED ] || { + $GETSTRIPE -R $TDIR error "\"$CMD\" wrong: found $NUMS, expected $EXPECTED" + } CMD="$LFIND -stripe-count -2 -type f $TDIR" NUMS=$($CMD | wc -l) - [ $NUMS -eq $EXPECTED ] || + [ $NUMS -eq $EXPECTED ] || { + $GETSTRIPE -R $TDIR error "\"$CMD\" wrong: found $NUMS, expected $EXPECTED" + } EXPECTED=0 CMD="$LFIND -stripe-count $((OSTCOUNT + 1)) -type f $TDIR" NUMS=$($CMD | wc -l) - [ $NUMS -eq $EXPECTED ] || + [ $NUMS -eq $EXPECTED ] || { + $GETSTRIPE -R $TDIR error "\"$CMD\" wrong: found $NUMS, expected $EXPECTED" + } } run_test 56s "check lfs find -stripe-count works"