Skip to content

openssl: Enable tests, add missing patch comments#443190

Closed
infinisil wants to merge 2 commits intoNixOS:masterfrom
tweag:openssl-tests-patches
Closed

openssl: Enable tests, add missing patch comments#443190
infinisil wants to merge 2 commits intoNixOS:masterfrom
tweag:openssl-tests-patches

Conversation

@infinisil
Copy link
Member

@infinisil infinisil commented Sep 15, 2025

Things done


Add a 👍 reaction to pull requests you find important.

@infinisil infinisil requested a review from thillux September 15, 2025 15:28
@nixpkgs-ci nixpkgs-ci 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 Sep 15, 2025
Comment on lines +403 to +402
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Comment on lines 314 to 319
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see doCheck = false in the main derivation though;
so doesn't building it by default do the checks as the test?

Copy link
Member Author

Choose a reason for hiding this comment

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

Contrary to popular belief, doCheck is false by default for mkDerivation 🙃

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh...
Yes contrary to my belief because I've had to explicitly set it to false at times.. maybe other derivation builders buildPythonPackage have it set to true.

What's the difference between setting doCheck and the approach here in tests for my edification?

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it :

Could in theory also enable the tests for all builds, but it makes the build take a lot longer (13 instead of 5 minutes for the default version on my machine)

We run tests not for every build variant?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah indeed, it's true by default for buildPythonPackage, although it's kind of more doInstallCheck there.

What's the difference between setting doCheck and the approach here in tests for my edification?

It avoids having to run the tests (which almost triple the build time) when doing stdenv rebuilds, while still running the tests in ofborg PRs and allowing to run them on demand. Not a big fan of doing this tbh, but we can still enable them always later if wanted.

Copy link
Member

Choose a reason for hiding this comment

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

OpenSSL is only part of stdenv on Darwin and LLVM is far more of a serial bottleneck there. If these tests pass in the sandbox I’m fine enabling them in the main derivation.

Copy link
Member Author

Choose a reason for hiding this comment

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

Alright then, done now. Confirmed that it gives the same drv hashes as with the .overrideAttrs before.

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Sep 15, 2025
Makes the build take about 13 instead of 5 minutes
@infinisil infinisil force-pushed the openssl-tests-patches branch from 346432f to a31a53e Compare September 16, 2025 12:22
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. and removed 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 Sep 16, 2025
@nix-owners nix-owners bot requested a review from ulrikstrid September 16, 2025 12:28
@infinisil infinisil changed the title openssl: Add tests.withChecks to run tests, add missing patch comments openssl: Enable tests, add missing patch comments Sep 17, 2025
hash = "sha256-39135OobV/86bb3msL3D8x21rJnn/dTq+eH7tuwtuM4=";

patches = [
# Support for NIX_SSL_CERT_FILE, motivation unclear:
Copy link
Contributor

Choose a reason for hiding this comment

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

Motivation for this patch is given here: 942dbf8

@thillux
Copy link
Contributor

thillux commented Sep 19, 2025

LGTM after adapting comment for NIX_SSL_CERT_FILE patch (please keep references to 942dbf8, NixOS/nix#921 and #385955).

@infinisil
Copy link
Member Author

Thanks for the follow-up PR!

@infinisil infinisil closed this Oct 7, 2025
@infinisil infinisil deleted the openssl-tests-patches branch October 7, 2025 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants