diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-11-05 20:37:55 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-11-05 20:58:55 +0100 |
commit | d49d95df0a260aaca9a3fdd1e6ce535592a53bca (patch) | |
tree | 2e6c0d39f73c2ddea296ccad63ad81b1bf31df09 /src/test | |
parent | tree-wide: time-out → timeout (diff) | |
download | systemd-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.c | 7 |
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); |