Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/fs/union xfail test for problem described in PR kern/2...
details: https://anonhg.NetBSD.org/src/rev/7e48370b43e2
branches: trunk
changeset: 755937:7e48370b43e2
user: pooka <pooka%NetBSD.org@localhost>
date: Tue Jun 29 15:25:28 2010 +0000
description:
xfail test for problem described in PR kern/23986
diffstat:
tests/fs/union/Makefile | 4 +-
tests/fs/union/t_pr.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 81 insertions(+), 2 deletions(-)
diffs (99 lines):
diff -r 89bd7a667711 -r 7e48370b43e2 tests/fs/union/Makefile
--- a/tests/fs/union/Makefile Tue Jun 29 15:05:43 2010 +0000
+++ b/tests/fs/union/Makefile Tue Jun 29 15:25:28 2010 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.1 2010/03/29 18:19:19 pooka Exp $
+# $NetBSD: Makefile,v 1.2 2010/06/29 15:25:28 pooka Exp $
#
TESTSDIR= ${TESTSBASE}/fs/union
WARNS= 4
-TESTS_C= t_basic
+TESTS_C= t_basic t_pr
LDADD+= -lrumpfs_union -lrumpvfs_layerfs -lrumpfs_ffs # fs drivers
LDADD+= -lrumpdev_disk -lrumpdev # disk device
diff -r 89bd7a667711 -r 7e48370b43e2 tests/fs/union/t_pr.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/fs/union/t_pr.c Tue Jun 29 15:25:28 2010 +0000
@@ -0,0 +1,79 @@
+/* $NetBSD: t_pr.c,v 1.1 2010/06/29 15:25:28 pooka Exp $ */
+
+#include <sys/types.h>
+#include <sys/mount.h>
+
+#include <atf-c.h>
+#include <err.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <rump/rump.h>
+#include <rump/rump_syscalls.h>
+
+#include <miscfs/union/union.h>
+#include <ufs/ufs/ufsmount.h>
+
+#include "../../h_macros.h"
+
+ATF_TC(multilayer);
+ATF_TC_HEAD(multilayer, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "mount_union -b twice");
+ atf_tc_set_md_var(tc, "use.fs", "true");
+ atf_tc_set_md_var(tc, "xfail", "PR kern/23986");
+}
+
+#define IMG1 "atf1.img"
+#define DEV1 "/dev/fs1"
+#define newfs_base "newfs -F -s 10000 "
+
+ATF_TC_BODY(multilayer, tc)
+{
+ struct ufs_args args;
+ struct union_args unionargs;
+
+ if (system(newfs_base IMG1) == -1)
+ atf_tc_fail_errno("create img1");
+
+ rump_init();
+ rump_pub_etfs_register(DEV1, IMG1, RUMP_ETFS_BLK);
+
+ memset(&args, 0, sizeof(args));
+ args.fspec = __UNCONST(DEV1);
+ if (rump_sys_mount(MOUNT_FFS, "/", 0, &args, sizeof(args)) == -1)
+ atf_tc_fail_errno("could not mount root");
+
+ if (rump_sys_mkdir("/Tunion", 0777) == -1)
+ atf_tc_fail_errno("mkdir mp1");
+ if (rump_sys_mkdir("/Tunion2", 0777) == -1)
+ atf_tc_fail_errno("mkdir mp2");
+ if (rump_sys_mkdir("/Tunion2/A", 0777) == -1)
+ atf_tc_fail_errno("mkdir A");
+ if (rump_sys_mkdir("/Tunion2/B", 0777) == -1)
+ atf_tc_fail_errno("mkdir B");
+
+ unionargs.target = __UNCONST("/Tunion2/A");
+ unionargs.mntflags = UNMNT_BELOW;
+
+ if (rump_sys_mount(MOUNT_UNION, "/Tunion", 0,
+ &unionargs, sizeof(unionargs)) == -1)
+ atf_tc_fail_errno("union mount");
+
+ unionargs.target = __UNCONST("/Tunion2/B");
+ unionargs.mntflags = UNMNT_BELOW;
+
+ /* BADABOOM */
+ rump_sys_mount(MOUNT_UNION, "/Tunion", 0,&unionargs,sizeof(unionargs));
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+ ATF_TP_ADD_TC(tp, multilayer);
+
+ return atf_no_error();
+}
Home |
Main Index |
Thread Index |
Old Index