CS318 - Pintos
Pintos source browser for JHU CS318 course
dir-rm-root.c
Go to the documentation of this file.
1 /** Try to remove the root directory.
2  This must fail. */
3 
4 #include <syscall.h>
5 #include "tests/lib.h"
6 #include "tests/main.h"
7 
8 void
9 test_main (void)
10 {
11  CHECK (!remove ("/"), "remove \"/\" (must fail)");
12  CHECK (create ("/a", 243), "create \"/a\"");
13 }
lib.h
CHECK
#define CHECK(SUCCESS,...)
Takes an expression to test for SUCCESS and a message, which may include printf-style arguments.
Definition: lib.h:29
remove
bool remove(const char *file)
Definition: syscall.c:97
test_main
void test_main(void)
Try to remove the root directory.
Definition: dir-rm-root.c:9
main.h
create
bool create(const char *file, unsigned initial_size)
Definition: syscall.c:91