diff options
| author | Christian Brauner <brauner@kernel.org> | 2026-09-11 14:58:39 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-09-11 15:00:37 +0200 |
| commit | 86cfbad9d7b3d2f6546dd3452aaade8022ac63ec (patch) | |
| tree | 5924676c17ec4532e24851fd3d65ff26240c6868 /kernel/tests | |
| parent | 34a496d638705dc227cc6dd2aaaa9e450893502f (diff) | |
userns: rename insert_extent() and sort_idmaps()
The KUnit test suite turned insert_extent() and sort_idmaps() into global
symbols and declared them in include/linux/user_namespace.h. That header
is pulled in nearly everywhere through linux/cgroup.h and the btrfs
self-tests carry a static insert_extent() of their own, so any config
with both test suites enabled fails to build:
fs/btrfs/tests/inode-tests.c:16:13: error: conflicting types for 'insert_extent'
include/linux/user_namespace.h:212:12: note: previous declaration of 'insert_extent'
A global symbol needs a prefix. Rename them to
uid_gid_map_insert_extent() and uid_gid_map_sort(). It's the better name
anyway.
No functional changes.
Fixes: f6f1a2496ba5 ("userns: Add KUnit test suite for uid_gid_map")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202609110843.okbPe7GM-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202609110937.zHKPPXJk-lkp@intel.com/
Link: https://patch.msgid.link/20260911-suggerieren-suchaktion-fliehen-87b9cdf1d169@brauner
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'kernel/tests')
| -rw-r--r-- | kernel/tests/user_ns_map_kunit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/tests/user_ns_map_kunit.c b/kernel/tests/user_ns_map_kunit.c index 24c21e43a36c..033dccc6a535 100644 --- a/kernel/tests/user_ns_map_kunit.c +++ b/kernel/tests/user_ns_map_kunit.c @@ -24,7 +24,7 @@ static void user_ns_map_insert(struct kunit *test) extent.lower_first = i * 100; extent.count = 5; - ret = insert_extent(&map, &extent); + ret = uid_gid_map_insert_extent(&map, &extent); KUNIT_ASSERT_EQ(test, ret, 0); } @@ -54,14 +54,14 @@ static void user_ns_map_insert_extended(struct kunit *test) extent.lower_first = value * 100; extent.count = 5; - ret = insert_extent(&map, &extent); + ret = uid_gid_map_insert_extent(&map, &extent); KUNIT_ASSERT_EQ(test, ret, 0); } KUNIT_EXPECT_EQ(test, map.nr_extents, NR_EXTENTS); /* Now sort the map to set up reverse mapping */ - ret = sort_idmaps(&map); + ret = uid_gid_map_sort(&map); KUNIT_ASSERT_EQ(test, ret, 0); KUNIT_ASSERT_NOT_ERR_OR_NULL(test, map.reverse); |
