Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/fs/common Don't panic if "unnecessary" dir already exi...



details:   https://anonhg.NetBSD.org/src/rev/07f4138c114f
branches:  trunk
changeset: 760548:07f4138c114f
user:      pooka <pooka%NetBSD.org@localhost>
date:      Fri Jan 07 11:50:37 2011 +0000

description:
Don't panic if "unnecessary" dir already exists.
(helpful when running the test without atf-run)

diffstat:

 tests/fs/common/fstest_puffs.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r e41f3aaf90ff -r 07f4138c114f tests/fs/common/fstest_puffs.c
--- a/tests/fs/common/fstest_puffs.c    Fri Jan 07 11:41:54 2011 +0000
+++ b/tests/fs/common/fstest_puffs.c    Fri Jan 07 11:50:37 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fstest_puffs.c,v 1.8 2011/01/07 10:45:45 pooka Exp $   */
+/*     $NetBSD: fstest_puffs.c,v 1.9 2011/01/07 11:50:37 pooka Exp $   */
 
 /*
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
@@ -360,7 +360,7 @@
        rump_init();
        if ((rv = ffs_fstest_newfs(tc, argp, image, size, fspriv)) != 0)
                return rv;
-       if (mkdir("p2kffsfake", 0777) == -1)
+       if (mkdir("p2kffsfake", 0777) == -1 && errno != EEXIST)
                return errno;
 
        setenv("P2K_NODETACH", "1", 1);



Home | Main Index | Thread Index | Old Index