Module Name: src
Committed By: pooka
Date: Fri Nov 5 11:32:09 UTC 2010
Modified Files:
src/tests/fs/ffs: Makefile
Added Files:
src/tests/fs/ffs: t_snapshot_log.c
Log Message:
test fss with underlying fs mounted with MNT_LOG
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tests/fs/ffs/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/fs/ffs/t_snapshot_log.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/ffs/Makefile
diff -u src/tests/fs/ffs/Makefile:1.12 src/tests/fs/ffs/Makefile:1.13
--- src/tests/fs/ffs/Makefile:1.12 Thu Sep 23 09:39:14 2010
+++ src/tests/fs/ffs/Makefile Fri Nov 5 11:32:09 2010
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2010/09/23 09:39:14 he Exp $
+# $NetBSD: Makefile,v 1.13 2010/11/05 11:32:09 pooka Exp $
#
.include <bsd.own.mk>
@@ -8,6 +8,7 @@
TESTS_C+= t_fifos
TESTS_C+= t_snapshot
+TESTS_C+= t_snapshot_log
TESTS_C+= t_mount
LDADD+=-lrumpfs_ffs # ffs
Added files:
Index: src/tests/fs/ffs/t_snapshot_log.c
diff -u /dev/null src/tests/fs/ffs/t_snapshot_log.c:1.1
--- /dev/null Fri Nov 5 11:32:09 2010
+++ src/tests/fs/ffs/t_snapshot_log.c Fri Nov 5 11:32:09 2010
@@ -0,0 +1,45 @@
+/* $NetBSD: t_snapshot_log.c,v 1.1 2010/11/05 11:32:09 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 " IMGNAME
+#define BAKNAME "/mnt/le_snapp"
+
+static void
+mount_diskfs(const char *fspec, const char *path)
+{
+ struct ufs_args uargs;
+ static int flags = MNT_LOG;
+
+ uargs.fspec = __UNCONST(fspec);
+
+ if (rump_sys_mount(MOUNT_FFS,
+ path, flags, &uargs, sizeof(uargs)) == -1)
+ atf_tc_fail_errno("mount ffs %s", path);
+ flags = 0;
+}
+
+static void
+begin(void)
+{
+
+ /* empty */
+}
+
+#include "../common/snapshot.c"