summary refs log tree commit diff
path: root/pkgs/top-level/all-packages.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2016-11-17 17:06:17 +0100
committeraszlig <aszlig@redmoonstudios.org>2016-11-17 17:16:16 +0100
commit6cfb3b636418526d1c49d14316a127133cf09c9d (patch)
tree6616a1c6ae29b304f3144b82ad2dc932dc3af0a4 /pkgs/top-level/all-packages.nix
parent2c01da365410311fb3c044cdca85477241e2665f (diff)
downloadnixlib-6cfb3b636418526d1c49d14316a127133cf09c9d.tar
nixlib-6cfb3b636418526d1c49d14316a127133cf09c9d.tar.gz
nixlib-6cfb3b636418526d1c49d14316a127133cf09c9d.tar.bz2
nixlib-6cfb3b636418526d1c49d14316a127133cf09c9d.tar.lz
nixlib-6cfb3b636418526d1c49d14316a127133cf09c9d.tar.xz
nixlib-6cfb3b636418526d1c49d14316a127133cf09c9d.tar.zst
nixlib-6cfb3b636418526d1c49d14316a127133cf09c9d.zip
nixos/tests: Use a patched QEMU for testing
The reason to patch QEMU is that with latest Nix, tests like "printing"
or "misc" fail because they expect the store paths to be owned by uid 0
and gid 0.

Starting with NixOS/nix@5e51ffb1c265e16486fcdd888ce4a04db9e5552b, Nix
builds inside of a new user namespace. Unfortunately this also means
that bind-mounted store paths that are part of the derivation's inputs
are no longer owned by uid 0 and gid 0 but by uid 65534 and gid 65534.

This in turn causes things like sudo or cups to fail with errors about
insecure file permissions.

So in order to avoid that, let's make sure the VM always gets files
owned by uid 0 and gid 0 and does a no-op when doing a chmod on a store
path.

In addition, this adds a virtualisation.qemu.program option so that we
can make sure that we only use the patched version if we're *really*
running NixOS VM tests (that is, whenever we have imported
test-instrumentation.nix).

Tested against the "misc" and "printing" tests.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/top-level/all-packages.nix')
-rw-r--r--pkgs/top-level/all-packages.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 33dd7572e4c8..6b98d78e4555 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -11358,6 +11358,7 @@ in
   watch = callPackage ../os-specific/linux/procps/watch.nix { };
 
   qemu_kvm = lowPrio (qemu.override { x86Only = true; });
+  qemu_test = lowPrio (qemu.override { x86Only = true; nixosTestRunner = true; });
 
   firmwareLinuxNonfree = callPackage ../os-specific/linux/firmware/firmware-linux-nonfree { };