All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 3/3] syscalls/inotify10: Test two inotify groups with parent and child watches
Date: Fri, 18 Dec 2020 09:06:31 +0200	[thread overview]
Message-ID: <20201218070631.1182292-4-amir73il@gmail.com> (raw)
In-Reply-To: <20201218070631.1182292-1-amir73il@gmail.com>

Add a test case for commit fecc4559780d that fixes a bug introduced in
kernel v5.9:

     fsnotify: fix events reported to watching parent and child

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
 testcases/kernel/syscalls/inotify/inotify10.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/testcases/kernel/syscalls/inotify/inotify10.c b/testcases/kernel/syscalls/inotify/inotify10.c
index 17aafc773..eb2322090 100644
--- a/testcases/kernel/syscalls/inotify/inotify10.c
+++ b/testcases/kernel/syscalls/inotify/inotify10.c
@@ -8,6 +8,10 @@
  *     Check that event is reported to watching parent and watching child
  *     based on their interest
  *
+ * Test case #3 is a regression test for commit fecc4559780d that fixes
+ * a bug introduced in kernel v5.9:
+ *
+ *     fsnotify: fix events reported to watching parent and child
  */
 
 #include "config.h"
@@ -63,6 +67,11 @@ static struct tcase {
 		IN_ATTRIB, 0, 0,
 		0, IN_ATTRIB, IN_ATTRIB,
 	},
+	{
+		"Two Groups with parent and child watches for different events",
+		IN_ATTRIB, IN_OPEN, IN_OPEN,
+		IN_OPEN, IN_ATTRIB, IN_ATTRIB,
+	},
 };
 
 struct event_t event_set[EVENT_MAX];
@@ -199,6 +208,10 @@ static struct tst_test test = {
 	.cleanup = cleanup,
 	.test = verify_inotify,
 	.tcnt = ARRAY_SIZE(tcases),
+	.tags = (const struct tst_tag[]) {
+		{"linux-git", "fecc4559780d"},
+		{}
+	}
 };
 
 #else
-- 
2.25.1


  parent reply	other threads:[~2020-12-18  7:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18  7:06 [LTP] [PATCH 0/3] inotify tests for v5.9 regression Amir Goldstein
2020-12-18  7:06 ` [LTP] [PATCH 1/3] syscalls/inotify10: Generalize for more test cases Amir Goldstein
2020-12-18  8:32   ` Petr Vorel
2020-12-18  7:06 ` [LTP] [PATCH 2/3] syscalls/inotify10: Add test cases with two groups Amir Goldstein
2020-12-18  8:36   ` Petr Vorel
2020-12-18  7:06 ` Amir Goldstein [this message]
2020-12-18  8:53   ` [LTP] [PATCH 3/3] syscalls/inotify10: Test two inotify groups with parent and child watches Petr Vorel
2020-12-18  9:01 ` [LTP] [PATCH 0/3] inotify tests for v5.9 regression Petr Vorel
2020-12-18 16:23   ` 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=20201218070631.1182292-4-amir73il@gmail.com \
    --to=amir73il@gmail.com \
    --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.