Skip to content

Commit

Permalink
pythonPackages.python-prctl: disabled tests causing build failure
Browse files Browse the repository at this point in the history
Now disables tests using pytestCheckHook + disabledTests instead of
patch file.

Disables:
- test_speculation_ctrl
- test_mpx

Enables:
- test_mce_kill
- test_proctitle
  • Loading branch information
kira-bruneau committed Jan 4, 2021
1 parent 83f7410 commit d29570f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 35 deletions.
19 changes: 18 additions & 1 deletion pkgs/development/python-modules/python-prctl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
, buildPythonPackage
, fetchPypi
, libcap
, pytestCheckHook
}:

buildPythonPackage rec {
Expand All @@ -13,9 +14,25 @@ buildPythonPackage rec {
sha256 = "b4ca9a25a7d4f1ace4fffd1f3a2e64ef5208fe05f929f3edd5e27081ca7e67ce";
};

patches = [ ./skip_bad_tests.patch ];
buildInputs = [ libcap ];

checkInputs = [ pytestCheckHook ];

disabledTests = [
# Intel MPX support was removed in GCC 9.1 & Linux kernel 5.6
"test_mpx"

# The Nix build sandbox has no_new_privs already enabled
"test_no_new_privs"

# The Nix build sandbox has seccomp already enabled
"test_seccomp"

# This will fail if prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_FORCE_DISABLE)
# has been set system-wide, even outside the sandbox
"test_speculation_ctrl"
];

meta = {
description = "Python(ic) interface to the linux prctl syscall";
homepage = "https://github.com/seveas/python-prctl";
Expand Down
34 changes: 0 additions & 34 deletions pkgs/development/python-modules/python-prctl/skip_bad_tests.patch

This file was deleted.

0 comments on commit d29570f

Please sign in to comment.