fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rodrigo Campos <rodrigo@sdfg.com.ar>
To: fstests@vger.kernel.org
Cc: Christian Brauner <brauner@kernel.org>,
	Giuseppe Scrivano <gscrivan@redhat.com>,
	Rodrigo Campos <rodrigo@sdfg.com.ar>
Subject: [PATCH v2 6/9] vfs: Prepare tests in &s_idmapped_mounts to be reused inside a userns
Date: Wed,  8 Mar 2023 12:13:40 +0100	[thread overview]
Message-ID: <20230308111343.510970-7-rodrigo@sdfg.com.ar> (raw)
In-Reply-To: <20230308111343.510970-1-rodrigo@sdfg.com.ar>

Future patches will call these tests within a userns. So, let's change
the makedev major/minor to something that works inside a userns.

Signed-off-by: Rodrigo Campos <rodrigo@sdfg.com.ar>
---
 src/vfs/idmapped-mounts.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git src/vfs/idmapped-mounts.c src/vfs/idmapped-mounts.c
index ed7948b6..eb0df938 100644
--- src/vfs/idmapped-mounts.c
+++ src/vfs/idmapped-mounts.c
@@ -535,7 +535,7 @@ static int fsids_mapped(const struct vfstest_info *info)
 			die("failure: create");
 
 		/* create character device */
-		if (mknodat(open_tree_fd, CHRDEV1, S_IFCHR | 0644, makedev(5, 1)))
+		if (mknodat(open_tree_fd, CHRDEV1, S_IFCHR | 0644, makedev(0, 0)))
 			die("failure: create");
 
 		/* create symlink */
@@ -764,7 +764,7 @@ static int expected_uid_gid_idmapped_mounts(const struct vfstest_info *info)
 	}
 
 	/* create character device */
-	if (mknodat(info->t_dir1_fd, CHRDEV1, S_IFCHR | 0644, makedev(5, 1))) {
+	if (mknodat(info->t_dir1_fd, CHRDEV1, S_IFCHR | 0644, makedev(0, 0))) {
 		log_stderr("failure: mknodat");
 		goto out;
 	}
-- 
2.39.2


  parent reply	other threads:[~2023-03-08 11:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-08 11:13 [PATCH v2 0/9] Tests for idmapped tmpfs Rodrigo Campos
2023-03-08 11:13 ` [PATCH v2 1/9] vfs: Don't open-code safe_close() Rodrigo Campos
2023-03-08 11:13 ` [PATCH v2 2/9] vfs: Fix documentation typo Rodrigo Campos
2023-03-08 11:13 ` [PATCH v2 3/9] vfs: Use tabs to indent, not spaces Rodrigo Campos
2023-03-13 10:39   ` Christian Brauner
2023-03-08 11:13 ` [PATCH v2 4/9] vfs: Fix race condition on get_userns_fd() Rodrigo Campos
2023-03-13 10:39   ` Christian Brauner
2023-03-08 11:13 ` [PATCH v2 5/9] vfs: Make switch_userns set PR_SET_DUMPABLE Rodrigo Campos
2023-03-08 11:13 ` Rodrigo Campos [this message]
2023-03-13 10:40   ` [PATCH v2 6/9] vfs: Prepare tests in &s_idmapped_mounts to be reused inside a userns Christian Brauner
2023-03-08 11:13 ` [PATCH v2 7/9] vfs: Make idmapped core tests public Rodrigo Campos
2023-03-08 11:13 ` [PATCH v2 8/9] vfs: Export test_setup() and test_cleanup() Rodrigo Campos
2023-03-13 10:41   ` Christian Brauner
2023-03-08 11:13 ` [PATCH v2 9/9] vfs: Add tmpfs tests for idmap mounts Rodrigo Campos
2023-03-13 10:50   ` Christian Brauner
2023-03-13 14:26     ` Zorro Lang
2023-03-13 16:21     ` Rodrigo Campos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230308111343.510970-7-rodrigo@sdfg.com.ar \
    --to=rodrigo@sdfg.com.ar \
    --cc=brauner@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=gscrivan@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).