Source-Changes-HG archive

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

[src/trunk]: src/regress/sys/fs/mkdir Add rename(2) case.



details:   https://anonhg.NetBSD.org/src/rev/f7564557c908
branches:  trunk
changeset: 522484:f7564557c908
user:      enami <enami%NetBSD.org@localhost>
date:      Wed Feb 20 03:52:51 2002 +0000

description:
Add rename(2) case.

diffstat:

 regress/sys/fs/mkdir/mkdir.c |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r 0a930a6f4677 -r f7564557c908 regress/sys/fs/mkdir/mkdir.c
--- a/regress/sys/fs/mkdir/mkdir.c      Wed Feb 20 03:15:35 2002 +0000
+++ b/regress/sys/fs/mkdir/mkdir.c      Wed Feb 20 03:52:51 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mkdir.c,v 1.1 2002/01/27 21:49:46 thorpej Exp $        */
+/*     $NetBSD: mkdir.c,v 1.2 2002/02/20 03:52:51 enami Exp $  */
 
 /*
  * Written by Jason R. Thorpe, Jan 27, 2002.
@@ -30,10 +30,15 @@
 {
        int i;
 
+       (void) rmdir("foo");
        for (i = 0; testdirnames[i] != NULL; i++) {
                (void) rmdir(testdirnames[i]);
                if (mkdir(testdirnames[i], 0777))
                        err(1, "mkdir(\"%s\", 0777)", testdirnames[i]);
+               if (rename(testdirnames[i], "foo"))
+                       err(1, "rename(\"%s\", \"foo\")", testdirnames[i]);
+               if (rename("foo/", testdirnames[i]))
+                       err(1, "rename(\"foo/\", \"%s\")", testdirnames[i]);
                if (rmdir(testdirnames[i]))
                        err(1, "rmdir(\"%s\")", testdirnames[i]);
        }



Home | Main Index | Thread Index | Old Index