Module Name: src Committed By: pooka Date: Mon Aug 9 19:34:59 UTC 2010
Modified Files: src/tests/fs/ffs: t_mount.c Log Message: * convert 48k fs image test to FSTEST_CON/DESTRO * make sure hugeblocksize doesn't accidentally succeed To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 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/tests/fs/ffs/t_mount.c diff -u src/tests/fs/ffs/t_mount.c:1.8 src/tests/fs/ffs/t_mount.c:1.9 --- src/tests/fs/ffs/t_mount.c:1.8 Mon Aug 9 17:42:26 2010 +++ src/tests/fs/ffs/t_mount.c Mon Aug 9 19:34:59 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: t_mount.c,v 1.8 2010/08/09 17:42:26 pooka Exp $ */ +/* $NetBSD: t_mount.c,v 1.9 2010/08/09 19:34:59 pooka Exp $ */ /* * Basic tests for mounting @@ -12,11 +12,7 @@ #include <atf-c.h> -#define IMGNAME "image.ffs" -#define IMGSIZE (96 * 512) - -#define MNTDIR "/mnt" - +#define FSTEST_IMGSIZE (96 * 512) #include "../common/h_fsmacros.h" #include <sys/types.h> @@ -42,20 +38,11 @@ { void *tmp; - if (ffs_fstest_newfs(tc, &tmp, IMGNAME, IMGSIZE, NULL) != 0) - atf_tc_fail("newfs failed"); - atf_tc_expect_fail("PR kern/43573"); - if (ffs_fstest_mount(tc, tmp, MNTDIR, 0) != 0) { - atf_tc_fail("mount failed"); - } + FSTEST_CONSTRUCTOR(tc, ffs, tmp); atf_tc_expect_pass(); - if (ffs_fstest_unmount(tc, MNTDIR, 0) != 0) - atf_tc_fail("unmount failed"); - - if (ffs_fstest_delfs(tc, tmp) != 0) - atf_tc_fail("delfs failed"); + FSTEST_DESTRUCTOR(tc, ffs, tmp); } ATF_TC(fsbsize2big); @@ -95,6 +82,7 @@ /* mount succeeded? bad omen. confirm we're in trouble. */ if (rump_sys_mount(MOUNT_FFS, "/mp", 0, &args, sizeof(args)) != -1) { rump_sys_statvfs1("/mp", &svb, ST_WAIT); + atf_tc_fail("not expecting to be alive"); } /* otherwise we're do-ne */