From: Bob Glossman Date: Mon, 4 Nov 2013 15:46:20 +0000 (-0800) Subject: LU-4204 tests: fix test_69 in conf-sanity X-Git-Tag: 2.5.52~42 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=fa53b0ff65a4f8915709dba63f463d5340c1c76e;hp=c0a57501d5610353ee4b1cc841ef7de2a92300bd LU-4204 tests: fix test_69 in conf-sanity 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 Change-Id: I44d1e5f620a3e4cc14b59842abdd2f56ed409872 Reviewed-on: http://review.whamcloud.com/8158 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Nathaniel Clark --- diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 93dfacb..4a50781 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -84,7 +84,7 @@ init_logging 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 @@ -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 - 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 - 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 - $LFS find $MOUNT --index 0 -print0 | xargs -0 unlink + $LFS find $MOUNT --ost 0 | xargs rm 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" + wait_osc_import_state mds ost FULL 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 } -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