Module Name: src
Committed By: pooka
Date: Fri Apr 16 14:05:32 UTC 2010
Modified Files:
src/tests/fs/common: snapshot.c
Log Message:
Add the typical #ifdef USE_ATF stuff so I can debug the test if it
goes wrong.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/fs/common/snapshot.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.1 src/tests/fs/common/snapshot.c:1.2
--- src/tests/fs/common/snapshot.c:1.1 Tue Apr 13 10:19:25 2010
+++ src/tests/fs/common/snapshot.c Fri Apr 16 14:05:32 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: snapshot.c,v 1.1 2010/04/13 10:19:25 pooka Exp $ */
+/* $NetBSD: snapshot.c,v 1.2 2010/04/16 14:05:32 pooka Exp $ */
#include <sys/types.h>
#include <sys/ioctl.h>
@@ -13,12 +13,15 @@
#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)
@@ -31,7 +34,11 @@
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;
@@ -108,6 +115,7 @@
/* done for now */
}
+#ifdef USE_ATF
ATF_TC_CLEANUP(snapshot, tc)
{
@@ -119,3 +127,4 @@
ATF_TP_ADD_TC(tp, snapshot);
return 0;
}
+#endif