zig icon indicating copy to clipboard operation
zig copied to clipboard

Test cases in io_uring are failing on my machine

Open IntegratedQuantum opened this issue 3 years ago • 1 comments

Zig Version

0.11.0-dev.818+8a0a6b738

Steps to Reproduce and Observed Behavior

My operating system is Linux Mint 20.2 x86_64 with kernel version 5.4.0-110-generic

$ ./stage3/bin/zig test lib/std/std.zig --zig-lib-dir lib
Test [42/2254] test.sign... SKIP
Test [93/2254] test.zeroes... SKIP
Test [334/2254] test.PackedIntArray... SKIP
Test [338/2254] test.PackedIntSlice... SKIP
Test [339/2254] test.PackedIntSlice of PackedInt(Array/Slice)... SKIP
Test [397/2254] test.basic functionality... SKIP
Test [494/2254] test.vector prefix scan... SKIP
Test [534/2254] test.write/read... SKIP
Test [536/2254] test.openat... SKIP
Test [537/2254] test.close... SKIP
Test [538/2254] test.accept/connect/send/recv... SKIP
Test [542/2254] test.timeout_remove... expected 2, found 1
Test [542/2254] test.timeout_remove... FAIL (TestExpectedEqual)
/home/mint/zig/lib/std/testing.zig:78:17: 0x5ed199 in expectEqual__anon_6173 (test)
                return error.TestExpectedEqual;
                ^
/home/mint/zig/lib/std/os/linux/io_uring.zig:2191:5: 0xa4e1e0 in test.timeout_remove (test)
    try testing.expectEqual(@as(u32, 2), try ring.copy_cqes(cqes[0..], 2));
    ^
Test [543/2254] test.accept/connect/recv/link_timeout... SKIP
Test [544/2254] test.fallocate... SKIP
Test [545/2254] test.statx... SKIP
Test [546/2254] test.accept/connect/recv/cancel... SKIP
Test [547/2254] test.register_files_update... SKIP
Test [548/2254] test.shutdown... SKIP
Test [549/2254] test.renameat... SKIP
Test [550/2254] test.unlinkat... SKIP
Test [551/2254] test.mkdirat... SKIP
Test [552/2254] test.symlinkat... SKIP
Test [553/2254] test.linkat... SKIP
Test [554/2254] test.provide_buffers: read... SKIP
Test [555/2254] test.remove_buffers... thread 9278 panic: unhandled errno: os.linux.errno.generic.E.INVAL
/home/mint/zig/lib/std/debug.zig:316:22: 0xc01baa in panicExtra__anon_69545 (test)
    std.builtin.panic(msg, trace, ret_addr);
                     ^
/home/mint/zig/lib/std/debug.zig:291:15: 0xa5ac59 in panic__anon_60532 (test)
    panicExtra(null, null, format, args);
              ^
/home/mint/zig/lib/std/os/linux/io_uring.zig:3001:44: 0xa5a134 in test.remove_buffers (test)
            else => |errno| std.debug.panic("unhandled errno: {}", .{errno}),
                                           ^
/home/mint/zig/lib/test_runner.zig:63:28: 0x5fc173 in main (test)
        } else test_fn.func();
                           ^
/home/mint/zig/lib/std/start.zig:604:22: 0x5e4730 in posixCallMainAndExit (test)
            root.main();
                     ^
/home/mint/zig/lib/std/start.zig:376:5: 0x5e41e1 in _start (test)
    @call(.never_inline, posixCallMainAndExit, .{});
    ^
error: the following test command crashed:
/home/mint/zig/zig-cache/o/e21accf27421127e440ede045f56e4e4/test

Expected Behavior

Test should either pass or be skipped.

IntegratedQuantum avatar Dec 16 '22 10:12 IntegratedQuantum

Should probably check for support of REMOVE_BUFFERS op in test remove_buffers, and TIMEOUT_REMOVE in test timeout_remove.

Note that #13986 add probing for supported OPs.

Edit: probing support was added with linux 5.6, so nope, gotta handle the EVINVAL properly.

Jiboo avatar Dec 17 '22 13:12 Jiboo