Remove plenty of makefile misconfigurations

This commit is contained in:
Justine Tunney 2022-07-21 09:16:38 -07:00
parent 9172fd42a0
commit 8b469389f6
186 changed files with 1408 additions and 901 deletions

View file

@ -23,13 +23,12 @@
#include "libc/sysv/consts/o.h"
#include "libc/testlib/testlib.h"
#define PATH "o/vfork_test"
char testlib_enable_tmp_setup_teardown;
TEST(vfork, test) {
int fd;
char buf[8] = {0};
mkdir("o", 0755);
ASSERT_NE(-1, (fd = open(PATH, O_RDWR | O_CREAT, 0644)));
ASSERT_NE(-1, (fd = open("vfork_test", O_RDWR | O_CREAT, 0644)));
ASSERT_EQ(5, write(fd, "hello", 5));
ASSERT_NE(-1, lseek(fd, 0, SEEK_SET));
if (!vfork()) {
@ -44,5 +43,4 @@ TEST(vfork, test) {
EXPECT_EQ(5, read(fd, buf, 5));
EXPECT_STREQ("hello", buf);
EXPECT_NE(-1, close(fd));
unlink(PATH);
}