1 /* $NetBSD: t_ptyfs.c,v 1.1 2010/06/11 23:52:38 pooka Exp $ */
15 #include <rump/rump.h>
16 #include <rump/rump_syscalls.h>
18 #include <fs/ptyfs/ptyfs.h>
20 #include "../../h_macros.h"
23 mountptyfs(const char *mp, int flags)
25 struct ptyfs_args args;
27 if (rump_sys_mkdir("/mp", 0777) == -1) {
29 atf_tc_fail_errno("mp1");
31 memset(&args, 0, sizeof(args));
32 args.version = PTYFS_ARGSVERSION;
34 if (rump_sys_mount(MOUNT_PTYFS, mp, flags, &args, sizeof(args)) == -1)
35 atf_tc_fail_errno("could not mount ptyfs");
39 ATF_TC_HEAD(basic, tc)
41 atf_tc_set_md_var(tc, "descr", "mount ptyfs");
44 ATF_TC_BODY(basic, tc)
50 if (rump_sys_unmount("/mp", 0) == -1)
51 atf_tc_fail_errno("unmount failed");
59 ATF_TP_ADD_TC(tp, basic);
61 return atf_no_error();