CS318 - Pintos
Pintos source browser for JHU CS318 course
|
Go to the source code of this file.
Macros | |
#define | FILE_SIZE 8143 |
Grows two files in parallel and checks that their contents are correct. More... | |
Functions | |
static void | write_some_bytes (const char *file_name, int fd, const char *buf, size_t *ofs) |
void | test_main (void) |
tests/main.h More... | |
Variables | |
static char | buf_a [FILE_SIZE] |
static char | buf_b [FILE_SIZE] |
#define FILE_SIZE 8143 |
Grows two files in parallel and checks that their contents are correct.
Definition at line 9 of file grow-two-files.c.
void test_main | ( | void | ) |
This must fail, because that directory is non-empty.
This must fail.
and an ordinary file in each of them, until we fill up the disk.
Then delete most of them, for two reasons. First, "tar" limits file names to 100 characters (which could be extended to 256 without much trouble). Second, a full disk has no room for the tar archive.
Definition at line 32 of file grow-two-files.c.
References buf_a, buf_b, CHECK, check_file(), close(), create(), FILE_SIZE, msg(), open(), random_bytes(), random_init(), and write_some_bytes().
|
static |
Definition at line 14 of file grow-two-files.c.
References block_size(), buf, fail(), file_name, FILE_SIZE, random_ulong(), and write().
Referenced by test_main().
|
static |
Definition at line 10 of file grow-two-files.c.
Referenced by test_main().
|
static |
Definition at line 11 of file grow-two-files.c.
Referenced by test_main().