All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Zorro Lang <zlang@redhat.com>, fstests <fstests@vger.kernel.org>
Cc: Christian Brauner <brauner@kernel.org>,
	Dave Chinner <david@fromorbit.com>,
	Eryu Guan <guaneryu@gmail.com>,
	Amir Goldstein <amir73il@gmail.com>,
	Christoph Hellwig <hch@lst.de>,
	"Darrick J. Wong" <djwong@kernel.org>
Subject: [PATCH v2 08/13] missing: move sys_execveat() to missing.h
Date: Thu, 12 May 2022 18:52:45 +0200	[thread overview]
Message-ID: <20220512165250.450989-9-brauner@kernel.org> (raw)
In-Reply-To: <20220512165250.450989-1-brauner@kernel.org>

The missing.h header provides syscalls potentially missing from the used
libc. Move the sys_execveat() definition into it. It doesn't belong into
vfstest.c.

Cc: Dave Chinner <david@fromorbit.com>
Cc: Amir Goldstein <amir73il@gmail.com>
Cc: Eryu Guan <guaneryu@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Zorro Lang <zlang@redhat.com>
Cc: "Darrick J. Wong" <djwong@kernel.org>
Cc: fstests <fstests@vger.kernel.org>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
---
 src/vfs/missing.h | 11 +++++++++++
 src/vfs/vfstest.c | 11 -----------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/vfs/missing.h b/src/vfs/missing.h
index c4f4cc32..059e742d 100644
--- a/src/vfs/missing.h
+++ b/src/vfs/missing.h
@@ -148,4 +148,15 @@ static inline int sys_umount2(const char *path, int flags)
 	return syscall(__NR_umount2, path, flags);
 }
 
+static inline int sys_execveat(int fd, const char *path, char **argv,
+			       char **envp, int flags)
+{
+#ifdef __NR_execveat
+	return syscall(__NR_execveat, fd, path, argv, envp, flags);
+#else
+	errno = ENOSYS;
+	return -1;
+#endif
+}
+
 #endif /* __IDMAP_MISSING_H */
diff --git a/src/vfs/vfstest.c b/src/vfs/vfstest.c
index 8a68565c..1d71b25b 100644
--- a/src/vfs/vfstest.c
+++ b/src/vfs/vfstest.c
@@ -226,17 +226,6 @@ __attribute__((unused)) static int print_r(int fd, const char *path)
 }
 #endif
 
-static int sys_execveat(int fd, const char *path, char **argv, char **envp,
-			int flags)
-{
-#ifdef __NR_execveat
-	return syscall(__NR_execveat, fd, path, argv, envp, flags);
-#else
-	errno = ENOSYS;
-	return -1;
-#endif
-}
-
 static void test_setup(struct vfstest_info *info)
 {
 	if (mkdirat(info->t_mnt_fd, T_DIR1, 0777))
-- 
2.34.1


  parent reply	other threads:[~2022-05-12 16:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 16:52 [PATCH v2 00/13] rename & split tests Christian Brauner
2022-05-12 16:52 ` [PATCH v2 01/13] idmapped-mounts: make all tests set their required feature flags Christian Brauner
2022-05-16  5:50   ` Christoph Hellwig
2022-05-12 16:52 ` [PATCH v2 02/13] src: rename idmapped-mounts folder Christian Brauner
2022-05-12 16:52 ` [PATCH v2 03/13] src/vfs: rename idmapped-mounts.c file Christian Brauner
2022-05-12 16:52 ` [PATCH v2 04/13] vfstest: rename struct t_idmapped_mounts Christian Brauner
2022-05-12 16:52 ` [PATCH v2 05/13] utils: add missing global.h include Christian Brauner
2022-05-12 16:52 ` [PATCH v2 07/13] utils: move helpers into utils Christian Brauner
2022-05-12 16:52 ` Christian Brauner [this message]
2022-05-12 16:52 ` [PATCH v2 09/13] utils: add struct test_suite Christian Brauner
2022-05-12 16:52 ` [PATCH v2 12/13] vfstest: split out remaining idmapped mount tests Christian Brauner
2022-05-12 16:52 ` [PATCH v2 13/13] vfs/idmapped-mounts: remove invalid test Christian Brauner
2022-05-16  5:53   ` Christoph Hellwig
2022-05-12 20:19 ` [PATCH v2 00/13] rename & split tests Zorro Lang
2022-05-14 17:59 ` Zorro Lang
2022-05-16  8:02   ` Christian Brauner
2022-05-21 23:13 ` Dave Chinner
2022-05-22  1:07   ` Jens Axboe
2022-05-22  2:19     ` Jens Axboe
2022-05-23  0:13       ` Dave Chinner
2022-05-23  0:57         ` Jens Axboe
2022-05-23 10:41           ` Dave Chinner
2022-05-23 12:28             ` Jens Axboe
2022-05-23  9:44   ` Christian Brauner

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=20220512165250.450989-9-brauner@kernel.org \
    --to=brauner@kernel.org \
    --cc=amir73il@gmail.com \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=hch@lst.de \
    --cc=zlang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.