Skip to content

Comments

bluez: Disable kernel-dependent test test-mesh-crypto#123011

Merged
SuperSandro2000 merged 1 commit intoNixOS:stagingfrom
knedlsepp:bluez-kernel-dependent-test
Jul 7, 2021
Merged

bluez: Disable kernel-dependent test test-mesh-crypto#123011
SuperSandro2000 merged 1 commit intoNixOS:stagingfrom
knedlsepp:bluez-kernel-dependent-test

Conversation

@knedlsepp
Copy link
Member

@knedlsepp knedlsepp commented May 14, 2021

Motivation for this change

I'm having trouble building bluez on a CentOS 7.9 builder.
Turns out that the test-mesh-crypto test depends on the following Linux
kernel configuration items:
CONFIG_CRYPTO_[USER|USER_API|USER_API_AEAD|USER_API_HASH|AES|CCM|AEAD|CMAC]
and will fail if run wih an incompatible kernel with the following error
message:

...
IVindex              = 12345678
NetworkNonce         = 00800000011201000012345678
                       00800000011201000012345678 => PASS
PrivacyRandom        = 000000000012345678b5e5bfdacbaf6c
                       000000000012345678fffd034b50057e => FAIL
FAIL unit/test-mesh-crypto (exit status: 1)

I found the same bug reported on Gentoo https://bugs.gentoo.org/704190.
Their fix is to only run the test if the kernel options are available,
which we don't want to do for build reproducibility.
Instead we just want to skip the test unconditionally. As it's simpler
to completely override the test instead of patching the build system, we
opt for doing just that.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@knedlsepp knedlsepp changed the title bluez: Disable kernel dependent test-mesh-crypto bluez: Disable kernel-dependent test-mesh-crypto May 14, 2021
@knedlsepp knedlsepp changed the title bluez: Disable kernel-dependent test-mesh-crypto bluez: Disable kernel-dependent test test-mesh-crypto May 14, 2021
@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. labels May 14, 2021
@knedlsepp knedlsepp changed the base branch from master to staging May 14, 2021 17:25
@knedlsepp knedlsepp requested review from a team, FRidh, Mic92, WilliButz, jonringer and zowoq as code owners May 14, 2021 17:25
@github-actions github-actions bot added 6.topic: erlang General-purpose, concurrent, functional high-level programming language 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: policy discussion Discuss policies to work in and around Nixpkgs 6.topic: python Python is a high-level, general-purpose programming language. 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` labels May 14, 2021
@knedlsepp knedlsepp force-pushed the bluez-kernel-dependent-test branch from 59140da to 3b1da76 Compare May 14, 2021 17:28
@github-actions github-actions bot removed 6.topic: python Python is a high-level, general-purpose programming language. 8.has: module (update) This PR changes an existing module in `nixos/` 6.topic: policy discussion Discuss policies to work in and around Nixpkgs 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: erlang General-purpose, concurrent, functional high-level programming language labels May 14, 2021
@knedlsepp knedlsepp removed request for a team, FRidh and Mic92 May 14, 2021 17:28
@knedlsepp knedlsepp requested review from SuperSandro2000 and removed request for WilliButz, jonringer and zowoq May 14, 2021 17:28
@ofborg ofborg bot added 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. and removed 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. labels May 14, 2021
@veprbl veprbl added the 6.topic: non-nixos Running packages on non-NixOS Linux label May 14, 2021
I'm having trouble building bluez on a CentOS 7.9 builder.
Turns out that the test-mesh-crypto test depends on the following Linux
kernel configuration items:
CONFIG_CRYPTO_[USER|USER_API|USER_API_AEAD|USER_API_HASH|AES|CCM|AEAD|CMAC]
and will fail if run wih an incompatible kernel with the following error
message:

    ...
    IVindex              = 12345678
    NetworkNonce         = 00800000011201000012345678
                           00800000011201000012345678 => PASS
    PrivacyRandom        = 000000000012345678b5e5bfdacbaf6c
                           000000000012345678fffd034b50057e => FAIL
    FAIL unit/test-mesh-crypto (exit status: 1)

I found the same bug reported on Gentoo https://bugs.gentoo.org/704190.
Their fix is to only run the test if the kernel options are available,
which we don't want to do for build reproducibility.
Instead we just want to skip the test unconditionally. As it's simpler
to completely override the test instead of patching the build system, we
opt for doing just that.
@knedlsepp knedlsepp force-pushed the bluez-kernel-dependent-test branch from 7618e79 to 05c5176 Compare May 15, 2021 06:22
@knedlsepp
Copy link
Member Author

@Mic92 Mind taking another look?

@SuperSandro2000
Copy link
Member

@ofborg eval

@knedlsepp
Copy link
Member Author

friendly ping @SuperSandro2000 Can I provide something to make this happen?

@github-actions
Copy link
Contributor

github-actions bot commented Sep 2, 2021

Successfully created backport PR #136490 for staging-21.05.

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

Labels

6.topic: non-nixos Running packages on non-NixOS Linux 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches.

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants