Skip to content

openssl: disable tests for musl#451044

Closed
LunNova wants to merge 1 commit intoNixOS:stagingfrom
LunNova:push-sruplrksoznp
Closed

openssl: disable tests for musl#451044
LunNova wants to merge 1 commit intoNixOS:stagingfrom
LunNova:push-sruplrksoznp

Conversation

@LunNova
Copy link
Member

@LunNova LunNova commented Oct 11, 2025

test_errstr fails, seems to expect specific glibc messages. pkgsStatic.openssl on aarch64-linux

../../util/wrap.pl ../../apps/openssl errstr 80000005 => 0 not ok 1 - match 'I/O error' (80000005) with one of ( 'Input/output error', 'reason(5)' )

../../util/wrap.pl ../../apps/openssl errstr 8000007a => 0 not ok 2 - match 'Quota exceeded' (8000007a) with one of ( 'Disk quota exceeded', 'reason(122)' )

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

test_errstr fails, seems to expect specific glibc messages

../../util/wrap.pl ../../apps/openssl errstr 80000005 => 0
not ok 1 - match 'I/O error' (80000005) with one of ( 'Input/output error', 'reason(5)' )

../../util/wrap.pl ../../apps/openssl errstr 8000007a => 0
not ok 2 - match 'Quota exceeded' (8000007a) with one of ( 'Disk quota exceeded', 'reason(122)' )
@LunNova LunNova mentioned this pull request Oct 11, 2025
13 tasks
@LunNova
Copy link
Member Author

LunNova commented Oct 11, 2025

cc @thillux (#447713), does turning them back off for musl seem reasonable?

@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 Oct 11, 2025
@LunNova LunNova requested review from booxter and thillux October 11, 2025 20:48
@booxter
Copy link
Contributor

booxter commented Oct 12, 2025

All these test failures seem to stem from the fact that the $! in the Perl test scripts returns the strerror result using the libc that is linked with Perl. Which is not musl Perl:

$ ldd /nix/store/bvp4jwn1ibkjh7yhr2mlcxxd908y4x4v-perl-5.40.0/bin/perl
	linux-vdso.so.1 (0x0000ffffbf23c000)
	libperl.so => /nix/store/bvp4jwn1ibkjh7yhr2mlcxxd908y4x4v-perl-5.40.0/lib/perl5/5.40.0/aarch64-linux-thread-multi/CORE/libperl.so (0x0000ffffbede0000)
	libpthread.so.0 => /nix/store/62yvg9afjvmwa8z17arn4giqmjzg2xd2-glibc-2.40-66/lib/libpthread.so.0 (0x0000ffffbedb0000)
	libdl.so.2 => /nix/store/62yvg9afjvmwa8z17arn4giqmjzg2xd2-glibc-2.40-66/lib/libdl.so.2 (0x0000ffffbed80000)
	libm.so.6 => /nix/store/62yvg9afjvmwa8z17arn4giqmjzg2xd2-glibc-2.40-66/lib/libm.so.6 (0x0000ffffbecd0000)
	libcrypt.so.2 => /nix/store/3vx4bz3x26xl2j2c7lxq8v5hlx02v5ix-libxcrypt-4.4.38/lib/libcrypt.so.2 (0x0000ffffbec90000)
	libutil.so.1 => /nix/store/62yvg9afjvmwa8z17arn4giqmjzg2xd2-glibc-2.40-66/lib/libutil.so.1 (0x0000ffffbec60000)
	libc.so.6 => /nix/store/62yvg9afjvmwa8z17arn4giqmjzg2xd2-glibc-2.40-66/lib/libc.so.6 (0x0000ffffbea80000)
	/nix/store/62yvg9afjvmwa8z17arn4giqmjzg2xd2-glibc-2.40-66/lib/ld-linux-aarch64.so.1 => /nix/store/cnw00vg7w28qsn4jc6vxbwlignc35w4n-glibc-2.40-66/lib/ld-linux-aarch64.so.1 (0x0000ffffbf1f0000)

So then when the test script compares the error as reported by openssl (statically linked with musl) and strerror as returned by Perl for the same errno (dynamically linked with glibc), these don't match. I think we could try to make use of pkgs{Musl,Static}.perl when running the tests, so that both openssl binaries and perl use the same strerror representations.

Naively, I tried to replace perl from nativeBuildInputs in openssl derivation with pkgs{Musl,Static}.perl, but this results in a recursion because fetchurl uses perl. I am not sure how to solve this, maybe you have ideas.

@alyssais
Copy link
Member

#451291 seems like a less invasive fix.

@LunNova LunNova closed this Oct 12, 2025
@LunNova LunNova deleted the push-sruplrksoznp branch October 12, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants