From: Richard Palethorpe <rpalethorpe@suse.de>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls/fanotify03: Cleanup backup file descriptor
Date: Wed, 12 Sep 2018 09:01:35 +0200 [thread overview]
Message-ID: <87bm935hdc.fsf@rpws.prws.suse.cz> (raw)
In-Reply-To: <20180911145602.18106-1-amir73il@gmail.com>
Hello,
Amir Goldstein <amir73il@gmail.com> writes:
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> ---
>
> Cyril,
>
> As requested by Richard, here is the fanotify03 minor fix separated from
> whitespace cleanup.
> If you wish to take the whitespace cleanup patch you can find it here:
> https://github.com/amir73il/ltp/commits/fanotify_sb
LGTM
>
> Thanks,
> Amir.
>
> testcases/kernel/syscalls/fanotify/fanotify03.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/testcases/kernel/syscalls/fanotify/fanotify03.c b/testcases/kernel/syscalls/fanotify/fanotify03.c
> index 50401157b..966366a72 100644
> --- a/testcases/kernel/syscalls/fanotify/fanotify03.c
> +++ b/testcases/kernel/syscalls/fanotify/fanotify03.c
> @@ -57,6 +57,7 @@
> static char fname[BUF_SIZE];
> static char buf[BUF_SIZE];
> static volatile int fd_notify;
> +static int fd_notify_backup = -1;
>
> static pid_t child_pid;
>
> @@ -140,7 +141,7 @@ static void check_child(void)
>
> void test01(void)
> {
> - int tst_count, fd_notify_backup = -1;
> + int tst_count;
>
> int ret, len = 0, i = 0, test_num = 0;
>
> @@ -262,6 +263,8 @@ static void cleanup(void)
> {
> if (fd_notify > 0)
> SAFE_CLOSE(fd_notify);
> + if (fd_notify_backup > 0)
> + SAFE_CLOSE(fd_notify_backup);
> }
>
> static struct tst_test test = {
--
Thank you,
Richard.
next prev parent reply other threads:[~2018-09-12 7:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-11 14:56 [LTP] [PATCH] syscalls/fanotify03: Cleanup backup file descriptor Amir Goldstein
2018-09-12 7:01 ` Richard Palethorpe [this message]
2018-09-28 7:39 ` 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=87bm935hdc.fsf@rpws.prws.suse.cz \
--to=rpalethorpe@suse.de \
--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