From 8199e6f7402ca2232de6f57b918d2b1fb9c224cb Mon Sep 17 00:00:00 2001 From: Amir Goldstein Date: Fri, 9 May 2025 15:32:39 +0200 Subject: selftests/filesystems: create setup_userns() helper Add helper to utils.c and use it in statmount userns tests. Reviewed-by: John Hubbard Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/20250509133240.529330-8-amir73il@gmail.com Reviewed-by: Christian Brauner Signed-off-by: Christian Brauner --- tools/testing/selftests/filesystems/utils.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/testing/selftests/filesystems/utils.h') diff --git a/tools/testing/selftests/filesystems/utils.h b/tools/testing/selftests/filesystems/utils.h index d9cf145b321a..70f7ccc607f4 100644 --- a/tools/testing/selftests/filesystems/utils.h +++ b/tools/testing/selftests/filesystems/utils.h @@ -27,6 +27,7 @@ extern int caps_down(void); extern int cap_down(cap_value_t down); extern bool switch_ids(uid_t uid, gid_t gid); +extern int setup_userns(void); static inline bool switch_userns(int fd, uid_t uid, gid_t gid, bool drop_caps) { -- cgit v1.2.3