From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH V4 2/2] syscalls/io_pgetevents: New tests
Date: Wed, 29 Jan 2020 10:50:56 +0100 [thread overview]
Message-ID: <20200129095055.GA21699@rei.lan> (raw)
In-Reply-To: <20200129004651.pdwhyxnnwluxewb6@vireshk-i7>
Hi!
> > Pushed with one minor adjustement, thanks.
> >
> > I've removed the tst_test.h include from the lapi header and put it into
> > the two test sources. Since that is the main header the tests should
> > include it's better when they include it explicitely.
>
> That was a very intentional change I kept because the header should
> also take care of its dependencies. An earlier version was using few
> tst_syscall() calls in lapi header and so it should have directly
> included tst_test.h file, which I did.
The tst_syscall() is defined in lapi/syscalls.h and I doubt that this
header is incldued from tst_test.h and even if it is we should include
the lapi/syscall.h instead.
> But the same got removed in the latest version and so the same isn't
> required. Though changing the order of lapi header and tst_test.h in
> the io_pgetevents0*.c files still generate compilation errors as
> definition of syscall() isn't found as well and the header should now
> explicitly include <unistd.h>.
>
> I have a question now :)
>
> In the pidfd_open() lapi header I used tst_syscall() and in
> io_pgetevents() lapi header I used syscall(). Should I use
> tst_syscall() in both of them ? If yes, then I will include tst_test.h
> as well in both of them and send you a patch.
The difference between plain syscall() and tst_syscall() is twofold, it
takes care of undefined __NR_foo as well as of ENOSYS return from
kernel, so generally tst_syscall() should be used instead.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2020-01-29 9:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-24 9:53 [LTP] [PATCH V2 1/2] Add Syscall numbers for io_pgetevents Viresh Kumar
2020-01-24 9:53 ` [LTP] [PATCH V2 2/2] syscalls/io_pgetevents Viresh Kumar
2020-01-27 10:50 ` [LTP] [PATCH V3 " Viresh Kumar
2020-01-27 14:32 ` Cyril Hrubis
2020-01-28 3:01 ` [LTP] [PATCH V4 2/2] syscalls/io_pgetevents: New tests Viresh Kumar
2020-01-28 13:40 ` Cyril Hrubis
2020-01-29 0:46 ` Viresh Kumar
2020-01-29 9:50 ` Cyril Hrubis [this message]
2020-01-28 13:42 ` [LTP] [PATCH V2 1/2] Add Syscall numbers for io_pgetevents Cyril Hrubis
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=20200129095055.GA21699@rei.lan \
--to=chrubis@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox