public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] Run the eventfd test in a temporary directory, because it creates some files
@ 2008-12-29 13:48 Jiri Palecek
  0 siblings, 0 replies; 5+ messages in thread
From: Jiri Palecek @ 2008-12-29 13:48 UTC (permalink / raw)
  Cc: ltp-list

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>
---
 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*/}
-- 
1.6.3.1




------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH] Run the eventfd test in a temporary directory, because it creates some files
       [not found] <200906232049.n5NKne0h007108@e5.ny.us.ibm.com>
@ 2009-06-25  9:09 ` Subrata Modak
  2009-06-30  7:41   ` Subrata Modak
  0 siblings, 1 reply; 5+ messages in thread
From: Subrata Modak @ 2009-06-25  9:09 UTC (permalink / raw)
  To: Jiri Palecek, Vijay Kumar B.; +Cc: ltp-list, Davide Libenzi

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,

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH] Run the eventfd test in a temporary directory, because it creates some files
  2009-06-25  9:09 ` [LTP] [PATCH] Run the eventfd test in a temporary directory, because it creates some files Subrata Modak
@ 2009-06-30  7:41   ` Subrata Modak
  2009-06-30 14:41     ` Davide Libenzi
  0 siblings, 1 reply; 5+ messages in thread
From: Subrata Modak @ 2009-06-30  7:41 UTC (permalink / raw)
  To: Jiri Palecek; +Cc: ltp-list, Davide Libenzi

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


------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH] Run the eventfd test in a temporary directory, because it creates some files
  2009-06-30  7:41   ` Subrata Modak
@ 2009-06-30 14:41     ` Davide Libenzi
  2009-06-30 14:50       ` Subrata Modak
  0 siblings, 1 reply; 5+ messages in thread
From: Davide Libenzi @ 2009-06-30 14:41 UTC (permalink / raw)
  To: Subrata Modak; +Cc: Jiri Palecek, ltp-list

On Tue, 30 Jun 2009, Subrata Modak wrote:

> 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 ?

No worry. It is the internal (kernel) interface that will eventually 
change. Userspace will not be affected by it.


- Davide



------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH] Run the eventfd test in a temporary directory, because it creates some files
  2009-06-30 14:41     ` Davide Libenzi
@ 2009-06-30 14:50       ` Subrata Modak
  0 siblings, 0 replies; 5+ messages in thread
From: Subrata Modak @ 2009-06-30 14:50 UTC (permalink / raw)
  To: Davide Libenzi; +Cc: Jiri Palecek, ltp-list

On Tue, 2009-06-30 at 07:41 -0700, Davide Libenzi wrote:
> On Tue, 30 Jun 2009, Subrata Modak wrote:
> 
> > 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 ?
> 
> No worry. It is the internal (kernel) interface that will eventually 
> change. Userspace will not be affected by it.

Thanks Davide for this clarification.

Regards--
Subrata

> 
> 
> - Davide
> 
> 


------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-06-30 14:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200906232049.n5NKne0h007108@e5.ny.us.ibm.com>
2009-06-25  9:09 ` [LTP] [PATCH] Run the eventfd test in a temporary directory, because it creates some files Subrata Modak
2009-06-30  7:41   ` Subrata Modak
2009-06-30 14:41     ` Davide Libenzi
2009-06-30 14:50       ` Subrata Modak
2008-12-29 13:48 Jiri Palecek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox