X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftests%2Ffilesys%2Fextended%2Fdir-rm-parent.c;h=eb43f5b6cf6070b9767bafa315165ffc3afa8786;hb=b51bfd75c7f55f008d67ec13d895694fbfa22430;hp=78e84b1c76b48613947ecc23fc4e4c3b9f120a29;hpb=73389b59f54bfed8eb0cb370a5ffec1223686a9e;p=pintos-anon diff --git a/src/tests/filesys/extended/dir-rm-parent.c b/src/tests/filesys/extended/dir-rm-parent.c index 78e84b1..eb43f5b 100644 --- a/src/tests/filesys/extended/dir-rm-parent.c +++ b/src/tests/filesys/extended/dir-rm-parent.c @@ -1,6 +1,5 @@ -/* Tries to remove the change of parents of the current - directory. - This can succeed or fail as long as it doesn't crash. */ +/* Tries to remove a parent of the current directory. This must + fail, because that directory is non-empty. */ #include #include "tests/lib.h" @@ -13,8 +12,5 @@ test_main (void) 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)"); }