Whamcloud - gitweb
LU-9741 test: Correct check of stripe count for directories 80/27980/3
authorJames Nunez <james.a.nunez@intel.com>
Mon, 21 Aug 2017 23:43:19 +0000 (17:43 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 16 Oct 2017 03:22:44 +0000 (03:22 +0000)
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 <james.a.nunez@intel.com>
Change-Id: I51f141b2542e65d1bc296cb2cb14c12f22afdcec
Reviewed-on: https://review.whamcloud.com/27980
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
lustre/tests/sanity.sh

index 2200a39..6ccaba7 100755 (executable)
@@ -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 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 ]] &&
 
 test_27wa() {
        [[ $OSTCOUNT -lt 2 ]] &&