Module Name: src
Committed By: njoly
Date: Tue Jul 13 15:50:31 UTC 2010
Modified Files:
src/tests/fs/common: ext2fs.c ffs.c h_fsmacros.h lfs.c msdosfs.c
sysvbfs.c tmpfs.c
src/tests/fs/ffs: t_mount.c
Log Message:
Add testcase data argument to all fstest helper functions.
Needed by pooka for puffs fstest support.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/fs/common/ext2fs.c \
src/tests/fs/common/ffs.c src/tests/fs/common/msdosfs.c \
src/tests/fs/common/sysvbfs.c src/tests/fs/common/tmpfs.c
cvs rdiff -u -r1.8 -r1.9 src/tests/fs/common/h_fsmacros.h
cvs rdiff -u -r1.5 -r1.6 src/tests/fs/common/lfs.c
cvs rdiff -u -r1.4 -r1.5 src/tests/fs/ffs/t_mount.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/ext2fs.c
diff -u src/tests/fs/common/ext2fs.c:1.3 src/tests/fs/common/ext2fs.c:1.4
--- src/tests/fs/common/ext2fs.c:1.3 Mon Jul 12 21:37:47 2010
+++ src/tests/fs/common/ext2fs.c Tue Jul 13 15:50:31 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: ext2fs.c,v 1.3 2010/07/12 21:37:47 njoly Exp $ */
+/* $NetBSD: ext2fs.c,v 1.4 2010/07/13 15:50:31 njoly Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -32,6 +32,7 @@
#include <sys/mount.h>
#include <sys/stat.h>
+#include <atf-c.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -49,7 +50,8 @@
};
static int
-ext2fs_fstest_newfs(void **buf, const char *image, off_t size)
+ext2fs_fstest_newfs(const atf_tc_t *tc, void **buf, const char *image,
+ off_t size)
{
char cmd[1024];
int res;
@@ -88,7 +90,7 @@
}
static int
-ext2fs_fstest_delfs(void *buf)
+ext2fs_fstest_delfs(const atf_tc_t *tc, void *buf)
{
int res;
struct ext2fstestargs *args = buf;
@@ -107,7 +109,7 @@
}
static int
-ext2fs_fstest_mount(void *buf, const char *path, int flags)
+ext2fs_fstest_mount(const atf_tc_t *tc, void *buf, const char *path, int flags)
{
int res;
struct ext2fstestargs *args = buf;
@@ -122,7 +124,7 @@
}
static int
-ext2fs_fstest_unmount(const char *path, int flags)
+ext2fs_fstest_unmount(const atf_tc_t *tc, const char *path, int flags)
{
int res;
Index: src/tests/fs/common/ffs.c
diff -u src/tests/fs/common/ffs.c:1.3 src/tests/fs/common/ffs.c:1.4
--- src/tests/fs/common/ffs.c:1.3 Mon Jul 12 21:37:47 2010
+++ src/tests/fs/common/ffs.c Tue Jul 13 15:50:31 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs.c,v 1.3 2010/07/12 21:37:47 njoly Exp $ */
+/* $NetBSD: ffs.c,v 1.4 2010/07/13 15:50:31 njoly Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -32,6 +32,7 @@
#include <sys/mount.h>
#include <sys/stat.h>
+#include <atf-c.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -49,7 +50,7 @@
};
static int
-ffs_fstest_newfs(void **buf, const char *image, off_t size)
+ffs_fstest_newfs(const atf_tc_t *tc, void **buf, const char *image, off_t size)
{
char cmd[1024];
int res;
@@ -87,7 +88,7 @@
}
static int
-ffs_fstest_delfs(void *buf)
+ffs_fstest_delfs(const atf_tc_t *tc, void *buf)
{
int res;
struct ffstestargs *args = buf;
@@ -106,7 +107,7 @@
}
static int
-ffs_fstest_mount(void *buf, const char *path, int flags)
+ffs_fstest_mount(const atf_tc_t *tc, void *buf, const char *path, int flags)
{
int res;
struct ffstestargs *args = buf;
@@ -121,7 +122,7 @@
}
static int
-ffs_fstest_unmount(const char *path, int flags)
+ffs_fstest_unmount(const atf_tc_t *tc, const char *path, int flags)
{
int res;
Index: src/tests/fs/common/msdosfs.c
diff -u src/tests/fs/common/msdosfs.c:1.3 src/tests/fs/common/msdosfs.c:1.4
--- src/tests/fs/common/msdosfs.c:1.3 Mon Jul 12 21:37:47 2010
+++ src/tests/fs/common/msdosfs.c Tue Jul 13 15:50:31 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: msdosfs.c,v 1.3 2010/07/12 21:37:47 njoly Exp $ */
+/* $NetBSD: msdosfs.c,v 1.4 2010/07/13 15:50:31 njoly Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -32,6 +32,7 @@
#include <sys/mount.h>
#include <sys/stat.h>
+#include <atf-c.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -49,7 +50,8 @@
};
static int
-msdosfs_fstest_newfs(void **buf, const char *image, off_t size)
+msdosfs_fstest_newfs(const atf_tc_t *tc, void **buf, const char *image,
+ off_t size)
{
char cmd[1024];
int res;
@@ -88,7 +90,7 @@
}
static int
-msdosfs_fstest_delfs(void *buf)
+msdosfs_fstest_delfs(const atf_tc_t *tc, void *buf)
{
int res;
struct msdosfstestargs *args = buf;
@@ -107,7 +109,7 @@
}
static int
-msdosfs_fstest_mount(void *buf, const char *path, int flags)
+msdosfs_fstest_mount(const atf_tc_t *tc, void *buf, const char *path, int flags)
{
int res;
struct msdosfstestargs *args = buf;
@@ -122,7 +124,7 @@
}
static int
-msdosfs_fstest_unmount(const char *path, int flags)
+msdosfs_fstest_unmount(const atf_tc_t *tc, const char *path, int flags)
{
int res;
Index: src/tests/fs/common/sysvbfs.c
diff -u src/tests/fs/common/sysvbfs.c:1.3 src/tests/fs/common/sysvbfs.c:1.4
--- src/tests/fs/common/sysvbfs.c:1.3 Mon Jul 12 21:37:47 2010
+++ src/tests/fs/common/sysvbfs.c Tue Jul 13 15:50:31 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: sysvbfs.c,v 1.3 2010/07/12 21:37:47 njoly Exp $ */
+/* $NetBSD: sysvbfs.c,v 1.4 2010/07/13 15:50:31 njoly Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -32,6 +32,7 @@
#include <sys/mount.h>
#include <sys/stat.h>
+#include <atf-c.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -49,7 +50,8 @@
};
static int
-sysvbfs_fstest_newfs(void **buf, const char *image, off_t size)
+sysvbfs_fstest_newfs(const atf_tc_t *tc, void **buf, const char *image,
+ off_t size)
{
char cmd[1024];
int res;
@@ -88,7 +90,7 @@
}
static int
-sysvbfs_fstest_delfs(void *buf)
+sysvbfs_fstest_delfs(const atf_tc_t *tc, void *buf)
{
int res;
struct sysvbfstestargs *args = buf;
@@ -107,7 +109,7 @@
}
static int
-sysvbfs_fstest_mount(void *buf, const char *path, int flags)
+sysvbfs_fstest_mount(const atf_tc_t *tc, void *buf, const char *path, int flags)
{
int res;
struct sysvbfstestargs *args = buf;
@@ -122,7 +124,7 @@
}
static int
-sysvbfs_fstest_unmount(const char *path, int flags)
+sysvbfs_fstest_unmount(const atf_tc_t *tc, const char *path, int flags)
{
int res;
Index: src/tests/fs/common/tmpfs.c
diff -u src/tests/fs/common/tmpfs.c:1.3 src/tests/fs/common/tmpfs.c:1.4
--- src/tests/fs/common/tmpfs.c:1.3 Mon Jul 12 21:37:47 2010
+++ src/tests/fs/common/tmpfs.c Tue Jul 13 15:50:31 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: tmpfs.c,v 1.3 2010/07/12 21:37:47 njoly Exp $ */
+/* $NetBSD: tmpfs.c,v 1.4 2010/07/13 15:50:31 njoly Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -32,6 +32,7 @@
#include <sys/mount.h>
#include <sys/stat.h>
+#include <atf-c.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -47,7 +48,8 @@
};
static int
-tmpfs_fstest_newfs(void **buf, const char *image, off_t size)
+tmpfs_fstest_newfs(const atf_tc_t *tc, void **buf, const char *image,
+ off_t size)
{
int res;
struct tmpfstestargs *args;
@@ -70,7 +72,7 @@
}
static int
-tmpfs_fstest_delfs(void *buf)
+tmpfs_fstest_delfs(const atf_tc_t *tc, void *buf)
{
struct tmpfstestargs *args = buf;
@@ -80,7 +82,7 @@
}
static int
-tmpfs_fstest_mount(void *buf, const char *path, int flags)
+tmpfs_fstest_mount(const atf_tc_t *tc, void *buf, const char *path, int flags)
{
int res;
struct tmpfstestargs *args = buf;
@@ -95,7 +97,7 @@
}
static int
-tmpfs_fstest_unmount(const char *path, int flags)
+tmpfs_fstest_unmount(const atf_tc_t *tc, const char *path, int flags)
{
int res;
Index: src/tests/fs/common/h_fsmacros.h
diff -u src/tests/fs/common/h_fsmacros.h:1.8 src/tests/fs/common/h_fsmacros.h:1.9
--- src/tests/fs/common/h_fsmacros.h:1.8 Tue Jul 13 11:12:19 2010
+++ src/tests/fs/common/h_fsmacros.h Tue Jul 13 15:50:31 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: h_fsmacros.h,v 1.8 2010/07/13 11:12:19 pooka Exp $ */
+/* $NetBSD: h_fsmacros.h,v 1.9 2010/07/13 15:50:31 njoly Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -60,14 +60,14 @@
{ \
void *tmp; \
atf_check_fstype(tc, type); \
- if (fs##_fstest_newfs(&tmp, IMGNAME, IMGSIZE) != 0) \
+ if (fs##_fstest_newfs(tc, &tmp, IMGNAME, IMGSIZE) != 0) \
atf_tc_fail("newfs failed"); \
- if (fs##_fstest_mount(tmp, MNTNAME, 0) != 0) \
+ if (fs##_fstest_mount(tc, tmp, MNTNAME, 0) != 0) \
atf_tc_fail("mount failed"); \
func(tc,MNTNAME); \
- if (fs##_fstest_unmount(MNTNAME, 0) != 0) \
+ if (fs##_fstest_unmount(tc, MNTNAME, 0) != 0) \
atf_tc_fail("unmount failed"); \
- if (fs##_fstest_delfs(tmp) != 0) \
+ if (fs##_fstest_delfs(tc, tmp) != 0) \
atf_tc_fail("delfs failed"); \
}
Index: src/tests/fs/common/lfs.c
diff -u src/tests/fs/common/lfs.c:1.5 src/tests/fs/common/lfs.c:1.6
--- src/tests/fs/common/lfs.c:1.5 Mon Jul 12 21:37:47 2010
+++ src/tests/fs/common/lfs.c Tue Jul 13 15:50:31 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs.c,v 1.5 2010/07/12 21:37:47 njoly Exp $ */
+/* $NetBSD: lfs.c,v 1.6 2010/07/13 15:50:31 njoly Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
};
static int
-lfs_fstest_newfs(void **buf, const char *image, off_t size)
+lfs_fstest_newfs(const atf_tc_t *tc, void **buf, const char *image, off_t size)
{
char cmd[1024];
int res;
@@ -89,7 +89,7 @@
}
static int
-lfs_fstest_delfs(void *buf)
+lfs_fstest_delfs(const atf_tc_t *tc, void *buf)
{
int res;
struct lfstestargs *args = buf;
@@ -108,7 +108,7 @@
}
static int
-lfs_fstest_mount(void *buf, const char *path, int flags)
+lfs_fstest_mount(const atf_tc_t *tc, void *buf, const char *path, int flags)
{
int res;
struct lfstestargs *args = buf;
@@ -125,7 +125,7 @@
}
static int
-lfs_fstest_unmount(const char *path, int flags)
+lfs_fstest_unmount(const atf_tc_t *tc, const char *path, int flags)
{
int res;
Index: src/tests/fs/ffs/t_mount.c
diff -u src/tests/fs/ffs/t_mount.c:1.4 src/tests/fs/ffs/t_mount.c:1.5
--- src/tests/fs/ffs/t_mount.c:1.4 Tue Jul 13 01:42:21 2010
+++ src/tests/fs/ffs/t_mount.c Tue Jul 13 15:50:31 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mount.c,v 1.4 2010/07/13 01:42:21 enami Exp $ */
+/* $NetBSD: t_mount.c,v 1.5 2010/07/13 15:50:31 njoly Exp $ */
/*
* Adapted for rump and atf from a testcase supplied
@@ -25,19 +25,19 @@
{
void *tmp;
- if (ffs_fstest_newfs(&tmp, IMGNAME, IMGSIZE) != 0)
+ if (ffs_fstest_newfs(tc, &tmp, IMGNAME, IMGSIZE) != 0)
atf_tc_fail("newfs failed");
atf_tc_expect_fail("PR kern/43573");
- if (ffs_fstest_mount(tmp, MNTDIR, 0) != 0) {
+ if (ffs_fstest_mount(tc, tmp, MNTDIR, 0) != 0) {
atf_tc_fail("mount failed");
}
atf_tc_expect_pass();
- if (ffs_fstest_unmount(MNTDIR, 0) != 0)
+ if (ffs_fstest_unmount(tc, MNTDIR, 0) != 0)
atf_tc_fail("unmount failed");
- if (ffs_fstest_delfs(tmp) != 0)
+ if (ffs_fstest_delfs(tc, tmp) != 0)
atf_tc_fail("delfs failed");
}