All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] generic/4[13,62]: restore TEST mount options
@ 2017-10-30  8:08 Omer Zilberberg
  2017-10-30 20:36 ` Dave Chinner
  0 siblings, 1 reply; 11+ messages in thread
From: Omer Zilberberg @ 2017-10-30  8:08 UTC (permalink / raw)
  To: fstests; +Cc: Omer Zilberberg

These tests locally change the TEST_FS_MOUNT_OPTS/MOUNT_OPTIONS
environment variables, and run _test_cycle_mount. As a result, following
tests using the TEST mount point may start with different mount options,
depending on run order.

This patch restores the TEST mount point's options.

Signed-off-by: Omer Zilberberg <Omer.Zilberberg@netapp.com>
---
 tests/generic/413 | 7 +++++++
 tests/generic/462 | 5 +++++
 2 files changed, 12 insertions(+)

diff --git a/tests/generic/413 b/tests/generic/413
index a1cc51443..94633a4d4 100755
--- a/tests/generic/413
+++ b/tests/generic/413
@@ -136,6 +136,8 @@ fi
 _scratch_mkfs "$mkfs_opts" > /dev/null 2>&1
 
 # mount SCRATCH_DEV with dax option, TEST_DEV not
+mount_options_orig=$MOUNT_OPTIONS
+test_fs_mount_opts_orig=$TEST_FS_MOUNT_OPTS
 export MOUNT_OPTIONS=""
 export TEST_FS_MOUNT_OPTS=""
 _test_cycle_mount
@@ -147,6 +149,11 @@ tsize=$((128 * 1024 * 1024))
 
 do_tests
 
+# restore TEST_FS to original mount options
+export MOUNT_OPTIONS=$mount_options_orig
+export TEST_FS_MOUNT_OPTS=$test_fs_mount_opts_orig
+_test_cycle_mount
+
 # success, all done
 echo "Silence is golden"
 status=0
diff --git a/tests/generic/462 b/tests/generic/462
index a5d6c4f85..176035ddc 100755
--- a/tests/generic/462
+++ b/tests/generic/462
@@ -64,6 +64,7 @@ _scratch_mkfs >>$seqres.full 2>&1
 _scratch_mount "-o dax"
 
 # remount TEST_DEV wo/ dax
+test_fs_mount_opts_orig=$TEST_FS_MOUNT_OPTS
 export TEST_FS_MOUNT_OPTS=""
 _test_cycle_mount
 
@@ -90,6 +91,10 @@ md5_2="$(_md5_checksum $SCRATCH_MNT/readonlyfile)"
 
 [ "$md5_1" != "$md5_2" ] && echo "read only file changed"
 
+# restore TEST_FS to original mount options
+export TEST_FS_MOUNT_OPTS=$test_fs_mount_opts_orig
+_test_cycle_mount
+
 # success, all done
 status=0
 exit
-- 
2.13.6


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-11-05 14:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-30  8:08 [PATCH] generic/4[13,62]: restore TEST mount options Omer Zilberberg
2017-10-30 20:36 ` Dave Chinner
2017-10-31  4:37   ` Eryu Guan
2017-10-31 10:25     ` Omer Zilberberg
2017-10-31 11:34       ` Eryu Guan
2017-11-01 12:06         ` Omer Zilberberg
2017-11-01 12:52           ` Eryu Guan
2017-11-01 15:03             ` Omer Zilberberg
2017-11-02 12:13               ` Eryu Guan
2017-11-05 14:20                 ` Omer Zilberberg
2017-10-31 22:08     ` Dave Chinner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.