/*
* We cannot pass newfs parameters via the fstest interface,
* so do things the oldfashioned manual way.
*/
snprintf(cmd, sizeof(cmd), "newfs -G -b %d -F -s 10000 "
"ffs.img > /dev/null", MAXPHYS * 2);
if (system(cmd))
atf_tc_fail("cannot create file system");
rump_init();
if (rump_pub_etfs_register("/devdisk", "ffs.img", RUMP_ETFS_BLK))
atf_tc_fail("cannot register rump fake device");
args.fspec = __UNCONST("/devdisk");
if (rump_sys_mkdir("/mp", 0777) == -1)
atf_tc_fail_errno("create mountpoint");
/* 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");
}
/*
* We cannot pass newfs parameters via the fstest interface,
* so do things the oldfashioned manual way.
*/
snprintf(cmd, sizeof(cmd), "newfs -G -b %d -F -s 10000 "
"ffs.img > /dev/null", MAXBSIZE * 2);
if (system(cmd))
atf_tc_fail("cannot create file system");
rump_init();
if (rump_pub_etfs_register("/devdisk", "ffs.img", RUMP_ETFS_BLK))
atf_tc_fail("cannot register rump fake device");
args.fspec = __UNCONST("/devdisk");
if (rump_sys_mkdir("/mp", 0777) == -1)
atf_tc_fail_errno("create mountpoint");
/* 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");
}