authorgravatar for michael.dusan@gmail.comMichael Dusan <michael.dusan@gmail.com> 2025-12-29 21:39:00-05:00
committergravatar for michael.dusan@gmail.comMichael Dusan <michael.dusan@gmail.com> 2025-12-29 22:29:56-05:00
log4b26c49076a1c163e5fdd1bd3a657e0794e5a917
treea1b5d3af43c93c6a716d33bb6c1511a7a3468ead
parent3c851ec3969f1396eff5c3af21be7b9e3328c7ae
signaturelock-open Commit is signed but in an unrecognized format.

dragonfly: make test lib/std/std.zig pass


3 files changed, 8 insertions(+), 5 deletions(-)

lib/std/c.zig+1
......@@ -9690,6 +9690,7 @@ pub const NSIG = switch (native_os) {
96909690 .illumos => 75,
96919691 // https://github.com/SerenityOS/serenity/blob/046c23f567a17758d762a33bdf04bacbfd088f9f/Kernel/API/POSIX/signal_numbers.h#L42
96929692 .openbsd, .serenity => 33,
9693 .dragonfly => 64,
96939694 else => {},
96949695};
96959696
lib/std/fs/test.zig+2-1
......@@ -821,7 +821,7 @@ test "file operations on directories" {
821821 try expectError(error.IsDir, ctx.dir.createFile(io, test_dir_name, .{}));
822822 try expectError(error.IsDir, ctx.dir.deleteFile(io, test_dir_name));
823823 switch (native_os) {
824 .dragonfly, .netbsd => {
824 .netbsd => {
825825 // no error when reading a directory. See https://github.com/ziglang/zig/issues/5732
826826 const buf = try ctx.dir.readFileAlloc(io, test_dir_name, testing.allocator, .unlimited);
827827 testing.allocator.free(buf);
......@@ -1241,6 +1241,7 @@ test "createDirPath, put some files in it, deleteTreeMinStackSize" {
12411241
12421242test "createDirPath in a directory that no longer exists" {
12431243 if (native_os == .windows) return error.SkipZigTest; // Windows returns FileBusy if attempting to remove an open dir
1244 if (native_os == .dragonfly) return error.SkipZigTest; // DragonflyBSD does not produce error (hammer2 fs)
12441245
12451246 const io = testing.io;
12461247
lib/std/posix/test.zig+5-4
......@@ -364,9 +364,10 @@ test "getrlimit and setrlimit" {
364364}
365365
366366test "sigrtmin/max" {
367 if (native_os == .wasi or native_os == .windows or native_os.isDarwin() or native_os == .openbsd) {
368 return error.SkipZigTest;
369 }
367 if (native_os.isDarwin() or switch (native_os) {
368 .wasi, .windows, .openbsd, .dragonfly => true,
369 else => false,
370 }) return error.SkipZigTest;
370371
371372 try expect(posix.sigrtmin() >= 32);
372373 try expect(posix.sigrtmin() >= posix.system.sigrtmin());
......@@ -397,7 +398,7 @@ fn reserved_signo(i: usize) bool {
397398 if (!builtin.link_libc) return false;
398399 const max = if (native_os == .netbsd) 32 else 31;
399400 if (i > max) return true;
400 if (native_os == .openbsd) return false; // no RT signals
401 if (native_os == .openbsd or native_os == .dragonfly) return false; // no RT signals
401402 return i < posix.sigrtmin();
402403}
403404