Skip to content

workaround rust-nix* test failures due to 4-part kernel version issue#16461

Merged
christopherco merged 4 commits intotomls/base/mainfrom
chrco/rust-nix28
Apr 4, 2026
Merged

workaround rust-nix* test failures due to 4-part kernel version issue#16461
christopherco merged 4 commits intotomls/base/mainfrom
chrco/rust-nix28

Conversation

@christopherco
Copy link
Copy Markdown
Collaborator

@christopherco christopherco commented Apr 4, 2026

Azure Linux 3.0 kernels, used on our current Koji builders, have 4-part
version strings (e.g. 6.6.121.1-1.azl3) which the semver crate's
Version::parse() rejects. Two tests (gro, gso) panic on unwrap of the
parse error.

Apply the same fix-4part-kernel-version.patch already used by rust-nix:
truncate to 3 numeric components before parsing so the extra part
becomes a pre-release suffix (which is cleared immediately after).

Apply to rust-nix0.23, rust-nix0.28, rust-nix0.29, rust-nix0.30.

This workaround can be undone when the Koji builders move to a
kernel with 3-part version strings, although the current logic will still
continue to function as intended with a standard 3-part kernel version
string.

Azure Linux 3.0 kernels, used on our current Koji builders, have 4-part
version strings (e.g. 6.6.121.1-1.azl3) which the semver crate's
Version::parse() rejects. Three tests (gro, gso, test_txtime) panic on
unwrap of the parse error.

Apply the same fix-4part-kernel-version.patch already used by rust-nix:
truncate to 3 numeric components before parsing so the extra part
becomes a pre-release suffix (which is cleared immediately after).
Azure Linux 3.0 kernels, used on our current Koji builders, have 4-part
version strings (e.g. 6.6.121.1-1.azl3) which the semver crate's
Version::parse() rejects. Three tests (gro, gso, test_txtime) panic on
unwrap of the parse error.

Apply the same fix-4part-kernel-version.patch already used by rust-nix:
truncate to 3 numeric components before parsing so the extra part
becomes a pre-release suffix (which is cleared immediately after).
Azure Linux 3.0 kernels, used on our current Koji builders, have 4-part
version strings (e.g. 6.6.121.1-1.azl3) which the semver crate's
Version::parse() rejects. Three tests (gro, gso, test_txtime) panic on
unwrap of the parse error.

Apply the same fix-4part-kernel-version.patch already used by rust-nix:
truncate to 3 numeric components before parsing so the extra part
becomes a pre-release suffix (which is cleared immediately after).
Azure Linux 3.0 kernels, used on our current Koji builders, have 4-part
version strings (e.g. 6.6.121.1-1.azl3) which the semver crate's
Version::parse() rejects. Two tests (gro, gso) panic on unwrap of the
parse error.

Apply the same fix-4part-kernel-version.patch already used by rust-nix:
truncate to 3 numeric components before parsing so the extra part
becomes a pre-release suffix (which is cleared immediately after).
@christopherco christopherco marked this pull request as ready for review April 4, 2026 20:52
Copilot AI review requested due to automatic review settings April 4, 2026 20:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Azure Linux–specific overlays to multiple rust-nix* component variants to prevent %check panics on Koji builders running AZL3 kernels that report a 4-part uname -r version string (rejected by semver::Version::parse()), aligning these variants with the already-established workaround used elsewhere in the repo.

Changes:

  • Add per-component overlays for rust-nix0.23, rust-nix0.28, rust-nix0.29, and rust-nix0.30 to ship and register fix-4part-kernel-version.patch.
  • Introduce the patch in each component directory to rewrite the kernel version string into semver-parseable form for the affected tests.
  • Remove these components’ bare entries from components-full.toml now that they have dedicated *.comp.toml definitions.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
base/comps/rust-nix0.30/rust-nix0.30.comp.toml Adds overlays to include/register the kernel-version parsing workaround patch.
base/comps/rust-nix0.30/fix-4part-kernel-version.patch Implements semver-compatible handling for 4-part uname -r strings in test helper code.
base/comps/rust-nix0.29/rust-nix0.29.comp.toml Same overlay approach for the 0.29 variant.
base/comps/rust-nix0.29/fix-4part-kernel-version.patch Same patch content for the 0.29 variant.
base/comps/rust-nix0.28/rust-nix0.28.comp.toml Same overlay approach for the 0.28 variant.
base/comps/rust-nix0.28/fix-4part-kernel-version.patch Same patch content for the 0.28 variant.
base/comps/rust-nix0.23/rust-nix0.23.comp.toml Same overlay approach for the 0.23 variant.
base/comps/rust-nix0.23/fix-4part-kernel-version.patch Same patch content for the 0.23 variant.
base/comps/components-full.toml Removes entries for components that now have dedicated *.comp.toml files.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@binujp
Copy link
Copy Markdown
Contributor

binujp commented Apr 4, 2026

Looks good to me. We probably will ever know why they did not use a regular expression.

@christopherco christopherco merged commit e56903a into tomls/base/main Apr 4, 2026
9 checks passed
@christopherco christopherco deleted the chrco/rust-nix28 branch April 4, 2026 22:53
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.

3 participants