Initial file system tests.
[pintos-anon] / grading / filesys / fslib.h
1 #ifndef FSLIB_H
2 #define FSLIB_H
3
4 #include <debug.h>
5 #include <stdbool.h>
6 #include <stddef.h>
7
8 extern const char test_name[];
9 extern bool quiet;
10
11 void msg (const char *, ...) PRINTF_FORMAT (1, 2);
12 void fail (const char *, ...) PRINTF_FORMAT (1, 2) NO_RETURN;
13 void check (bool, const char *, ...) PRINTF_FORMAT (2, 3);
14
15 void shuffle (void *, size_t cnt, size_t size);
16 void seq_test (const char *filename,
17                void *buffer, size_t size,
18                size_t initial_size, int seed,
19                size_t (*block_size) (void), void (*check) (int fd, long ofs));
20 void check_file (const char *filename, const void *buf, size_t filesize);
21
22 #endif /* fslib.h */