/* $NetBSD: t_io.c,v 1.1 2010/11/12 17:33:28 pooka Exp $ */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "../../h_macros.h" #include "../common/h_fsmacros.h" #define MAKEOPTS(...) \ char *theopts[] = {NULL, "-s", __VA_ARGS__, "dtfs", "n/a", NULL} ATF_TC(nocache); ATF_TC_HEAD(nocache, tc) { atf_tc_set_md_var(tc, "descr", "tests large i/o without page cache"); } ATF_TC_BODY(nocache, tc) { MAKEOPTS("-o", "nopagecache"); char data[1024*1024]; void *args; int fd; FSTEST_CONSTRUCTOR_FSPRIV(tc, puffs, args, theopts); FSTEST_ENTER(); RL(fd = rump_sys_open("afile", O_CREAT | O_RDWR, 0755)); RL(rump_sys_write(fd, data, sizeof(data))); rump_sys_close(fd); FSTEST_EXIT(); FSTEST_DESTRUCTOR(tc, puffs, args); } ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, nocache); return atf_no_error(); }