]> git.scottworley.com Git - nixos-qemu-vm-isolation/blame_incremental - checks/mount-grep.nix
Follow NixOS PR 236656's changes about device naming
[nixos-qemu-vm-isolation] / checks / mount-grep.nix
... / ...
CommitLineData
1pkgs: {
2 name = "qemu-private-store-mount-grep";
3
4 hostPkgs = pkgs;
5
6 includeTestScriptReferences = false;
7
8 nodes = {
9 shared = _: { };
10 private = _: { imports = [ ../modules/qemu-vm-isolation.nix ]; };
11 privateErofs = _: {
12 imports = [ ../modules/qemu-vm-isolation.nix ];
13 virtualisation.qemu.isolation.nixStoreFilesystemType = "erofs";
14 };
15 useNixStoreImage = {
16 virtualisation = {
17 sharedDirectories = pkgs.lib.mkForce { };
18 useNixStoreImage = true;
19 };
20 };
21 };
22
23 testScript = ''
24 start_all()
25 for machine in [shared, private, privateErofs, useNixStoreImage]:
26 machine.wait_for_unit("multi-user.target")
27
28 shared.succeed("[[ $(mount | grep -c virt) -gt 0 ]]")
29 shared.succeed("[[ -e ${pkgs.pv} ]]")
30
31 for machine in [private, privateErofs, useNixStoreImage]:
32 machine.succeed("[[ $(mount | grep -c virt) -eq 0 ]]")
33 machine.fail("[[ -e ${pkgs.pv} ]]")
34 '';
35}