X-Git-Url: http://git.scottworley.com/nixos-qemu-vm-isolation/blobdiff_plain/69619e0bcd198291d2e4f7a72ccd87d61a8d0bc9..2f94b5fbad026e89290b77cf291b2e611e145f98:/checks/mount-grep.nix?ds=inline diff --git a/checks/mount-grep.nix b/checks/mount-grep.nix index f8fed0e..99084ea 100644 --- a/checks/mount-grep.nix +++ b/checks/mount-grep.nix @@ -1,17 +1,31 @@ -{ pkgs, ... }: { +{ lib, pkgs, ... }: { name = "qemu-private-store-mount-grep"; nodes = { shared = _: { }; private = _: { imports = [ ../modules/qemu-vm-isolation.nix ]; }; + useNixStoreImage = { + virtualisation = { + sharedDirectories = lib.mkForce { }; + useNixStoreImage = true; + }; + }; }; testScript = '' start_all() shared.wait_for_unit("multi-user.target") private.wait_for_unit("multi-user.target") + useNixStoreImage.wait_for_unit("multi-user.target") shared.succeed("[[ $(mount | grep -c virt) -gt 0 ]]") private.succeed("[[ $(mount | grep -c virt) -eq 0 ]]") + useNixStoreImage.succeed("[[ $(mount | grep -c virt) -eq 0 ]]") + + shared.succeed("[[ -e ${pkgs.pv} ]]") + private.fail("[[ -e ${pkgs.pv} ]]") + + # useNixStoreImage isn't ready until this works: + # useNixStoreImage.fail("[[ -e ${pkgs.pv} ]]") ''; }