ltp.lists.linux.it archive mirror
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] fanotify: Move safe_fanotify_init() + safe macro into fanotify.h
@ 2020-04-28 11:35 Petr Vorel
  2020-04-28 11:35 ` [LTP] [PATCH 2/2] fanotify: Test with tst_variant both raw syscall and libc Petr Vorel
  2020-10-14 13:46 ` [LTP] [PATCH 1/2] fanotify: Move safe_fanotify_init() + safe macro into fanotify.h Cyril Hrubis
  0 siblings, 2 replies; 13+ messages in thread
From: Petr Vorel @ 2020-04-28 11:35 UTC (permalink / raw)
  To: ltp

Fanotify code is used only in testcases/kernel/syscalls/fanotify/, which
justify breaking rule of having safe function and macro outside of
library. This will be further cleaned in next commit.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Hi,

patchset is based on Amir's patchset [1], which I'd prefer to have
merged before.

Kind regards,
Petr

[1] https://patchwork.ozlabs.org/project/ltp/list/?series=171631&state=*

 include/tst_safe_macros.h                     |  5 ----
 lib/tst_safe_macros.c                         | 24 -----------------
 testcases/kernel/syscalls/fanotify/fanotify.h | 27 ++++++++++++++++++-
 3 files changed, 26 insertions(+), 30 deletions(-)

diff --git a/include/tst_safe_macros.h b/include/tst_safe_macros.h
index c39d8768b..edaeef461 100644
--- a/include/tst_safe_macros.h
+++ b/include/tst_safe_macros.h
@@ -520,11 +520,6 @@ int safe_mincore(const char *file, const int lineno, void *start,
 #define SAFE_MINCORE(start, length, vec) \
 	safe_mincore(__FILE__, __LINE__, (start), (length), (vec))
 
-int safe_fanotify_init(const char *file, const int lineno,
-	unsigned int flags, unsigned int event_f_flags);
-#define SAFE_FANOTIFY_INIT(fan, mode)  \
-	safe_fanotify_init(__FILE__, __LINE__, (fan), (mode))
-
 int safe_personality(const char *filename, unsigned int lineno,
 		    unsigned long persona);
 #define SAFE_PERSONALITY(persona) safe_personality(__FILE__, __LINE__, persona)
diff --git a/lib/tst_safe_macros.c b/lib/tst_safe_macros.c
index dbdfcc5be..9a9c73d06 100644
--- a/lib/tst_safe_macros.c
+++ b/lib/tst_safe_macros.c
@@ -45,29 +45,6 @@ pid_t safe_getpgid(const char *file, const int lineno, pid_t pid)
 	return pgid;
 }
 
