summary refs log tree commit diff
path: root/nixos/tests/virtualbox.nix
diff options
context:
space:
mode:
authorAmbroz Bizjak <abizjak.pro@gmail.com>2019-09-03 21:59:50 +0200
committerTim Steinbach <tim@nequissimus.com>2019-09-05 09:30:05 -0400
commita97a047419f51b2100995aea68d2819040cc07ad (patch)
tree99ab66adfee51246cd7a9d7413fe27f3d1e591e4 /nixos/tests/virtualbox.nix
parent4e99ef6a18b28c57a56564a64e436a81aa15e2da (diff)
downloadnixpkgs-a97a047419f51b2100995aea68d2819040cc07ad.tar
nixpkgs-a97a047419f51b2100995aea68d2819040cc07ad.tar.gz
nixpkgs-a97a047419f51b2100995aea68d2819040cc07ad.tar.bz2
nixpkgs-a97a047419f51b2100995aea68d2819040cc07ad.tar.lz
nixpkgs-a97a047419f51b2100995aea68d2819040cc07ad.tar.xz
nixpkgs-a97a047419f51b2100995aea68d2819040cc07ad.tar.zst
nixpkgs-a97a047419f51b2100995aea68d2819040cc07ad.zip
tests/virtualbox: Clean up unnecessary things.
Always enable the UART because the VirtualBug bug that required running without the UART was fixed in 6.0.10. Stop using an old kernel version because the tests work with the default kernel.

(cherry picked from commit ae93571e8d04cebd69491a789d902d6481e05d3f)
Diffstat (limited to 'nixos/tests/virtualbox.nix')
-rw-r--r--nixos/tests/virtualbox.nix24
1 files changed, 6 insertions, 18 deletions
diff --git a/nixos/tests/virtualbox.nix b/nixos/tests/virtualbox.nix
index 844ce47d743..32637d2c1ef 100644
--- a/nixos/tests/virtualbox.nix
+++ b/nixos/tests/virtualbox.nix
@@ -10,17 +10,10 @@
   # to run 32-bit guests.
   useKvmNestedVirt ? false,
   # Whether to run 64-bit guests instead of 32-bit. Requires nested KVM.
-  use64bitGuest ? false,
-  # Whether to enable the virtual UART in VirtualBox guests, allowing to see
-  # the guest console. There is currently a bug in VirtualBox where this will
-  # cause a crash if running with SW virtualization
-  # (https://www.virtualbox.org/ticket/18632). If you need to debug the tests
-  # then enable this and nested KVM to work around the crash (see above).
-  enableVBoxUART ? false
+  use64bitGuest ? false
 }:
 
 assert use64bitGuest -> useKvmNestedVirt;
-assert enableVBoxUART -> useKvmNestedVirt; # VirtualBox bug, see above
 
 with import ../lib/testing.nix { inherit system pkgs; };
 with pkgs.lib;
@@ -65,9 +58,6 @@ let
       "init=${pkgs.writeScript "mini-init.sh" miniInit}"
     ];
 
-    # XXX: Remove this once TSS location detection has been fixed in VirtualBox
-    boot.kernelPackages = pkgs.linuxPackages_4_9;
-
     fileSystems."/" = {
       device = "vboxshare";
       fsType = "vboxsf";
@@ -162,11 +152,9 @@ let
       "--register"
     ];
 
-    vmFlags = mkFlags (
-      (optionals enableVBoxUART [
-        "--uart1 0x3F8 4"
-        "--uartmode1 client /run/virtualbox-log-${name}.sock"
-      ]) ++ [
+    vmFlags = mkFlags ([
+      "--uart1 0x3F8 4"
+      "--uartmode1 client /run/virtualbox-log-${name}.sock"
       "--memory 768"
       "--audio none"
     ] ++ (attrs.vmFlags or []));
@@ -199,7 +187,7 @@ let
     ];
   in {
     machine = {
-      systemd.sockets."vboxtestlog-${name}" = mkIf enableVBoxUART {
+      systemd.sockets."vboxtestlog-${name}" = {
         description = "VirtualBox Test Machine Log Socket For ${name}";
         wantedBy = [ "sockets.target" ];
         before = [ "multi-user.target" ];
@@ -207,7 +195,7 @@ let
         socketConfig.Accept = true;
       };
 
-      systemd.services."vboxtestlog-${name}@" = mkIf enableVBoxUART {
+      systemd.services."vboxtestlog-${name}@" = {
         description = "VirtualBox Test Machine Log For ${name}";
         serviceConfig.StandardInput = "socket";
         serviceConfig.StandardOutput = "syslog";