PKUOS - Pintos
Pintos source browser for PKU Operating System course
dir-mkdir.c
Go to the documentation of this file.
1/** Tests mkdir(). */
2
3#include <syscall.h>
4#include "tests/lib.h"
5#include "tests/main.h"
6
7void
8test_main (void)
9{
10 CHECK (mkdir ("a"), "mkdir \"a\"");
11 CHECK (create ("a/b", 512), "create \"a/b\"");
12 CHECK (chdir ("a"), "chdir \"a\"");
13 CHECK (open ("b") > 1, "open \"b\"");
14}
15
void test_main(void)
Tests mkdir().
Definition: dir-mkdir.c:8
bool chdir(const char *dir)
Project 4 only.
Definition: syscall.c:157
bool create(const char *file, unsigned initial_size)
Definition: syscall.c:91
int open(const char *file)
Definition: syscall.c:103
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