00001 /* Verifies that trying to create a file under a name that 00002 already exists will fail. */ 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 (create ("quux.dat", 0), "create quux.dat"); 00012 CHECK (create ("warble.dat", 0), "create warble.dat"); 00013 CHECK (!create ("quux.dat", 0), "try to re-create quux.dat"); 00014 CHECK (create ("baffle.dat", 0), "create baffle.dat"); 00015 CHECK (!create ("warble.dat", 0), "try to re-create quux.dat"); 00016 }