public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Matthew Bobrowski <mbobrowski@mbobrowski.org>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/4] syscalls/fanotify15: Minor corrections
Date: Fri, 1 May 2020 18:09:04 +1000	[thread overview]
Message-ID: <20200501080902.GA2782@morpheus.bobrowski.net> (raw)
In-Reply-To: <20200421065002.12417-3-amir73il@gmail.com>

On Tue, Apr 21, 2020 at 09:50:00AM +0300, Amir Goldstein wrote:
>  static void do_test(void)
> @@ -55,23 +61,24 @@ static void do_test(void)
>  	struct fanotify_event_metadata *metadata;
>  	struct fanotify_event_info_fid *event_fid;
>  
> +

^ Unnecessary white line entered here?

>  	if (fanotify_mark(fanotify_fd, FAN_MARK_ADD | FAN_MARK_FILESYSTEM,
> -				FAN_CREATE | FAN_DELETE | FAN_ATTRIB |
> -				FAN_MOVED_FROM | FAN_MOVED_TO |
> -				FAN_DELETE_SELF | FAN_ONDIR,
> +				FAN_CREATE | FAN_DELETE | FAN_MOVE |
> +				FAN_MODIFY | FAN_DELETE_SELF | FAN_ONDIR,
>  				AT_FDCWD, TEST_DIR) == -1) {

...

> -	/* Generate a sequence of events */
> +	/* All dirent events on testdir are merged */
>  	event_set[count].mask = FAN_CREATE | FAN_MOVED_FROM | FAN_MOVED_TO | \
>  				FAN_DELETE;

Just a suggestion, perhaps we can modify the above line to the following:

	event_set[count].mask = FAN_CREATE | FAN_MOVE | FAN_DELETE;

Also, I believe that we can generally replace all instances of
FAN_MOVED_FROM | FAN_MOVED_TO with FAN_MOVE within this file.

The rest looks good to me.

Reviewed-by: Matthew Bobrowski <mbobrowski@mbobrowski.org>

/M

  parent reply	other threads:[~2020-05-01  8:09 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21  6:49 [LTP] [PATCH 0/4] fanotify ltp tests for v5.7-rc1 Amir Goldstein
2020-04-21  6:49 ` [LTP] [PATCH 1/4] syscalls/fanotify09: Check merging of events on directories Amir Goldstein
2020-04-27 17:27   ` Petr Vorel
2020-05-01  7:17   ` Matthew Bobrowski
2020-05-01  9:05     ` Amir Goldstein
2020-05-01  9:46       ` Matthew Bobrowski
2020-04-21  6:50 ` [LTP] [PATCH 2/4] syscalls/fanotify15: Minor corrections Amir Goldstein
2020-04-27 19:30   ` Petr Vorel
2020-04-29 15:08   ` Cyril Hrubis
2020-05-01  8:09   ` Matthew Bobrowski [this message]
2020-04-21  6:50 ` [LTP] [PATCH 3/4] syscalls/fanotify15: Add a test case for inode marks Amir Goldstein
2020-04-27 19:43   ` Petr Vorel
2020-04-28  9:20     ` Petr Vorel
2020-04-29 15:28   ` Cyril Hrubis
2020-05-02  7:09   ` Matthew Bobrowski
2020-05-02 13:17     ` Amir Goldstein
2020-04-21  6:50 ` [LTP] [PATCH 4/4] syscalls/fanotify: New test for FAN_MODIFY_DIR Amir Goldstein
2020-04-27 16:49   ` Petr Vorel
2020-04-28  9:22   ` Petr Vorel
2020-04-28  9:51     ` Amir Goldstein
2020-04-29 16:02   ` Cyril Hrubis
2020-05-02  9:39   ` Matthew Bobrowski
2020-05-02 14:58     ` Amir Goldstein

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=20200501080902.GA2782@morpheus.bobrowski.net \
    --to=mbobrowski@mbobrowski.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox