mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Improve pledge() and unveil() further
- Fix getpriority() - Add AT_MINSIGSTKSZ - Fix bugs in BPF code - Show more stuff in printargs.com - Write manual test for pledge.com - pledge() now generates tinier BPF code - Have pledge("exec") only enable execve() - Fix pledge.com chroot setuid functionality - Improve pledge.com unveiling of ape loader
This commit is contained in:
parent
31ac58a57b
commit
f968e2a726
17 changed files with 722 additions and 412 deletions
|
@ -22,6 +22,7 @@
|
|||
#include "libc/dce.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sysv/consts/sched.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
|
@ -53,6 +54,10 @@ bool CanTuneRealtimeSchedulers(void) {
|
|||
}
|
||||
}
|
||||
|
||||
TEST(sched_getscheduler, einval) {
|
||||
ASSERT_SYS(IsLinux() ? EINVAL : ESRCH, -1, sched_getscheduler(INT_MIN));
|
||||
}
|
||||
|
||||
TEST(sched_setscheduler, test) {
|
||||
struct sched_param p = {sched_get_priority_min(SCHED_OTHER)};
|
||||
EXPECT_SYS(0, DEFAULT_POLICY, sched_setscheduler(0, SCHED_OTHER, &p));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue