00001 /* Tries to remove a parent of the current directory. This must 00002 fail, because that directory is non-empty. */ 00003 00004 #include <syscall.h> 00005 #include "tests/lib.h" 00006 #include "tests/main.h" 00007 00008 void 00009 test_main (void) 00010 { 00011 CHECK (mkdir ("a"), "mkdir \"a\""); 00012 CHECK (chdir ("a"), "chdir \"a\""); 00013 CHECK (mkdir ("b"), "mkdir \"b\""); 00014 CHECK (chdir ("b"), "chdir \"b\""); 00015 CHECK (!remove ("/a"), "remove \"/a\" (must fail)"); 00016 }