Compare commits

...

3 Commits

Author SHA1 Message Date
dd7f24f455 Replace __noChroot with requiredSystemFeatures
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
Tested-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2025-10-09 11:41:18 +02:00
64e2c39582 Add hwloc test with sys-devices feature
Reviewed-by: Aleix Boné <abonerib@bsc.es>
2025-10-09 11:41:06 +02:00
98d17b19d3 Enable custom sys-devices system feature
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2025-10-09 11:40:44 +02:00
8 changed files with 23 additions and 14 deletions

View File

@ -11,6 +11,7 @@
./base/hw.nix
./base/net.nix
./base/nix.nix
./base/sys-devices.nix
./base/ntp.nix
./base/rev.nix
./base/ssh.nix

View File

@ -0,0 +1,9 @@
{
nix.settings.system-features = [ "sys-devices" ];
programs.nix-required-mounts.enable = true;
programs.nix-required-mounts.allowedPatterns.sys-devices.paths = [
"/sys/devices/system/cpu"
"/sys/devices/system/node"
];
}

View File

@ -62,7 +62,7 @@ let
};
tests = rec {
#hwloc = callPackage ./test/bugs/hwloc.nix { }; # Broken, no /sys
hwloc = callPackage ./test/bugs/hwloc.nix { };
#sigsegv = callPackage ./test/reproducers/sigsegv.nix { };
hello-c = callPackage ./test/compilers/hello-c.nix { };
hello-cpp = callPackage ./test/compilers/hello-cpp.nix { };

View File

@ -6,6 +6,7 @@
stdenv.mkDerivation {
name = "hwloc-test";
requiredSystemFeatures = [ "sys-devices" ];
src = ./.;
@ -14,7 +15,7 @@ stdenv.mkDerivation {
buildPhase = ''
ls -l /sys
gcc -lhwloc hwloc.c -o hwloc
strace ./hwloc
strace ./hwloc > $out
'';
}

View File

@ -23,9 +23,8 @@ in stdenv.mkDerivation {
dontUnpack = true;
dontConfigure = true;
# nOS-V requires access to /sys/devices to request NUMA information. It will
# fail to run otherwise, so we disable the sandbox for this test.
__noChroot = true;
# nOS-V requires access to /sys/devices to request NUMA information
requiredSystemFeatures = [ "sys-devices" ];
buildInputs = [ openmp ];

View File

@ -36,9 +36,8 @@ in stdenv.mkDerivation {
dontUnpack = true;
dontConfigure = true;
# nOS-V requires access to /sys/devices to request NUMA information. It will
# fail to run otherwise, so we disable the sandbox for this test.
__noChroot = true;
# nOS-V requires access to /sys/devices to request NUMA information
requiredSystemFeatures = [ "sys-devices" ];
buildInputs = [ nosv ];

View File

@ -24,9 +24,8 @@ in stdenv.mkDerivation {
dontUnpack = true;
dontConfigure = true;
# nOS-V requires access to /sys/devices to request NUMA information. It will
# fail to run otherwise, so we disable the sandbox for this test.
__noChroot = true;
# nOS-V requires access to /sys/devices to request NUMA information
requiredSystemFeatures = [ "sys-devices" ];
buildPhase = ''
set -x

View File

@ -25,9 +25,10 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "all" ];
#NIX_DEBUG = 1;
buildInputs = [ ]; #strace gdb;
# NODES requires access to /sys/devices to request NUMA information. It will
# fail to run otherwise, so we disable the sandbox for this test.
__noChroot = true;
# NODES requires access to /sys/devices to request NUMA information
requiredSystemFeatures = [ "sys-devices" ];
buildPhase = ''
set -x
#$CC -v