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

nixosTests.kernel-generic: avoid kernel aliases #370075

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

Conversation

philiptaron
Copy link
Contributor

I discovered these searching for things under nixosTests that didn't evaluate.

It doesn't seem worth it to claim to have a test for kernels that aren't actually in nixpkgs.

Also, remove a top-level with statement and reshape the code to continue working.

Things done

It doesn't seem worth it to claim to have a test for kernels that aren't actually in `nixpkgs`.

Also, remove a top-level `with` statement and reshape the code to continue working.
@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Jan 2, 2025
@Atemu
Copy link
Member

Atemu commented Jan 3, 2025

The diff LGTM but I'm not so sure about the intent.

I get where you're coming from but I think it'd be confusing behaviour to just have the attribute disappear if the kernel doesn't eval for whatever reason. It's much preferable to eval a test for a certain kernel and then have it blow up in your face stating that it can't eval because the kernel has some issue.

If you only wanted to eval tests that don't throw, you should just filter that at the NixOS test level.

I think what this mostly comes down to is the question: What's so bad about NixOS tests that (rightfully) don't eval?

What I'd be fine with as an alternative would be a sort of opt-in test eval mode where tests that don't eval are removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants