Whamcloud - gitweb
LU-7088 tests: merge sanityn test_1[a-d] into test_1 26/16226/5
authorElena Gryaznova <elena.gryaznova@seagate.com>
Wed, 24 May 2017 18:56:39 +0000 (21:56 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 3 Jun 2017 03:57:41 +0000 (03:57 +0000)
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 <kyrylo.shatskyy@seagate.com>
Signed-off-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@seagate.com>
Change-Id: I7e550f4c34ef57ac8a2c6484f95731f61d17f86d
Reviewed-on: https://review.whamcloud.com/16226
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/tests/sanityn.sh

index 8275cc9..95027ea 100755 (executable)
@@ -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