Source-Changes-HG archive

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

[src/trunk]: src/tests/fs/union enhance fail check



details:   https://anonhg.NetBSD.org/src/rev/685a5c0a1d9d
branches:  trunk
changeset: 756024:685a5c0a1d9d
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sat Jul 03 12:23:04 2010 +0000

description:
enhance fail check

diffstat:

 tests/fs/union/t_pr.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (24 lines):

diff -r 3ab2001c80e2 -r 685a5c0a1d9d tests/fs/union/t_pr.c
--- a/tests/fs/union/t_pr.c     Sat Jul 03 12:10:35 2010 +0000
+++ b/tests/fs/union/t_pr.c     Sat Jul 03 12:23:04 2010 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index