summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpooka <pooka@NetBSD.org>2010-07-03 12:23:04 +0000
committerpooka <pooka@NetBSD.org>2010-07-03 12:23:04 +0000
commita8bfb4f650eeaecf3063533cee526cf9013fa27c (patch)
treed66004306436a95a70d966c7643e9e06bf7e2af0
parent8da786abdeb3cd145cba0e6c5f9b290e16cd3c48 (diff)
enhance fail check
-rw-r--r--tests/fs/union/t_pr.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/fs/union/t_pr.c b/tests/fs/union/t_pr.c
index 8e8d6ce3cb8..7ef22188468 100644
--- a/tests/fs/union/t_pr.c
+++ b/tests/fs/union/t_pr.c
@@ -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 @@ ATF_TC_BODY(devnull1, tc)
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);