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

Cyril Hrubis chrubis@suse.cz
Tue Oct 31 18:11:13 CET 2023


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.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list