]>
Commit | Line | Data |
---|---|---|
1 | pkgs: { | |
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 | privateSquash = _: { | |
16 | imports = [ ../modules/qemu-vm-isolation.nix ]; | |
17 | virtualisation.qemu.isolation.nixStoreFilesystemType = "squashfs"; | |
18 | }; | |
19 | useNixStoreImage = { | |
20 | virtualisation = { | |
21 | sharedDirectories = pkgs.lib.mkForce { }; | |
22 | useNixStoreImage = true; | |
23 | }; | |
24 | }; | |
25 | }; | |
26 | ||
27 | testScript = '' | |
28 | start_all() | |
29 | for machine in [shared, private, privateErofs, privateSquash, useNixStoreImage]: | |
30 | machine.wait_for_unit("multi-user.target") | |
31 | ||
32 | shared.succeed("[[ $(mount | grep -c virt) -gt 0 ]]") | |
33 | shared.succeed("[[ -e ${pkgs.pv} ]]") | |
34 | ||
35 | for machine in [private, privateErofs, privateSquash, useNixStoreImage]: | |
36 | machine.succeed("[[ $(mount | grep -c virt) -eq 0 ]]") | |
37 | machine.fail("[[ -e ${pkgs.pv} ]]") | |
38 | ''; | |
39 | } |