summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2025-06-05 14:50:54 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2025-06-07 00:41:29 -0400
commit7054674ee9b9c0c62c2a254243f876f577d36db2 (patch)
tree5c5f8edf2bfc68aadbf5480083a95086fa320028 /tools
parent290da20e333955637f00647d9fff7c6e3c0b61e0 (diff)
selftests/mount_setattr: adapt detached mount propagation test
Make sure that detached trees don't receive mount propagation. Signed-off-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/mount_setattr/mount_setattr_test.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/tools/testing/selftests/mount_setattr/mount_setattr_test.c b/tools/testing/selftests/mount_setattr/mount_setattr_test.c
index 8b378c91debf..b1e4618399be 100644
--- a/tools/testing/selftests/mount_setattr/mount_setattr_test.c
+++ b/tools/testing/selftests/mount_setattr/mount_setattr_test.c
@@ -2079,24 +2079,9 @@ TEST_F(mount_setattr, detached_tree_propagation)
* means that the device information will be different for any
* statx() that was taken from /mnt/A before the mount compared
* to one after the mount.
- *
- * Since we already now that the device information between the
- * stx1 and stx2 samples are identical we also now that stx2 and
- * stx3 device information will necessarily differ.
*/
ASSERT_NE(stx1.stx_dev_minor, stx3.stx_dev_minor);
-
- /*
- * If mount propagation worked correctly then the tmpfs mount
- * that was created after the mount namespace was unshared will
- * have propagated onto /mnt/A in the detached mount tree.
- *
- * Verify that the device information for stx3 and stx4 are
- * identical. It is already established that stx3 is different
- * from both stx1 and stx2 sampled before the tmpfs mount was
- * done so if stx3 and stx4 are identical the proof is done.
- */
- ASSERT_EQ(stx3.stx_dev_minor, stx4.stx_dev_minor);
+ ASSERT_EQ(stx1.stx_dev_minor, stx4.stx_dev_minor);
EXPECT_EQ(close(fd_tree), 0);
}