| ... | ... | @@ -2072,6 +2072,7 @@ test "openat" { |
| 2072 | 2072 | const cqe_openat = try ring.copy_cqe(); |
| 2073 | 2073 | try testing.expectEqual(@as(u64, 0x33333333), cqe_openat.user_data); |
| 2074 | 2074 | if (cqe_openat.err() == .INVAL) return error.SkipZigTest; |
| 2075 | if (cqe_openat.err() == .BADF) return error.SkipZigTest; |
| 2075 | 2076 | if (cqe_openat.res <= 0) std.debug.print("\ncqe_openat.res={}\n", .{cqe_openat.res}); |
| 2076 | 2077 | try testing.expect(cqe_openat.res > 0); |
| 2077 | 2078 | try testing.expectEqual(@as(u32, 0), cqe_openat.flags); |
| ... | ... | @@ -2329,7 +2330,8 @@ test "timeout_remove" { |
| 2329 | 2330 | // * kernel 5.18 gives user data 0x99999999 first, 0x88888888 second |
| 2330 | 2331 | |
| 2331 | 2332 | var cqes: [2]os.linux.io_uring_cqe = undefined; |
| 2332 | | try testing.expectEqual(@as(u32, 2), try ring.copy_cqes(cqes[0..], 2)); |
| 2333 | cqes[0] = try ring.copy_cqe(); |
| 2334 | cqes[1] = try ring.copy_cqe(); |
| 2333 | 2335 | |
| 2334 | 2336 | for (cqes) |cqe| { |
| 2335 | 2337 | // IORING_OP_TIMEOUT_REMOVE is not supported by this kernel version: |
| ... | ... | @@ -2499,6 +2501,8 @@ test "statx" { |
| 2499 | 2501 | // The filesystem containing the file referred to by fd does not support this operation; |
| 2500 | 2502 | // or the mode is not supported by the filesystem containing the file referred to by fd: |
| 2501 | 2503 | .OPNOTSUPP => return error.SkipZigTest, |
| 2504 | // not supported on older kernels (5.4) |
| 2505 | .BADF => return error.SkipZigTest, |
| 2502 | 2506 | else => |errno| std.debug.panic("unhandled errno: {}", .{errno}), |
| 2503 | 2507 | } |
| 2504 | 2508 | try testing.expectEqual(linux.io_uring_cqe{ |
| ... | ... | @@ -3144,6 +3148,7 @@ test "remove_buffers" { |
| 3144 | 3148 | |
| 3145 | 3149 | const cqe = try ring.copy_cqe(); |
| 3146 | 3150 | switch (cqe.err()) { |
| 3151 | .INVAL => return error.SkipZigTest, |
| 3147 | 3152 | .SUCCESS => {}, |
| 3148 | 3153 | else => |errno| std.debug.panic("unhandled errno: {}", .{errno}), |
| 3149 | 3154 | } |
| ... | ... | @@ -3234,6 +3239,8 @@ test "provide_buffers: accept/connect/send/recv" { |
| 3234 | 3239 | switch (cqe.err()) { |
| 3235 | 3240 | // Happens when the kernel is < 5.7 |
| 3236 | 3241 | .INVAL => return error.SkipZigTest, |
| 3242 | // Happens on the kernel 5.4 |
| 3243 | .BADF => return error.SkipZigTest, |
| 3237 | 3244 | .SUCCESS => {}, |
| 3238 | 3245 | else => |errno| std.debug.panic("unhandled errno: {}", .{errno}), |
| 3239 | 3246 | } |