mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
Tests: Build automatically, fix compilation errors
This commit is contained in:
parent
538b985487
commit
29eceebdbf
Notes:
sideshowbarker
2024-07-19 04:23:28 +09:00
Author: https://github.com/BenWiederhake
Commit: 29eceebdbf
Pull-request: https://github.com/SerenityOS/serenity/pull/2947
21 changed files with 31 additions and 1 deletions
|
@ -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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue