Module Name:    src
Committed By:   pooka
Date:           Sat Jul  3 12:23:04 UTC 2010

Modified Files:
        src/tests/fs/union: t_pr.c

Log Message:
enhance fail check


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/fs/union/t_pr.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/union/t_pr.c
diff -u src/tests/fs/union/t_pr.c:1.5 src/tests/fs/union/t_pr.c:1.6
--- src/tests/fs/union/t_pr.c:1.5	Sat Jul  3 12:10:35 2010
+++ src/tests/fs/union/t_pr.c	Sat Jul  3 12:23:04 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_pr.c,v 1.5 2010/07/03 12:10:35 pooka Exp $	*/
+/*	$NetBSD: t_pr.c,v 1.6 2010/07/03 12:23:04 pooka Exp $	*/
 
 #include <sys/types.h>
 #include <sys/mount.h>
@@ -81,8 +81,12 @@
 	fd = rump_sys_open("/mp/null", O_WRONLY | O_CREAT | O_TRUNC);
 
 	atf_tc_expect_fail("PR kern/43560");
-	if (fd == -1)
-		atf_tc_fail_errno("open");
+	if (fd == -1 && errno == EROFS)
+		atf_tc_fail("open returned EROFS");
+	else if (fd == -1)
+		atf_tc_fail_errno("open fail");
+
+	atf_tc_expect_pass();
 }
 
 ATF_TC(devnull2);

Reply via email to