aboutsummaryrefslogtreecommitdiffstats
path: root/test/testsudo_fileutils02.cpp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2022-08-31 06:54:10 +0200
committerSven Gothel <[email protected]>2022-08-31 06:54:10 +0200
commit4fe02b7ed25a3c3d89745a6b02d46f750d2649eb (patch)
tree69472677df5f996e2447248efad52183d04e865f /test/testsudo_fileutils02.cpp
parent1bf92eef97af186c9814c010a2510e0bbcf7186b (diff)
Complete full `jau::fs::mount()` and `umount()`
Diffstat (limited to 'test/testsudo_fileutils02.cpp')
-rw-r--r--test/testsudo_fileutils02.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/testsudo_fileutils02.cpp b/test/testsudo_fileutils02.cpp
index 7b9aabb..a6ee299 100644
--- a/test/testsudo_fileutils02.cpp
+++ b/test/testsudo_fileutils02.cpp
@@ -313,7 +313,12 @@ class TestFileUtil02 : TestFileUtilBase {
print_creds("pre-mount");
print_caps("pre-mount");
- mctx = jau::fs::mount_image(image_stats.path(), mount_point, "squashfs", /* MS_LAZYTIME | MS_NOATIME | */ MS_RDONLY, "");
+ jau::fs::mountflags_t flags = 0;
+#ifdef __linux__
+ flags |= jau::fs::mountflags_linux::MS_RDONLY;
+#endif
+ jau::fprintf_td(stderr, "MountFlags %" PRIu64 "\n", flags);
+ mctx = jau::fs::mount_image(image_stats.path(), mount_point, "squashfs", flags, "");
print_creds("post-mount");
print_caps("post-mount");
@@ -336,7 +341,12 @@ class TestFileUtil02 : TestFileUtilBase {
print_creds("pre-umount");
print_caps("pre-umount");
- umount_ok = jau::fs::umount(mctx);
+ jau::fs::umountflags_t flags = 0;
+#ifdef __linux__
+ flags |= jau::fs::umountflags_linux::MNT_DETACH; // lazy
+#endif
+ jau::fprintf_td(stderr, "UnmountFlags %d\n", flags);
+ umount_ok = jau::fs::umount(mctx, flags);
print_creds("post-umount");
print_caps("post-umount");