mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
selftests/filesystems: check listmount() with a U64_MAX cursor
Pass the largest possible mount id as the cursor and check that listmount() returns no entries instead of starting over at the first mount. Link: https://patch.msgid.link/20261021-work-mount-statmount_listns_fixes-v1-4-8917a4c1bd14@kernel.org Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
parent
95a5412022
commit
8c407f829a
|
|
@ -63,4 +63,15 @@ TEST(listmount_backward)
|
|||
}
|
||||
}
|
||||
|
||||
/* A cursor at the largest possible mount id must not wrap around. */
|
||||
TEST(listmount_cursor_max)
|
||||
{
|
||||
uint64_t list[LISTMNT_BUFFER];
|
||||
ssize_t nr_mounts;
|
||||
|
||||
nr_mounts = listmount(LSMT_ROOT, 0, UINT64_MAX, list,
|
||||
LISTMNT_BUFFER, 0);
|
||||
ASSERT_EQ(nr_mounts, 0);
|
||||
}
|
||||
|
||||
TEST_HARNESS_MAIN
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user