Source-Changes-HG archive

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

[src/trunk]: src/tests Now that atf gdb/coredump conflicts have been solved (...



details:   https://anonhg.NetBSD.org/src/rev/0f5bca324571
branches:  trunk
changeset: 755307:0f5bca324571
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon May 31 23:44:54 2010 +0000

description:
Now that atf gdb/coredump conflicts have been solved (thanks jmmv!),
remove USE_ATF ifdefs.

diffstat:

 tests/fs/common/snapshot.c     |  11 +----------
 tests/fs/ffs/t_fifos.c         |  17 +----------------
 tests/fs/ffs/t_snapshot.c      |   3 +--
 tests/fs/kernfs/t_basic.c      |  13 +------------
 tests/fs/nullfs/t_basic.c      |  13 +------------
 tests/fs/umapfs/t_basic.c      |  13 +------------
 tests/fs/union/t_basic.c       |  13 +------------
 tests/rump/rumpkern/t_modcmd.c |  12 +-----------
 8 files changed, 8 insertions(+), 87 deletions(-)

diffs (truncated from 375 to 300 lines):

diff -r bbff7706d5c5 -r 0f5bca324571 tests/fs/common/snapshot.c
--- a/tests/fs/common/snapshot.c        Mon May 31 23:37:52 2010 +0000
+++ b/tests/fs/common/snapshot.c        Mon May 31 23:44:54 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: snapshot.c,v 1.2 2010/04/16 14:05:32 pooka Exp $       */
+/*     $NetBSD: snapshot.c,v 1.3 2010/05/31 23:44:54 pooka Exp $       */
 
 #include <sys/types.h>
 #include <sys/ioctl.h>
@@ -13,15 +13,12 @@
 #include <string.h>
 #include <unistd.h>
 
-#define USE_ATF
-#ifdef USE_ATF
 ATF_TC_WITH_CLEANUP(snapshot);
 ATF_TC_HEAD(snapshot, tc)
 {
 
        atf_tc_set_md_var(tc, "descr", "basic snapshot features");
 }
-#endif
 
 static void
 makefile(const char *path)
@@ -34,11 +31,7 @@
        rump_sys_close(fd);
 }
 
-#ifdef USE_ATF
 ATF_TC_BODY(snapshot, tc)
-#else
-int main(int argc, char *argv[])
-#endif
 {
        char buf[1024];
        struct fss_set fss;
@@ -115,7 +108,6 @@
        /* done for now */
 }
 
-#ifdef USE_ATF
 ATF_TC_CLEANUP(snapshot, tc)
 {
 
@@ -127,4 +119,3 @@
        ATF_TP_ADD_TC(tp, snapshot);
        return 0;
 }
-#endif
diff -r bbff7706d5c5 -r 0f5bca324571 tests/fs/ffs/t_fifos.c
--- a/tests/fs/ffs/t_fifos.c    Mon May 31 23:37:52 2010 +0000
+++ b/tests/fs/ffs/t_fifos.c    Mon May 31 23:44:54 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_fifos.c,v 1.2 2010/05/01 10:46:29 pooka Exp $        */
+/*     $NetBSD: t_fifos.c,v 1.3 2010/05/31 23:44:54 pooka Exp $        */
 
 #include <sys/types.h>
 #include <sys/mount.h>
@@ -17,10 +17,6 @@
 
 #include <ufs/ufs/ufsmount.h>
 
-/* for debugging */
-#define USE_ATF
-
-#ifdef USE_ATF
 #include "../../h_macros.h"
 
 ATF_TC_WITH_CLEANUP(fifos);
@@ -29,11 +25,6 @@
        atf_tc_set_md_var(tc, "descr", "test fifo support in ffs");
        atf_tc_set_md_var(tc, "timeout", "5");
 }
