From 096a509b30314b778b51b97736ba44bee79af48c Mon Sep 17 00:00:00 2001 From: Elena Gryaznova Date: Wed, 24 May 2017 21:56:39 +0300 Subject: [PATCH] LU-7088 tests: merge sanityn test_1[a-d] into test_1 The sanity.sh test_1a, test_1b, test_1c, and test_1d cases could not be run independently. Merge these test cases to form a single test_1 that is self contained. Test-Parameters: trivial envdefinitions=ONLY=1 testlist=sanityn Seagate-bug-id: MRP-335 Signed-off-by: Kyrylo Shatskyy Signed-off-by: Elena Gryaznova Reviewed-by: Alexander Zarochentsev Change-Id: I7e550f4c34ef57ac8a2c6484f95731f61d17f86d Reviewed-on: https://review.whamcloud.com/16226 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Andreas Dilger --- lustre/tests/sanityn.sh | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/lustre/tests/sanityn.sh b/lustre/tests/sanityn.sh index 8275cc9..95027ea 100755 --- a/lustre/tests/sanityn.sh +++ b/lustre/tests/sanityn.sh @@ -61,29 +61,22 @@ check_runas_id $RUNAS_ID $RUNAS_GID $RUNAS build_test_filter -test_1a() { - touch $DIR1/f1 - [ -f $DIR2/f1 ] || error -} -run_test 1a "check create on 2 mtpt's ==========================" - -test_1b() { - chmod 777 $DIR2/f1 - $CHECKSTAT -t file -p 0777 $DIR1/f1 || error - chmod a-x $DIR2/f1 -} -run_test 1b "check attribute updates on 2 mtpt's ===============" +test_1() { + touch $DIR1/$tfile + [ -f $DIR2/$tfile ] || error "Check create" + chmod 777 $DIR2/$tfile + $CHECKSTAT -t file -p 0777 $DIR1/$tfile || + error "Check attribute update for 0777" -test_1c() { - $CHECKSTAT -t file -p 0666 $DIR1/f1 || error -} -run_test 1c "check after remount attribute updates on 2 mtpt's =" + chmod a-x $DIR2/$tfile + $CHECKSTAT -t file -p 0666 $DIR1/$tfile || + error "Check attribute update for 0666" -test_1d() { - rm $DIR2/f1 - $CHECKSTAT -a $DIR1/f1 || error + rm $DIR2/$tfile + $CHECKSTAT -a $DIR1/$tfile || + error "Check unlink - removes file on other mountpoint" } -run_test 1d "unlink on one mountpoint removes file on other ====" +run_test 1 "Check attribute updates on 2 mount points" test_2a() { touch $DIR1/f2a -- 1.8.3.1