mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:58:12 +00:00
Tests: Build automatically, fix compilation errors
This commit is contained in:
parent
538b985487
commit
29eceebdbf
21 changed files with 31 additions and 1 deletions
25
Userland/Tests/Kernel/pledge-test-failures.cpp
Normal file
25
Userland/Tests/Kernel/pledge-test-failures.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
int res = pledge("stdio unix rpath", "stdio");
|
||||
if (res < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
res = pledge("stdio unix", "stdio unix");
|
||||
if (res >= 0) {
|
||||
fprintf(stderr, "second pledge should have failed\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
res = pledge("stdio rpath", "stdio");
|
||||
if (res < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue