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.
This commit is contained in:
parent
70d05149f8
commit
e4723ab868
@ -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) \
|
||||
|
@ -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 *func2(void *arg)
|
||||
}
|
||||
|
||||
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))
|
||||
|
Loading…
Reference in New Issue
Block a user