| ... | @@ -2072,6 +2072,7 @@ test "openat" { | ... | @@ -2072,6 +2072,7 @@ test "openat" { |
| 2072 | const cqe_openat = try ring.copy_cqe(); | 2072 | const cqe_openat = try ring.copy_cqe(); |
| 2073 | try testing.expectEqual(@as(u64, 0x33333333), cqe_openat.user_data); | 2073 | try testing.expectEqual(@as(u64, 0x33333333), cqe_openat.user_data); |
| 2074 | if (cqe_openat.err() == .INVAL) return error.SkipZigTest; | 2074 | if (cqe_openat.err() == .INVAL) return error.SkipZigTest; |
| | 2075 | if (cqe_openat.err() == .BADF) return error.SkipZigTest; |
| 2075 | if (cqe_openat.res <= 0) std.debug.print("\ncqe_openat.res={}\n", .{cqe_openat.res}); | 2076 | if (cqe_openat.res <= 0) std.debug.print("\ncqe_openat.res={}\n", .{cqe_openat.res}); |
| 2076 | try testing.expect(cqe_openat.res > 0); | 2077 | try testing.expect(cqe_openat.res > 0); |
| 2077 | try testing.expectEqual(@as(u32, 0), cqe_openat.flags); | 2078 | try testing.expectEqual(@as(u32, 0), cqe_openat.flags); |
| ... | @@ -2500,6 +2501,8 @@ test "statx" { | ... | @@ -2500,6 +2501,8 @@ test "statx" { |
| 2500 | // The filesystem containing the file referred to by fd does not support this operation; | 2501 | // The filesystem containing the file referred to by fd does not support this operation; |
| 2501 | // or the mode is not supported by the filesystem containing the file referred to by fd: | 2502 | // or the mode is not supported by the filesystem containing the file referred to by fd: |
| 2502 | .OPNOTSUPP => return error.SkipZigTest, | 2503 | .OPNOTSUPP => return error.SkipZigTest, |
| | 2504 | // not supported on older kernels (5.4) |
| | 2505 | .BADF => return error.SkipZigTest, |
| 2503 | else => |errno| std.debug.panic("unhandled errno: {}", .{errno}), | 2506 | else => |errno| std.debug.panic("unhandled errno: {}", .{errno}), |
| 2504 | } | 2507 | } |
| 2505 | try testing.expectEqual(linux.io_uring_cqe{ | 2508 | try testing.expectEqual(linux.io_uring_cqe{ |
| ... | @@ -3145,6 +3148,7 @@ test "remove_buffers" { | ... | @@ -3145,6 +3148,7 @@ test "remove_buffers" { |
| 3145 | | 3148 | |
| 3146 | const cqe = try ring.copy_cqe(); | 3149 | const cqe = try ring.copy_cqe(); |
| 3147 | switch (cqe.err()) { | 3150 | switch (cqe.err()) { |
| | 3151 | .INVAL => return error.SkipZigTest, |
| 3148 | .SUCCESS => {}, | 3152 | .SUCCESS => {}, |
| 3149 | else => |errno| std.debug.panic("unhandled errno: {}", .{errno}), | 3153 | else => |errno| std.debug.panic("unhandled errno: {}", .{errno}), |
| 3150 | } | 3154 | } |
| ... | @@ -3235,6 +3239,8 @@ test "provide_buffers: accept/connect/send/recv" { | ... | @@ -3235,6 +3239,8 @@ test "provide_buffers: accept/connect/send/recv" { |
| 3235 | switch (cqe.err()) { | 3239 | switch (cqe.err()) { |
| 3236 | // Happens when the kernel is < 5.7 | 3240 | // Happens when the kernel is < 5.7 |
| 3237 | .INVAL => return error.SkipZigTest, | 3241 | .INVAL => return error.SkipZigTest, |
| | 3242 | // Happens on the kernel 5.4 |
| | 3243 | .BADF => return error.SkipZigTest, |
| 3238 | .SUCCESS => {}, | 3244 | .SUCCESS => {}, |
| 3239 | else => |errno| std.debug.panic("unhandled errno: {}", .{errno}), | 3245 | else => |errno| std.debug.panic("unhandled errno: {}", .{errno}), |
| 3240 | } | 3246 | } |