Commit 331bdb67 authored by frankiejol's avatar frankiejol
Browse files

Merge branch 'develop' of github.com:UPC/ravada into develop

parents 0da0eb79 a93b4fa0
......@@ -82,6 +82,7 @@ create_domain
mangle_volume
test_volume_contents
test_volume_format
unload_nbd
check_libvirt_tls
......@@ -2037,6 +2038,7 @@ sub _check_leftovers_users {
sub end {
_unload_nbd();
_check_leftovers
clean();
_unlock_all();
......@@ -2173,6 +2175,10 @@ sub _lsof_nbd($vm, $dev_nbd) {
return 0;
}
sub unload_nbd() {
_unload_nbd();
}
sub _unload_nbd() {
my @cmd = ($QEMU_NBD,"-d", $DEV_NBD);
my ($in, $out, $err);
......
......@@ -95,6 +95,7 @@ sub test_rebase_3times($vm, $swap, $data, $with_cd) {
}
}
unload_nbd();
$clone->remove(user_admin);
$base1->remove(user_admin);
$base3->remove(user_admin);
......@@ -163,6 +164,7 @@ sub test_rebase_with_vols($vm, $swap0, $data0, $with_cd0, $swap1, $data1, $with_
}
sub _remove_domains(@bases) {
unload_nbd();
for my $base (@bases) {
for my $clone ($base->clones) {
my $d_clone = Ravada::Domain->open($clone->{id});
......@@ -221,6 +223,7 @@ sub test_rebase($vm, $swap, $data, $with_cd) {
is(scalar($base->clones),1);
is(scalar($clone1->clones),1);
unload_nbd();
$clone2->remove(user_admin);
$clone1->remove(user_admin);
$base->remove(user_admin);
......@@ -240,6 +243,7 @@ sub test_prepare_remove($vm) {
next if $file =~ /\.iso$/;
test_volume_contents($vm, "zipizape", $file);
}
unload_nbd();
$domain->remove(user_admin);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment