aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
authorIgor Anić <igor.anic@gmail.com>2023-11-17 16:31:57 +0100
committerIgor Anić <igor.anic@gmail.com>2023-11-17 16:31:57 +0100
commit87dd8d56690b4e8187d9a2a9fda9c611199f430f (patch)
treeafc3c541cd1c1ff950bb0e893b829e2bfdf6196b /src/codegen
parent256384a2ec2f67fc1b9380be987c63d5702f180c (diff)
downloadzig-87dd8d56690b4e8187d9a2a9fda9c611199f430f.tar.gz
zig-87dd8d56690b4e8187d9a2a9fda9c611199f430f.zip
io_uring: simplify tests by checking kernel version
So far we relied on getting EINVAL in CQE for operations that kernel don't support. The problem with that approach is that there are many other reasons (like wrong params) to get EINVAL. The other problem is when we have an operation that existed before and gets new behavior via different attributes, like accept and accept_direct. Older kernels can fall back to non direct operation although we set attributes for direct operation. Operation completes successfully in both cases but with different results. This commit introduces kernel version check at the start of the test. Making body of the test free of checking for various kernel version differences. Feature availability references: * https://manpages.debian.org/unstable/liburing-dev/io_uring_enter.2.en.html * https://kernel.dk/axboe-kr2022.pdf * https://github.com/Jiboo/zig/blob/5acf7969bc759ce51005924109924d9666f74429/lib/std/os/linux.zig#L3727 * https://github.com/Jiboo/zig/blob/5acf7969bc759ce51005924109924d9666f74429/lib/std/os/linux.zig#L3993
Diffstat (limited to 'src/codegen')
0 files changed, 0 insertions, 0 deletions