summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-11-05 20:37:55 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-11-05 20:58:55 +0100
commitd49d95df0a260aaca9a3fdd1e6ce535592a53bca (patch)
tree2e6c0d39f73c2ddea296ccad63ad81b1bf31df09 /src/test
parenttree-wide: time-out → timeout (diff)
downloadsystemd-d49d95df0a260aaca9a3fdd1e6ce535592a53bca.tar.xz
systemd-d49d95df0a260aaca9a3fdd1e6ce535592a53bca.zip
mount-util: introduce path_is_network_fs_harder()
It also detects e.g. glusterfs or mounts with "_netdev" option.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-mount-util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/test-mount-util.c b/src/test/test-mount-util.c
index 4f6da39f48..28d171de33 100644
--- a/src/test/test-mount-util.c
+++ b/src/test/test-mount-util.c
@@ -537,4 +537,11 @@ TEST(bind_mount_submounts) {
assert_se(umount_recursive(b, 0) >= 0);
}
+TEST(path_is_network_fs_harder) {
+ ASSERT_OK(path_is_network_fs_harder("/"));
+ ASSERT_OK_ZERO(path_is_network_fs_harder("/dev"));
+ ASSERT_OK_ZERO(path_is_network_fs_harder("/sys"));
+ ASSERT_OK_ZERO(path_is_network_fs_harder("/run"));
+}
+
DEFINE_TEST_MAIN(LOG_DEBUG);