All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 0/8] fanotify tests for v5.13
Date: Fri, 19 Mar 2021 14:04:07 +0100	[thread overview]
Message-ID: <YFShR2Qd7Ubve1wi@pevik> (raw)
In-Reply-To: <20210318131134.3562203-1-amir73il@gmail.com>

Hi Amir,

> Hi Petr,

> Following tests were used for development of the two features
> queued for v5.13 (in linux-next):
> - Performance improvements for events merge [1]
> - Unprivileged fanotify listener [2]

As these are features not fixes, I suppose nothing from these already merged 2
patchsets in next tree can be added with struct tst_tag to document it.
I wonder if any of these are could be at least noted in the tests / commit
messages.

> All test cases of fanotify05 pass on upstream, but their runtime
> on linux-next is reduced by more than half.

> Only the first test case of fanotify17 pass on upstream.
> The rest of the test cases as well as fanotify18 and fanotify19
> tests exit with TCONF on upstream. They all pass on linux-next.

Thanks! LGTM, thanks for testing them on both mainline and next tree.

To whole patchset:
Reviewed-by: Petr Vorel <pvorel@suse.cz>

I'll apply it with following tiny fixes to fix compilation on very old kernels
(2.6.x) and to use our documentation format [3] [4].
(+ later I'll fix documentation format for the rest of the tests)

Kind regards,
Petr

> Thanks,
> Amir.

> [1] https://lore.kernel.org/linux-fsdevel/20210304104826.3993892-1-amir73il@gmail.com/
> [2] https://lore.kernel.org/linux-fsdevel/20210304112921.3996419-1-amir73il@gmail.com/

[3] https://github.com/linux-test-project/ltp/releases/download/20210121/metadata.20210121.pdf
[4] https://github.com/linux-test-project/ltp/releases/download/20210121/metadata.20210121.html

diff --git testcases/kernel/syscalls/fanotify/fanotify17.c testcases/kernel/syscalls/fanotify/fanotify17.c
index ee242a441..98355a7b4 100644
--- testcases/kernel/syscalls/fanotify/fanotify17.c
+++ testcases/kernel/syscalls/fanotify/fanotify17.c
@@ -7,13 +7,15 @@
  * Forked from getxattr05.c by Amir Goldstein <amir73il@gmail.com>
  */
 
-/*
- * DESCRIPTION
- *     Check that fanotify groups and marks limits are enforced correctly.
- *     If user ns is supported, verify that global limit and per user ns
- *     limits are both enforced.
- *     Otherwise, we only check that global groups limit is enforced.
+/*\
+ * [Description]
+ *
+ * Check that fanotify groups and marks limits are enforced correctly.
+ * If user ns is supported, verify that global limit and per user ns
+ * limits are both enforced.
+ * Otherwise, we only check that global groups limit is enforced.
  */
+
 #define _GNU_SOURCE
 #include "config.h"
 #include <errno.h>
diff --git testcases/kernel/syscalls/fanotify/fanotify18.c testcases/kernel/syscalls/fanotify/fanotify18.c
index 1acd23ce2..318245efc 100644
--- testcases/kernel/syscalls/fanotify/fanotify18.c
+++ testcases/kernel/syscalls/fanotify/fanotify18.c
@@ -3,13 +3,17 @@
  * Copyright (c) 2018 Matthew Bobrowski. All Rights Reserved.
  *
  * Started by Matthew Bobrowski <mbobrowski@mbobrowski.org>
+ */
+
+/*\
+ * [Description]
  *
- * DESCRIPTION
- *	This set of tests is to ensure that the unprivileged listener feature of
- *	fanotify is functioning as expected. The objective this test case file
- *	is to validate whether any forbidden flags that are passed by an
- *	unprivileged user return the correct error result.
+ * This set of tests is to ensure that the unprivileged listener feature of
+ * fanotify is functioning as expected. The objective this test case file
+ * is to validate whether any forbidden flags that are passed by an
+ * unprivileged user return the correct error result.
  */
+
 #define _GNU_SOURCE
 #include "config.h"
 
@@ -17,10 +21,9 @@
 #include <stdio.h>
 #include <errno.h>
 #include "tst_test.h"
-#include "fanotify.h"
 
-#if defined(HAVE_SYS_FANOTIFY_H)
-#include <sys/fanotify.h>
+#ifdef HAVE_SYS_FANOTIFY_H
+#include "fanotify.h"
 
 /*
  * This is a set of intialization flags that are not permitted to be used by an
@@ -194,5 +197,5 @@ static struct tst_test test = {
 };
 
 #else
-	TST_TEST_CONF("System does not have required fanotify support");
+	TST_TEST_TCONF("system doesn't have required fanotify support");
 #endif
diff --git testcases/kernel/syscalls/fanotify/fanotify19.c testcases/kernel/syscalls/fanotify/fanotify19.c
index 83a9aaa98..92ed45e49 100644
--- testcases/kernel/syscalls/fanotify/fanotify19.c
+++ testcases/kernel/syscalls/fanotify/fanotify19.c
@@ -3,14 +3,18 @@
  * Copyright (c) 2018 Matthew Bobrowski. All Rights Reserved.
  *
  * Started by Matthew Bobrowski <mbobrowski@mbobrowski.org>
+ */
+
+/*\
+ * [Description]
  *
- * DESCRIPTION
- *	This set of tests is to ensure that the unprivileged listener feature of
- *	fanotify is functioning as expected. The objective of this test file is
- *	to generate a sequence of events and ensure that the returned events
- *	contain the limited values that an unprivileged listener is expected
- *	to receive.
+ * This set of tests is to ensure that the unprivileged listener feature of
+ * fanotify is functioning as expected. The objective of this test file is
+ * to generate a sequence of events and ensure that the returned events
+ * contain the limited values that an unprivileged listener is expected
+ * to receive.
  */
+
 #define _GNU_SOURCE
 #include "config.h"
 
@@ -21,10 +25,9 @@
 #include <sys/wait.h>
 
 #include "tst_test.h"
-#include "fanotify.h"
 
-#if defined(HAVE_SYS_FANOTIFY_H)
-#include <sys/fanotify.h>
+#ifdef HAVE_SYS_FANOTIFY_H
+#include "fanotify.h"
 
 #define EVENT_MAX 1024
 #define EVENT_SIZE (sizeof (struct fanotify_event_metadata))
@@ -249,5 +252,5 @@ static struct tst_test test = {
 };
 
 #else
-	TST_TEST_CONF("System does not have required fanotify support");
+	TST_TEST_TCONF("system doesn't have required fanotify support");
 #endif

  parent reply	other threads:[~2021-03-19 13:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18 13:11 [LTP] [PATCH 0/8] fanotify tests for v5.13 Amir Goldstein
2021-03-18 13:11 ` [LTP] [PATCH 1/8] syscalls/fanotify05: Fix test output when not getting overflow Amir Goldstein
2021-03-18 13:11 ` [LTP] [PATCH 2/8] syscalls/fanotify05: Verify events are received by queue order Amir Goldstein
2021-03-18 13:11 ` [LTP] [PATCH 3/8] syscalls/fanotify05: Verify getting a single overflow event Amir Goldstein
2021-03-18 13:11 ` [LTP] [PATCH 4/8] syscalls/fanotify05: Add a test case for unlimited queue Amir Goldstein
2021-03-18 13:11 ` [LTP] [PATCH 5/8] syscalls/fanotify05: adjust test to tunable max_queued_events Amir Goldstein
2021-03-18 13:11 ` [LTP] [PATCH 6/8] syscalls/fanotify: New test for fanotify user limits Amir Goldstein
2021-03-18 13:11 ` [LTP] [PATCH 7/8] syscalls/fanotify: New test to validate unprivileged user permissions Amir Goldstein
2021-03-18 13:11 ` [LTP] [PATCH 8/8] syscalls/fanotify: New test to validate unprivileged listener events Amir Goldstein
2021-03-19 13:04 ` Petr Vorel [this message]
2021-03-19 13:54   ` [LTP] [PATCH 0/8] fanotify tests for v5.13 Amir Goldstein
2021-03-21 20:13     ` Petr Vorel
2021-03-22 18:42       ` Amir Goldstein
2021-03-22 19:07         ` Petr Vorel
2021-03-23  6:36         ` Petr Vorel

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=YFShR2Qd7Ubve1wi@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    /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.