1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:17:44 +00:00

Tests: Build automatically, fix compilation errors

This commit is contained in:
Ben Wiederhake 2020-08-01 21:18:32 +02:00 committed by Andreas Kling
parent 538b985487
commit 29eceebdbf
21 changed files with 31 additions and 1 deletions

View file

@ -0,0 +1,20 @@
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
int main()
{
int fd = open("hax", O_CREAT | O_RDWR, 0755);
ftruncate(fd, 0);
close(fd);
int rc = execlp("hax", "hax", nullptr);
int saved_errno = errno;
unlink("hax");
if (rc == -1 && saved_errno == ENOEXEC) {
printf("FAIL\n");
return 1;
}
printf("PASS\n");
return 0;
}