1 /* $NetBSD: t_pr.c,v 1.6 2011/02/22 18:41:05 pooka Exp $ */
15 #include <rump/rump.h>
16 #include <rump/rump_syscalls.h>
18 #include <ufs/ufs/ufsmount.h>
20 #include "../../h_macros.h"
23 ATF_TC_HEAD(mknod
, tc
)
26 atf_tc_set_md_var(tc
, "descr", "mknod(2) hangs on LFS (PR kern/43503)");
27 atf_tc_set_md_var(tc
, "timeout", "20");
30 #define IMGNAME "disk.img"
31 #define FAKEBLK "/dev/blk"
32 ATF_TC_BODY(mknod
, tc
)
36 /* hmm, maybe i should fix newfs_lfs instead? */
37 if (system("newfs_lfs -D -F -s 10000 ./" IMGNAME
) == -1)
38 atf_tc_fail_errno("newfs failed");
40 memset(&args
, 0, sizeof(args
));
41 args
.fspec
= __UNCONST(FAKEBLK
);
44 if (rump_sys_mkdir("/mp", 0777) == -1)
45 atf_tc_fail_errno("cannot create mountpoint");
46 rump_pub_etfs_register(FAKEBLK
, IMGNAME
, RUMP_ETFS_BLK
);
47 if (rump_sys_mount(MOUNT_LFS
, "/mp", 0, &args
, sizeof(args
)) == -1)
48 atf_tc_fail_errno("rump_sys_mount failed");
50 //atf_tc_expect_timeout("PR kern/43503");
51 if (rump_sys_mknod("/mp/node", S_IFCHR
| 0777, 0) == -1)
52 atf_tc_fail_errno("mknod failed");
58 ATF_TP_ADD_TC(tp
, mknod
);