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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

openssh: put tests into passthru #277579

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

Conversation

nikstur
Copy link
Contributor

@nikstur nikstur commented Dec 29, 2023

openssh tests are very slow (they take ~30 mins because they are not parallelized). This makes rebuilding (esp. after changes e.g. to systemd) painful. Putting the tests into a separate derivation solves this without losing any testing capability.

Debian does the same: https://packages.debian.org/sid/openssh-tests

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.05 Release Notes (or backporting 23.05 and 23.11 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.

@nikstur
Copy link
Contributor Author

nikstur commented Dec 29, 2023

@ofborg test openssh

Copy link
Member

@AndersonTorres AndersonTorres left a comment

Choose a reason for hiding this comment

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

Nice idea!

@JulienMalka
Copy link
Member

I don't think Hydra automatically builds passthrough.tests so it will not build the tests as part of building openssh.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/1346

@risicle
Copy link
Contributor

risicle commented Jan 1, 2024

Suggest using the finalAttrs/finalPackage pattern instead of taking openssh as an argument. This will ensure you're testing the exact variant you think you're testing.

@SuperSandro2000
Copy link
Member

I am basically doing the same in an overlay since a longer time because the tests are so annoyingly slow.

@ajs124
Copy link
Member

ajs124 commented Jan 11, 2024

hm. why does this fail on aarch64-linux?

@nikstur nikstur force-pushed the openssh-tests-in-separate-derivation branch from 3736e47 to 26e49b6 Compare January 17, 2024 21:52
@nikstur
Copy link
Contributor Author

nikstur commented Jan 19, 2024

hm. why does this fail on aarch64-linux?

I think that was just an ofborg runner issue. Seems to be fine now

@drupol
Copy link
Contributor

drupol commented Mar 27, 2024

I don't think Hydra automatically builds passthrough.tests so it will not build the tests as part of building openssh.

@nikstur I really would like to merge this, but this feedback ^^ needs to be addressed.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/1559

@nikstur
Copy link
Contributor Author

nikstur commented Mar 28, 2024

this feedback ^^ needs to be addressed.

I guess the solution is to explicitly add the openssh tests to a hydra jobset. I don't know much about hydra though. Any pointers would be appreciated.

openssh tests are very slow (they take ~30 mins because they are not
parallelized). This makes rebuilding (esp. after changes e.g. to
systemd) painful. Putting the tests into a separate derivation solves
this without losing any testing capability.

Debian does the same: https://packages.debian.org/sid/openssh-tests
@nikstur nikstur force-pushed the openssh-tests-in-separate-derivation branch from 26e49b6 to 8677517 Compare June 14, 2024 21:55
@nikstur
Copy link
Contributor Author

nikstur commented Jun 14, 2024

this feedback ^^ needs to be addressed.

I added this to release-small now. I would love if someone that knows more about hydra could review this.

@ofborg ofborg bot requested a review from Conni2461 June 14, 2024 23:33
@Mic92
Copy link
Member

Mic92 commented Jun 15, 2024

Seems to evaluate on my machine:

nix-eval-jobs -- --force-recurse nixos/release-small.nix  306.57s user 137.58s system 52% cpu 14:04.92 total

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet