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 <[email protected]>
---
 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to