projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use standard POSIX "ustar" format for the scratch disk.
[pintos-anon]
/
src
/
tests
/
filesys
/
extended
/
dir-rm-parent.c
diff --git
a/src/tests/filesys/extended/dir-rm-parent.c
b/src/tests/filesys/extended/dir-rm-parent.c
index e18d6fdadc57cf721ac85bd4d73bad2e02a030e6..eb43f5b6cf6070b9767bafa315165ffc3afa8786 100644
(file)
--- a/
src/tests/filesys/extended/dir-rm-parent.c
+++ b/
src/tests/filesys/extended/dir-rm-parent.c
@@
-1,3
+1,6
@@
+/* Tries to remove a parent of the current directory. This must
+ fail, because that directory is non-empty. */
+
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
@@
-9,8
+12,5
@@
test_main (void)
CHECK (chdir ("a"), "chdir \"a\"");
CHECK (mkdir ("b"), "mkdir \"b\"");
CHECK (chdir ("b"), "chdir \"b\"");
CHECK (chdir ("a"), "chdir \"a\"");
CHECK (mkdir ("b"), "mkdir \"b\"");
CHECK (chdir ("b"), "chdir \"b\"");
- msg ("remove \"/b\" (must not crash)");
- remove ("/b");
- msg ("remove \"/a\" (must not crash)");
- remove ("/a");
+ CHECK (!remove ("/a"), "remove \"/a\" (must fail)");
}
}