Whamcloud - gitweb
LU-5208 tests: inject failure on the proper OST 75/11275/4
authorFan Yong <fan.yong@intel.com>
Sun, 22 Jun 2014 06:34:04 +0000 (14:34 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 25 Aug 2014 16:54:49 +0000 (16:54 +0000)
The old test scripts assumed that the file created by the MDS2 will
be striped to the OST2 and OST1, but such assumption is wrong. When
the OSTs reside on different OSS nodes, the sanity-lfsck test_18c
will get failure.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I755370e6a70384b5a70e046b1acc806e63817f6e
Reviewed-on: http://review.whamcloud.com/11275
Tested-by: Jenkins
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/tests/sanity-lfsck.sh

index 64cf16b..34ee6ed 100644 (file)
@@ -1739,8 +1739,7 @@ test_18c() {
 
        if [ $MDSCOUNT -ge 2 ]; then
                $LFS mkdir -i 1 $DIR/$tdir/a2
 
        if [ $MDSCOUNT -ge 2 ]; then
                $LFS mkdir -i 1 $DIR/$tdir/a2
-               $LFS setstripe -c 2 -i 1 -s 1M $DIR/$tdir/a2
-               do_facet ost2 $LCTL set_param fail_loc=0x1617
+               $LFS setstripe -c 1 -i 0 -s 1M $DIR/$tdir/a2
                dd if=/dev/zero of=$DIR/$tdir/a2/f2 bs=1M count=2
                $LFS getstripe $DIR/$tdir/a2/f2
        fi
                dd if=/dev/zero of=$DIR/$tdir/a2/f2 bs=1M count=2
                $LFS getstripe $DIR/$tdir/a2/f2
        fi
@@ -1790,7 +1789,7 @@ test_18c() {
        done
 
        if [ $MDSCOUNT -ge 2 ]; then
        done
 
        if [ $MDSCOUNT -ge 2 ]; then
-               expected=3
+               expected=2
        else
                expected=1
        fi
        else
                expected=1
        fi
@@ -1809,7 +1808,7 @@ test_18c() {
                        error "(5) Expect 0 fixed on mds2, but got: $repaired"
        fi
 
                        error "(5) Expect 0 fixed on mds2, but got: $repaired"
        fi
 
-       echo "There should be some stub under .lustre/lost+found/MDT0001/"
+       echo "There should NOT be some stub under .lustre/lost+found/MDT0001/"
        ls -ail $MOUNT/.lustre/lost+found/MDT0001/*-N-0 &&
                error "(6) .lustre/lost+found/MDT0001/ should be empty"
 
        ls -ail $MOUNT/.lustre/lost+found/MDT0001/*-N-0 &&
                error "(6) .lustre/lost+found/MDT0001/ should be empty"