[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ltp-list
Subject:    [LTP] Patch for Bug no. [ 1427780 ] "link07 fails"
From:       Subrata Modak1 <subrata.modak () in ! ibm ! com>
Date:       2007-03-23 12:33:39
Message-ID: OFC5E04F7E.625FE319-ON652572A7.004391D2-652572A7.004305F3 () in ! ibm ! com
[Download RAW message or body]

Hi,

Kindly find attached the patch for Bug no. [ 1427780 ] link07 fails after
1st invocation when TDIRECTORY is set.

(See attached file: link07.patch)


Regards & Thanks--
Subrata Modak,
====================================
====================================
["link07.patch" (application/octet-stream)]

--- testcases/kernel/syscalls/link/link07.c	2006-05-26 11:56:40.000000000 +0530
+++ testcases/kernel/syscalls/link/link07.c	2007-03-23 16:58:31.000000000 +0530
@@ -252,7 +252,10 @@ cleanup()
      * print errno log if that option was specified.
      */
     TEST_CLEANUP;
-
+    unlink(file1);   /*Delete this tempfile created by this process*/
+    unlink(file2);   /*Delete this also, empties the following directory*/
+    rmdir(DIR_TEMP); /*Now go ahead and delete this empty temp directory, 
+                       this directory was chdir() from tst_tmpdir() routine in lib/tst_tmpdir.c*/
     /* Remove tmp dir and all files in it */
     tst_rmdir();
 
--- lib/tst_tmpdir.c	2005-01-05 02:30:35.000000000 +0530
+++ lib/tst_tmpdir.c	2007-03-23 16:58:52.000000000 +0530
@@ -143,6 +143,9 @@ tst_tmpdir()
 		 * The TDIRECTORY env. variable is set, so no temp dir is created.
 		 * Also, no clean up will be done via tst_rmdir().
 		 */
+                mkdir(TESTDIR,DIR_MODE); /*Try to create the directory if it does not exist already, 
+                                           user might forget to create one before exporting TDIRECTORY,
+                                           Will fail if it already exists, no issues in that*/
 		no_cleanup++;
 #if UNIT_TEST
 		printf("TDIRECTORY env var is set\n");


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic