Module Name: src
Committed By: pooka
Date: Wed Jun 16 15:57:12 UTC 2010
Modified Files:
src/tests/fs/ptyfs: t_nullpts.c
Log Message:
Fix test: we need to mount /dev/pts to /null/dev/pts, not /dev to
/null/dev: we're interested in /dev/pts and nullfs doesn't traverse
underlying mountpoints.
(I had code for nullfs mountpoint traversal in the tree i used to
test this originally... but I assume the rest of the world doesn't.
Before this change the test would still fail, but fail in the wrong
place and due to the wrong reason.)
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/fs/ptyfs/t_nullpts.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/fs/ptyfs/t_nullpts.c
diff -u src/tests/fs/ptyfs/t_nullpts.c:1.2 src/tests/fs/ptyfs/t_nullpts.c:1.3
--- src/tests/fs/ptyfs/t_nullpts.c:1.2 Wed Jun 16 15:39:41 2010
+++ src/tests/fs/ptyfs/t_nullpts.c Wed Jun 16 15:57:11 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: t_nullpts.c,v 1.2 2010/06/16 15:39:41 pooka Exp $ */
+/* $NetBSD: t_nullpts.c,v 1.3 2010/06/16 15:57:11 pooka Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
@@ -77,13 +77,18 @@
mountptyfs("/dev/pts", 0);
/*
- * null mount /dev to /null/dev
+ * null mount /dev/pts to /null/dev/pts
*/
if (rump_sys_mkdir("/null", 0777) == -1) {
if (errno != EEXIST)
atf_tc_fail_errno("null create /null");
}
- mountnull("/dev", "/null/dev", 0);
+ if (rump_sys_mkdir("/null/dev", 0777) == -1) {
+ if (errno != EEXIST)
+ atf_tc_fail_errno("null create /null/dev");
+ }
+
+ mountnull("/dev/pts", "/null/dev/pts", 0);
/*
* get slave/master pair.
@@ -95,7 +100,7 @@
/*
* Build nullfs path to slave.
*/
- strcpy(path, "/null/");
+ strcpy(path, "/null");
strcat(path, ptg.sn);
/*