Re: [LTP] [PATCH] Run the eventfd test in a temporary directory, because it creates some files

Subrata Modak
2009-06-30T07:43:47Z

Jiri,

On Thu, 2009-06-25 at 14:39 +0530, Subrata Modak wrote:
> On Mon, 2008-12-29 at 14:48 +0100, Jiri Palecek wrote:
> > Hello,
> >
> > the eventfd test creates some files in the current directory. I think it should be creating the files in a temporary directory instead, as is already the standard with other LTP tests, because the current might be nonwriteable and the user might not want the files left there.
> >
> > Regards
> > Jiri Palecek
> >
> > Signed-off-by: Jiri Palecek <jpalecek@web.de>
>
> Thanks.
>
> Recently i have seen some patches on LKML from Davide on the change for
> eventfd() interface. Could you please verify how they will affect our
> tests, and, make changes if necessary ?
> http://lkml.org/lkml/2009/6/24/590,

Any thoughts for this ?

Regards--
Subrata

>
> Regards--
> Subrata
>
> > ---
> > testcases/kernel/syscalls/eventfd/eventfd01.c | 3 +++
> > 1 files changed, 3 insertions(+), 0 deletions(-)
> >
> > diff --git a/testcases/kernel/syscalls/eventfd/eventfd01.c b/testcases/kernel/syscalls/eventfd/eventfd01.c
> > index ee09752..0eed8d1 100644
> > --- a/testcases/kernel/syscalls/eventfd/eventfd01.c
> > +++ b/testcases/kernel/syscalls/eventfd/eventfd01.c
> > @@ -759,6 +759,8 @@ static void setup(void)
> > if (tst_kvercmp(2, 6, 22) < 0)
> > tst_brkm(TCONF, cleanup, "2.6.22 or greater kernel required");
> >
> > + /* Create a temporary directory & chdir there */
> > + tst_tmpdir();
> > /* Pause if that option was specified
> > * TEST_PAUSE contains the code to fork the test with the -c option.
> > */
> > @@ -776,6 +778,7 @@ static void cleanup(void)
> > */
> > TEST_CLEANUP;
> >
> > + tst_rmdir();
> > /* exit with return code appropriate for results */
> > tst_exit();
> > /*NOTREACHED*/}
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list