summaryrefslogtreecommitdiff
path: root/tests/fs-tests/lib
diff options
context:
space:
mode:
authorAdrian Hunter <ext-adrian.hunter@nokia.com>2008-09-08 11:39:29 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-09-08 13:15:02 +0300
commitfecc8c382b2b1e7ee567657785480da33e23f997 (patch)
tree38bd5bb59d678041b93372be7075617341b1cf52 /tests/fs-tests/lib
parent05bd6d8b3c6b56720830411b54bb00ef595769d7 (diff)
fs-tests: also preserve mount options when mounting again
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'tests/fs-tests/lib')
-rw-r--r--tests/fs-tests/lib/tests.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/fs-tests/lib/tests.c b/tests/fs-tests/lib/tests.c
index 570672f..68b42e4 100644
--- a/tests/fs-tests/lib/tests.c
+++ b/tests/fs-tests/lib/tests.c
@@ -1035,7 +1035,13 @@ static void tests_mnt(int mnt)
target = tests_file_system_mount_dir;
filesystemtype = tests_file_system_type;
mountflags = 0;
- data = NULL;
+ data = mount_info.mnt_opts;
+ if (data) {
+ if (strcmp(data, "rw") == 0)
+ data = NULL;
+ else if (strncmp(data, "rw,", 3) == 0)
+ data += 3;
+ }
CHECK(mount(source, target, filesystemtype, mountflags, data)
!= -1);
CHECK(chdir(cwd) != -1);