Lines Matching full:mount

10 #include <sys/mount.h>
21 #include <linux/mount.h>
220 if (mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, 0)) in prepare_unpriv_mountns()
380 ASSERT_EQ(mount("testing", "/tmp", "tmpfs", MS_NOATIME | MS_NODEV, in FIXTURE_SETUP()
385 ASSERT_EQ(mount("testing", "/tmp/B", "tmpfs", MS_NOATIME | MS_NODEV, in FIXTURE_SETUP()
394 ASSERT_EQ(mount("testing", "/tmp/B/BB", "tmpfs", MS_NOATIME | MS_NODEV, in FIXTURE_SETUP()
397 ASSERT_EQ(mount("testing", "/mnt", "tmpfs", MS_NOATIME | MS_NODEV, in FIXTURE_SETUP()
402 ASSERT_EQ(mount("testing", "/mnt/A", "tmpfs", MS_NOATIME | MS_NODEV, in FIXTURE_SETUP()
407 ASSERT_EQ(mount("/tmp", "/mnt/A/AA", NULL, MS_BIND | MS_REC, NULL), 0); in FIXTURE_SETUP()
411 ASSERT_EQ(mount("testing", "/mnt/B", "ramfs", in FIXTURE_SETUP()
416 ASSERT_EQ(mount("testing", "/tmp/B/BB", "devpts", in FIXTURE_SETUP()
631 * in the middle and the mount options need to be unchanged. in TEST_F()
679 * We're holding a fd open to a mount somwhere in the middle so this in TEST_F()
680 * needs to fail somewhere in the middle. After this the mount options in TEST_F()
910 /* Try to change mount options from multiple threads. */ in TEST_F()
1000 ASSERT_EQ(mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, 0), 0); in FIXTURE_SETUP()
1005 ASSERT_EQ(mount("testing", "/tmp", "tmpfs", MS_NOATIME | MS_NODEV, in FIXTURE_SETUP()
1012 ASSERT_EQ(mount("testing", "/tmp/B", "tmpfs", MS_NOATIME | MS_NODEV, in FIXTURE_SETUP()
1019 ASSERT_EQ(mount("testing", "/tmp/B/BB", "tmpfs", MS_NOATIME | MS_NODEV, in FIXTURE_SETUP()
1022 ASSERT_EQ(mount("testing", "/mnt", "tmpfs", MS_NOATIME | MS_NODEV, in FIXTURE_SETUP()
1027 ASSERT_EQ(mount("testing", "/mnt/A", "tmpfs", MS_NOATIME | MS_NODEV, in FIXTURE_SETUP()
1032 ASSERT_EQ(mount("/tmp", "/mnt/A/AA", NULL, MS_BIND | MS_REC, NULL), 0); in FIXTURE_SETUP()
1036 ASSERT_EQ(mount("testing", "/mnt/B", "ramfs", in FIXTURE_SETUP()
1041 ASSERT_EQ(mount("testing", "/tmp/B/BB", "devpts", in FIXTURE_SETUP()
1050 ASSERT_EQ(system("mount -o loop -t ext4 /mnt/C/ext4.img /mnt/D/"), 0); in FIXTURE_SETUP()
1074 TH_LOG("failure: created idmapped mount with negative fd"); in TEST_F()
1092 TH_LOG("failure: created idmapped mount with too large fd value"); in TEST_F()
1115 TH_LOG("failure: created idmapped mount with closed fd"); in TEST_F()
1227 * Validate that an attached mount in our mount namespace cannot be idmapped.
1228 * (The kernel enforces that the mount's mount namespace and the caller's mount
1262 * Validate that idmapping a mount is rejected if the mount's mount namespace
1263 * and our mount namespace don't match.
1264 * (The kernel enforces that the mount's mount namespace and the caller's mount
1301 * Validate that an attached mount in our mount namespace can be idmapped.
1321 /* Changing mount properties on a detached mount. */ in TEST_F()
1331 * Validate that a detached mount not in our mount namespace can be idmapped.
1353 /* Changing mount properties on a detached mount. */ in TEST_F()
1376 * Validate that currently changing the idmapping of an idmapped mount fails.
1407 /* Change idmapping on a detached mount that is already idmapped. */ in TEST_F()
1436 ASSERT_EQ(mount("testing", "/mnt/A", "ramfs", MS_NOATIME | MS_NODEV, in TEST_F()
1441 ASSERT_EQ(mount("/tmp", "/mnt/A/AA", NULL, MS_BIND | MS_REC, NULL), 0); in TEST_F()
1639 * The origin mount namespace of the anonymous mount namespace in TEST_F()
1640 * of @fd_tree_base doesn't match the caller's mount namespace in TEST_F()
1683 * located in a mount namespace that is owned by an ancestor in TEST_F()
1685 * detached mount must thus fail. in TEST_F()
1725 * The caller entered a new mount namespace. They will have in TEST_F()
1726 * CAP_SYS_ADMIN in the owning user namespace of their mount in TEST_F()
1729 * However, the origin mount namespace of the anonymous mount in TEST_F()
1730 * namespace of @fd_tree_base doesn't match the caller's mount in TEST_F()
1876 /* Attach the mount to the caller's mount namespace. */ in TEST_F()
1889 /* Not allowed to move an attached mount to a detached mount. */ in TEST_F()
1912 /* Attach the mount to the caller's mount namespace. */ in TEST_F()
1921 * This tests whether dissolve_on_fput() handles a NULL mount in TEST_F()
1953 * Move the source detached mount tree to the target detached in TEST_F()
1954 * mount tree. This will move all the mounts in the source mount in TEST_F()
1955 * tree from the source anonymous mount namespace to the target in TEST_F()
1956 * anonymous mount namespace. in TEST_F()
1958 * The source detached mount tree and the target detached mount in TEST_F()
1959 * tree now both refer to the same anonymous mount namespace. in TEST_F()
1970 * The source detached mount tree @fd_tree1 is now an attached in TEST_F()
1971 * mount, i.e., it has a parent. Specifically, it now has the in TEST_F()
1972 * root mount of the mount tree of @fd_tree2 as its parent. in TEST_F()
1975 * allow attaching the root of an anonymous mount tree, not in TEST_F()
1981 * Closing the source detached mount tree must not unmount and in TEST_F()
1982 * free the shared anonymous mount namespace. The kernel will in TEST_F()
1983 * quickly yell at us because the anonymous mount namespace in TEST_F()
1989 * Attach the mount tree to a non-anonymous mount namespace. in TEST_F()
1991 * semantics and didn't cause the anonymous mount namespace to in TEST_F()
2010 * Copy the following mount tree: in TEST_F()
2025 * that refers to the same detached mount tree as @fd_tree1 in TEST_F()
2033 * Copy the following mount tree: in TEST_F()
2043 * This must fail as this would mean adding the same mount tree in TEST_F()
2044 * into the same mount tree. in TEST_F()
2054 * Copy the following mount tree: in TEST_F()
2069 * refers to a subtree of the same detached mount tree as @fd_tree1 in TEST_F()
2078 * detached mount tree. in TEST_F()
2091 ASSERT_EQ(mount(NULL, "/mnt", NULL, MS_REC | MS_SHARED, NULL), 0); in TEST_F()
2094 * Copy the following mount tree: in TEST_F()
2113 * Copying the mount namespace like done above doesn't alter the in TEST_F()
2121 /* Mount a tmpfs filesystem over /mnt/A. */ in TEST_F()
2122 ASSERT_EQ(mount(NULL, "/mnt/A", "tmpfs", 0, NULL), 0); in TEST_F()
2131 * statx() that was taken from /mnt/A before the mount compared in TEST_F()
2132 * to one after the mount. in TEST_F()