aboutsummaryrefslogtreecommitdiff
path: root/tests/fs-tests
diff options
context:
space:
mode:
authorAdrian Hunter <ext-adrian.hunter@nokia.com>2008-06-05 14:11:29 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-06-16 18:02:31 +0300
commit3ab9b9e7af305169e3c60496b02902c79c2881c4 (patch)
tree893d5b9fed614c3b5a192d8e4735ad07235749ff /tests/fs-tests
parent41829562fd7687d37b953e184b1cb6edea9593f8 (diff)
fs-tests: preserve mount options when mounting again
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Diffstat (limited to 'tests/fs-tests')
-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 aaf3907..97e5207 100644
--- a/tests/fs-tests/lib/tests.c
+++ b/tests/fs-tests/lib/tests.c
@@ -995,7 +995,13 @@ void tests_remount(void)
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);