Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IoUring: fix an issue in tests where InvalidVersion might get thrown #20001

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Jiboo
Copy link
Sponsor

@Jiboo Jiboo commented May 19, 2024

InvalidVersion might get thrown by skipKernelLessThan, due to some kernel versions not being SemVer compliant.

Which result in a bunch of InvalidVersion errors during unit tests:

error: 'os.linux.IoUring.test.accept/connect/send_zc/recv' failed: /home/jiboo/Projects/zig-fork/lib/std/SemanticVersion.zig:117:73: 0x1be34e3 in parse (test)
            for (id) |c| if (!std.ascii.isAlphanumeric(c) and c != '-') return error.InvalidVersion;
                                                                        ^
/home/jiboo/Projects/zig-fork/lib/std/os/linux/IoUring.zig:3506:5: 0x2bc9aea in test.accept/connect/send_zc/recv (test)
    try skipKernelLessThan(.{ .major = 6, .minor = 0, .patch = 0 });
    ^

Here's the result of my uname -r: 6.8.9-300.fc40.x86_64 the underscore makes this non compliant, I'm don't believe I've changed anything and I'm on a vanilla Fedora 40 setup.

I've attempted to fix this by stripping any extra from the release string returned from the uname call, prior to passing it to SemanticVersion.parse.

…by skipKernelLessThan, due to some kernel versions not being SemVer compliant.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant