CS318 - Pintos
Pintos source browser for JHU CS318 course
src
tests
filesys
extended
dir-rmdir.c
Go to the documentation of this file.
1
/** Creates and removes a directory, then makes sure that it's
2
really gone. */
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
(
mkdir
(
"a"
),
"mkdir \"a\""
);
12
CHECK
(
remove
(
"a"
),
"rmdir \"a\""
);
13
CHECK
(!
chdir
(
"a"
),
"chdir \"a\" (must return false)"
);
14
}
lib.h
test_main
void test_main(void)
Creates and removes a directory, then makes sure that it's really gone.
Definition:
dir-rmdir.c:9
CHECK
#define CHECK(SUCCESS,...)
Takes an expression to test for SUCCESS and a message, which may include printf-style arguments.
Definition:
lib.h:29
mkdir
bool mkdir(const char *dir)
Definition:
syscall.c:163
remove
bool remove(const char *file)
Definition:
syscall.c:97
chdir
bool chdir(const char *dir)
Project 4 only.
Definition:
syscall.c:157
main.h
Generated on Thu Aug 22 2019 10:19:15 for CS318 - Pintos by
1.8.16