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) {...@@ -9690,6 +9690,7 @@ pub const NSIG = switch (native_os) {
9690 .illumos => 75,9690 .illumos => 75,
9691 // https://github.com/SerenityOS/serenity/blob/046c23f567a17758d762a33bdf04bacbfd088f9f/Kernel/API/POSIX/signal_numbers.h#L429691 // https://github.com/SerenityOS/serenity/blob/046c23f567a17758d762a33bdf04bacbfd088f9f/Kernel/API/POSIX/signal_numbers.h#L42
9692 .openbsd, .serenity => 33,9692 .openbsd, .serenity => 33,
9693 .dragonfly => 64,
9693 else => {},9694 else => {},
9694};9695};
96959696
lib/std/fs/test.zig+2-1
...@@ -821,7 +821,7 @@ test "file operations on directories" {...@@ -821,7 +821,7 @@ test "file operations on directories" {
821 try expectError(error.IsDir, ctx.dir.createFile(io, test_dir_name, .{}));821 try expectError(error.IsDir, ctx.dir.createFile(io, test_dir_name, .{}));
822 try expectError(error.IsDir, ctx.dir.deleteFile(io, test_dir_name));822 try expectError(error.IsDir, ctx.dir.deleteFile(io, test_dir_name));
823 switch (native_os) {823 switch (native_os) {
824 .dragonfly, .netbsd => {824 .netbsd => {
825 // no error when reading a directory. See https://github.com/ziglang/zig/issues/5732825 // no error when reading a directory. See https://github.com/ziglang/zig/issues/5732
826 const buf = try ctx.dir.readFileAlloc(io, test_dir_name, testing.allocator, .unlimited);826 const buf = try ctx.dir.readFileAlloc(io, test_dir_name, testing.allocator, .unlimited);
827 testing.allocator.free(buf);827 testing.allocator.free(buf);
...@@ -1241,6 +1241,7 @@ test "createDirPath, put some files in it, deleteTreeMinStackSize" {...@@ -1241,6 +1241,7 @@ test "createDirPath, put some files in it, deleteTreeMinStackSize" {
12411241
1242test "createDirPath in a directory that no longer exists" {1242test "createDirPath in a directory that no longer exists" {
1243 if (native_os == .windows) return error.SkipZigTest; // Windows returns FileBusy if attempting to remove an open dir1243 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
1245 const io = testing.io;1246 const io = testing.io;
12461247
lib/std/posix/test.zig+5-4
...@@ -364,9 +364,10 @@ test "getrlimit and setrlimit" {...@@ -364,9 +364,10 @@ test "getrlimit and setrlimit" {
364}364}
365365
366test "sigrtmin/max" {366test "sigrtmin/max" {
367 if (native_os == .wasi or native_os == .windows or native_os.isDarwin() or native_os == .openbsd) {367 if (native_os.isDarwin() or switch (native_os) {
368 return error.SkipZigTest;368 .wasi, .windows, .openbsd, .dragonfly => true,
369 }369 else => false,
370 }) return error.SkipZigTest;
370371
371 try expect(posix.sigrtmin() >= 32);372 try expect(posix.sigrtmin() >= 32);
372 try expect(posix.sigrtmin() >= posix.system.sigrtmin());373 try expect(posix.sigrtmin() >= posix.system.sigrtmin());
...@@ -397,7 +398,7 @@ fn reserved_signo(i: usize) bool {...@@ -397,7 +398,7 @@ fn reserved_signo(i: usize) bool {
397 if (!builtin.link_libc) return false;398 if (!builtin.link_libc) return false;
398 const max = if (native_os == .netbsd) 32 else 31;399 const max = if (native_os == .netbsd) 32 else 31;
399 if (i > max) return true;400 if (i > max) return true;
400 if (native_os == .openbsd) return false; // no RT signals401 if (native_os == .openbsd or native_os == .dragonfly) return false; // no RT signals
401 return i < posix.sigrtmin();402 return i < posix.sigrtmin();
402}403}
403404