From c63717e4a5442feef389c46fdac2a7beea7c2f1f Mon Sep 17 00:00:00 2001 From: pooka Date: Fri, 7 Jan 2011 11:52:59 +0000 Subject: [PATCH] add another fstype for ffs -o log --- tests/fs/common/fstest_ffs.c | 12 +++++++++++- tests/fs/common/h_fsmacros.h | 9 ++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/tests/fs/common/fstest_ffs.c b/tests/fs/common/fstest_ffs.c index 524a2f3ab4dd..159f84f40ad2 100644 --- a/tests/fs/common/fstest_ffs.c +++ b/tests/fs/common/fstest_ffs.c @@ -1,4 +1,4 @@ -/* $NetBSD: fstest_ffs.c,v 1.2 2010/07/30 16:15:05 pooka Exp $ */ +/* $NetBSD: fstest_ffs.c,v 1.3 2011/01/07 11:52:59 pooka Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -89,6 +89,7 @@ ffs_fstest_newfs(const atf_tc_t *tc, void **buf, const char *image, off_t size, return 0; } +__strong_alias(ffslog_fstest_newfs,ffs_fstest_newfs); int ffs_fstest_delfs(const atf_tc_t *tc, void *buf) @@ -108,6 +109,7 @@ ffs_fstest_delfs(const atf_tc_t *tc, void *buf) return 0; } +__strong_alias(ffslog_fstest_delfs,ffs_fstest_delfs); int ffs_fstest_mount(const atf_tc_t *tc, void *buf, const char *path, int flags) @@ -124,6 +126,13 @@ ffs_fstest_mount(const atf_tc_t *tc, void *buf, const char *path, int flags) return res; } +int +ffslog_fstest_mount(const atf_tc_t *tc, void *buf, const char *path, int flags) +{ + + return ffs_fstest_mount(tc, buf, path, flags | MNT_LOG); +} + int ffs_fstest_unmount(const atf_tc_t *tc, const char *path, int flags) { @@ -136,3 +145,4 @@ ffs_fstest_unmount(const atf_tc_t *tc, const char *path, int flags) res = rump_sys_rmdir(path); return res; } +__strong_alias(ffslog_fstest_unmount,ffs_fstest_unmount); diff --git a/tests/fs/common/h_fsmacros.h b/tests/fs/common/h_fsmacros.h index b68bb495009e..e093ebbe83db 100644 --- a/tests/fs/common/h_fsmacros.h +++ b/tests/fs/common/h_fsmacros.h @@ -1,4 +1,4 @@ -/* $NetBSD: h_fsmacros.h,v 1.27 2011/01/07 11:41:40 pooka Exp $ */ +/* $NetBSD: h_fsmacros.h,v 1.28 2011/01/07 11:52:59 pooka Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -51,6 +51,7 @@ int _fs_##_fstest_unmount(const atf_tc_t *, const char *, int); FSPROTOS(ext2fs); FSPROTOS(ffs); +FSPROTOS(ffslog); FSPROTOS(lfs); FSPROTOS(msdosfs); FSPROTOS(nfs); @@ -169,6 +170,7 @@ do { \ #define ATF_TC_FSAPPLY(func,desc) \ ATF_TC_FSADD(ext2fs,MOUNT_EXT2FS,func,desc) \ ATF_TC_FSADD(ffs,MOUNT_FFS,func,desc) \ + ATF_TC_FSADD(ffslog,MOUNT_FFS,func,desc) \ ATF_TC_FSADD(lfs,MOUNT_LFS,func,desc) \ ATF_TC_FSADD(msdosfs,MOUNT_MSDOS,func,desc) \ ATF_TC_FSADD(nfs,MOUNT_NFS,func,desc) \ @@ -181,6 +183,7 @@ do { \ #define ATF_TP_FSAPPLY(func) \ ATF_TP_FSADD(ext2fs,func); \ ATF_TP_FSADD(ffs,func); \ + ATF_TP_FSADD(ffslog,func); \ ATF_TP_FSADD(lfs,func); \ ATF_TP_FSADD(msdosfs,func); \ ATF_TP_FSADD(nfs,func); \ @@ -204,6 +207,7 @@ do { \ #define ATF_TC_FSAPPLY_RO(func,desc,gen) \ ATF_TC_FSADD_RO(ext2fs,MOUNT_EXT2FS,func,desc,gen) \ ATF_TC_FSADD_RO(ffs,MOUNT_FFS,func,desc,gen) \ + ATF_TC_FSADD_RO(ffslog,MOUNT_FFS,func,desc,gen) \ ATF_TC_FSADD_RO(msdosfs,MOUNT_MSDOS,func,desc,gen) \ ATF_TC_FSADD_RO(nfs,MOUNT_NFS,func,desc,gen) \ ATF_TC_FSADD_RO(nfsro,MOUNT_NFS,func,desc,gen) \ @@ -212,6 +216,7 @@ do { \ #define ATF_TP_FSAPPLY_RO(func) \ ATF_TP_FSADD(ext2fs,func); \ ATF_TP_FSADD(ffs,func); \ + ATF_TP_FSADD(ffslog,func); \ ATF_TP_FSADD(msdosfs,func); \ ATF_TP_FSADD(nfs,func); \ ATF_TP_FSADD(nfsro,func); \ @@ -243,6 +248,8 @@ atf_check_fstype(const atf_tc_t *tc, const char *fs) (strcmp(atf_tc_get_md_var(tc, "X-fs.type"), "ext2fs") == 0) #define FSTYPE_FFS(tc)\ (strcmp(atf_tc_get_md_var(tc, "X-fs.type"), "ffs") == 0) +#define FSTYPE_FFSLOG(tc)\ + (strcmp(atf_tc_get_md_var(tc, "X-fs.type"), "ffs") == 0) #define FSTYPE_LFS(tc)\ (strcmp(atf_tc_get_md_var(tc, "X-fs.type"), "lfs") == 0) #define FSTYPE_MSDOS(tc)\