-#else
-#include <err.h>
-#define atf_tc_fail_errno(a) err(1, a)
-#define atf_tc_fail(...) err(1, __VA_ARGS__)
-#endif
 
 #define teststr1 "raving & drooling"
 #define teststr2 "haha, charade"
@@ -111,11 +102,7 @@
 const char *newfs = "newfs -F -s 10000 " IMGNAME;
 #define FAKEBLK "/dev/sp00ka"
 
-#ifdef USE_ATF
 ATF_TC_BODY(fifos, tc)
-#else
-int main(int argc, char *argv[])
-#endif
 {
        struct ufs_args args;
        pthread_t ptw1, ptw2, ptr1, ptr2;
@@ -158,7 +145,6 @@
                atf_tc_fail_errno("unmount failed");
 }
 
-#ifdef USE_ATF
 ATF_TC_CLEANUP(fifos, tc)
 {
 
@@ -170,4 +156,3 @@
        ATF_TP_ADD_TC(tp, fifos);
        return 0;
 }
-#endif
diff -r bbff7706d5c5 -r 0f5bca324571 tests/fs/ffs/t_snapshot.c
--- a/tests/fs/ffs/t_snapshot.c Mon May 31 23:37:52 2010 +0000
+++ b/tests/fs/ffs/t_snapshot.c Mon May 31 23:44:54 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_snapshot.c,v 1.3 2010/04/13 10:19:25 pooka Exp $     */
+/*     $NetBSD: t_snapshot.c,v 1.4 2010/05/31 23:44:54 pooka Exp $     */
 
 #include <sys/types.h>
 #include <sys/mount.h>
@@ -30,7 +30,6 @@
 
        if (rump_sys_mount(MOUNT_FFS, path, 0, &uargs, sizeof(uargs)) == -1)
                atf_tc_fail_errno("mount ffs %s\n", path);
-
 }
 
 static void
diff -r bbff7706d5c5 -r 0f5bca324571 tests/fs/kernfs/t_basic.c
--- a/tests/fs/kernfs/t_basic.c Mon May 31 23:37:52 2010 +0000
+++ b/tests/fs/kernfs/t_basic.c Mon May 31 23:44:54 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_basic.c,v 1.2 2010/04/26 23:47:25 pooka Exp $        */
+/*     $NetBSD: t_basic.c,v 1.3 2010/05/31 23:44:54 pooka Exp $        */
 
 #include <sys/types.h>
 #include <sys/mount.h>
@@ -20,19 +20,14 @@
 
 #include <miscfs/kernfs/kernfs.h>
 
-#define USE_ATF
 #include "../../h_macros.h"
 
-#ifdef USE_ATF
 ATF_TC(getdents);
 ATF_TC_HEAD(getdents, tc)
 {
 
        atf_tc_set_md_var(tc, "descr", "kernfs directory contains files");
 }
-#else
-#define atf_tc_fail(...) errx(1, __VA_ARGS__)
-#endif
 
 static void
 mountkernfs(void)
@@ -46,11 +41,7 @@
                atf_tc_fail_errno("could not mount kernfs");
 }
 
-#ifdef USE_ATF
 ATF_TC_BODY(getdents, tc)
-#else
-int main(int argc, char *argv[])
-#endif
 {
        struct dirent *dent;
        char buf[8192];
@@ -77,7 +68,6 @@
        /* done */
 }
 
-#ifdef USE_ATF
 ATF_TC(hostname);
 ATF_TC_HEAD(hostname, tc)
 {
@@ -141,4 +131,3 @@
 
        return atf_no_error();
 }
-#endif
diff -r bbff7706d5c5 -r 0f5bca324571 tests/fs/nullfs/t_basic.c
--- a/tests/fs/nullfs/t_basic.c Mon May 31 23:37:52 2010 +0000
+++ b/tests/fs/nullfs/t_basic.c Mon May 31 23:44:54 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_basic.c,v 1.1 2010/03/30 01:02:47 pooka Exp $        */
+/*     $NetBSD: t_basic.c,v 1.2 2010/05/31 23:44:54 pooka Exp $        */
 
 #include <sys/types.h>
 #include <sys/mount.h>
