Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Small xfail testcase to exercise 48k ffs image mount, from p...
details: https://anonhg.NetBSD.org/src/rev/15080689f79e
branches: trunk
changeset: 755970:15080689f79e
user: njoly <njoly%NetBSD.org@localhost>
date: Wed Jun 30 21:54:56 2010 +0000
description:
Small xfail testcase to exercise 48k ffs image mount, from problem
reported by Hubert Feyrer on netbsd-users@.
diffstat:
distrib/sets/lists/tests/mi | 4 +++-
tests/fs/ffs/Makefile | 3 ++-
tests/fs/ffs/t_mount.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 50 insertions(+), 2 deletions(-)
diffs (91 lines):
diff -r ee4c05031272 -r 15080689f79e distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi Wed Jun 30 20:39:39 2010 +0000
+++ b/distrib/sets/lists/tests/mi Wed Jun 30 21:54:56 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.92 2010/06/29 15:26:13 pooka Exp $
+# $NetBSD: mi,v 1.93 2010/06/30 21:54:56 njoly Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -130,6 +130,7 @@
./usr/libdata/debug/usr/tests/fs tests-fs-debug
./usr/libdata/debug/usr/tests/fs/ffs tests-fs-debug
./usr/libdata/debug/usr/tests/fs/ffs/t_fifos.debug tests-fs-debug debug,atf
+./usr/libdata/debug/usr/tests/fs/ffs/t_mount.debug tests-fs-debug debug,atf
./usr/libdata/debug/usr/tests/fs/ffs/t_renamerace.debug tests-fs-debug debug,atf
./usr/libdata/debug/usr/tests/fs/ffs/t_snapshot.debug tests-fs-debug debug,atf
./usr/libdata/debug/usr/tests/fs/kernfs tests-fs-debug
@@ -715,6 +716,7 @@
./usr/tests/fs/ffs tests-fs-tests
./usr/tests/fs/ffs/Atffile tests-fs-tests atf
./usr/tests/fs/ffs/t_fifos tests-fs-tests atf
+./usr/tests/fs/ffs/t_mount tests-fs-tests atf
./usr/tests/fs/ffs/t_renamerace tests-fs-tests atf
./usr/tests/fs/ffs/t_snapshot tests-fs-tests atf
./usr/tests/fs/kernfs tests-fs-tests
diff -r ee4c05031272 -r 15080689f79e tests/fs/ffs/Makefile
--- a/tests/fs/ffs/Makefile Wed Jun 30 20:39:39 2010 +0000
+++ b/tests/fs/ffs/Makefile Wed Jun 30 21:54:56 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2010/04/12 22:58:53 pooka Exp $
+# $NetBSD: Makefile,v 1.8 2010/06/30 21:54:56 njoly Exp $
#
TESTSDIR= ${TESTSBASE}/fs/ffs
@@ -7,6 +7,7 @@
TESTS_C= t_renamerace
TESTS_C+= t_fifos
TESTS_C+= t_snapshot
+TESTS_C+= t_mount
LDADD+=-lrumpfs_ffs # ffs
LDADD+=-lrumpdev_fss # snapshot dev
diff -r ee4c05031272 -r 15080689f79e tests/fs/ffs/t_mount.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/fs/ffs/t_mount.c Wed Jun 30 21:54:56 2010 +0000
@@ -0,0 +1,45 @@
+/* $NetBSD: t_mount.c,v 1.1 2010/06/30 21:54:56 njoly Exp $ */
+
+/*
+ * Adapted for rump and atf from a testcase supplied
+ * by Hubert Feyrer on netbsd-users@
+ */
+
+#include <atf-c.h>
+
+#include "../common/ffs.c"
+
+#define IMGNAME "image.ffs"
+#define IMGSIZE (96 * 512)
+
+#define MNTDIR "/mnt"
+
+ATF_TC(48Kimage);
+ATF_TC_HEAD(48Kimage, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "mount small 48K ffs image");
+ atf_tc_set_md_var(tc, "use.fs", "true");
+ atf_tc_set_md_var(tc, "xfail", "No PR yet");
+}
+
+ATF_TC_BODY(48Kimage, tc)
+{
+ void *tmp;
+
+ if (ffs_newfs(&tmp, IMGNAME, IMGSIZE) != 0)
+ atf_tc_fail("newfs failed");
+
+ if (ffs_mount(tmp, MNTDIR, 0) != 0)
+ atf_tc_fail("mount failed");
+ if (ffs_unmount(MNTDIR, 0) != 0)
+ atf_tc_fail("unmount failed");
+
+ if (ffs_delfs(tmp) != 0)
+ atf_tc_fail("delfs failed");
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+ ATF_TP_ADD_TC(tp, 48Kimage);
+ return atf_no_error();
+}
Home |
Main Index |
Thread Index |
Old Index