Module Name: src Committed By: pooka Date: Mon May 31 23:44:54 UTC 2010
Modified Files: src/tests/fs/common: snapshot.c src/tests/fs/ffs: t_fifos.c t_snapshot.c src/tests/fs/kernfs: t_basic.c src/tests/fs/nullfs: t_basic.c src/tests/fs/umapfs: t_basic.c src/tests/fs/union: t_basic.c src/tests/rump/rumpkern: t_modcmd.c Log Message: Now that atf gdb/coredump conflicts have been solved (thanks jmmv!), remove USE_ATF ifdefs. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/fs/common/snapshot.c cvs rdiff -u -r1.2 -r1.3 src/tests/fs/ffs/t_fifos.c cvs rdiff -u -r1.3 -r1.4 src/tests/fs/ffs/t_snapshot.c cvs rdiff -u -r1.2 -r1.3 src/tests/fs/kernfs/t_basic.c cvs rdiff -u -r1.1 -r1.2 src/tests/fs/nullfs/t_basic.c cvs rdiff -u -r1.2 -r1.3 src/tests/fs/umapfs/t_basic.c cvs rdiff -u -r1.2 -r1.3 src/tests/fs/union/t_basic.c cvs rdiff -u -r1.7 -r1.8 src/tests/rump/rumpkern/t_modcmd.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/common/snapshot.c diff -u src/tests/fs/common/snapshot.c:1.2 src/tests/fs/common/snapshot.c:1.3 --- src/tests/fs/common/snapshot.c:1.2 Fri Apr 16 14:05:32 2010 +++ src/tests/fs/common/snapshot.c Mon May 31 23:44:54 2010 @@ -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 Index: src/tests/fs/ffs/t_fifos.c diff -u src/tests/fs/ffs/t_fifos.c:1.2 src/tests/fs/ffs/t_fifos.c:1.3 --- src/tests/fs/ffs/t_fifos.c:1.2 Sat May 1 10:46:29 2010 +++ src/tests/fs/ffs/t_fifos.c Mon May 31 23:44:54 2010 @@ -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 Index: src/tests/fs/ffs/t_snapshot.c diff -u src/tests/fs/ffs/t_snapshot.c:1.3 src/tests/fs/ffs/t_snapshot.c:1.4 --- src/tests/fs/ffs/t_snapshot.c:1.3 Tue Apr 13 10:19:25 2010 +++ src/tests/fs/ffs/t_snapshot.c Mon May 31 23:44:54 2010 @@ -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 Index: src/tests/fs/kernfs/t_basic.c diff -u src/tests/fs/kernfs/t_basic.c:1.2 src/tests/fs/kernfs/t_basic.c:1.3 --- src/tests/fs/kernfs/t_basic.c:1.2 Mon Apr 26 23:47:25 2010 +++ src/tests/fs/kernfs/t_basic.c Mon May 31 23:44:54 2010 @@ -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 Index: src/tests/fs/nullfs/t_basic.c diff -u src/tests/fs/nullfs/t_basic.c:1.1 src/tests/fs/nullfs/t_basic.c:1.2 --- src/tests/fs/nullfs/t_basic.c:1.1 Tue Mar 30 01:02:47 2010 +++ src/tests/fs/nullfs/t_basic.c Mon May 31 23:44:54 2010 @@ -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 Index: src/tests/fs/umapfs/t_basic.c diff -u src/tests/fs/umapfs/t_basic.c:1.2 src/tests/fs/umapfs/t_basic.c:1.3 --- src/tests/fs/umapfs/t_basic.c:1.2 Sun May 30 06:09:17 2010 +++ src/tests/fs/umapfs/t_basic.c Mon May 31 23:44:54 2010 @@ -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 Index: src/tests/fs/union/t_basic.c diff -u src/tests/fs/union/t_basic.c:1.2 src/tests/fs/union/t_basic.c:1.3 --- src/tests/fs/union/t_basic.c:1.2 Sat May 1 10:43:31 2010 +++ src/tests/fs/union/t_basic.c Mon May 31 23:44:54 2010 @@ -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) { atf_tc_set_md_var(tc, "descr", "basic union functionality: two views"); } -#else -#define atf_tc_fail(...) errx(1, __VA_ARGS__) -#endif #define MSTR "magic bus" @@ -69,11 +64,7 @@ #define DEV2 "/dev/fs2" #define newfs_base "newfs -F -s 10000 " -#ifdef USE_ATF ATF_TC_BODY(basic, tc) -#else -int main(int argc, char *argv[]) -#endif { struct ufs_args args; struct union_args unionargs; @@ -128,10 +119,8 @@ /* unmount etc. yaddayadda if non-lazy */ } -#ifdef USE_ATF ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, basic); return 0; /*XXX?*/ } -#endif Index: src/tests/rump/rumpkern/t_modcmd.c diff -u src/tests/rump/rumpkern/t_modcmd.c:1.7 src/tests/rump/rumpkern/t_modcmd.c:1.8 --- src/tests/rump/rumpkern/t_modcmd.c:1.7 Sat May 1 12:11:53 2010 +++ src/tests/rump/rumpkern/t_modcmd.c Mon May 31 23:44:54 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: t_modcmd.c,v 1.7 2010/05/01 12:11:53 pooka Exp $ */ +/* $NetBSD: t_modcmd.c,v 1.8 2010/05/31 23:44:54 pooka Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -46,10 +46,6 @@ #include <unistd.h> #include <util.h> -#define USE_ATF - -#ifdef USE_ATF - #include "../../h_macros.h" /* * We verify that modules can be loaded and unloaded. @@ -119,11 +115,7 @@ } #define TMPFSMODULE "librumpfs_tmpfs.so" -#ifdef USE_ATF ATF_TC_BODY(cmsg_modcmd, tc) -#else -int main(int argc, char *argv[]) -#endif { struct tmpfs_args args; const struct modinfo *const *mi_start, *const *mi_end; @@ -185,11 +177,9 @@ atf_tc_fail("mount unexpectedly succeeded"); } -#ifdef USE_ATF ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, cmsg_modcmd); return atf_no_error(); } -#endif