From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/2] inotify: Add SAFE_MYINOTIFY_ADD_WATCH() helper
Date: Wed, 5 Jun 2019 17:18:39 +0200 [thread overview]
Message-ID: <20190605151838.GA15712@dell5510> (raw)
In-Reply-To: <CAEemH2fLHFmNL57Hm5oU8MNoUN72brqz7fO-fOY_GGTxrAEpPQ@mail.gmail.com>
Hi,
> > > If test exit with TBROK the reap_wd will never get a chance to set as 1,
> > > and the cleanup() also make no sense in tst_brk() calling.
> > No, that's a "flag" for cleanup function which is run always (no matter
> > whether
> > tst_brk() was called). See cleanup() and mount_flag in [1].
> You are right. And seems the problem is only exist in original code, it put
> reap_wd in wrong place and mislead my sight.
> if ((wd = myinotify_add_watch(fd_notify, DIR_PATH, IN_ALL_EVENTS)) <
> 0) {
> tst_brk(TBROK | TERRNO,
> "inotify_add_watch (%d, " DIR_PATH ", IN_ALL_EVENTS)
> failed",
> fd_notify);
> reap_wd = 1;
> };
so I'll put into commit message:
Also put reap_wd to correct place in inotify0[127].c
(in original code it was in if clause after tst_brk() so it was
1) unreachable 2) for detection it should have been after if (outside).
Fixes: 04f2177b6, inotify0[12].c, 763d02824 (inotify07.c)
Acked-by: Li Wang <liwang@redhat.com>
Kind regards,
Petr
next prev parent reply other threads:[~2019-06-05 15:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-05 7:21 [LTP] [PATCH 1/2] inotify: Add SAFE_MYINOTIFY_INIT{,1}() helpers Petr Vorel
2019-06-05 7:21 ` [LTP] [PATCH 2/2] inotify: Add SAFE_MYINOTIFY_ADD_WATCH() helper Petr Vorel
2019-06-05 14:07 ` Li Wang
2019-06-05 14:16 ` Petr Vorel
2019-06-05 14:40 ` Li Wang
2019-06-05 15:02 ` Petr Vorel
2019-06-05 15:18 ` Petr Vorel [this message]
2019-06-13 13:10 ` [LTP] [PATCH 1/2] inotify: Add SAFE_MYINOTIFY_INIT{, 1}() helpers Cyril Hrubis
2019-06-13 16:34 ` Petr Vorel
2020-04-28 12: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=20190605151838.GA15712@dell5510 \
--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.