]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
xfstests: change directory to / before _cleanup_testdir in test 135
authorBoris Ranto <branto@redhat.com>
Tue, 8 Mar 2011 13:29:20 +0000 (13:29 +0000)
committerAlex Elder <aelder@sgi.com>
Wed, 9 Mar 2011 20:52:45 +0000 (14:52 -0600)
Nfs tries to umount $testdir in _cleanup_testdir function. Tests 126
and 135 call the function from directory $SCRATCH_MNT that is equal
to $testdir (at least for nfs). The umount will therefore fail,
causing the test to fail due to the output mismatch.

Test 126 also does double a umount thanks to the call to _cleanup
before exit and the trap command.  So remove the unnecessary call of
the _cleanup function before exit.

Signed-off-by: Boris Ranto <branto@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
126
135

diff --git a/126 b/126
index 44db64c624ade77aca1ce84e22135a078fbbb6c0..c2348f4fc7b3366f7192ead28927d9043c2996a6 100755 (executable)
--- a/126
+++ b/126
@@ -34,6 +34,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 
 _cleanup()
 {
+    cd /
     _cleanup_testdir
 }
 
@@ -73,5 +74,4 @@ $QA_FS_PERMS 040 99 99 99 500 r 1
 $QA_FS_PERMS 400 99 99 200 99 r 1
 
 status=0
-_cleanup
 exit
diff --git a/135 b/135
index 915701fdf8d9868c49a2db9c42cc254cb9f81b25..976619de39c4461cfd4e5e5af154fb053bdf9eab 100755 (executable)
--- a/135
+++ b/135
@@ -34,6 +34,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 
 _cleanup()
 {
+    cd /
     _cleanup_testdir
 }