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 fss with underlying fs mounted with MNT_LOG



details:   https://anonhg.NetBSD.org/src/rev/b0475e48907f
branches:  trunk
changeset: 758468:b0475e48907f
user:      pooka <pooka%NetBSD.org@localhost>
date:      Fri Nov 05 11:32:09 2010 +0000

description:
test fss with underlying fs mounted with MNT_LOG

diffstat:

 tests/fs/ffs/Makefile         |   3 +-
 tests/fs/ffs/t_snapshot_log.c |  45 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 1 deletions(-)

diffs (66 lines):

diff -r 4b7e7ff4bf4a -r b0475e48907f tests/fs/ffs/Makefile
--- a/tests/fs/ffs/Makefile     Fri Nov 05 11:31:15 2010 +0000
+++ b/tests/fs/ffs/Makefile     Fri Nov 05 11:32:09 2010 +0000
@@ -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
diff -r 4b7e7ff4bf4a -r b0475e48907f tests/fs/ffs/t_snapshot_log.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/fs/ffs/t_snapshot_log.c     Fri Nov 05 11:32:09 2010 +0000
@@ -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"



Home | Main Index | Thread Index | Old Index