[LTP] [PATCH v1] Refactor getdtablesize01 using new LTP API

Richard Palethorpe rpalethorpe@suse.de
Wed Nov 1 09:01:46 CET 2023


Hello,

Cyril Hrubis <chrubis@suse.cz> writes:

> Hi!
>> > +static void setup(void)
>> >  {
>> > +	int fd;
>> > +
>> > +	fd = SAFE_CREAT(FILENAME, 0644);
>> > +	SAFE_CLOSE(fd);
>> >  }
>> > +
>> > +static struct tst_test test = {
>> > +	.test_all = run,
>> > +	.setup = setup,
>> > +	.needs_tmpdir = 1,
>> 
>> This tests the underlying file system to some extent, so we should test
>> all available file systems.
>
> As far as I can tell it does not actually. This is a compatibility
> function for od unixes and the name is literrally 'get descriptor table
> size' so I suppose that it once returned the size of the array allocated
> for the process to store file descritptors into.
>
> So I supose that the only sensible approach is to call the function and
> check that it returns a sane value.

+1

-- 
Thank you,
Richard.


More information about the ltp mailing list