forked from mirrors/nixpkgs
tests/virtualbox: Add a subtest for host USB.
Unfortunately, we can't test whether USB is really working, but we can make sure that VirtualBox has access to the USB devices. This is essentially testing #9736, which I haven't yet been able to reproduce though, but it makes sense to test it so it won't happen in future releases. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
030fa33958
commit
9a39c2e943
|
@ -389,6 +389,21 @@ in {
|
||||||
|
|
||||||
destroyVM_simple;
|
destroyVM_simple;
|
||||||
|
|
||||||
|
sub removeUUIDs {
|
||||||
|
return join("\n", grep { $_ !~ /^UUID:/ } split(/\n/, $_[0]))."\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
subtest "host-usb-permissions", sub {
|
||||||
|
my $userUSB = removeUUIDs vbm("list usbhost");
|
||||||
|
print STDERR $userUSB;
|
||||||
|
my $rootUSB = removeUUIDs $machine->succeed("VBoxManage list usbhost");
|
||||||
|
print STDERR $rootUSB;
|
||||||
|
|
||||||
|
die "USB host devices differ for root and normal user"
|
||||||
|
if $userUSB ne $rootUSB;
|
||||||
|
die "No USB host devices found" if $userUSB =~ /<none>/;
|
||||||
|
};
|
||||||
|
|
||||||
subtest "systemd-detect-virt", sub {
|
subtest "systemd-detect-virt", sub {
|
||||||
createVM_detectvirt;
|
createVM_detectvirt;
|
||||||
vbm("startvm detectvirt");
|
vbm("startvm detectvirt");
|
||||||
|
|
Loading…
Reference in a new issue