[LTP] [PATCH V6 05/10] syscalls/fsconfig: New tests

Viresh Kumar viresh.kumar@linaro.org
Fri Mar 13 09:48:53 CET 2020


On 13-03-20, 09:03, Cyril Hrubis wrote:
> Hi!
> > > diff --git a/testcases/kernel/syscalls/fsconfig/fsconfig01.c b/testcases/kernel/syscalls/fsconfig/fsconfig01.c
> > > index d05350ce2..aea6db822 100644
> > > --- a/testcases/kernel/syscalls/fsconfig/fsconfig01.c
> > > +++ b/testcases/kernel/syscalls/fsconfig/fsconfig01.c
> > > @@ -77,6 +77,8 @@ static void run(void)
> > >                 SAFE_UMOUNT(MNTPOINT);
> > >                 tst_res(TPASS, "fsconfig() passed");
> > >         }
> > > +
> > > +       SAFE_CLOSE(fd);
> > 
> > This isn't required as cleanup() routine is taking care of it and this
> > is a test_all type test.
> 
> It _is_, I've tried top explain in the paragraph below, just run the
> test with large enough -i, sooner or late the test will run out of file
> descriptiors and then it will fail.
> 
> The key here is that the run() function can be called repeatedly but
> setup() and cleanup() are called only once at the start and at the end
> of the test.

I didn't knew about the -i option, yeah your change makes sense now :)

-- 
viresh


More information about the ltp mailing list