From: Bobi Jam Date: Fri, 23 Aug 2013 16:56:45 +0000 (+0800) Subject: LU-3803 test: refine sanity test_161c X-Git-Tag: 2.4.92~38 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=ad2a34cc126ab470b15d454a5ce05126291f92ae LU-3803 test: refine sanity test_161c The test 161c is assume the $tdir will be in MDT0, but actually $tdir(161d) left by 161a and 161b will be on MDT1, which will make 161 fails, so delete $tdir before testing 161c. Add interop test condition. Add more console output infomation. Signed-off-by: Bobi Jam Change-Id: Id40c63c3c81d32565e393850c4448c30e0d2e693 Reviewed-on: http://review.whamcloud.com/7439 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: wangdi Reviewed-by: Andreas Dilger --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index b15303e..2312176 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -9479,15 +9479,19 @@ run_test 161b "link ea sanity under remote directory" test_161c() { [ $PARALLEL == "yes" ] && skip "skip parallel run" && return + [[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.1.5) ]] && + skip "Need MDS version at least 2.1.5" && return # define CLF_RENAME_LAST 0x0001 # rename overwrite a target having nlink = 1 (changelog flag 0x1) local USER=$(do_facet $SINGLEMDS $LCTL --device $MDT0 \ changelog_register -n) + rm -rf $DIR/$tdir mkdir -p $DIR/$tdir touch $DIR/$tdir/foo_161c touch $DIR/$tdir/bar_161c mv -f $DIR/$tdir/foo_161c $DIR/$tdir/bar_161c + $LFS changelog $MDT0 | grep RENME local flags=$($LFS changelog $MDT0 | grep RENME | tail -1 | \ cut -f5 -d' ') $LFS changelog_clear $MDT0 $USER 0 @@ -9504,6 +9508,7 @@ test_161c() { touch $DIR/$tdir/bar_161c ln $DIR/$tdir/bar_161c $DIR/$tdir/foobar_161c mv -f $DIR/$tdir/foo_161c $DIR/$tdir/bar_161c + $LFS changelog $MDT0 | grep RENME flags=$($LFS changelog $MDT0 | grep RENME | tail -1 | cut -f5 -d' ') $LFS changelog_clear $MDT0 $USER 0 if [ x$flags != "x0x0" ]; then @@ -9517,6 +9522,7 @@ test_161c() { # rename doesn't overwrite a target (changelog flag 0x0) touch $DIR/$tdir/foo_161c mv -f $DIR/$tdir/foo_161c $DIR/$tdir/foo2_161c + $LFS changelog $MDT0 | grep RENME flags=$($LFS changelog $MDT0 | grep RENME | tail -1 | cut -f5 -d' ') $LFS changelog_clear $MDT0 $USER 0 if [ x$flags != "x0x0" ]; then @@ -9530,6 +9536,7 @@ test_161c() { # define CLF_UNLINK_LAST 0x0001 # unlink a file having nlink = 1 (changelog flag 0x1) rm -f $DIR/$tdir/foo2_161c + $LFS changelog $MDT0 | grep UNLNK flags=$($LFS changelog $MDT0 | grep UNLNK | tail -1 | cut -f5 -d' ') $LFS changelog_clear $MDT0 $USER 0 if [ x$flags != "x0x1" ]; then @@ -9543,6 +9550,7 @@ test_161c() { # unlink a file having nlink > 1 (changelog flag 0x0) ln -f $DIR/$tdir/bar_161c $DIR/$tdir/foobar_161c rm -f $DIR/$tdir/foobar_161c + $LFS changelog $MDT0 | grep UNLNK flags=$($LFS changelog $MDT0 | grep UNLNK | tail -1 | cut -f5 -d' ') $LFS changelog_clear $MDT0 $USER 0 if [ x$flags != "x0x0" ]; then