svn commit: r260391 - user/pho/stress2/testcases/symlink

Peter Holm pho at FreeBSD.org
Tue Jan 7 11:51:01 UTC 2014


Author: pho
Date: Tue Jan  7 11:51:00 2014
New Revision: 260391
URL: http://svnweb.freebsd.org/changeset/base/260391

Log:
  Skip cleanup if not initialized.
  
  Sponsored by:	EMC / Isilon storage division

Modified:
  user/pho/stress2/testcases/symlink/symlink.c

Modified: user/pho/stress2/testcases/symlink/symlink.c
==============================================================================
--- user/pho/stress2/testcases/symlink/symlink.c	Tue Jan  7 11:43:51 2014	(r260390)
+++ user/pho/stress2/testcases/symlink/symlink.c	Tue Jan  7 11:51:00 2014	(r260391)
@@ -100,9 +100,11 @@ setup(int nb)
 void
 cleanup(void)
 {
-	(void)chdir("..");
-	if (rmdir(path) == -1) {
-		warn("rmdir(%s), %s:%d", path, __FILE__, __LINE__);
+	if (path[0] != 0) {
+		(void)chdir("..");
+		if (rmdir(path) == -1) {
+			warn("rmdir(%s), %s:%d", path, __FILE__, __LINE__);
+		}
 	}
 }
 


More information about the svn-src-user mailing list