Whamcloud - gitweb
LU-4204 tests: fix test_69 in conf-sanity 58/8158/7
authorBob Glossman <bob.glossman@intel.com>
Mon, 4 Nov 2013 15:46:20 +0000 (07:46 -0800)
committerAndreas Dilger <andreas.dilger@intel.com>
Tue, 26 Nov 2013 22:18:20 +0000 (22:18 +0000)
Recent commit added new test 69 to conf-sanity,
but calls test_68 by mistake. This patch fixes that typo.
In addition the test in its original form could never have worked.
There were several functional problems in it.
This patch fixes these up too.

Test-Parmeters: testlist=conf-sanity envdefinitions=SLOW=yes,ONLY=69

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I44d1e5f620a3e4cc14b59842abdd2f56ed409872
Reviewed-on: http://review.whamcloud.com/8158
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
lustre/tests/conf-sanity.sh

index 93dfacb..4a50781 100644 (file)
@@ -84,7 +84,7 @@ init_logging
 require_dsh_mds || exit 0
 require_dsh_ost || exit 0
 #
 require_dsh_mds || exit 0
 require_dsh_ost || exit 0
 #
-[ "$SLOW" = "no" ] && EXCEPT_SLOW="30a 31 45"
+[ "$SLOW" = "no" ] && EXCEPT_SLOW="30a 31 45 69"
 
 
 assert_DIR
 
 
 assert_DIR
@@ -3874,27 +3874,29 @@ test_69() {
        # not, then the OST will refuse to allow the MDS connect
        # because the LAST_ID value is too different from the MDS
        #define OST_MAX_PRECREATE=20000
        # not, then the OST will refuse to allow the MDS connect
        # because the LAST_ID value is too different from the MDS
        #define OST_MAX_PRECREATE=20000
-       local num_create=$((20000 * 3/2 - $last_id + 100))
+       local num_create=$((20000 * 5))
 
 
-       mkdir $DIR/$tdir
+       mkdir -p $DIR/$tdir
        $LFS setstripe -i 0 $DIR/$tdir
        $LFS setstripe -i 0 $DIR/$tdir
-       createmany $DIR/$tdir/$tfile- $num_create
+       createmany -o $DIR/$tdir/$tfile- $num_create
        # delete all of the files with objects on OST0 so the
        # filesystem is not inconsistent later on
        # delete all of the files with objects on OST0 so the
        # filesystem is not inconsistent later on
-       $LFS find $MOUNT --index 0 -print0 | xargs -0 unlink
+       $LFS find $MOUNT --ost 0 | xargs rm
 
        stop_ost || error "OST0 stop failure"
 
        stop_ost || error "OST0 stop failure"
-       add ost1 $(mkfs_opts ost1 $ostdev) --reformat --replace $ostdev ||
+       add ost1 $(mkfs_opts ost1 $(ostdevname 1)) --reformat --replace \
+               $(ostdevname 1) $(ostvdevname 1) ||
                error "reformat and replace $ostdev failed"
        start_ost || error "OST0 restart failure"
                error "reformat and replace $ostdev failed"
        start_ost || error "OST0 restart failure"
+       wait_osc_import_state mds ost FULL
 
        touch $DIR/$tdir/$tfile-last || error "create file after reformat"
 
        touch $DIR/$tdir/$tfile-last || error "create file after reformat"
-       local idx=$($LFS getstripe -c $DIR/$tdir/$tfile-last)
+       local idx=$($LFS getstripe -i $DIR/$tdir/$tfile-last)
        [ $idx -ne 0 ] && error "$DIR/$tdir/$tfile-last on $idx not 0" || true
 
        cleanup
 }
        [ $idx -ne 0 ] && error "$DIR/$tdir/$tfile-last on $idx not 0" || true
 
        cleanup
 }
-run_test 68 "replace an OST with the same index"
+run_test 69 "replace an OST with the same index"
 
 test_70a() {
        [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
 
 test_70a() {
        [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return