Create testfile in tmpdir to be consistent with other tests.
The makes the behavior consistent with other testcases if /tmp is a
different fs than where the testcase is run from.
--- ltp-full-20071031.orig/testcases/kernel/syscalls/splice/splice01.c
2007-11-02 03:34:57.000000000 -0500
+++ ltp-full-20071031/testcases/kernel/syscalls/splice/splice01.c
2007-11-14 00:09:39.000000000 -0600
@@ -150,6 +150,9 @@
int i, len;
int fd_in, fd_out;
+ /* Make a temp directory and cd to it */
+ tst_tmpdir();
+
for (i = 0; i < SPLICE_TEST_BLOCK_SIZE; i++) {
buffer[i] = i & 0xff;
}
@@ -260,6 +263,9 @@
*/
TEST_CLEANUP;
+ /* Remove tmp dir and all files in it */
+ tst_rmdir();
+
/* exit with return code appropriate for results */
tst_exit();
} /* End cleanup() */
--- ltp-full-20071031.orig/testcases/kernel/syscalls/tee/tee01.c
2007-11-02 03:34:57.000000000 -0500
+++ ltp-full-20071031/testcases/kernel/syscalls/tee/tee01.c 2007-11-14
00:10:49.000000000 -0600
@@ -270,6 +270,9 @@
*/
void setup()
{
+ /* Make a temp directory and cd to it */
+ tst_tmpdir();
+
/* Initialize test file names */
sprintf(testfile1, "teetest%d_1.txt", getpid());
sprintf(testfile2, "teetest%d_2.txt", getpid());
@@ -297,6 +300,9 @@
*/
TEST_CLEANUP;
+ /* Remove tmp dir and all files in it */
+ tst_rmdir();
+
/* exit with return code appropriate for results */
tst_exit();
} /* End cleanup() */
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list