Consistently spell "file name" and "file system" as two words.
[pintos-anon] / src / tests / filesys / extended / grow-too-big.c
1 /* Checks that trying to grow a file beyond the capacity of the
2    file system behaves reasonably (does not crash). */
3
4 #include <limits.h>
5 #include <syscall.h>
6 #include "tests/lib.h"
7 #include "tests/main.h"
8
9 void
10 test_main (void) 
11 {
12   const char *file_name = "fumble";
13   char zero = 0;
14   int fd;
15   
16   CHECK (create (file_name, 0), "create \"%s\"", file_name);
17   CHECK ((fd = open (file_name)) > 1, "open \"%s\"", file_name);
18   msg ("seek \"%s\"", file_name);
19   seek (fd, UINT_MAX);
20   msg ("write \"%s\"", file_name);
21   write (fd, &zero, 1);
22   msg ("close \"%s\"", file_name);
23   close (fd);
24 }