Source-Changes-HG archive

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

[src/trunk]: src/tests/syscall Use atf_tc_skip() instead of #if 0.



details:   https://anonhg.NetBSD.org/src/rev/77640e179981
branches:  trunk
changeset: 765859:77640e179981
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Wed Jun 08 05:28:03 2011 +0000

description:
Use atf_tc_skip() instead of #if 0.

diffstat:

 tests/syscall/t_stat.c |  16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diffs (58 lines):

diff -r e46881a6847c -r 77640e179981 tests/syscall/t_stat.c
--- a/tests/syscall/t_stat.c    Wed Jun 08 05:21:42 2011 +0000
+++ b/tests/syscall/t_stat.c    Wed Jun 08 05:28:03 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_stat.c,v 1.4 2011/06/07 19:06:39 jruoho Exp $ */
+/* $NetBSD: t_stat.c,v 1.5 2011/06/08 05:28:03 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_stat.c,v 1.4 2011/06/07 19:06:39 jruoho Exp $");
+__RCSID("$NetBSD: t_stat.c,v 1.5 2011/06/08 05:28:03 jruoho Exp $");
 
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -42,6 +42,8 @@
 #include <string.h>
 #include <unistd.h>
 
+#include <stdio.h>
+
 static const char *path = "stat";
 
 ATF_TC_WITH_CLEANUP(stat_chflags);
@@ -85,10 +87,6 @@
 
 ATF_TC_BODY(stat_dir, tc)
 {
-       /*
-        * XXX: This panics qemu/i386 guest.
-        */
-#if 0
        const short depth = 3;
        struct stat sa, sb;
        char *argv[2];
@@ -96,6 +94,11 @@
        FTS *fts;
        int ops;
 
+       /*
+        * XXX: This is verified to panic at least a qemu/i386 guest.
+        */
+       atf_tc_skip("the test may cause a panic");
+
        argv[1] = NULL;
        argv[0] = __UNCONST("/");
 
@@ -148,7 +151,6 @@
        }
 
        (void)fts_close(fts);
-#endif
 }
 
 ATF_TC(stat_err);



Home | Main Index | Thread Index | Old Index