authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-12-01 18:30:05+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-12-16 06:25:21+01:00
log215b250e6b94edf8c00606ab73a9e93dbd80c150
treeff445ee9f92c69f6e4de124255423773c8d11e24
parentda9733d44181f4582112cc74ee0ce6730ce8e66d
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.posix.test: fix sigset tests on openbsd (no rt signals)


1 files changed, 4 insertions(+), 2 deletions(-)

lib/std/posix/test.zig+4-2
...@@ -566,7 +566,7 @@ test "getrlimit and setrlimit" {...@@ -566,7 +566,7 @@ test "getrlimit and setrlimit" {
566}566}
567567
568test "sigrtmin/max" {568test "sigrtmin/max" {
569 if (native_os == .wasi or native_os == .windows or native_os.isDarwin()) {569 if (native_os == .wasi or native_os == .windows or native_os.isDarwin() or native_os == .openbsd) {
570 return error.SkipZigTest;570 return error.SkipZigTest;
571 }571 }
572572
...@@ -598,7 +598,9 @@ fn reserved_signo(i: usize) bool {...@@ -598,7 +598,9 @@ fn reserved_signo(i: usize) bool {
598 if (native_os.isDarwin()) return false;598 if (native_os.isDarwin()) return false;
599 if (!builtin.link_libc) return false;599 if (!builtin.link_libc) return false;
600 const max = if (native_os == .netbsd) 32 else 31;600 const max = if (native_os == .netbsd) 32 else 31;
601 return i > max and i < posix.sigrtmin();601 if (i > max) return true;
602 if (native_os == .openbsd) return false; // no RT signals
603 return i < posix.sigrtmin();
602}604}
603605
604test "sigset add/del" {606test "sigset add/del" {