Skip to content

Commit 22d94ea

Browse files
committed
disable std lib unit tests that hard code port numbers
See tracking issue #14907
1 parent 2b09299 commit 22d94ea

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

lib/std/os/linux/io_uring.zig

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1976,6 +1976,11 @@ test "close" {
19761976
test "accept/connect/send/recv" {
19771977
if (builtin.os.tag != .linux) return error.SkipZigTest;
19781978

1979+
if (true) {
1980+
// https://github.com/ziglang/zig/issues/14907
1981+
return error.SkipZigTest;
1982+
}
1983+
19791984
var ring = IO_Uring.init(16, 0) catch |err| switch (err) {
19801985
error.SystemOutdated => return error.SkipZigTest,
19811986
error.PermissionDenied => return error.SkipZigTest,
@@ -2017,13 +2022,19 @@ test "accept/connect/send/recv" {
20172022
test "sendmsg/recvmsg" {
20182023
if (builtin.os.tag != .linux) return error.SkipZigTest;
20192024

2025+
if (true) {
2026+
// https://github.com/ziglang/zig/issues/14907
2027+
return error.SkipZigTest;
2028+
}
2029+
20202030
var ring = IO_Uring.init(2, 0) catch |err| switch (err) {
20212031
error.SystemOutdated => return error.SkipZigTest,
20222032
error.PermissionDenied => return error.SkipZigTest,
20232033
else => return err,
20242034
};
20252035
defer ring.deinit();
20262036

2037+
if (true) @compileError("don't hard code port numbers in unit tests"); // https://github.com/ziglang/zig/issues/14907
20272038
const address_server = try net.Address.parseIp4("127.0.0.1", 3131);
20282039

20292040
const server = try os.socket(address_server.any.family, os.SOCK.DGRAM, 0);
@@ -2223,6 +2234,11 @@ test "timeout_remove" {
22232234
test "accept/connect/recv/link_timeout" {
22242235
if (builtin.os.tag != .linux) return error.SkipZigTest;
22252236

2237+
if (true) {
2238+
// https://github.com/ziglang/zig/issues/14907
2239+
return error.SkipZigTest;
2240+
}
2241+
22262242
var ring = IO_Uring.init(16, 0) catch |err| switch (err) {
22272243
error.SystemOutdated => return error.SkipZigTest,
22282244
error.PermissionDenied => return error.SkipZigTest,
@@ -2372,6 +2388,11 @@ test "statx" {
23722388
test "accept/connect/recv/cancel" {
23732389
if (builtin.os.tag != .linux) return error.SkipZigTest;
23742390

2391+
if (true) {
2392+
// https://github.com/ziglang/zig/issues/14907
2393+
return error.SkipZigTest;
2394+
}
2395+
23752396
var ring = IO_Uring.init(16, 0) catch |err| switch (err) {
23762397
error.SystemOutdated => return error.SkipZigTest,
23772398
error.PermissionDenied => return error.SkipZigTest,
@@ -2509,13 +2530,19 @@ test "register_files_update" {
25092530
test "shutdown" {
25102531
if (builtin.os.tag != .linux) return error.SkipZigTest;
25112532

2533+
if (true) {
2534+
// https://github.com/ziglang/zig/issues/14907
2535+
return error.SkipZigTest;
2536+
}
2537+
25122538
var ring = IO_Uring.init(16, 0) catch |err| switch (err) {
25132539
error.SystemOutdated => return error.SkipZigTest,
25142540
error.PermissionDenied => return error.SkipZigTest,
25152541
else => return err,
25162542
};
25172543
defer ring.deinit();
25182544

2545+
if (true) @compileError("don't hard code port numbers in unit tests"); // https://github.com/ziglang/zig/issues/14907
25192546
const address = try net.Address.parseIp4("127.0.0.1", 3131);
25202547

25212548
// Socket bound, expect shutdown to work
@@ -3060,6 +3087,11 @@ test "remove_buffers" {
30603087
test "provide_buffers: accept/connect/send/recv" {
30613088
if (builtin.os.tag != .linux) return error.SkipZigTest;
30623089

3090+
if (true) {
3091+
// https://github.com/ziglang/zig/issues/14907
3092+
return error.SkipZigTest;
3093+
}
3094+
30633095
var ring = IO_Uring.init(16, 0) catch |err| switch (err) {
30643096
error.SystemOutdated => return error.SkipZigTest,
30653097
error.PermissionDenied => return error.SkipZigTest,
@@ -3236,6 +3268,7 @@ const SocketTestHarness = struct {
32363268
fn createSocketTestHarness(ring: *IO_Uring) !SocketTestHarness {
32373269
// Create a TCP server socket
32383270

3271+
if (true) @compileError("don't hard code port numbers in unit tests"); // https://github.com/ziglang/zig/issues/14907
32393272
const address = try net.Address.parseIp4("127.0.0.1", 3131);
32403273
const kernel_backlog = 1;
32413274
const listener_socket = try os.socket(address.any.family, os.SOCK.STREAM | os.SOCK.CLOEXEC, 0);

0 commit comments

Comments
 (0)