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

This commit is contained in:
Michael Dusan
2025-12-29 21:39:00 -05:00
parent 3c851ec396
commit 4b26c49076
3 changed files with 8 additions and 5 deletions
+1
View File
@@ -9690,6 +9690,7 @@ pub const NSIG = switch (native_os) {
.illumos => 75,
// https://github.com/SerenityOS/serenity/blob/046c23f567a17758d762a33bdf04bacbfd088f9f/Kernel/API/POSIX/signal_numbers.h#L42
.openbsd, .serenity => 33,
.dragonfly => 64,
else => {},
};
+2 -1
View File
@@ -821,7 +821,7 @@ test "file operations on directories" {
try expectError(error.IsDir, ctx.dir.createFile(io, test_dir_name, .{}));
try expectError(error.IsDir, ctx.dir.deleteFile(io, test_dir_name));
switch (native_os) {
.dragonfly, .netbsd => {
.netbsd => {
// no error when reading a directory. See https://github.com/ziglang/zig/issues/5732
const buf = try ctx.dir.readFileAlloc(io, test_dir_name, testing.allocator, .unlimited);
testing.allocator.free(buf);
@@ -1241,6 +1241,7 @@ test "createDirPath, put some files in it, deleteTreeMinStackSize" {
test "createDirPath in a directory that no longer exists" {
if (native_os == .windows) return error.SkipZigTest; // Windows returns FileBusy if attempting to remove an open dir
if (native_os == .dragonfly) return error.SkipZigTest; // DragonflyBSD does not produce error (hammer2 fs)
const io = testing.io;
+5 -4
View File
@@ -364,9 +364,10 @@ test "getrlimit and setrlimit" {
}
test "sigrtmin/max" {
if (native_os == .wasi or native_os == .windows or native_os.isDarwin() or native_os == .openbsd) {
return error.SkipZigTest;
}
if (native_os.isDarwin() or switch (native_os) {
.wasi, .windows, .openbsd, .dragonfly => true,
else => false,
}) return error.SkipZigTest;
try expect(posix.sigrtmin() >= 32);
try expect(posix.sigrtmin() >= posix.system.sigrtmin());
@@ -397,7 +398,7 @@ fn reserved_signo(i: usize) bool {
if (!builtin.link_libc) return false;
const max = if (native_os == .netbsd) 32 else 31;
if (i > max) return true;
if (native_os == .openbsd) return false; // no RT signals
if (native_os == .openbsd or native_os == .dragonfly) return false; // no RT signals
return i < posix.sigrtmin();
}