This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC PATCH] Test for syscall templates
- From: Zack Weinberg <zackw at panix dot com>
- To: Yury Norov <ynorov at caviumnetworks dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Date: Fri, 10 Feb 2017 09:10:03 -0500
- Subject: Re: [RFC PATCH] Test for syscall templates
- Authentication-results: sourceware.org; auth=none
- References: <1486721452-15097-1-git-send-email-ynorov@caviumnetworks.com> <CAKCAbMg=hEGYTpxg38f7vQee1T1Fm0uhJar__WsgnGP-PtpAJw@mail.gmail.com> <20170210132723.GA18280@yury-N73SV>
On Fri, Feb 10, 2017 at 8:27 AM, Yury Norov <ynorov@caviumnetworks.com> wrote:
> On Fri, Feb 10, 2017 at 07:51:07AM -0500, Zack Weinberg wrote:
>> On Fri, Feb 10, 2017 at 5:10 AM, Yury Norov <ynorov@caviumnetworks.com> wrote:
>> >
>> > This is RFC because I'm not sure this is right way to check the macro
>>
>> The way to make this a better test, and ensure you're not just testing
>> one of several possible implementations of the
>> trap-to-kernel-then-set-errno sequence, is to apply the same test to
>> _as many syscalls as practical_.
>
> So I only tried to test error path of syscall template. If you think
> that the correct way to do it is to call each syscall that may fail
> in each possible scenario - then I think glibc don't need the test
> like that, and we'd run LTP to find bugs of that sort - like I did in
> this case.
You asked how to make the test better. I told you how I think you
could make the test better.
I realize I'm asking for some extra work, but it should not take more
than a half hour and it really will be a better test this way.
(I _do_ think glibc should have a test like this. It does not require
elaborate setup, and the more bugs we can catch _during development_,
rather than months after the fact when someone thinks to run LTP, the
better.)
zw