Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/fs/ffs test snapshots on ffsv2 too
details: https://anonhg.NetBSD.org/src/rev/3396277aa961
branches: trunk
changeset: 758880:3396277aa961
user: pooka <pooka%NetBSD.org@localhost>
date: Fri Nov 19 12:36:49 2010 +0000
description:
test snapshots on ffsv2 too
diffstat:
tests/fs/ffs/Makefile | 3 ++-
tests/fs/ffs/t_snapshot_v2.c | 42 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 44 insertions(+), 1 deletions(-)
diffs (63 lines):
diff -r f1e4d05dbcf7 -r 3396277aa961 tests/fs/ffs/Makefile
--- a/tests/fs/ffs/Makefile Fri Nov 19 12:31:36 2010 +0000
+++ b/tests/fs/ffs/Makefile Fri Nov 19 12:36:49 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2010/11/05 11:32:09 pooka Exp $
+# $NetBSD: Makefile,v 1.14 2010/11/19 12:36:49 pooka Exp $
#
.include <bsd.own.mk>
@@ -9,6 +9,7 @@
TESTS_C+= t_fifos
TESTS_C+= t_snapshot
TESTS_C+= t_snapshot_log
+TESTS_C+= t_snapshot_v2
TESTS_C+= t_mount
LDADD+=-lrumpfs_ffs # ffs
diff -r f1e4d05dbcf7 -r 3396277aa961 tests/fs/ffs/t_snapshot_v2.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/fs/ffs/t_snapshot_v2.c Fri Nov 19 12:36:49 2010 +0000
@@ -0,0 +1,42 @@
+/* $NetBSD: t_snapshot_v2.c,v 1.1 2010/11/19 12:36:49 pooka Exp $ */
+
+#include <sys/types.h>
+#include <sys/mount.h>
+
+#include <rump/rump.h>
+#include <rump/rump_syscalls.h>
+
+#include <ufs/ufs/ufsmount.h>
+
+#include <atf-c.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "../../h_macros.h"
+
+#define IMGNAME "ffs.img"
+#define NEWFS "newfs -F -s 10000 -O 2 " IMGNAME
+#define BAKNAME "/mnt/le_snapp"
+
+static void
+mount_diskfs(const char *fspec, const char *path)
+{
+ struct ufs_args uargs;
+
+ uargs.fspec = __UNCONST(fspec);
+
+ if (rump_sys_mount(MOUNT_FFS, path, 0, &uargs, sizeof(uargs)) == -1)
+ atf_tc_fail_errno("mount ffs %s", path);
+}
+
+static void
+begin(void)
+{
+
+ /* empty */
+}
+
+#include "../common/snapshot.c"
Home |
Main Index |
Thread Index |
Old Index