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

haskellPackages.cryptonite: fix for aarch64 and re-enable tests #48485

Merged
merged 2 commits into from Oct 15, 2018
Merged

haskellPackages.cryptonite: fix for aarch64 and re-enable tests #48485

merged 2 commits into from Oct 15, 2018

Conversation

dhess
Copy link
Contributor

@dhess dhess commented Oct 15, 2018

Motivation for this change

cryptonite has been dontCheck for nearly 3 years:

358db2a

but the test failures that led to that nixpkgs commit were fixed upstream around the same time:

haskell-crypto/cryptonite#28

The first patch in this series re-enables tests for cryptonite.

Meanwhile, cryptonite-0.25 has a bug on aarch64 that was not caught because the tests are disabled. It only manifested in test failures on that arch in tls. The fix for this issue has been committed upstream, but no release has been made since, so the second patch in this series cherry-picks the commit from cryptonite upstream for aarch64. The fix is guarded by a check for that architecture, so it does not impact other architectures.

As an aside, a package like cryptonite seems like a very dangerous one to leave dontCheck for so long. Probably there should be some way to revisit, from time to time, packages whose tests have been disabled. One idea would be to run an occasional Hydra build where dontCheck is a no-op.

/cc @srhb

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

This has been fixed since cryptonite-0.7:

haskell-crypto/cryptonite#28

cryptonite is also no longer listed in expected-test-failures in
Stackage.
This is a cherry-pick from upstream (see
haskell-crypto/cryptonite#234); there has
been no upstream release since the fix was committed.
@srhb
Copy link
Contributor

srhb commented Oct 15, 2018

@GrahamcOfBorg build haskellPackages.cryptonite

@srhb srhb self-assigned this Oct 15, 2018
@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: haskellPackages.cryptonite

Partial log (click to expand)

/nix/store/91r9w2j9xwffcy540f8mpwd3s9h2gxk9-cryptonite-0.25

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: haskellPackages.cryptonite

Partial log (click to expand)

Preprocessing test suite 'test-cryptonite' for cryptonite-0.25..
installing
Installing library in /nix/store/45irdmpc50ljvkg8c12as3mrhxksk333-cryptonite-0.25/lib/ghc-8.4.3/x86_64-osx-ghc-8.4.3/cryptonite-0.25-7qwunXemDhaBfXM5ItvYSJ
post-installation fixup
strip is /nix/store/53nysl8bqwxihwzs1pgwka20nf8mbvlp-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/45irdmpc50ljvkg8c12as3mrhxksk333-cryptonite-0.25/lib
patching script interpreter paths in /nix/store/45irdmpc50ljvkg8c12as3mrhxksk333-cryptonite-0.25
strip is /nix/store/53nysl8bqwxihwzs1pgwka20nf8mbvlp-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/r934sxg9w5igbpr0kw1axkgg5qbm7pkp-cryptonite-0.25-doc
/nix/store/45irdmpc50ljvkg8c12as3mrhxksk333-cryptonite-0.25

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: haskellPackages.cryptonite

Partial log (click to expand)

strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/vdy9gzbgi58czhgglx9si131wp6ly6n1-cryptonite-0.25/lib
patching script interpreter paths in /nix/store/vdy9gzbgi58czhgglx9si131wp6ly6n1-cryptonite-0.25
checking for references to /build in /nix/store/vdy9gzbgi58czhgglx9si131wp6ly6n1-cryptonite-0.25...
wrong ELF type
shrinking RPATHs of ELF executables and libraries in /nix/store/kpchfabp4m6bcqqcxyfd9kkv443x40ls-cryptonite-0.25-doc
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/kpchfabp4m6bcqqcxyfd9kkv443x40ls-cryptonite-0.25-doc
checking for references to /build in /nix/store/kpchfabp4m6bcqqcxyfd9kkv443x40ls-cryptonite-0.25-doc...
/nix/store/vdy9gzbgi58czhgglx9si131wp6ly6n1-cryptonite-0.25

@srhb
Copy link
Contributor

srhb commented Oct 15, 2018

Thanks!

@srhb srhb merged commit 6c00efd into NixOS:master Oct 15, 2018
srhb pushed a commit to srhb/nixpkgs that referenced this pull request Oct 15, 2018
This has been fixed since cryptonite-0.7:

haskell-crypto/cryptonite#28

cryptonite is also no longer listed in expected-test-failures in
Stackage.

(cherry picked from commit c8a59e8)
Backport of NixOS#48485
srhb pushed a commit to srhb/nixpkgs that referenced this pull request Oct 15, 2018
This is a cherry-pick from upstream (see
haskell-crypto/cryptonite#234); there has
been no upstream release since the fix was committed.

(cherry picked from commit 321626d)
Backport of NixOS#48485
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

3 participants