[PATCH 05/11] vfs: Specify wether a test is run inside a userns or not

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



This bool that is initialized to false will be used in future pathces,
when we will reuse some existing tests to run them inside a userns and
with some fs-specific setup.

Signed-off-by: Rodrigo Campos <rodrigo@xxxxxxxxxxx>
---
 src/vfs/utils.h   | 2 ++
 src/vfs/vfstest.c | 1 +
 2 files changed, 3 insertions(+)

diff --git src/vfs/utils.h src/vfs/utils.h
index f1681737..4c796559 100644
--- src/vfs/utils.h
+++ src/vfs/utils.h
@@ -197,6 +197,8 @@ struct vfstest_info {
 	bool t_fs_allow_idmap;
 	/* whether user namespaces are supported */
 	bool t_has_userns;
+	/* whether this test is running inside a userns */
+	bool t_inside_userns;
 };
 
 struct test_struct {
diff --git src/vfs/vfstest.c src/vfs/vfstest.c
index 20ade869..3ec65dff 100644
--- src/vfs/vfstest.c
+++ src/vfs/vfstest.c
@@ -42,6 +42,7 @@ static void init_vfstest_info(struct vfstest_info *info)
 	info->t_mnt_scratch_fd		= -EBADF;
 	info->t_dir1_fd			= -EBADF;
 	info->t_fs_allow_idmap		= false;
+	info->t_inside_userns		= false;
 }
 
 static void stash_overflowuid(struct vfstest_info *info)
-- 
2.39.2




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux