Skip to content

nixos test driver doesn't work with multiple emptyDiskImages #73559

@flokli

Description

@flokli

Describe a NixOS VM test that uses emptyDiskImages on more than one VM, and run it via nixosTests.testName.

Observe it works with the perl test driver, but fails with the python test driver.

The python test code shows something like this:

qemu-system-x86_64: -drive file=/build /empty0.qcow2,id=drive2,if=none,index=2,werror=report: Failed to get "write" lock

This seems to be caused due to some differences in passing around environment to the startVM script created in qemu-vm.nix, which causes it to not create the empty$idx.qcow2 images in a per-vm tmpdir, but all in the same location (and by that, trying to use empty0.qcow2 from two different VMs at once.

cc @tfc @Mic92 @worldofpeace

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: testingTooling for automated testing of packages and modules

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions