Module Name:    src
Committed By:   pooka
Date:           Sat Jul  3 13:37:23 UTC 2010

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

Log Message:
Improve previous a bit more: now it works correctly in all cases
with or without xfail.

There is still room for improvement, though: with xfail the
errno != EROFS branch does not report why open failed.


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

Reply via email to