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

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