#include #include #include #include #include #include "toku_os.h" int verbose; static void test_pread_empty(const char *fname) { int fd; char c[12]; uint64_t r; unlink(fname); fd = open(fname, O_RDWR | O_CREAT | O_BINARY, S_IRWXU|S_IRWXG|S_IRWXO); if (verbose) printf("open %s fd %d\n", fname, fd); assert(fd != -1); r = pread(fd, c, sizeof c, 0); assert(r == 0); r = close(fd); if (verbose) printf("close %s %"PRIu64"\n", fname, r); } int test_main(int argc, char *argv[]) { int i; for (i=1; i