8 size_t (*block_size_func) (
void),
9 void (*check_func) (
int fd,
long ofs))
27 fail (
"write %zu bytes at offset %zu in \"%s\" failed",
31 if (check_func !=
NULL)
block_sector_t block_size(struct block *block)
Returns the number of sectors in BLOCK.
static char buf[BUF_SIZE]
bool create(const char *file, unsigned initial_size)
int open(const char *file)
int write(int fd, const void *buffer, unsigned size)
void fail(const char *format,...)
void check_file(const char *file_name, const void *buf, size_t size)
void msg(const char *format,...)
#define CHECK(SUCCESS,...)
Takes an expression to test for SUCCESS and a message, which may include printf-style arguments.
void random_bytes(void *buf_, size_t size)
Writes SIZE random bytes into BUF.
void seq_test(const char *file_name, void *buf, size_t size, size_t initial_size, size_t(*block_size_func)(void), void(*check_func)(int fd, long ofs))
tests/filesys/seq-test.h
static const char file_name[]
tests/filesys/base/syn-read.h