summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichal Privoznik <mprivozn@redhat.com>2018-10-09 15:23:10 +0200
committerMichal Privoznik <mprivozn@redhat.com>2018-10-10 17:14:05 +0200
commit98ca1d52a2a871e1c068504450b4dc15db063ef4 (patch)
tree98ebdd6a3fe08e2659f6014933205a79723d2007 /tests
parenta7b4eb7d261255d70d90047ae34e8eea849053f2 (diff)
downloadlibvirt-98ca1d52a2a871e1c068504450b4dc15db063ef4.tar.gz
virFileIsSharedFSType: Detect direct mount points
If the given path is already a mount point (e.g. a bind mount of a file, or simply a direct mount point of a FS), then our code fails to detect that because the first thing it does is cutting off part after last slash '/'. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/virfiletest.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/virfiletest.c b/tests/virfiletest.c
index 22c163f0a0..42d918aecc 100644
--- a/tests/virfiletest.c
+++ b/tests/virfiletest.c
@@ -453,8 +453,7 @@ mymain(void)
DO_TEST_FILE_IS_SHARED_FS_TYPE("mounts1.txt", "/boot/vmlinuz", false);
DO_TEST_FILE_IS_SHARED_FS_TYPE("mounts2.txt", "/run/user/501/gvfs/some/file", false);
DO_TEST_FILE_IS_SHARED_FS_TYPE("mounts3.txt", "/nfs/file", true);
- /* TODO Detect bind mounts */
- DO_TEST_FILE_IS_SHARED_FS_TYPE("mounts3.txt", "/nfs/blah", true);
+ DO_TEST_FILE_IS_SHARED_FS_TYPE("mounts3.txt", "/nfs/blah", false);
return ret != 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}