This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: support for calling Linux syscalls directly


On Tue, Feb 12, 2013 at 01:24:54PM -0500, David Miller wrote:
> From: Rich Felker <dalias@aerifal.cx>
> Date: Tue, 12 Feb 2013 13:04:01 -0500
> 
> > On Tue, Feb 12, 2013 at 12:52:52PM -0500, David Miller wrote:
> >> From: chrubis@suse.cz
> >> Date: Tue, 12 Feb 2013 18:46:38 +0100
> >> 
> >> > I do the LTP[1] which makes legitimate use of syscall(3) as for the
> >> > testing purposes we need to be able to call bare syscalls in order to
> >> > validate both glibc and kernel API. And removing the call would mess
> >> > backward compatibility.
> >> 
> >> I don't think it makes sense for every source tree that wants to
> >> call syscall directly to have to duplicate over and over again the
> >> argument passing quirks of various architectures.
> >> 
> >> Multiple instances of such tricky code means multiple places for
> >> the same bugs over and over again.
> > 
> > LTP is a very special case. It's a test suite for the kernel API/ABI,
> > so of course it needs to be aware of (and testing!) these differences
> > to make sure nobody breaks them (which would in turn break glibc).
> 
> And everyone who wanted to write such a testsuite as well would have
> the same needs, and duplicate.

Of course two different test suites duplicate a lot of work - namely
all of the assertions they're testing. That's the whole point. If they
shared their code, they wouldn't really be any better than a single
test suite at finding bugs. The fact that multiple independently
developed test suites reach the same conclusion that everything is
working right is the whole reason for believing the software being
tested actually works.

Rich


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]