Skip to content

Commit

Permalink
langref: disable var args example on aarch64-windows
Browse files Browse the repository at this point in the history
See tracking issues #14096 and #16961.

Also, any time a test is skipped it should link to the open bug report
for it.
  • Loading branch information
andrewrk committed Aug 25, 2023
1 parent 5e9dce1 commit bafd081
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
11 changes: 8 additions & 3 deletions doc/langref.html.in
Original file line number Diff line number Diff line change
Expand Up @@ -11131,9 +11131,14 @@ fn add(count: c_int, ...) callconv(.C) c_int {
}

test "defining a variadic function" {
// Variadic functions are currently disabled on some targets due to miscompilations.
if (builtin.cpu.arch == .aarch64 and builtin.os.tag != .windows and builtin.os.tag != .macos) return error.SkipZigTest;
if (builtin.cpu.arch == .x86_64 and builtin.os.tag == .windows) return error.SkipZigTest;
if (builtin.cpu.arch == .aarch64 and builtin.os.tag != .macos) {
// https://github.com/ziglang/zig/issues/14096
return error.SkipZigTest;
}
if (builtin.cpu.arch == .x86_64 and builtin.os.tag == .windows) {
// https://github.com/ziglang/zig/issues/16961
return error.SkipZigTest;
}

try std.testing.expectEqual(@as(c_int, 0), add(0));
try std.testing.expectEqual(@as(c_int, 1), add(1, @as(c_int, 1)));
Expand Down
5 changes: 4 additions & 1 deletion test/behavior/var_args.zig
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,10 @@ test "unused VaList arg" {
// https://github.com/ziglang/zig/issues/14096
return error.SkipZigTest;
}
if (builtin.cpu.arch == .x86_64 and builtin.os.tag == .windows) return error.SkipZigTest; // TODO
if (builtin.cpu.arch == .x86_64 and builtin.os.tag == .windows) {
// https://github.com/ziglang/zig/issues/16961
return error.SkipZigTest; // TODO
}

const S = struct {
fn thirdArg(dummy: c_int, ...) callconv(.C) c_int {
Expand Down

0 comments on commit bafd081

Please sign in to comment.