Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/fs Make the FSTYPE macros take tc instead of derivativ...
details: https://anonhg.NetBSD.org/src/rev/265a5d0d7f4d
branches: trunk
changeset: 756331:265a5d0d7f4d
user: pooka <pooka%NetBSD.org@localhost>
date: Tue Jul 13 11:12:19 2010 +0000
description:
Make the FSTYPE macros take tc instead of derivative type "type".
ok njoly
diffstat:
tests/fs/common/h_fsmacros.h | 22 +++++++++++++++-------
tests/fs/vfs/t_rmdirrace.c | 13 +++++--------
2 files changed, 20 insertions(+), 15 deletions(-)
diffs (73 lines):
diff -r 57a1a501d69f -r 265a5d0d7f4d tests/fs/common/h_fsmacros.h
--- a/tests/fs/common/h_fsmacros.h Tue Jul 13 01:42:21 2010 +0000
+++ b/tests/fs/common/h_fsmacros.h Tue Jul 13 11:12:19 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: h_fsmacros.h,v 1.7 2010/07/12 21:37:47 njoly Exp $ */
+/* $NetBSD: h_fsmacros.h,v 1.8 2010/07/13 11:12:19 pooka Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -111,11 +111,19 @@
atf_tc_skip("filesystem not selected");
}
-#define FSTYPE_EXT2FS(type) (strcmp(type, MOUNT_EXT2FS) == 0)
-#define FSTYPE_FFS(type) (strcmp(type, MOUNT_FFS) == 0)
-#define FSTYPE_LFS(type) (strcmp(type, MOUNT_LFS) == 0)
-#define FSTYPE_MSDOS(type) (strcmp(type, MOUNT_MSDOS) == 0)
-#define FSTYPE_SYSVBFS(type) (strcmp(type, MOUNT_SYSVBFS) == 0)
-#define FSTYPE_TMPFS(type) (strcmp(type, MOUNT_TMPFS) == 0)
+#define FSTYPE_EXT2FS(tc)\
+ (strcmp(atf_tc_get_md_var(tc, "X-fs.type"), MOUNT_EXT2FS) == 0)
+#define FSTYPE_FFS(tc)\
+ (strcmp(atf_tc_get_md_var(tc, "X-fs.type"), MOUNT_FFS) == 0)
+#define FSTYPE_LFS(tc)\
+ (strcmp(atf_tc_get_md_var(tc, "X-fs.type"), MOUNT_LFS) == 0)
+#define FSTYPE_MSDOS(tc)\
+ (strcmp(atf_tc_get_md_var(tc, "X-fs.type"), MOUNT_MSDOS) == 0)
+#define FSTYPE_PUFFS(tc)\
+ (strcmp(atf_tc_get_md_var(tc, "X-fs.type"), MOUNT_PUFFS) == 0)
+#define FSTYPE_SYSVBFS(tc)\
+ (strcmp(atf_tc_get_md_var(tc, "X-fs.type"), MOUNT_SYSVBFS) == 0)
+#define FSTYPE_TMPFS(tc)\
+ (strcmp(atf_tc_get_md_var(tc, "X-fs.type"), MOUNT_TMPFS) == 0)
#endif /* __H_FSMACROS_H_ */
diff -r 57a1a501d69f -r 265a5d0d7f4d tests/fs/vfs/t_rmdirrace.c
--- a/tests/fs/vfs/t_rmdirrace.c Tue Jul 13 01:42:21 2010 +0000
+++ b/tests/fs/vfs/t_rmdirrace.c Tue Jul 13 11:12:19 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_rmdirrace.c,v 1.5 2010/07/12 21:05:20 njoly Exp $ */
+/* $NetBSD: t_rmdirrace.c,v 1.6 2010/07/13 11:12:19 pooka Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -64,16 +64,13 @@
static void
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))
+ if (FSTYPE_LFS(tc))
atf_tc_expect_signal(-1, "PR kern/43582");
- if (FSTYPE_SYSVBFS(type))
- atf_tc_skip("%s does not support rmdir(2)", type);
+ if (FSTYPE_SYSVBFS(tc))
+ atf_tc_skip("rmdir(2) not supported by file system");
fd = rump_sys_open(".", O_RDONLY, 0666);
if (fd == -1)
@@ -111,7 +108,7 @@
* saying "just chill even if the test doesn't fail", so this
* takes care of it.
*/
- if (FSTYPE_LFS(type))
+ if (FSTYPE_LFS(tc))
abort();
}
Home |
Main Index |
Thread Index |
Old Index