PKUOS - Pintos
Pintos source browser for PKU Operating System course
src
tests
filesys
extended
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
7
void
8
test_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
test_main
void test_main(void)
Tests mkdir().
Definition:
dir-mkdir.c:8
chdir
bool chdir(const char *dir)
Project 4 only.
Definition:
syscall.c:157
create
bool create(const char *file, unsigned initial_size)
Definition:
syscall.c:91
open
int open(const char *file)
Definition:
syscall.c:103
mkdir
bool mkdir(const char *dir)
Definition:
syscall.c:163
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
main.h
Generated on Thu Nov 4 2021 19:31:01 for PKUOS - Pintos by
1.9.2