@@ -18,18 +18,13 @@
 #include <miscfs/nullfs/null.h>
 #include <fs/tmpfs/tmpfs_args.h>
 
-#define USE_ATF
 #include "../../h_macros.h"
 
-#ifdef USE_ATF
 ATF_TC(basic);
 ATF_TC_HEAD(basic, tc)
 {
        atf_tc_set_md_var(tc, "descr", "basic nullfs functionality");
 }
-#else
-#define atf_tc_fail(...) errx(1, __VA_ARGS__)
-#endif
 
 #define MSTR "magic bus"
 
@@ -63,11 +58,7 @@
        return EPROGMISMATCH;
 }
 
-#ifdef USE_ATF
 ATF_TC_BODY(basic, tc)
-#else
-int main(int argc, char *argv[])
-#endif
 {
        struct null_args nargs;
        struct tmpfs_args targs;
@@ -128,10 +119,8 @@
        /* done */
 }
 
-#ifdef USE_ATF
 ATF_TP_ADD_TCS(tp)
 {
        ATF_TP_ADD_TC(tp, basic);
        return 0; /*XXX?*/
 }
-#endif
diff -r bbff7706d5c5 -r 0f5bca324571 tests/fs/umapfs/t_basic.c
--- a/tests/fs/umapfs/t_basic.c Mon May 31 23:37:52 2010 +0000
+++ b/tests/fs/umapfs/t_basic.c Mon May 31 23:44:54 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_basic.c,v 1.2 2010/05/30 06:09:17 dholland Exp $     */
+/*     $NetBSD: t_basic.c,v 1.3 2010/05/31 23:44:54 pooka Exp $        */
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -20,18 +20,13 @@
 #include <fs/tmpfs/tmpfs_args.h>
 #include <miscfs/umapfs/umap.h>
 
-#define USE_ATF
 #include "../../h_macros.h"
 
-#ifdef USE_ATF
 ATF_TC(basic);
 ATF_TC_HEAD(basic, tc)
 {
        atf_tc_set_md_var(tc, "descr", "basic umapfs mapping");
 }
-#else
-#define atf_tc_fail(...) errx(1, __VA_ARGS__)
-#endif
 
 /* deal with time_t change for running this on 5.0 */
 #if __NetBSD_Prereq__(5,99,7)
@@ -78,11 +73,7 @@
        }
 }
 
-#ifdef USE_ATF
 ATF_TC_BODY(basic, tc)
-#else
-int main(int argc, char *argv[])
-#endif
 {
        struct umap_args umargs;
        struct tmpfs_args targs;
@@ -154,10 +145,8 @@
        
 }
 
-#ifdef USE_ATF
 ATF_TP_ADD_TCS(tp)
 {
        ATF_TP_ADD_TC(tp, basic);
        return 0; /*XXX?*/
 }
-#endif
diff -r bbff7706d5c5 -r 0f5bca324571 tests/fs/union/t_basic.c
--- a/tests/fs/union/t_basic.c  Mon May 31 23:37:52 2010 +0000
+++ b/tests/fs/union/t_basic.c  Mon May 31 23:44:54 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_basic.c,v 1.2 2010/05/01 10:43:31 pooka Exp $        */
+/*     $NetBSD: t_basic.c,v 1.3 2010/05/31 23:44:54 pooka Exp $        */
 
 #include <sys/types.h>
 #include <sys/mount.h>
@@ -18,18 +18,13 @@
 #include <miscfs/union/union.h>
 #include <ufs/ufs/ufsmount.h>
 
-#define USE_ATF
 #include "../../h_macros.h"
 
-#ifdef USE_ATF
 ATF_TC(basic);
 ATF_TC_HEAD(basic, tc)
 {



Home | Main Index | Thread Index | Old Index