Skip to content

test: parse WSL kernel version without error #24042

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

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

Conversation

papparapa
Copy link
Contributor

The WSL kernel version is not SemVer compliant, e.g. 6.6.87.1-microsoft-standard-WSL2, which causes a version check error during the io_uring test on WSL.

error: 'os.linux.IoUring.test.openat_direct/close_direct' failed: /workspaces/Zig/zig/lib/std/SemanticVersion.zig:95:28: 0x107c3e9 in parse (test)
    if (it.next() != null) return error.InvalidVersion;
                           ^
/workspaces/Zig/zig/lib/std/os/linux/IoUring.zig:3978:5: 0x21f2dd1 in test.openat_direct/close_direct (test)
    try skipKernelLessThan(.{ .major = 5, .minor = 19, .patch = 0 });
    ^

This PR modifies the version check function to extract the SemVer-compliant part of the WSL kernel version, as in #20001.

The WSL kernel version is not SemVer compliant, e.g. '6.6.87.1-
microsoft-standard-WSL2', which causes a version check error
during the io_uring test.

This commit modifies the version check function to extract the
SemVer-compliant part of the WSL kernel version.
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.

1 participant