Module Name: src Committed By: njoly Date: Wed Jun 30 21:54:56 UTC 2010
Modified Files: src/distrib/sets/lists/tests: mi src/tests/fs/ffs: Makefile Added Files: src/tests/fs/ffs: t_mount.c Log Message: Small xfail testcase to exercise 48k ffs image mount, from problem reported by Hubert Feyrer on netbsd-us...@. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.7 -r1.8 src/tests/fs/ffs/Makefile cvs rdiff -u -r0 -r1.1 src/tests/fs/ffs/t_mount.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.92 src/distrib/sets/lists/tests/mi:1.93 --- src/distrib/sets/lists/tests/mi:1.92 Tue Jun 29 15:26:13 2010 +++ src/distrib/sets/lists/tests/mi Wed Jun 30 21:54:56 2010 @@ -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 Index: src/tests/fs/ffs/Makefile diff -u src/tests/fs/ffs/Makefile:1.7 src/tests/fs/ffs/Makefile:1.8 --- src/tests/fs/ffs/Makefile:1.7 Mon Apr 12 22:58:53 2010 +++ src/tests/fs/ffs/Makefile Wed Jun 30 21:54:56 2010 @@ -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 Added files: Index: src/tests/fs/ffs/t_mount.c diff -u /dev/null src/tests/fs/ffs/t_mount.c:1.1 --- /dev/null Wed Jun 30 21:54:56 2010 +++ src/tests/fs/ffs/t_mount.c Wed Jun 30 21:54:56 2010 @@ -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(); +}