at master 1.0 kB view raw
1{ pkgs, ... }: 2{ 3 name = "rasdaemon"; 4 meta = with pkgs.lib.maintainers; { 5 maintainers = [ evils ]; 6 }; 7 8 nodes.machine = 9 { pkgs, ... }: 10 { 11 imports = [ ../modules/profiles/minimal.nix ]; 12 hardware.rasdaemon = { 13 enable = true; 14 # should be enabled by default, just making sure 15 record = true; 16 # nonsense label 17 labels = '' 18 vendor: none 19 product: none 20 model: none 21 DIMM_0: 0.0.0; 22 ''; 23 }; 24 }; 25 26 testScript = '' 27 start_all() 28 machine.wait_for_unit("multi-user.target") 29 # confirm rasdaemon is running and has a valid database 30 # some disk errors detected in qemu for some reason ¯\_()_/¯ 31 machine.wait_until_succeeds("ras-mc-ctl --errors | tee /dev/stderr | grep -q 'No .* errors.'") 32 # confirm the supplied labels text made it into the system 33 machine.succeed("grep -q 'vendor: none' /etc/ras/dimm_labels.d/labels >&2") 34 machine.shutdown() 35 ''; 36}