t_mount.c revision 1.6 1 /* $NetBSD: t_mount.c,v 1.6 2010/07/19 16:22:05 pooka Exp $ */
2
3 /*
4 * Adapted for rump and atf from a testcase supplied
5 * by Hubert Feyrer on netbsd-users@
6 */
7
8 #include <atf-c.h>
9
10 #define IMGNAME "image.ffs"
11 #define IMGSIZE (96 * 512)
12
13 #define MNTDIR "/mnt"
14
15 #include "../common/h_fsmacros.h"
16
17 ATF_TC(48Kimage);
18 ATF_TC_HEAD(48Kimage, tc)
19 {
20 atf_tc_set_md_var(tc, "descr", "mount small 48K ffs image");
21 atf_tc_set_md_var(tc, "use.fs", "true");
22 }
23
24 ATF_TC_BODY(48Kimage, tc)
25 {
26 void *tmp;
27
28 if (ffs_fstest_newfs(tc, &tmp, IMGNAME, IMGSIZE) != 0)
29 atf_tc_fail("newfs failed");
30
31 atf_tc_expect_fail("PR kern/43573");
32 if (ffs_fstest_mount(tc, tmp, MNTDIR, 0) != 0) {
33 atf_tc_fail("mount failed");
34 }
35 atf_tc_expect_pass();
36
37 if (ffs_fstest_unmount(tc, MNTDIR, 0) != 0)
38 atf_tc_fail("unmount failed");
39
40 if (ffs_fstest_delfs(tc, tmp) != 0)
41 atf_tc_fail("delfs failed");
42 }
43
44 ATF_TP_ADD_TCS(tp)
45 {
46 ATF_TP_ADD_TC(tp, 48Kimage);
47 return atf_no_error();
48 }
49