-int safe_fanotify_init(const char *file, const int lineno,
-	unsigned int flags, unsigned int event_f_flags)
-{
-	int rval;
-
-#ifdef HAVE_SYS_FANOTIFY_H
-	rval = fanotify_init(flags, event_f_flags);
-
-	if (rval == -1) {
-		if (errno == ENOSYS) {
-			tst_brk(TCONF,
-				"fanotify is not configured in this kernel.");
-		}
-		tst_brk(TBROK | TERRNO,
-			"%s:%d: fanotify_init() failed", file, lineno);
-	}
-#else
-	tst_brk(TCONF, "Header <sys/fanotify.h> is not present");
-#endif /* HAVE_SYS_FANOTIFY_H */
-
-	return rval;
-}
-
 int safe_personality(const char *filename, unsigned int lineno,
 		    unsigned long persona)
 {
@@ -96,7 +73,6 @@ int safe_setregid(const char *file, const int lineno,
 	return rval;
 }
 
-
 int safe_setreuid(const char *file, const int lineno,
 		  uid_t ruid, uid_t euid)
 {
diff --git a/testcases/kernel/syscalls/fanotify/fanotify.h b/testcases/kernel/syscalls/fanotify/fanotify.h
index a05f4a372..f74171c15 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify.h
+++ b/testcases/kernel/syscalls/fanotify/fanotify.h
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 /*
- * Copyright (c) 2012 Linux Test Project.  All Rights Reserved.
+ * Copyright (c) 2012-2020 Linux Test Project.  All Rights Reserved.
  * Author: Jan Kara, November 2013
  */
 
@@ -38,6 +38,31 @@ static long fanotify_mark(int fd, unsigned int flags, uint64_t mask,
 
 #endif /* HAVE_SYS_FANOTIFY_H */
 
+int safe_fanotify_init(const char *file, const int lineno,
+	unsigned int flags, unsigned int event_f_flags)
+{
+	int rval;
+
+#ifdef HAVE_SYS_FANOTIFY_H
+	rval = fanotify_init(flags, event_f_flags);
+
+	if (rval == -1) {
+		if (errno == ENOSYS) {
+			tst_brk(TCONF,
+				"fanotify is not configured in this kernel.");
+		}
+		tst_brk(TBROK | TERRNO,
+			"%s:%d: fanotify_init() failed", file, lineno);
+	}
+#else
+	tst_brk(TCONF, "Header <sys/fanotify.h> is not present");
+#endif /* HAVE_SYS_FANOTIFY_H */
+
+	return rval;
+}
+#define SAFE_FANOTIFY_INIT(fan, mode)  \
+	safe_fanotify_init(__FILE__, __LINE__, (fan), (mode))
+
 #ifndef FAN_REPORT_TID
 #define FAN_REPORT_TID		0x00000100
 #endif
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [LTP] [PATCH 2/2] fanotify: Test with tst_variant both raw syscall and libc
  2020-04-28 11:35 [LTP] [PATCH 1/2] fanotify: Move safe_fanotify_init() + safe macro into fanotify.h Petr Vorel
@ 2020-04-28 11:35 ` Petr Vorel
  2020-04-28 13:26   ` Amir Goldstein
  2020-10-14 13:49   ` Cyril Hrubis
  2020-10-14 13:46 ` [LTP] [PATCH 1/2] fanotify: Move safe_fanotify_init() + safe macro into fanotify.h Cyril Hrubis
  1 sibling, 2 replies; 13+ messages in thread
From: Petr Vorel @ 2020-04-28 11:35 UTC (permalink / raw)
  To: ltp

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Hi,

patchset is based on Amir's patchset [1], which I'd prefer to have
merged before.

libc wrappers for fanotify_init() and fanotify_mark() are trivial, so it
might not make sense to test both variants. WDYT?

Kind regards,
Petr

[1] https://patchwork.ozlabs.org/project/ltp/list/?series=171631&state=*

 testcases/kernel/syscalls/fanotify/fanotify.h | 55 ++++++++++---------
 .../kernel/syscalls/fanotify/fanotify01.c     | 27 +++++----
 .../kernel/syscalls/fanotify/fanotify02.c     | 13 +++--
 .../kernel/syscalls/fanotify/fanotify03.c     |  7 ++-
 .../kernel/syscalls/fanotify/fanotify04.c     | 27 +++++----
 .../kernel/syscalls/fanotify/fanotify05.c     |  7 ++-
 .../kernel/syscalls/fanotify/fanotify06.c     |  7 ++-
 .../kernel/syscalls/fanotify/fanotify07.c     |  7 ++-
 .../kernel/syscalls/fanotify/fanotify08.c     |  7 +++
 .../kernel/syscalls/fanotify/fanotify09.c     | 17 ++++--
 .../kernel/syscalls/fanotify/fanotify10.c     |  7 ++-
 .../kernel/syscalls/fanotify/fanotify11.c     |  7 ++-
 .../kernel/syscalls/fanotify/fanotify12.c     | 11 ++--
 .../kernel/syscalls/fanotify/fanotify13.c     |  9 ++-
 .../kernel/syscalls/fanotify/fanotify14.c     |  7 ++-
 .../kernel/syscalls/fanotify/fanotify15.c     |  5 +-
 .../kernel/syscalls/fanotify/fanotify16.c     | 15 +++--
 17 files changed, 147 insertions(+), 88 deletions(-)

diff --git a/testcases/kernel/syscalls/fanotify/fanotify.h b/testcases/kernel/syscalls/fanotify/fanotify.h
index f74171c15..18a5ca1a2 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify.h
+++ b/testcases/kernel/syscalls/fanotify/fanotify.h
@@ -8,55 +8,60 @@
 #define	__FANOTIFY_H__
 
 #include "config.h"
-#include <sys/statfs.h>
-#include <sys/types.h>
-#include <sys/stat.h>
 #include <errno.h>
 #include <fcntl.h>
-
-#if defined(HAVE_SYS_FANOTIFY_H)
-
 #include <sys/fanotify.h>
-
-#else /* HAVE_SYS_FANOTIFY_H */
-
-/* fanotify(7) wrappers */
-
+#include <sys/stat.h>
+#include <sys/statfs.h>
+#include <sys/types.h>
 #include <stdint.h>
 #include "lapi/syscalls.h"
 
-static int fanotify_init(unsigned int flags, unsigned int event_f_flags)
+#define TEST_VARIANTS 2
+
+static const char *variant_desc[] = {
+	"libc fanotify",
+	"fanotify syscall"
+};
+
+static inline int do_fanotify_init(unsigned int flags, unsigned int event_f_flags)
 {
-	return syscall(__NR_fanotify_init, flags, event_f_flags);
+	switch (tst_variant) {
+	case 0:
+		return fanotify_init(flags, event_f_flags);
+	case 1:
+		return syscall(__NR_fanotify_init, flags, event_f_flags);
+	}
+	return -1;
 }
 
-static long fanotify_mark(int fd, unsigned int flags, uint64_t mask,
+static inline long do_fanotify_mark(int fd, unsigned int flags, uint64_t mask,
                      int dfd, const char *pathname)
 {
-	return syscall(__NR_fanotify_mark, fd, flags, mask, dfd, pathname);
+	switch (tst_variant) {
+	case 0:
+		return fanotify_mark(fd, flags, mask, dfd, pathname);
+	case 1:
+		return syscall(__NR_fanotify_mark, fd, flags, mask, dfd, pathname);
+	}
+	return -1;
 }
 
-#endif /* HAVE_SYS_FANOTIFY_H */
-
 int safe_fanotify_init(const char *file, const int lineno,
 	unsigned int flags, unsigned int event_f_flags)
 {
 	int rval;
 
-#ifdef HAVE_SYS_FANOTIFY_H
-	rval = fanotify_init(flags, event_f_flags);
+	rval = do_fanotify_init(flags, event_f_flags);
 
 	if (rval == -1) {
-		if (errno == ENOSYS) {
+		if (errno == ENOSYS)
 			tst_brk(TCONF,
-				"fanotify is not configured in this kernel.");
-		}
+				"fanotify is not configured in this kernel");
+
 		tst_brk(TBROK | TERRNO,
 			"%s:%d: fanotify_init() failed", file, lineno);
 	}
-#else
-	tst_brk(TCONF, "Header <sys/fanotify.h> is not present");
-#endif /* HAVE_SYS_FANOTIFY_H */
 
 	return rval;
 }
diff --git a/testcases/kernel/syscalls/fanotify/fanotify01.c b/testcases/kernel/syscalls/fanotify/fanotify01.c
index 03e453f41..77c18e67f 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify01.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify01.c
@@ -88,7 +88,7 @@ static void test_fanotify(unsigned int n)
 
 	tst_res(TINFO, "Test #%d: %s", n, tc->tname);
 
-	fd_notify = fanotify_init(tc->init_flags, O_RDONLY);
+	fd_notify = do_fanotify_init(tc->init_flags, O_RDONLY);
 	if (fd_notify < 0) {
 		if (errno == EINVAL &&
 		    (tc->init_flags & FAN_REPORT_FID)) {
@@ -97,11 +97,11 @@ static void test_fanotify(unsigned int n)
 			return;
 		}
 		tst_brk(TBROK | TERRNO,
-			"fanotify_init (0x%x, O_RDONLY) "
+			"fanotify_init(0x%x, O_RDONLY) "
 			"failed", tc->init_flags);
 	}
 
-	if (fanotify_mark(fd_notify, FAN_MARK_ADD | mark->flag,
+	if (do_fanotify_mark(fd_notify, FAN_MARK_ADD | mark->flag,
 			  FAN_ACCESS | FAN_MODIFY | FAN_CLOSE | FAN_OPEN,
 			  AT_FDCWD, fname) < 0) {
 		if (errno == EINVAL && mark->flag == FAN_MARK_FILESYSTEM) {
@@ -110,7 +110,7 @@ static void test_fanotify(unsigned int n)
 			return;
 		}
 		tst_brk(TBROK | TERRNO,
-			"fanotify_mark (%d, FAN_MARK_ADD, FAN_ACCESS | %s | "
+			"fanotify_mark(%d, FAN_MARK_ADD, FAN_ACCESS | %s | "
 			"FAN_MODIFY | FAN_CLOSE | FAN_OPEN, AT_FDCWD, %s) "
 			"failed", fd_notify, mark->name, fname);
 	}
@@ -161,11 +161,11 @@ static void test_fanotify(unsigned int n)
 	 */
 
 	/* Ignore access events */
-	if (fanotify_mark(fd_notify,
+	if (do_fanotify_mark(fd_notify,
 			  FAN_MARK_ADD | mark->flag | FAN_MARK_IGNORED_MASK,
 			  FAN_ACCESS, AT_FDCWD, fname) < 0) {
 		tst_brk(TBROK | TERRNO,
-			"fanotify_mark (%d, FAN_MARK_ADD | %s | "
+			"fanotify_mark(%d, FAN_MARK_ADD | %s | "
 			"FAN_MARK_IGNORED_MASK, FAN_ACCESS, AT_FDCWD, %s) "
 			"failed", fd_notify, mark->name, fname);
 	}
@@ -211,11 +211,11 @@ static void test_fanotify(unsigned int n)
 	 * Now ignore open & close events regardless of file
 	 * modifications
 	 */
-	if (fanotify_mark(fd_notify, FAN_MARK_ADD | mark->flag |
+	if (do_fanotify_mark(fd_notify, FAN_MARK_ADD | mark->flag |
 			  FAN_MARK_IGNORED_MASK | FAN_MARK_IGNORED_SURV_MODIFY,
 			  FAN_OPEN | FAN_CLOSE, AT_FDCWD, fname) < 0) {
 		tst_brk(TBROK | TERRNO,
-			"fanotify_mark (%d, FAN_MARK_ADD | %s | "
+			"fanotify_mark(%d, FAN_MARK_ADD | %s | "
 			"FAN_MARK_IGNORED_MASK | FAN_MARK_IGNORED_SURV_MODIFY, "
 			"FAN_OPEN | FAN_CLOSE, AT_FDCWD, %s) failed",
 			fd_notify, mark->name, fname);
@@ -240,11 +240,11 @@ static void test_fanotify(unsigned int n)
 	len += ret;
 
 	/* Now remove open and close from ignored mask */
-	if (fanotify_mark(fd_notify,
+	if (do_fanotify_mark(fd_notify,
 			  FAN_MARK_REMOVE | mark->flag | FAN_MARK_IGNORED_MASK,
 			  FAN_OPEN | FAN_CLOSE, AT_FDCWD, fname) < 0) {
 		tst_brk(TBROK | TERRNO,
-			"fanotify_mark (%d, FAN_MARK_REMOVE | %s | "
+			"fanotify_mark(%d, FAN_MARK_REMOVE | %s | "
 			"FAN_MARK_IGNORED_MASK, FAN_OPEN | FAN_CLOSE, "
 			"AT_FDCWD, %s) failed", fd_notify,
 			mark->name, fname);
@@ -344,11 +344,11 @@ pass:
 
 	}
 	/* Remove mark to clear FAN_MARK_IGNORED_SURV_MODIFY */
-	if (fanotify_mark(fd_notify, FAN_MARK_REMOVE | mark->flag,
+	if (do_fanotify_mark(fd_notify, FAN_MARK_REMOVE | mark->flag,
 			  FAN_ACCESS | FAN_MODIFY | FAN_CLOSE | FAN_OPEN,
 			  AT_FDCWD, fname) < 0) {
 		tst_brk(TBROK | TERRNO,
-			"fanotify_mark (%d, FAN_MARK_REMOVE | %s, FAN_ACCESS | "
+			"fanotify_mark(%d, FAN_MARK_REMOVE | %s, FAN_ACCESS | "
 			"FAN_MODIFY | FAN_CLOSE | FAN_OPEN, AT_FDCWD, %s) "
 			"failed", fd_notify, mark->name, fname);
 	}
@@ -360,6 +360,8 @@ static void setup(void)
 {
 	int fd;
 
+	tst_res(TINFO, "Testing variant: %s", variant_desc[tst_variant]);
+
 	/* Check for kernel fanotify support */
 	fd = SAFE_FANOTIFY_INIT(FAN_CLASS_NOTIF, O_RDONLY);
 	SAFE_CLOSE(fd);
@@ -382,6 +384,7 @@ static struct tst_test test = {
 	.needs_root = 1,
 	.mount_device = 1,
 	.mntpoint = MOUNT_PATH,
+	.test_variants = TEST_VARIANTS,
 };
 
 #else
diff --git a/testcases/kernel/syscalls/fanotify/fanotify02.c b/testcases/kernel/syscalls/fanotify/fanotify02.c
index c578e0ae8..32c842804 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify02.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify02.c
@@ -46,12 +46,12 @@ void test01(void)
 
 	int tst_count = 0;
 
-	if (fanotify_mark(fd_notify, FAN_MARK_ADD, FAN_ACCESS |
+	if (do_fanotify_mark(fd_notify, FAN_MARK_ADD, FAN_ACCESS |
 			  FAN_MODIFY | FAN_CLOSE | FAN_OPEN |
 			  FAN_EVENT_ON_CHILD | FAN_ONDIR, AT_FDCWD,
 			  ".") < 0) {
 		tst_brk(TBROK | TERRNO,
-			"fanotify_mark (%d, FAN_MARK_ADD, FAN_ACCESS | "
+			"fanotify_mark(%d, FAN_MARK_ADD, FAN_ACCESS | "
 			"FAN_MODIFY | FAN_CLOSE | FAN_OPEN | "
 			"FAN_EVENT_ON_CHILD | FAN_ONDIR, AT_FDCWD, '.') "
 			"failed", fd_notify);
@@ -102,10 +102,10 @@ void test01(void)
 	/*
 	 * now remove child mark
 	 */
-	if (fanotify_mark(fd_notify, FAN_MARK_REMOVE,
+	if (do_fanotify_mark(fd_notify, FAN_MARK_REMOVE,
 			  FAN_EVENT_ON_CHILD, AT_FDCWD, ".") < 0) {
 		tst_brk(TBROK | TERRNO,
-			"fanotify_mark (%d, FAN_MARK REMOVE, "
+			"fanotify_mark(%d, FAN_MARK REMOVE, "
 			"FAN_EVENT_ON_CHILD, AT_FDCWD, '.') failed",
 			fd_notify);
 	}
@@ -190,6 +190,8 @@ void test01(void)
 
 static void setup(void)
 {
+	tst_res(TINFO, "Testing variant: %s", variant_desc[tst_variant]);
+
 	sprintf(fname, "fname_%d", getpid());
 	fd_notify = SAFE_FANOTIFY_INIT(FAN_CLASS_NOTIF, O_RDONLY);
 }
@@ -205,7 +207,8 @@ static struct tst_test test = {
 	.setup = setup,
 	.cleanup = cleanup,
 	.needs_tmpdir = 1,
-	.needs_root = 1
+	.needs_root = 1,
+	.test_variants = TEST_VARIANTS,
 };
 
 #else
diff --git a/testcases/kernel/syscalls/fanotify/fanotify03.c b/testcases/kernel/syscalls/fanotify/fanotify03.c
index 1ef1c206b..fdb0d0f58 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify03.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify03.c
@@ -215,7 +215,7 @@ static int setup_mark(unsigned int n)
 	fd_notify = SAFE_FANOTIFY_INIT(FAN_CLASS_CONTENT, O_RDONLY);
 
 	for (; i < ARRAY_SIZE(files); i++) {
-		if (fanotify_mark(fd_notify, FAN_MARK_ADD | mark->flag,
+		if (do_fanotify_mark(fd_notify, FAN_MARK_ADD | mark->flag,
 				  tc->mask, AT_FDCWD, files[i]) < 0) {
 			if (errno == EINVAL &&
 				(tc->mask & FAN_OPEN_EXEC_PERM &&
@@ -347,6 +347,8 @@ static void test_fanotify(unsigned int n)
 
 static void setup(void)
 {
+	tst_res(TINFO, "Testing variant: %s", variant_desc[tst_variant]);
+
 	sprintf(fname, MOUNT_PATH"/fname_%d", getpid());
 	SAFE_FILE_PRINTF(fname, "1");
 
@@ -373,7 +375,8 @@ static struct tst_test test = {
 	.needs_root = 1,
 	.mount_device = 1,
 	.mntpoint = MOUNT_PATH,
-	.resource_files = resource_files
+	.resource_files = resource_files,
+	.test_variants = TEST_VARIANTS,
 };
 
 #else
diff --git a/testcases/kernel/syscalls/fanotify/fanotify04.c b/testcases/kernel/syscalls/fanotify/fanotify04.c
index 722ad5d41..8b738b3ae 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify04.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify04.c
@@ -58,15 +58,15 @@ static char *expect_str_pass(int expect)
 static void check_mark(char *file, unsigned long long flag, char *flagstr,
 		       int expect, void (*test_event)(char *))
 {
-	if (fanotify_mark(fd_notify, FAN_MARK_ADD | flag, FAN_OPEN, AT_FDCWD,
+	if (do_fanotify_mark(fd_notify, FAN_MARK_ADD | flag, FAN_OPEN, AT_FDCWD,
 			  file) != expect) {
 		tst_res(TFAIL,
-			"fanotify_mark (%d, FAN_MARK_ADD | %s, FAN_OPEN, "
+			"fanotify_mark(%d, FAN_MARK_ADD | %s, FAN_OPEN, "
 			"AT_FDCWD, '%s') %s", fd_notify, flagstr, file,
 			expect_str_fail(expect));
 	} else {
 		tst_res(TPASS,
-			"fanotify_mark (%d, FAN_MARK_ADD | %s, FAN_OPEN, "
+			"fanotify_mark(%d, FAN_MARK_ADD | %s, FAN_OPEN, "
 			"AT_FDCWD, '%s') %s", fd_notify, flagstr, file,
 			expect_str_pass(expect));
 
@@ -77,10 +77,10 @@ static void check_mark(char *file, unsigned long long flag, char *flagstr,
 		if (test_event)
 			test_event(file);
 
-		if (fanotify_mark(fd_notify, FAN_MARK_REMOVE | flag,
+		if (do_fanotify_mark(fd_notify, FAN_MARK_REMOVE | flag,
 				  FAN_OPEN, AT_FDCWD, file) < 0) {
 			tst_brk(TBROK | TERRNO,
-				"fanotify_mark (%d, FAN_MARK_REMOVE | %s, "
+				"fanotify_mark(%d, FAN_MARK_REMOVE | %s, "
 				"FAN_OPEN, AT_FDCWD, '%s') failed",
 				fd_notify, flagstr, file);
 		}
@@ -191,16 +191,16 @@ void test01(void)
 	CHECK_MARK(sname, 0, 0, test_open_file);
 
 	/* Verify FAN_MARK_FLUSH destroys all inode marks */
-	if (fanotify_mark(fd_notify, FAN_MARK_ADD,
+	if (do_fanotify_mark(fd_notify, FAN_MARK_ADD,
 			  FAN_OPEN, AT_FDCWD, fname) < 0) {
 		tst_brk(TBROK | TERRNO,
-			"fanotify_mark (%d, FAN_MARK_ADD, FAN_OPEN, "
+			"fanotify_mark(%d, FAN_MARK_ADD, FAN_OPEN, "
 			"AT_FDCWD, '%s') failed", fd_notify, fname);
 	}
-	if (fanotify_mark(fd_notify, FAN_MARK_ADD,
+	if (do_fanotify_mark(fd_notify, FAN_MARK_ADD,
 			  FAN_OPEN | FAN_ONDIR, AT_FDCWD, dir) < 0) {
 		tst_brk(TBROK | TERRNO,
-			"fanotify_mark (%d, FAN_MARK_ADD, FAN_OPEN | "
+			"fanotify_mark(%d, FAN_MARK_ADD, FAN_OPEN | "
 			"FAN_ONDIR, AT_FDCWD, '%s') failed", fd_notify,
 			dir);
 	}
@@ -208,10 +208,10 @@ void test01(void)
 	verify_event(S_IFREG);
 	open_dir(dir);
 	verify_event(S_IFDIR);
-	if (fanotify_mark(fd_notify, FAN_MARK_FLUSH,
+	if (do_fanotify_mark(fd_notify, FAN_MARK_FLUSH,
 			  0, AT_FDCWD, ".") < 0) {
 		tst_brk(TBROK | TERRNO,
-			"fanotify_mark (%d, FAN_MARK_FLUSH, 0, "
+			"fanotify_mark(%d, FAN_MARK_FLUSH, 0, "
 			"AT_FDCWD, '.') failed", fd_notify);
 	}
 
@@ -223,6 +223,8 @@ static void setup(void)
 {
 	int fd;
 
+	tst_res(TINFO, "Testing variant: %s", variant_desc[tst_variant]);
+
 	sprintf(fname, "fname_%d", getpid());
 	fd = SAFE_OPEN(fname, O_RDWR | O_CREAT, 0644);
 	SAFE_CLOSE(fd);
@@ -248,7 +250,8 @@ static struct tst_test test = {
 	.setup = setup,
 	.cleanup = cleanup,
 	.needs_tmpdir = 1,
-	.needs_root = 1
+	.needs_root = 1,
+	.test_variants = TEST_VARIANTS,
 };
 
 #else
diff --git a/testcases/kernel/syscalls/fanotify/fanotify05.c b/testcases/kernel/syscalls/fanotify/fanotify05.c
index e53cc333a..24edec19c 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify05.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify05.c
@@ -104,13 +104,15 @@ void test01(void)
 
 static void setup(void)
 {
+	tst_res(TINFO, "Testing variant: %s", variant_desc[tst_variant]);
+
 	fd_notify = SAFE_FANOTIFY_INIT(FAN_CLASS_NOTIF | FAN_NONBLOCK,
 			O_RDONLY);
 
-	if (fanotify_mark(fd_notify, FAN_MARK_MOUNT | FAN_MARK_ADD, FAN_OPEN,
+	if (do_fanotify_mark(fd_notify, FAN_MARK_MOUNT | FAN_MARK_ADD, FAN_OPEN,
 			  AT_FDCWD, MOUNT_PATH) < 0) {
 		tst_brk(TBROK | TERRNO,
-			"fanotify_mark (%d, FAN_MARK_MOUNT | FAN_MARK_ADD, "
+			"fanotify_mark(%d, FAN_MARK_MOUNT | FAN_MARK_ADD, "
 			"FAN_OPEN, AT_FDCWD, \".\") failed",
 			fd_notify);
 	}
@@ -129,6 +131,7 @@ static struct tst_test test = {
 	.needs_root = 1,
 	.mount_device = 1,
 	.mntpoint = MOUNT_PATH,
+	.test_variants = TEST_VARIANTS,
 };
 #else
 	TST_TEST_TCONF("system doesn't have required fanotify support");
diff --git a/testcases/kernel/syscalls/fanotify/fanotify06.c b/testcases/kernel/syscalls/fanotify/fanotify06.c
index 99e312a4f..85dbe5b82 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify06.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify06.c
@@ -87,7 +87,7 @@ static void create_fanotify_groups(void)
 							     O_RDONLY);
 
 			/* Add mount mark for each group */
-			ret = fanotify_mark(fd_notify[p][i],
+			ret = do_fanotify_mark(fd_notify[p][i],
 					    FAN_MARK_ADD | FAN_MARK_MOUNT,
 					    FAN_MODIFY,
 					    AT_FDCWD, fname);
@@ -100,7 +100,7 @@ static void create_fanotify_groups(void)
 			/* Add ignore mark for groups with higher priority */
 			if (p == 0)
 				continue;
-			ret = fanotify_mark(fd_notify[p][i],
+			ret = do_fanotify_mark(fd_notify[p][i],
 					    FAN_MARK_ADD |
 					    FAN_MARK_IGNORED_MASK |
 					    FAN_MARK_IGNORED_SURV_MODIFY,
@@ -236,6 +236,8 @@ void test_fanotify(unsigned int n)
 
 static void setup(void)
 {
+	tst_res(TINFO, "Testing variant: %s", variant_desc[tst_variant]);
+
 	ovl_mounted = TST_MOUNT_OVERLAY();
 }
 
@@ -255,6 +257,7 @@ static struct tst_test test = {
 	.needs_root = 1,
 	.mount_device = 1,
 	.mntpoint = mntpoint,
+	.test_variants = TEST_VARIANTS,
 	.tags = (const struct tst_tag[]) {
 		{"linux-git", "8edc6e1688fc"},
 		{"linux-git", "d989903058a8"},
diff --git a/testcases/kernel/syscalls/fanotify/fanotify07.c b/testcases/kernel/syscalls/fanotify/fanotify07.c
index c2e185710..be42d1a0b 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify07.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify07.c
@@ -103,7 +103,7 @@ static int setup_instance(void)
 
 	fd = SAFE_FANOTIFY_INIT(FAN_CLASS_CONTENT, O_RDONLY);
 
-	if (fanotify_mark(fd, FAN_MARK_ADD, FAN_ACCESS_PERM, AT_FDCWD,
+	if (do_fanotify_mark(fd, FAN_MARK_ADD, FAN_ACCESS_PERM, AT_FDCWD,
 			  fname) < 0) {
 		close(fd);
 		if (errno == EINVAL) {
@@ -112,7 +112,7 @@ static int setup_instance(void)
 				"configured in kernel?");
 		} else {
 			tst_brk(TBROK | TERRNO,
-				"fanotify_mark (%d, FAN_MARK_ADD, FAN_ACCESS_PERM, "
+				"fanotify_mark(%d, FAN_MARK_ADD, FAN_ACCESS_PERM, "
 				"AT_FDCWD, %s) failed.", fd, fname);
 		}
 	}
@@ -195,6 +195,8 @@ static void test_fanotify(void)
 
 static void setup(void)
 {
+	tst_res(TINFO, "Testing variant: %s", variant_desc[tst_variant]);
+
 	sprintf(fname, "fname_%d", getpid());
 	SAFE_FILE_PRINTF(fname, "%s", fname);
 }
@@ -212,6 +214,7 @@ static struct tst_test test = {
 	.needs_tmpdir = 1,
 	.forks_child = 1,
 	.needs_root = 1,
+	.test_variants = TEST_VARIANTS,
 };
 
 #else
diff --git a/testcases/kernel/syscalls/fanotify/fanotify08.c b/testcases/kernel/syscalls/fanotify/fanotify08.c
index a4031b4ad..b61a5509a 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify08.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify08.c
@@ -43,6 +43,11 @@ static void test_init_bit(unsigned int fan_bit,
 	SAFE_CLOSE(fd_notify);
 }
 
+static void setup(void)
+{
+	tst_res(TINFO, "Testing variant: %s", variant_desc[tst_variant]);
+}
+
 static void run(unsigned int i)
 {
 	switch (i) {
@@ -64,8 +69,10 @@ static void cleanup(void)
 static struct tst_test test = {
 	.test = run,
 	.tcnt = 2,
+	.setup = setup,
 	.cleanup = cleanup,
 	.needs_root = 1,
+	.test_variants = TEST_VARIANTS,
 };
 
 #else
diff --git a/testcases/kernel/syscalls/fanotify/fanotify09.c b/testcases/kernel/syscalls/fanotify/fanotify09.c
index 4336f498f..a023cd8f6 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify09.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify09.c
@@ -50,6 +50,7 @@
 static char fname[BUF_SIZE];
 static char symlnk[BUF_SIZE];
 static char fdpath[BUF_SIZE];
+static char mntpoint[BUF_SIZE];
 static int fd_notify[NUM_GROUPS];
 
 static char event_buf[EVENT_BUF_LEN];
@@ -96,7 +97,7 @@ static void create_fanotify_groups(unsigned int ondir)
 
 		/* Add mount mark for each group without MODIFY event */
 		onchild = (i == 0) ? FAN_EVENT_ON_CHILD | ondir : 0;
-		ret = fanotify_mark(fd_notify[i],
+		ret = do_fanotify_mark(fd_notify[i],
 				    FAN_MARK_ADD | FAN_MARK_MOUNT,
 				    FAN_CLOSE_NOWRITE | onchild,
 				    AT_FDCWD, ".");
@@ -114,7 +115,7 @@ static void create_fanotify_groups(unsigned int ondir)
 		 * setting the DCACHE_FSNOTIFY_PARENT_WATCHED dentry
 		 * flag.
 		 */
-		ret = fanotify_mark(fd_notify[i], FAN_MARK_ADD,
+		ret = do_fanotify_mark(fd_notify[i], FAN_MARK_ADD,
 				    FAN_MODIFY | ondir | onchild,
 				    AT_FDCWD, ".");
 		if (ret < 0) {
@@ -256,10 +257,13 @@ static void test_fanotify(unsigned int n)
 
 static void setup(void)
 {
-	SAFE_MKDIR(MOUNT_NAME, 0755);
-	SAFE_MOUNT(MOUNT_NAME, MOUNT_NAME, "none", MS_BIND, NULL);
+	tst_res(TINFO, "Testing variant: %s", variant_desc[tst_variant]);
+
+	sprintf(mntpoint, "%s_%d", MOUNT_NAME, tst_variant);
+	SAFE_MKDIR(mntpoint, 0755);
+	SAFE_MOUNT(mntpoint, mntpoint, "none", MS_BIND, NULL);
 	mount_created = 1;
-	SAFE_CHDIR(MOUNT_NAME);
+	SAFE_CHDIR(mntpoint);
 	SAFE_MKDIR(DIR_NAME, 0755);
 
 	sprintf(fname, "tfile_%d", getpid());
@@ -272,7 +276,7 @@ static void cleanup(void)
 
 	SAFE_CHDIR("../");
 
-	if (mount_created && tst_umount(MOUNT_NAME) < 0)
+	if (mount_created && tst_umount(mntpoint) < 0)
 		tst_brk(TBROK | TERRNO, "umount failed");
 }
 
@@ -283,6 +287,7 @@ static struct tst_test test = {
 	.cleanup = cleanup,
 	.needs_tmpdir = 1,
 	.needs_root = 1,
+	.test_variants = TEST_VARIANTS,
 	.tags = (const struct tst_tag[]) {
 		{"linux-git", "54a307ba8d3c"},
 		{"linux-git", "b469e7e47c8a"},
diff --git a/testcases/kernel/syscalls/fanotify/fanotify10.c b/testcases/kernel/syscalls/fanotify/fanotify10.c
index ef0807761..eb7e4efcf 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify10.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify10.c
@@ -213,7 +213,7 @@ static int create_fanotify_groups(unsigned int n)
 							     O_RDONLY);
 
 			/* Add mark for each group */
-			ret = fanotify_mark(fd_notify[p][i],
+			ret = do_fanotify_mark(fd_notify[p][i],
 					    FAN_MARK_ADD | mark->flag,
 					    tc->expected_mask_without_ignore,
 					    AT_FDCWD, tc->mark_path);
@@ -241,7 +241,7 @@ static int create_fanotify_groups(unsigned int n)
 			/* Add ignore mark for groups with higher priority */
 			if (p == 0)
 				continue;
-			ret = fanotify_mark(fd_notify[p][i],
+			ret = do_fanotify_mark(fd_notify[p][i],
 					    FAN_MARK_ADD | ignore_mark->flag |
 					    FAN_MARK_IGNORED_MASK |
 					    FAN_MARK_IGNORED_SURV_MODIFY,
@@ -408,6 +408,8 @@ cleanup:
 
 static void setup(void)
 {
+	tst_res(TINFO, "Testing variant: %s", variant_desc[tst_variant]);
+
 	/* Create another bind mount at another path for generating events */
 	SAFE_MKDIR(MNT2_PATH, 0755);
 	SAFE_MOUNT(MOUNT_PATH, MNT2_PATH, "none", MS_BIND, NULL);
@@ -443,6 +445,7 @@ static struct tst_test test = {
 	.needs_root = 1,
 	.forks_child = 1,
 	.resource_files = resource_files,
+	.test_variants = TEST_VARIANTS,
 	.tags = (const struct tst_tag[]) {
 		{"linux-git", "9bdda4e9cf2d"},
 		{}
diff --git a/testcases/kernel/syscalls/fanotify/fanotify11.c b/testcases/kernel/syscalls/fanotify/fanotify11.c
index 9e8606c72..b8da46eff 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify11.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify11.c
@@ -65,7 +65,7 @@ void test01(unsigned int i)
 			i, (tcases[i] & FAN_REPORT_TID) ? "with" : "without",
 			tgid, tid, event.pid);
 
-	fd_notify = fanotify_init(tcases[i], 0);
+	fd_notify = do_fanotify_init(tcases[i], 0);
 	if (fd_notify < 0) {
 		if (errno == EINVAL && (tcases[i] & FAN_REPORT_TID)) {
 			tst_res(TCONF,
@@ -76,7 +76,7 @@ void test01(unsigned int i)
 				tcases[i]);
 	}
 
-	ret = fanotify_mark(fd_notify, FAN_MARK_ADD,
+	ret = do_fanotify_mark(fd_notify, FAN_MARK_ADD,
 			FAN_ALL_EVENTS | FAN_EVENT_ON_CHILD, AT_FDCWD, ".");
 	if (ret != 0)
 		tst_brk(TBROK, "fanotify_mark FAN_MARK_ADD fail ret=%d", ret);
@@ -102,6 +102,8 @@ static void setup(void)
 {
 	int fd;
 
+	tst_res(TINFO, "Testing variant: %s", variant_desc[tst_variant]);
+
 	fd = SAFE_FANOTIFY_INIT(FAN_CLASS_NOTIF, O_RDONLY);
 	SAFE_CLOSE(fd);
 }
@@ -112,6 +114,7 @@ static struct tst_test test = {
 	.tcnt =  ARRAY_SIZE(tcases),
 	.needs_tmpdir = 1,
 	.needs_root = 1,
+	.test_variants = TEST_VARIANTS,
 };
 
 #else
diff --git a/testcases/kernel/syscalls/fanotify/fanotify12.c b/testcases/kernel/syscalls/fanotify/fanotify12.c
index fcb7ec0d3..24fb712d4 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify12.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify12.c
@@ -139,7 +139,7 @@ static int setup_mark(unsigned int n)
 
 	for (; i < ARRAY_SIZE(files); i++) {
 		/* Setup normal mark on object */
-		if (fanotify_mark(fd_notify, FAN_MARK_ADD | mark->flag,
+		if (do_fanotify_mark(fd_notify, FAN_MARK_ADD | mark->flag,
 					tc->mask, AT_FDCWD, files[i]) < 0) {
 			if (errno == EINVAL && tc->mask & FAN_OPEN_EXEC) {
 				tst_res(TCONF,
@@ -163,7 +163,7 @@ static int setup_mark(unsigned int n)
 
 		/* Setup ignore mark on object */
 		if (tc->ignore_mask) {
-			if (fanotify_mark(fd_notify, FAN_MARK_ADD | mark->flag
+			if (do_fanotify_mark(fd_notify, FAN_MARK_ADD | mark->flag
 						| FAN_MARK_IGNORED_MASK,
 						tc->ignore_mask, AT_FDCWD,
 						files[i]) < 0) {
@@ -180,7 +180,7 @@ static int setup_mark(unsigned int n)
 						"kernel?");
 				} else {
 					tst_brk(TBROK | TERRNO,
-						"fanotify_mark (%d, "
+						"fanotify_mark(%d, "
 						"FAN_MARK_ADD | %s "
 						"| FAN_MARK_IGNORED_MASK, "
 						"%llx, AT_FDCWD, %s) failed",
@@ -253,6 +253,8 @@ cleanup:
 
 static void do_setup(void)
 {
+	tst_res(TINFO, "Testing variant: %s", variant_desc[tst_variant]);
+
 	sprintf(fname, "fname_%d", getpid());
 	SAFE_FILE_PRINTF(fname, "1");
 }
@@ -275,7 +277,8 @@ static struct tst_test test = {
 	.cleanup = do_cleanup,
 	.forks_child = 1,
 	.needs_root = 1,
-	.resource_files = resource_files
+	.resource_files = resource_files,
+	.test_variants = TEST_VARIANTS,
 };
 #else
 	TST_TEST_TCONF("System does not contain required fanotify support");
diff --git a/testcases/kernel/syscalls/fanotify/fanotify13.c b/testcases/kernel/syscalls/fanotify/fanotify13.c
index 3d8de6009..065aac646 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify13.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify13.c
@@ -121,7 +121,7 @@ static int setup_marks(unsigned int fd, struct test_case_t *tc)
 	struct fanotify_mark_type *mark = &tc->mark;
 
 	for (i = 0; i < ARRAY_SIZE(objects); i++) {
-		if (fanotify_mark(fd, FAN_MARK_ADD | mark->flag, tc->mask,
+		if (do_fanotify_mark(fd, FAN_MARK_ADD | mark->flag, tc->mask,
 					AT_FDCWD, objects[i].path) == -1) {
 			if (errno == EINVAL &&
 				mark->flag & FAN_MARK_FILESYSTEM) {
@@ -167,7 +167,7 @@ static void do_test(unsigned int number)
 		"Test #%d: FAN_REPORT_FID with mark flag: %s",
 		number, mark->name);
 
-	fanotify_fd = fanotify_init(FAN_CLASS_NOTIF | FAN_REPORT_FID, O_RDONLY);
+	fanotify_fd = do_fanotify_init(FAN_CLASS_NOTIF | FAN_REPORT_FID, O_RDONLY);
 	if (fanotify_fd == -1) {
 		if (errno == EINVAL) {
 			tst_res(TCONF,
@@ -285,6 +285,8 @@ out:
 
 static void do_setup(void)
 {
+	tst_res(TINFO, "Testing variant: %s", variant_desc[tst_variant]);
+
 	/* Check for kernel fanotify support */
 	nofid_fd = SAFE_FANOTIFY_INIT(FAN_CLASS_NOTIF, O_RDONLY);
 
@@ -296,7 +298,7 @@ static void do_setup(void)
 	 * uninitialized connector->fsid cache. This mark remains for all test
 	 * cases and is not expected to get any events (no writes in this test).
 	 */
-	if (fanotify_mark(nofid_fd, FAN_MARK_ADD, FAN_CLOSE_WRITE, AT_FDCWD,
+	if (do_fanotify_mark(nofid_fd, FAN_MARK_ADD, FAN_CLOSE_WRITE, AT_FDCWD,
 			  FILE_PATH_ONE) == -1) {
 		tst_brk(TBROK | TERRNO,
 			"fanotify_mark(%d, FAN_MARK_ADD, FAN_CLOSE_WRITE, "
@@ -325,6 +327,7 @@ static struct tst_test test = {
 	.mount_device = 1,
 	.mntpoint = MOUNT_PATH,
 	.all_filesystems = 1,
+	.test_variants = TEST_VARIANTS,
 	.tags = (const struct tst_tag[]) {
 		{"linux-git", "c285a2f01d69"},
 		{}
diff --git a/testcases/kernel/syscalls/fanotify/fanotify14.c b/testcases/kernel/syscalls/fanotify/fanotify14.c
index 3ca38d1e7..d78c3f3ca 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify14.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify14.c
@@ -96,7 +96,7 @@ static void do_test(unsigned int number)
 		goto out;
 	}
 
-	ret = fanotify_mark(fanotify_fd, FAN_MARK_ADD | tc->mark_flags,
+	ret = do_fanotify_mark(fanotify_fd, FAN_MARK_ADD | tc->mark_flags,
 				tc->mask, AT_FDCWD, FILE1);
 	if (ret < 0) {
 		/*
@@ -146,6 +146,8 @@ static void do_setup(void)
 {
 	int fd;
 
+	tst_res(TINFO, "Testing variant: %s", variant_desc[tst_variant]);
+
 	/* Check for kernel fanotify support */
 	fd = SAFE_FANOTIFY_INIT(FAN_CLASS_NOTIF, O_RDONLY);
 	SAFE_CLOSE(fd);
@@ -168,7 +170,8 @@ static struct tst_test test = {
 	.cleanup = do_cleanup,
 	.mount_device = 1,
 	.mntpoint = MNTPOINT,
-	.all_filesystems = 1
+	.all_filesystems = 1,
+	.test_variants = TEST_VARIANTS,
 };
 
 #else
diff --git a/testcases/kernel/syscalls/fanotify/fanotify15.c b/testcases/kernel/syscalls/fanotify/fanotify15.c
index c95c1ec15..7aebe19c7 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify15.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify15.c
@@ -88,7 +88,7 @@ static void do_test(unsigned int number)
 		number, mark->name);
 
 
-	if (fanotify_mark(fanotify_fd, FAN_MARK_ADD | mark->flag, tc->mask |
+	if (do_fanotify_mark(fanotify_fd, FAN_MARK_ADD | mark->flag, tc->mask |
 				FAN_CREATE | FAN_DELETE | FAN_MOVE |
 				FAN_MODIFY | FAN_ONDIR,
 				AT_FDCWD, TEST_DIR) == -1) {
@@ -296,6 +296,8 @@ static void do_setup(void)
 {
 	int fd;
 
+	tst_res(TINFO, "Testing variant: %s", variant_desc[tst_variant]);
+
 	/* Check kernel for fanotify support */
 	fd = SAFE_FANOTIFY_INIT(FAN_CLASS_NOTIF, O_RDONLY);
 	SAFE_CLOSE(fd);
@@ -327,6 +329,7 @@ static struct tst_test test = {
 	.tcnt = ARRAY_SIZE(test_cases),
 	.setup = do_setup,
 	.cleanup = do_cleanup,
+	.test_variants = TEST_VARIANTS,
 	.tags = (const struct tst_tag[]) {
 		{"linux-git", "f367a62a7cad"},
 		{}
diff --git a/testcases/kernel/syscalls/fanotify/fanotify16.c b/testcases/kernel/syscalls/fanotify/fanotify16.c
index 7c29d256a..35729aa7b 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify16.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify16.c
@@ -114,7 +114,7 @@ static void do_test(unsigned int number)
 		number, mark->name);
 
 
-	fd_notify = fanotify_init(FAN_REPORT_FID, 0);
+	fd_notify = do_fanotify_init(FAN_REPORT_FID, 0);
 	if (fd_notify == -1) {
 		if (errno == EINVAL)
 			tst_brk(TCONF,
@@ -127,14 +127,14 @@ static void do_test(unsigned int number)
 	/*
 	 * Watch dir modify events with name in filesystem/dir
 	 */
-	if (fanotify_mark(fd_notify, FAN_MARK_ADD | mark->flag, tc->mask,
+	if (do_fanotify_mark(fd_notify, FAN_MARK_ADD | mark->flag, tc->mask,
 			  AT_FDCWD, MOUNT_PATH) < 0) {
 		if (errno == EINVAL)
 			tst_brk(TCONF,
 				"FAN_DIR_MODIFY not supported by kernel");
 
 		tst_brk(TBROK | TERRNO,
-		    "fanotify_mark (%d, FAN_MARK_ADD | %s, "
+		    "fanotify_mark(%d, FAN_MARK_ADD | %s, "
 		    "FAN_DIR_MODIFY, AT_FDCWD, '"MOUNT_PATH"') "
 		    "failed", fd_notify, mark->name);
 	}
@@ -154,10 +154,10 @@ static void do_test(unsigned int number)
 	save_fid(dname1, &dir_fid);
 
 	if (tc->sub_mask &&
-	    fanotify_mark(fd_notify, FAN_MARK_ADD | sub_mark->flag, tc->sub_mask,
+	    do_fanotify_mark(fd_notify, FAN_MARK_ADD | sub_mark->flag, tc->sub_mask,
 			  AT_FDCWD, dname1) < 0) {
 		tst_brk(TBROK | TERRNO,
-		    "fanotify_mark (%d, FAN_MARK_ADD | %s, "
+		    "fanotify_mark(%d, FAN_MARK_ADD | %s, "
 		    "FAN_DIR_MODIFY | FAN_DELETE_SELF | FAN_ONDIR, "
 		    "AT_FDCWD, '%s') "
 		    "failed", fd_notify, sub_mark->name, dname1);
@@ -411,6 +411,8 @@ static void do_test(unsigned int number)
 
 static void setup(void)
 {
+	tst_res(TINFO, "Testing variant: %s", variant_desc[tst_variant]);
+
 	sprintf(dname1, "%s/%s", MOUNT_PATH, DIR_NAME1);
 	sprintf(dname2, "%s/%s", MOUNT_PATH, DIR_NAME2);
 	sprintf(fname1, "%s/%s", dname1, FILE_NAME1);
@@ -433,7 +435,8 @@ static struct tst_test test = {
 	.mntpoint = MOUNT_PATH,
 	.all_filesystems = 1,
 	.needs_tmpdir = 1,
-	.needs_root = 1
+	.needs_root = 1,
+	.test_variants = TEST_VARIANTS,
 };
 
 #else
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [LTP] [PATCH 2/2] fanotify: Test with tst_variant both raw syscall and libc
  2020-04-28 11:35 ` [LTP] [PATCH 2/2] fanotify: Test with tst_variant both raw syscall and libc Petr Vorel
@ 2020-04-28 13:26   ` Amir Goldstein
  2020-04-28 13:37     ` Petr Vorel
  2020-10-14 13:49   ` Cyril Hrubis
  1 sibling, 1 reply; 13+ messages in thread
From: Amir Goldstein @ 2020-04-28 13:26 UTC (permalink / raw)
  To: ltp

On Tue, Apr 28, 2020 at 2:35 PM Petr Vorel <pvorel@suse.cz> wrote:
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> Hi,
>
> patchset is based on Amir's patchset [1], which I'd prefer to have
> merged before.
>
> libc wrappers for fanotify_init() and fanotify_mark() are trivial, so it
> might not make sense to test both variants. WDYT?
>
> Kind regards,
> Petr
>
> [1] https://patchwork.ozlabs.org/project/ltp/list/?series=171631&state=*

FWIW, I have no objection to these changes.

I trust that you tested build with all supported configurations, because
I am not good at reviewing portable code.

Thanks,
Amir.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [LTP] [PATCH 2/2] fanotify: Test with tst_variant both raw syscall and libc
  2020-04-28 13:26   ` Amir Goldstein
@ 2020-04-28 13:37     ` Petr Vorel
  2020-04-28 15:18       ` Amir Goldstein
  0 siblings, 1 reply; 13+ messages in thread
From: Petr Vorel @ 2020-04-28 13:37 UTC (permalink / raw)
  To: ltp

Hi Amir,

> FWIW, I have no objection to these changes.
Thanks!

> I trust that you tested build with all supported configurations, because
> I am not good at reviewing portable code.
Not sure if I understand you. There is just a single configuration (test are run
twice, first with raw syscall than with libc wrapper). Previously there were two
configurations (tests were run only once, mostly with libc wrapper, raw syscalls
was on systems with old glibc, where only kernel supports fanotify syscall).

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [LTP] [PATCH 2/2] fanotify: Test with tst_variant both raw syscall and libc
  2020-04-28 13:37     ` Petr Vorel
@ 2020-04-28 15:18       ` Amir Goldstein
  2020-04-29 12:06         ` Petr Vorel
  0 siblings, 1 reply; 13+ messages in thread
From: Amir Goldstein @ 2020-04-28 15:18 UTC (permalink / raw)
  To: ltp

On Tue, Apr 28, 2020 at 4:37 PM Petr Vorel <pvorel@suse.cz> wrote:
>
> Hi Amir,
>
> > FWIW, I have no objection to these changes.
> Thanks!
>
> > I trust that you tested build with all supported configurations, because
> > I am not good at reviewing portable code.
> Not sure if I understand you. There is just a single configuration (test are run
> twice, first with raw syscall than with libc wrapper). Previously there were two
> configurations (tests were run only once, mostly with libc wrapper, raw syscalls
> was on systems with old glibc, where only kernel supports fanotify syscall).
>

My confusion is because you removed the HAVE_SYS_FANOTIFY_H ifdef
and now you include sys/fanotify.h unconditionally.
So I meant if this code builds with all supported system configurations.

Thanks,
Amir.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [LTP] [PATCH 2/2] fanotify: Test with tst_variant both raw syscall and libc
  2020-04-28 15:18       ` Amir Goldstein
@ 2020-04-29 12:06         ` Petr Vorel
  2020-04-29 14:27           ` Amir Goldstein
  0 siblings, 1 reply; 13+ messages in thread
From: Petr Vorel @ 2020-04-29 12:06 UTC (permalink / raw)
  To: ltp

Hi Amir,

> My confusion is because you removed the HAVE_SYS_FANOTIFY_H ifdef
> and now you include sys/fanotify.h unconditionally.
> So I meant if this code builds with all supported system configurations.
Thanks! I overlook an obvious error. Patch is wrong, because fanotify.h must be
included in tests below #if defined(HAVE_SYS_FANOTIFY_H).
Below is fix to posted patch, tested without <sys/fanotify.h>.

Kind regards,
Petr

diff --git testcases/kernel/syscalls/fanotify/fanotify01.c testcases/kernel/syscalls/fanotify/fanotify01.c
index 77c18e67f..83bcfccb4 100644
--- testcases/kernel/syscalls/fanotify/fanotify01.c
+++ testcases/kernel/syscalls/fanotify/fanotify01.c
@@ -18,10 +18,10 @@
 #include <string.h>
 #include <sys/syscall.h>
 #include "tst_test.h"
-#include "fanotify.h"
 
 #if defined(HAVE_SYS_FANOTIFY_H)
 #include <sys/fanotify.h>
+#include "fanotify.h"
 
 #define EVENT_MAX 1024
 /* size of the event structure, not counting name */
diff --git testcases/kernel/syscalls/fanotify/fanotify02.c testcases/kernel/syscalls/fanotify/fanotify02.c
index 32c842804..eedf00105 100644
--- testcases/kernel/syscalls/fanotify/fanotify02.c
+++ testcases/kernel/syscalls/fanotify/fanotify02.c
@@ -18,10 +18,10 @@
 #include <string.h>
 #include <sys/syscall.h>
 #include "tst_test.h"
-#include "fanotify.h"
 
 #if defined(HAVE_SYS_FANOTIFY_H)
 #include <sys/fanotify.h>
+#include "fanotify.h"
 
 #define EVENT_MAX 1024
 /* size of the event structure, not counting name */
diff --git testcases/kernel/syscalls/fanotify/fanotify03.c testcases/kernel/syscalls/fanotify/fanotify03.c
index fdb0d0f58..cf7b30800 100644
--- testcases/kernel/syscalls/fanotify/fanotify03.c
+++ testcases/kernel/syscalls/fanotify/fanotify03.c
@@ -22,10 +22,10 @@
 #include <sys/syscall.h>
 #include <stdlib.h>
 #include "tst_test.h"
-#include "fanotify.h"
 
 #if defined(HAVE_SYS_FANOTIFY_H)
 #include <sys/fanotify.h>
+#include "fanotify.h"
 
 #define EVENT_MAX 1024
 /* size of the event structure, not counting name */
diff --git testcases/kernel/syscalls/fanotify/fanotify04.c testcases/kernel/syscalls/fanotify/fanotify04.c
index 8b738b3ae..725162f5b 100644
--- testcases/kernel/syscalls/fanotify/fanotify04.c
+++ testcases/kernel/syscalls/fanotify/fanotify04.c
@@ -19,10 +19,10 @@
 #include <string.h>
 #include <sys/syscall.h>
 #include "tst_test.h"
-#include "fanotify.h"
 
 #if defined(HAVE_SYS_FANOTIFY_H)
 #include <sys/fanotify.h>
+#include "fanotify.h"
 
 #define EVENT_MAX 1024
 /* size of the event structure, not counting name */
diff --git testcases/kernel/syscalls/fanotify/fanotify05.c testcases/kernel/syscalls/fanotify/fanotify05.c
index 24edec19c..97c921886 100644
--- testcases/kernel/syscalls/fanotify/fanotify05.c
+++ testcases/kernel/syscalls/fanotify/fanotify05.c
@@ -22,10 +22,10 @@
 #include <string.h>
 #include <sys/syscall.h>
 #include "tst_test.h"
-#include "fanotify.h"
 
 #if defined(HAVE_SYS_FANOTIFY_H)
 #include <sys/fanotify.h>
+#include "fanotify.h"
 
 #define MOUNT_PATH "fs_mnt"
 
diff --git testcases/kernel/syscalls/fanotify/fanotify06.c testcases/kernel/syscalls/fanotify/fanotify06.c
index 85dbe5b82..5aea43e33 100644
--- testcases/kernel/syscalls/fanotify/fanotify06.c
+++ testcases/kernel/syscalls/fanotify/fanotify06.c
@@ -36,10 +36,10 @@
 #include <sys/mount.h>
 #include <sys/syscall.h>
 #include "tst_test.h"
-#include "fanotify.h"
 
 #if defined(HAVE_SYS_FANOTIFY_H)
 #include <sys/fanotify.h>
+#include "fanotify.h"
 
 #define EVENT_MAX 1024
 /* size of the event structure, not counting name */
diff --git testcases/kernel/syscalls/fanotify/fanotify07.c testcases/kernel/syscalls/fanotify/fanotify07.c
index be42d1a0b..81fe8f443 100644
--- testcases/kernel/syscalls/fanotify/fanotify07.c
+++ testcases/kernel/syscalls/fanotify/fanotify07.c
@@ -30,10 +30,10 @@
 #include <sys/syscall.h>
 #include "tst_test.h"
 #include "lapi/syscalls.h"
-#include "fanotify.h"
 
 #if defined(HAVE_SYS_FANOTIFY_H)
 #include <sys/fanotify.h>
+#include "fanotify.h"
 
 #define BUF_SIZE 256
 static char fname[BUF_SIZE];
diff --git testcases/kernel/syscalls/fanotify/fanotify08.c testcases/kernel/syscalls/fanotify/fanotify08.c
index b61a5509a..b40f95cc9 100644
--- testcases/kernel/syscalls/fanotify/fanotify08.c
+++ testcases/kernel/syscalls/fanotify/fanotify08.c
@@ -18,10 +18,10 @@
 #include <string.h>
 #include <sys/syscall.h>
 #include "tst_test.h"
-#include "fanotify.h"
 
 #if defined(HAVE_SYS_FANOTIFY_H)
 #include <sys/fanotify.h>
+#include "fanotify.h"
 
 static int fd_notify;
 
diff --git testcases/kernel/syscalls/fanotify/fanotify09.c testcases/kernel/syscalls/fanotify/fanotify09.c
index a023cd8f6..4e2c6f3e1 100644
--- testcases/kernel/syscalls/fanotify/fanotify09.c
+++ testcases/kernel/syscalls/fanotify/fanotify09.c
@@ -33,10 +33,10 @@
 #include <sys/syscall.h>
 #include <stdint.h>
 #include "tst_test.h"
-#include "fanotify.h"
 
 #if defined(HAVE_SYS_FANOTIFY_H)
 #include <sys/fanotify.h>
+#include "fanotify.h"
 
 #define EVENT_MAX 1024
 /* size of the event structure, not counting name */
diff --git testcases/kernel/syscalls/fanotify/fanotify10.c testcases/kernel/syscalls/fanotify/fanotify10.c
index eb7e4efcf..cbef4b943 100644
--- testcases/kernel/syscalls/fanotify/fanotify10.c
+++ testcases/kernel/syscalls/fanotify/fanotify10.c
@@ -30,10 +30,10 @@
 #include <sys/mount.h>
 #include <sys/syscall.h>
 #include "tst_test.h"
-#include "fanotify.h"
 
 #if defined(HAVE_SYS_FANOTIFY_H)
 #include <sys/fanotify.h>
+#include "fanotify.h"
 
 #define EVENT_MAX 1024
 /* size of the event structure, not counting name */
diff --git testcases/kernel/syscalls/fanotify/fanotify11.c testcases/kernel/syscalls/fanotify/fanotify11.c
index b8da46eff..de72d10ef 100644
--- testcases/kernel/syscalls/fanotify/fanotify11.c
+++ testcases/kernel/syscalls/fanotify/fanotify11.c
@@ -29,10 +29,10 @@
 #include <linux/limits.h>
 #include "tst_test.h"
 #include "tst_safe_pthread.h"
-#include "fanotify.h"
 
 #if defined(HAVE_SYS_FANOTIFY_H)
 #include <sys/fanotify.h>
+#include "fanotify.h"
 
 #define gettid() syscall(SYS_gettid)
 static int tid;
diff --git testcases/kernel/syscalls/fanotify/fanotify12.c testcases/kernel/syscalls/fanotify/fanotify12.c
index 24fb712d4..916444f78 100644
--- testcases/kernel/syscalls/fanotify/fanotify12.c
+++ testcases/kernel/syscalls/fanotify/fanotify12.c
@@ -21,10 +21,10 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #include "tst_test.h"
-#include "fanotify.h"
 
 #if defined(HAVE_SYS_FANOTIFY_H)
 #include <sys/fanotify.h>
+#include "fanotify.h"
 
 #define EVENT_MAX 1024
 #define EVENT_SIZE (sizeof (struct fanotify_event_metadata))
diff --git testcases/kernel/syscalls/fanotify/fanotify13.c testcases/kernel/syscalls/fanotify/fanotify13.c
index 065aac646..0fc82d6df 100644
--- testcases/kernel/syscalls/fanotify/fanotify13.c
+++ testcases/kernel/syscalls/fanotify/fanotify13.c
@@ -25,10 +25,10 @@
 #include <errno.h>
 #include <unistd.h>
 #include "tst_test.h"
-#include "fanotify.h"
 
 #if defined(HAVE_SYS_FANOTIFY_H)
 #include <sys/fanotify.h>
+#include "fanotify.h"
 
 #define PATH_LEN 128
 #define BUF_SIZE 256
diff --git testcases/kernel/syscalls/fanotify/fanotify14.c testcases/kernel/syscalls/fanotify/fanotify14.c
index d78c3f3ca..85c6cf401 100644
--- testcases/kernel/syscalls/fanotify/fanotify14.c
+++ testcases/kernel/syscalls/fanotify/fanotify14.c
@@ -12,12 +12,12 @@
  */
 #define _GNU_SOURCE
 #include "tst_test.h"
-#include "fanotify.h"
 
 #include <errno.h>
 
 #if defined(HAVE_SYS_FANOTIFY_H)
 #include <sys/fanotify.h>
+#include "fanotify.h"
 
 #define MNTPOINT "mntpoint"
 #define FILE1 MNTPOINT"/file1"
diff --git testcases/kernel/syscalls/fanotify/fanotify15.c testcases/kernel/syscalls/fanotify/fanotify15.c
index 7aebe19c7..39c2c9275 100644
--- testcases/kernel/syscalls/fanotify/fanotify15.c
+++ testcases/kernel/syscalls/fanotify/fanotify15.c
@@ -24,10 +24,10 @@
 #include <sys/types.h>
 
 #include "tst_test.h"
-#include "fanotify.h"
 
 #if defined(HAVE_SYS_FANOTIFY_H)
 #include <sys/fanotify.h>
+#include "fanotify.h"
 
 #define EVENT_MAX 10
 
diff --git testcases/kernel/syscalls/fanotify/fanotify16.c testcases/kernel/syscalls/fanotify/fanotify16.c
index 35729aa7b..66dd4057d 100644
--- testcases/kernel/syscalls/fanotify/fanotify16.c
+++ testcases/kernel/syscalls/fanotify/fanotify16.c
@@ -19,11 +19,11 @@
 #include <sys/mount.h>
 #include <sys/syscall.h>
 #include "tst_test.h"
-#include "fanotify.h"
 
 #if defined(HAVE_SYS_FANOTIFY_H)
 #include <sys/fanotify.h>
 #include <sys/inotify.h>
+#include "fanotify.h"
 
 #define EVENT_MAX 10
 

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [LTP] [PATCH 2/2] fanotify: Test with tst_variant both raw syscall and libc
  2020-04-29 12:06         ` Petr Vorel
@ 2020-04-29 14:27           ` Amir Goldstein
  0 siblings, 0 replies; 13+ messages in thread
From: Amir Goldstein @ 2020-04-29 14:27 UTC (permalink / raw)
  To: ltp

On Wed, Apr 29, 2020 at 3:06 PM Petr Vorel <pvorel@suse.cz> wrote:
>
> Hi Amir,
>
> > My confusion is because you removed the HAVE_SYS_FANOTIFY_H ifdef
> > and now you include sys/fanotify.h unconditionally.
> > So I meant if this code builds with all supported system configurations.
> Thanks! I overlook an obvious error. Patch is wrong, because fanotify.h must be
> included in tests below #if defined(HAVE_SYS_FANOTIFY_H).
> Below is fix to posted patch, tested without <sys/fanotify.h>.
>

That looks sane.

Thanks,
Amir.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [LTP] [PATCH 1/2] fanotify: Move safe_fanotify_init() + safe macro into fanotify.h
  2020-04-28 11:35 [LTP] [PATCH 1/2] fanotify: Move safe_fanotify_init() + safe macro into fanotify.h Petr Vorel
  2020-04-28 11:35 ` [LTP] [PATCH 2/2] fanotify: Test with tst_variant both raw syscall and libc Petr Vorel
@ 2020-10-14 13:46 ` Cyril Hrubis
  2020-10-14 18:02   ` Petr Vorel
  1 sibling, 1 reply; 13+ messages in thread
From: Cyril Hrubis @ 2020-10-14 13:46 UTC (permalink / raw)
  To: ltp

Hi!
> Fanotify code is used only in testcases/kernel/syscalls/fanotify/, which
> justify breaking rule of having safe function and macro outside of
> library. This will be further cleaned in next commit.

I guess that this is OK, I doubt that we will need a fanotify_init()
anywhere else but the fanotify testcases.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [LTP] [PATCH 2/2] fanotify: Test with tst_variant both raw syscall and libc
  2020-04-28 11:35 ` [LTP] [PATCH 2/2] fanotify: Test with tst_variant both raw syscall and libc Petr Vorel
  2020-04-28 13:26   ` Amir Goldstein
@ 2020-10-14 13:49   ` Cyril Hrubis
  2020-10-14 17:56     ` Petr Vorel
  1 sibling, 1 reply; 13+ messages in thread
From: Cyril Hrubis @ 2020-10-14 13:49 UTC (permalink / raw)
  To: ltp

Hi!
> libc wrappers for fanotify_init() and fanotify_mark() are trivial, so it
> might not make sense to test both variants. WDYT?

Hmm, I guess that fanotify_init() and fanotify_mark() are included in
libc for quite some time, so it does not make much sense to go for the
raw syscall here. But I do not have a strong opinion here, if anyone
thinks that this would be useful, we can as well go for it.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [LTP] [PATCH 2/2] fanotify: Test with tst_variant both raw syscall and libc
  2020-10-14 13:49   ` Cyril Hrubis
@ 2020-10-14 17:56     ` Petr Vorel
  0 siblings, 0 replies; 13+ messages in thread
From: Petr Vorel @ 2020-10-14 17:56 UTC (permalink / raw)
  To: ltp

> Hi!
> > libc wrappers for fanotify_init() and fanotify_mark() are trivial, so it
> > might not make sense to test both variants. WDYT?

> Hmm, I guess that fanotify_init() and fanotify_mark() are included in
> libc for quite some time, so it does not make much sense to go for the
> raw syscall here. But I do not have a strong opinion here, if anyone
> thinks that this would be useful, we can as well go for it.
+1 let's skip this one.

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [LTP] [PATCH 1/2] fanotify: Move safe_fanotify_init() + safe macro into fanotify.h
  2020-10-14 13:46 ` [LTP] [PATCH 1/2] fanotify: Move safe_fanotify_init() + safe macro into fanotify.h Cyril Hrubis
@ 2020-10-14 18:02   ` Petr Vorel
  2020-10-16  3:20     ` Li Wang
  0 siblings, 1 reply; 13+ messages in thread
From: Petr Vorel @ 2020-10-14 18:02 UTC (permalink / raw)
  To: ltp

Hi,

> > Fanotify code is used only in testcases/kernel/syscalls/fanotify/, which
> > justify breaking rule of having safe function and macro outside of
> > library. This will be further cleaned in next commit.

> I guess that this is OK, I doubt that we will need a fanotify_init()
> anywhere else but the fanotify testcases.
Amir acked whole patch some time ago, thus I guess he's not against this first one.

The original motivation was to do further modifications for libc wrapper vs.
syscall() for fanotify_init() and fanotify_mark(). But I guess even without
second commit it makes sense to have all fanotify helpers together.
We can always revert it if really need them as safe macros.

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [LTP] [PATCH 1/2] fanotify: Move safe_fanotify_init() + safe macro into fanotify.h
  2020-10-14 18:02   ` Petr Vorel
@ 2020-10-16  3:20     ` Li Wang
  2020-10-16 11:35       ` Petr Vorel
  0 siblings, 1 reply; 13+ messages in thread
From: Li Wang @ 2020-10-16  3:20 UTC (permalink / raw)
  To: ltp

On Thu, Oct 15, 2020 at 2:02 AM Petr Vorel <pvorel@suse.cz> wrote:

> Hi,
>
> > > Fanotify code is used only in testcases/kernel/syscalls/fanotify/,
> which
> > > justify breaking rule of having safe function and macro outside of
> > > library. This will be further cleaned in next commit.
>
> > I guess that this is OK, I doubt that we will need a fanotify_init()
> > anywhere else but the fanotify testcases.
> Amir acked whole patch some time ago, thus I guess he's not against this
> first one.
>
> The original motivation was to do further modifications for libc wrapper
> vs.
> syscall() for fanotify_init() and fanotify_mark(). But I guess even without
> second commit it makes sense to have all fanotify helpers together.
> We can always revert it if really need them as safe macros.
>
+1

Reviewed-by: Li Wang <liwang@redhat.com>

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20201016/9eb28f53/attachment-0001.htm>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [LTP] [PATCH 1/2] fanotify: Move safe_fanotify_init() + safe macro into fanotify.h
  2020-10-16  3:20     ` Li Wang
@ 2020-10-16 11:35       ` Petr Vorel
  0 siblings, 0 replies; 13+ messages in thread
From: Petr Vorel @ 2020-10-16 11:35 UTC (permalink / raw)
  To: ltp

Hi,

> > The original motivation was to do further modifications for libc wrapper
> > vs.
> > syscall() for fanotify_init() and fanotify_mark(). But I guess even without
> > second commit it makes sense to have all fanotify helpers together.
> > We can always revert it if really need them as safe macros.

> +1

> Reviewed-by: Li Wang <liwang@redhat.com>
Thanks Li! Merged.

I've also sent another fanotify cleanup patch:
https://patchwork.ozlabs.org/project/ltp/patch/20201016112441.4838-1-pvorel@suse.cz/

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-10-16 11:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-28 11:35 [LTP] [PATCH 1/2] fanotify: Move safe_fanotify_init() + safe macro into fanotify.h Petr Vorel
2020-04-28 11:35 ` [LTP] [PATCH 2/2] fanotify: Test with tst_variant both raw syscall and libc Petr Vorel
2020-04-28 13:26   ` Amir Goldstein
2020-04-28 13:37     ` Petr Vorel
2020-04-28 15:18       ` Amir Goldstein
2020-04-29 12:06         ` Petr Vorel
2020-04-29 14:27           ` Amir Goldstein
2020-10-14 13:49   ` Cyril Hrubis
2020-10-14 17:56     ` Petr Vorel
2020-10-14 13:46 ` [LTP] [PATCH 1/2] fanotify: Move safe_fanotify_init() + safe macro into fanotify.h Cyril Hrubis
2020-10-14 18:02   ` Petr Vorel
2020-10-16  3:20     ` Li Wang
2020-10-16 11:35       ` Petr Vorel

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).