[LU-7088] Tests sanityn/1b,1c,1d cannot be executed separatelly Created: 02/Sep/15  Updated: 03/Jun/17  Resolved: 03/Jun/17

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.10.0

Type: Bug Priority: Minor
Reporter: Aditya Pandit (Inactive) Assignee: WC Triage
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Tests sanityn/1b,1c,1d depends to sanityn/1a and cannot be executed separately via set ONLY parameter.
Here is excerpts from sanityn.sh:

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_1c() {
	$CHECKSTAT -t file -p 0666 $DIR1/f1 || error
}
run_test 1c "check after remount attribute updates on 2 mtpt's ="

test_1d() {
	rm $DIR2/f1
	$CHECKSTAT -a $DIR1/f1 || error
}

To make these test run without failures we can join each next test with each previous ones, or join all of them into single one.



 Comments   
Comment by Aditya Pandit (Inactive) [ 02/Sep/15 ]

This can be changed to:

@@ -75,29 +75,32 @@ build_test_filter
 mkdir -p $MOUNT2
 mount_client $MOUNT2

-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_1c() {
-       $CHECKSTAT -t file -p 0666 $DIR1/f1 || error
-}
-run_test 1c "check after remount attribute updates on 2 mtpt's ="
-
-test_1d() {
-       rm $DIR2/f1
-       $CHECKSTAT -a $DIR1/f1 || error
-}
-run_test 1d "unlink on one mountpoint removes file on other ===="
+test_1() {
+       touch $DIR1/$tfile
+       [ -f $DIR2/$tfile ] || {
+               error_noexit "Check create"
+               return
+       }
+
+       chmod 777 $DIR2/$tfile
+       $CHECKSTAT -t file -p 0777 $DIR1/$tfile || {
+               error_noexit "Check attribute update"
+               return
+       }
+
+       chmod a-x $DIR2/$tfile
+       $CHECKSTAT -t file -p 0666 $DIR1/$tfile || {
+               error_noexit "Check attribute update after remount"
+               return
+       }
+
+       rm $DIR2/$tfile
+       $CHECKSTAT -a $DIR1/$tfile || {
+               error_noexit "Unlink on one mountpoint removes file on other"
+               return
+       }
+}
+run_test 1 "Check attribute updates on 2 mtpt's"
Comment by Andreas Dilger [ 02/Sep/15 ]

It is better to just submit a patch to Gerrit, which will automatically be linked to this ticket and can then begin testing and review.

Comment by Andreas Dilger [ 02/Sep/15 ]

Note that the "update after remount" comment is incorrect in this case, since we can no longer remount the filesystem between the subtests. It should just be "... after chmod". You may as well also replace "2 mtpt's" with "two mount points" for clarity.

Comment by Gerrit Updater [ 03/Sep/15 ]

aditya.pandit (aditya.pandit@seagate.com) uploaded a new patch: http://review.whamcloud.com/16226
Subject: LU-7088 tests: sanityn/1b,1c,1d cannot execute separately
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: f443453d9e8b54902b3b15c91cec03a8c43d1ffb

Comment by Gerrit Updater [ 03/Jun/17 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/16226/
Subject: LU-7088 tests: merge sanityn test_1[a-d] into test_1
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 096a509b30314b778b51b97736ba44bee79af48c

Comment by Peter Jones [ 03/Jun/17 ]

Landed for 2.10

Generated at Sat Feb 10 02:05:53 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.