1 /* Basic file operations (rename, unlink); once without sysroot. We
2 also test that the simulator has chdir:ed to PREFIX, when defined. */
15 void err (const char *s)
21 int main (int argc, char *argv[])
26 unlink (PREFIX "testfoo2.tmp");
28 f = fopen ("testfoo1.tmp", "w");
33 if (rename (PREFIX "testfoo1.tmp", PREFIX "testfoo2.tmp") != 0)
36 if (stat (PREFIX "testfoo2.tmp", &buf) != 0
37 || !S_ISREG (buf.st_mode))
40 if (stat ("testfoo2.tmp", &buf) != 0
41 || !S_ISREG (buf.st_mode))
44 if (unlink (PREFIX "testfoo2.tmp") != 0)