From: chrubis@suse.cz
To: Jan Kara <jack@suse.cz>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH 1/2] syscalls/inotify: Test generation of overflow events
Date: Mon, 24 Feb 2014 14:12:13 +0100 [thread overview]
Message-ID: <20140224131213.GA23796@rei> (raw)
In-Reply-To: <20140224123955.GB26687@quack.suse.cz>
Hi!
> > > + SAFE_READ(cleanup, 0, fd, buf, BUF_SIZE);
> > > + if (sscanf(buf, "%d", &max_events) != 1) {
> > > + tst_brkm(TBROK, cleanup,
> > > + "cannot parse max_queued_events file");
> > > + }
> > > + SAFE_CLOSE(cleanup, fd);
> > > +}
> > > +
> > > +static void cleanup(void)
> > > +{
> > > + if (myinotify_rm_watch(fd_notify, wd) < 0) {
> > > + tst_resm(TWARN | TERRNO, "inotify_rm_watch (%d, %d) failed",
> > > + fd_notify, wd);
> > > +
> > > + }
> > > +
> > > + if (close(fd_notify) == -1) {
> > > + tst_resm(TWARN, "close(%d) failed", fd_notify);
> > > + }
> >
> >
> > And I guess that we need to change this to:
> >
> > if (fd_notify > 0 && close(fd_notify) == -1)
> >
> >
> > because the fd_notify may be set to -1 in case that the syscall above
> > failed with ENOSYS which would generate a bogus warning. And I guess
> > that the same goes for the removing the inotify watch.
> Well, yes. I can make that less verbose in case of missing inotify
> support. I was just following what is done in other inotify tests...
The problem is that TWARN gets propagated into the overall test result
so the test will not endup with clean TCONF in this case.
And unfortunately quite a lot of test cleanups are coded incorrectly in
LTP. :(
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
prev parent reply other threads:[~2014-02-24 13:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1393233450-22698-1-git-send-email-jack@suse.cz>
2014-02-24 12:04 ` [LTP] [PATCH 1/2] syscalls/inotify: Test generation of overflow events chrubis
[not found] ` <1393233450-22698-2-git-send-email-jack@suse.cz>
2014-02-24 12:10 ` [LTP] [PATCH 2/2] syscalls/fanotify: " chrubis
[not found] ` <20140224123723.GA26687@quack.suse.cz>
2014-02-24 13:25 ` chrubis
2014-02-24 12:14 ` [LTP] [PATCH 1/2] syscalls/inotify: " chrubis
[not found] ` <20140224123955.GB26687@quack.suse.cz>
2014-02-24 13:12 ` chrubis [this message]
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=20140224131213.GA23796@rei \
--to=chrubis@suse.cz \
--cc=jack@suse.cz \
--cc=ltp-list@lists.sourceforge.net \
/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