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

nixos/auto-cpufreq: init vm test #350507

Merged
merged 2 commits into from
Jan 2, 2025
Merged

Conversation

sarcasticadmin
Copy link
Member

Include a vm test for the auto-cpufreq nixos module

Even though cpufreq cannot be adjusted within qemu this test is still
useful to ensure that the service is running and the auto-cpufreq cli is
able to interact with the auto-cpufreq service.

This helped me troubleshoot the existing errors raised in: #347804

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label Oct 22, 2024
@ofborg ofborg bot added 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 Oct 22, 2024
@NiklasGollenstede
Copy link
Contributor

@ofborg test auto-cpufreq

@NiklasGollenstede
Copy link
Contributor

Ha! That actually triggered the test to be executed :)


You might want to add passthru.tests = { inherit (nixosTests) auto-cpufreq; } to pkgs.auto-cpufreq.

Other than that, (as you said) the test is basic, but is probably better than nothing.

@sarcasticadmin
Copy link
Member Author

You might want to add passthru.tests = { inherit (nixosTests) auto-cpufreq; } to pkgs.auto-cpufreq.

@NiklasGollenstede #350511 is moving auto-cpufreq to by-name Ill wait until either this PR or #350511 is merged then include the passthru.tests in a follow up PR.

# service will still start but since vm inside qemu cpufreq adjustments
# cannot be made. This will resource in the following error but the service
# remains up:
# ERROR:
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this error misleading? I guess it's documented here and thus expected, but still not great.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree but theres no way Im aware of to supress the error inside of qemu

@h7x4 h7x4 added the 8.has: tests This PR has tests label Oct 28, 2024
Even though cpufreq cannot be adjusted within qemu this test is still
useful to ensure that the service is running and the auto-cpufreq cli is
able to interact with the auto-cpufreq service.
@sarcasticadmin
Copy link
Member Author

@NiklasGollenstede #350511 was merged so Ive added the passthru.tests to the pkg for this module.

@ck3d ck3d merged commit 32f7694 into NixOS:master Jan 2, 2025
28 checks passed
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 8.has: tests This PR has tests 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.

5 participants