nixpkgs/nixos
aszlig ee39d4b98a
nixos/tests/virtualbox: Fix @shell@ expansion
This has surfaced since f803270b7e.

The commit bumped bash to version 4.4, which caused to change the order
of --subst-var flags in substituteAll, which this test was relying on,
because it added a @shell@ to boot.initrd.postMountCommands.

Our substituter is currently working a bit like this:

original.replace('@var1@', 'val1').replace('@var2@', 'val2')...

Unfortunately, this means that if @var2@ occurs within @var1@ it is
replaced by the new value, so the order of the substvars actually
matter. I highly doubt that we want a behaviour like this and I'm
wondering why it didn't occur to me as a problem while writing the
initial implementation of the VirtualBox tests.

Whether to get rid of this and disallowing substitution of substvars
within substvars is another topic which I think needs discussion in a
different place.

As for now, I'm using stdenv.shell, because the closure size of this
should fit within the initrd, so it's fine especially because it's just
a test.

Tested with the net-hostonlyif and systemd-detect-virt tests and they
both succeed with this change.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Reported-by: @globin on IRC
2017-03-27 04:53:17 +02:00
..
doc/manual NixOS Manual: Update version numbers 2017-03-25 20:14:04 +01:00
lib makeTest: don't rely on makeWrapper not quoting newlines 2017-03-20 16:15:38 +03:00
maintainers nova-image: refactoring 2017-02-24 22:17:52 +01:00
modules google-compute-image: fix Yama LSM option conflict 2017-03-26 21:09:58 +02:00
tests nixos/tests/virtualbox: Fix @shell@ expansion 2017-03-27 04:53:17 +02:00
COPYING
default.nix Remove nixFallback 2017-03-06 15:54:50 +01:00
README
release-combined.nix nixos/sddm: test automatic and manual login 2017-03-24 10:39:13 -05:00
release-small.nix nixos/release-small.nix: cleanup to use default versions 2017-01-27 15:33:54 +01:00
release.nix network-interfaces: reload bridges on conf changes 2017-03-26 18:47:43 +02:00

*** NixOS ***

NixOS is a Linux distribution based on the purely functional package
management system Nix.  More information can be found at
http://nixos.org/nixos and in the manual in doc/manual.