Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/fs Pass down the test case data to the test function, ...
details: https://anonhg.NetBSD.org/src/rev/8ee3f7305237
branches: trunk
changeset: 756328:8ee3f7305237
user: njoly <njoly%NetBSD.org@localhost>
date: Mon Jul 12 21:05:19 2010 +0000
description:
Pass down the test case data to the test function, to be able to use
meta-data informations such as srcdir. Requested by pooka.
While here remove fstype argument, and define it as a custom meta-data
(X-fs.type) instead.
diffstat:
tests/fs/common/h_fsmacros.h | 5 +++--
tests/fs/vfs/t_rmdirrace.c | 7 +++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diffs (51 lines):
diff -r d1bb11ff1553 -r 8ee3f7305237 tests/fs/common/h_fsmacros.h
--- a/tests/fs/common/h_fsmacros.h Mon Jul 12 21:00:47 2010 +0000
+++ b/tests/fs/common/h_fsmacros.h Mon Jul 12 21:05:19 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: h_fsmacros.h,v 1.5 2010/07/09 14:30:53 njoly Exp $ */
+/* $NetBSD: h_fsmacros.h,v 1.6 2010/07/12 21:05:19 njoly Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -54,6 +54,7 @@
{ \
atf_tc_set_md_var(tc, "descr", type " test for " desc); \
atf_tc_set_md_var(tc, "use.fs", "true"); \
+ atf_tc_set_md_var(tc, "X-fs.type", type); \
} \
ATF_TC_BODY(fs##_##func,tc) \
{ \
@@ -63,7 +64,7 @@
atf_tc_fail("newfs failed"); \
if (fs##_mount(tmp, MNTNAME, 0) != 0) \
atf_tc_fail("mount failed"); \
- func(type,MNTNAME); \
+ func(tc,MNTNAME); \
if (fs##_unmount(MNTNAME, 0) != 0) \
atf_tc_fail("unmount failed"); \
if (fs##_delfs(tmp) != 0) \
diff -r d1bb11ff1553 -r 8ee3f7305237 tests/fs/vfs/t_rmdirrace.c
--- a/tests/fs/vfs/t_rmdirrace.c Mon Jul 12 21:00:47 2010 +0000
+++ b/tests/fs/vfs/t_rmdirrace.c Mon Jul 12 21:05:19 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_rmdirrace.c,v 1.4 2010/07/09 14:30:53 njoly Exp $ */
+/* $NetBSD: t_rmdirrace.c,v 1.5 2010/07/12 21:05:20 njoly Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -62,11 +62,14 @@
}
static void
-race(const char *type, const char *path)
+race(const atf_tc_t *tc, const char *path)
{
+ const char *type;
int res, fd, quit;
pthread_t th1, th2;
+ type = atf_tc_get_md_var(tc, "X-fs.type");
+
if (FSTYPE_LFS(type))
atf_tc_expect_signal(-1, "PR kern/43582");
if (FSTYPE_SYSVBFS(type))
Home |
Main Index |
Thread Index |
Old Index