Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 81c705ad9937
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: f148c5c4a1ff
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Apr 30, 2018

  1. nixos/tests/udisks2: Fix USB device hotplug

    The usb_add and usb_del monitor commands have been removed in QEMU
    version 2.12 (introduced in 3e3b39f).
    
    Quote from https://wiki.qemu.org/ChangeLog/2.12#Incompatible_changes:
    
    > The deprecated HMP commands "usb_add" and "usb_del" have been removed.
    > Use "device_add" and "device_del" as replacement instead.
    
    So we're doing exactly that and the udisks2 test now works again.
    
    Signed-off-by: aszlig <aszlig@nix.build>
    Cc: @edolstra
    aszlig committed Apr 30, 2018
    Copy the full SHA
    1907120 View commit details
    Browse the repository at this point in the history
  2. nixos/tests: Fix QEMU flags for SCSI disks

    The ability to specify "-drive if=scsi" has been removed in QEMU version
    2.12 (introduced in 3e3b39f).
    
    Quote from https://wiki.qemu.org/ChangeLog/2.12#Incompatible_changes:
    
    > The deprecated way of configuring SCSI devices with "-drive if=scsi"
    > on x86 has been removed. Use an appropriate SCSI controller together
    > "-device scsi-hd" or "-device scsi-cd" and a corresponding "-blockdev"
    > parameter instead.
    
    So whenever the diskInterface is "scsi" we use the new way to specify
    the drive and fall back to the deprecated way for the time being. The
    reason why I'm not using the new way for "virtio" and "ide" as well is
    because there is no simple generic way anymore to specify these.
    
    This also turns the type of the virtualisation.qemu.diskInterface option
    to be an enum, so the user knows which values are allowed but we can
    also make sure the right value is provided to prevent typos.
    
    I've tested this against a few non-disk-related NixOS VM tests but also
    the installer.grub1 test (because it uses "ide" as its drive interface),
    the installer.simple test (just to be sure it still works with
    "virtio") and all the tests in nixos/tests/boot.nix.
    
    In order to be able to run the grub1 test I had to go back to
    8b1cf10 (which is a known commit where
    that test still works) and apply the QEMU update and this very commit,
    because right now the test is broken.
    
    Apart from the tests here in nixpkgs, I also ran another[1] test in
    another repository which uses the "scsi" disk interface as well (in
    comparison to most of the installer tests, this one actually failed
    prior to this commit).
    
    All of them now succeed.
    
    [1]: https://github.com/openlab-aux/vuizvui/blob/9b5a119972e9c2d327500638d89063f4fce243ec/tests/system/kernel/bfq.nix
    
    Signed-off-by: aszlig <aszlig@nix.build>
    Cc: @EdoStra, @grahamc, @dezgeg, @abbradar, @ts468
    aszlig committed Apr 30, 2018
    Copy the full SHA
    f148c5c View commit details
    Browse the repository at this point in the history