PKUOS - Pintos
Pintos source browser for PKU Operating System course
dir-under-file.c
Go to the documentation of this file.
1/** Tries to create a directory with the same name as an existing
2 file, which must return failure. */
3
4#include <syscall.h>
5#include "tests/lib.h"
6#include "tests/main.h"
7
8void
9test_main (void)
10{
11 CHECK (create ("abc", 0), "create \"abc\"");
12 CHECK (!mkdir ("abc"), "mkdir \"abc\" (must return false)");
13}
void test_main(void)
Tries to create a directory with the same name as an existing file, which must return failure.
Definition: dir-under-file.c:9
bool create(const char *file, unsigned initial_size)
Definition: syscall.c:91
bool mkdir(const char *dir)
Definition: syscall.c:163
#define CHECK(SUCCESS,...)
Takes an expression to test for SUCCESS and a message, which may include printf-style arguments.
Definition: lib.h:29