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

treewide: mark failing kernel modules broken #102209

Merged
merged 2 commits into from Nov 1, 2020

Conversation

@jonringer
Copy link
Contributor

@jonringer jonringer commented Oct 31, 2020

Motivation for this change

part of #101863
follow-up to #101736

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.
@jonringer
Copy link
Contributor Author

@jonringer jonringer commented Oct 31, 2020

oops, asciidoc isn't meant to be there

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Looks good

@Atemu
Copy link
Member

@Atemu Atemu commented Oct 31, 2020

A little helper to help find more broken modules not marked as broken:

{ pkgs ? import <nixpkgs> { } }:

with builtins;
with pkgs.lib;

let
  matches = regex: str: match regex str != null;

  allLinuxPackages = filterAttrs (name: pkg:
    matches "linuxPackages.*" name &&
    !matches "linuxPackagesFor|linuxPackages_custom|linuxPackages_testing_hardened" name
  ) pkgs;

  notBroken = lpkgs: filterAttrs (name: module: !(module.meta.broken or false)) lpkgs;
in
mapAttrs (name: pkg: notBroken pkg) allLinuxPackages

Then run with something like:

nix-build -A linuxPackages_4_9 /tmp/helper.nix --option max-jobs `nproc --all` --keep-going --no-build-output --arg pkgs 'import ./. { }' |& grep -E '^building|^builder'

@Atemu Atemu mentioned this pull request Oct 31, 2020
10 tasks
@jonringer jonringer force-pushed the mark-kernels-broken branch from 7c0d366 to 9a21e0e Nov 1, 2020
@jonringer
Copy link
Contributor Author

@jonringer jonringer commented Nov 1, 2020

@Atemu a lot of these modules are also packages, so you need to check if kernel is null

@jonringer jonringer force-pushed the mark-kernels-broken branch from 9a21e0e to cd6ff5a Nov 1, 2020
@jonringer
Copy link
Contributor Author

@jonringer jonringer commented Nov 1, 2020

zfs and dpdk has to check whether or not kernel was passed

@jonringer jonringer merged commit 4e5e460 into NixOS:release-20.09 Nov 1, 2020
15 checks passed
@jonringer jonringer deleted the mark-kernels-broken branch Nov 1, 2020
@jonringer jonringer mentioned this pull request Nov 1, 2020
10 tasks
@Atemu Atemu mentioned this pull request Dec 9, 2020
10 tasks
@Atemu Atemu mentioned this pull request Jan 3, 2021
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants