at 23.11-pre 540 B view raw
1# Test for https://github.com/NixOS/nixpkgs/pull/193469 2import ./make-test-python.nix { 3 name = "early-mount-options"; 4 5 nodes.machine = { 6 virtualisation.fileSystems."/var" = { 7 options = [ "bind" "nosuid" "nodev" "noexec" ]; 8 device = "/var"; 9 }; 10 }; 11 12 testScript = '' 13 machine.wait_for_unit("multi-user.target") 14 15 var_mount_info = machine.succeed("findmnt /var -n -o OPTIONS") 16 options = var_mount_info.strip().split(",") 17 assert "nosuid" in options and "nodev" in options and "noexec" in options 18 ''; 19}