This patch fixed following issues:
1) Hot unplug won't work for a VM without OS. Create a working VM
instead.
2) Avoid using multicast MAC address.
Signed-off-by: Zhe Peng <zpeng(a)redhat.com>
---
scripts/domain/200-disk-hotplug.t | 5 +++--
scripts/domain/205-disk-hotplug-ordering.t | 3 ++-
scripts/domain/210-nic-hotplug.t | 5 +++--
scripts/domain/215-nic-hotplug-many.t | 9 +++++----
4 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/scripts/domain/200-disk-hotplug.t b/scripts/domain/200-disk-hotplug.t
index 4c54b6b..7ed5b27 100644
--- a/scripts/domain/200-disk-hotplug.t
+++ b/scripts/domain/200-disk-hotplug.t
@@ -41,13 +41,14 @@ END {
}
-my $xml = $tck->generic_domain(name => "tck")->as_xml;
+my $xml = $tck->generic_domain(name => "tck", fullos =>
1)->as_xml;
diag "Creating a new transient domain";
my $dom;
ok_domain(sub { $dom = $conn->create_domain($xml) }, "created transient domain
object");
+sleep(30);
my $path = $tck->create_sparse_disk("200-disk-hotplug",
"extra.img", 100);
my $dev = "vdb";
@@ -76,4 +77,4 @@ lives_ok(sub { $dom->detach_device($diskxml); }, "disk has been
detached");
my $finalxml = $dom->get_xml_description;
-is($initialxml, $finalxml, "final XML has removed the disk")
+is($finalxml, $initialxml, "final XML has removed the disk")
diff --git a/scripts/domain/205-disk-hotplug-ordering.t
b/scripts/domain/205-disk-hotplug-ordering.t
index bc4990f..c9a300c 100644
--- a/scripts/domain/205-disk-hotplug-ordering.t
+++ b/scripts/domain/205-disk-hotplug-ordering.t
@@ -41,12 +41,13 @@ END {
}
-my $xml = $tck->generic_domain(name => "tck")->as_xml;
+my $xml = $tck->generic_domain(name => "tck", fullos =>
1)->as_xml;
diag "Creating a new transient domain";
my $dom;
ok_domain(sub { $dom = $conn->create_domain($xml) }, "created transient domain
object");
+sleep(30);
my $supported = 1;
foreach my $dev (qw/vdb sdb/) {
my $path = $tck->create_sparse_disk("200-disk-hotplug",
"extra-$dev.img", 100);
diff --git a/scripts/domain/210-nic-hotplug.t b/scripts/domain/210-nic-hotplug.t
index ac9048e..4a2763f 100644
--- a/scripts/domain/210-nic-hotplug.t
+++ b/scripts/domain/210-nic-hotplug.t
@@ -41,11 +41,12 @@ END {
}
-my $xml = $tck->generic_domain(name => "tck")->as_xml;
+my $xml = $tck->generic_domain(name => "tck", fullos =>
1)->as_xml;
diag "Creating a new transient domain";
my $dom;
ok_domain(sub { $dom = $conn->create_domain($xml) }, "created transient domain
object");
+sleep(30);
my $mac = "00:11:22:33:44:55";
my $model = "virtio";
@@ -72,4 +73,4 @@ lives_ok(sub { $dom->detach_device($netxml); }, "interface has
been detached");
my $finalxml = $dom->get_xml_description;
-is($initialxml, $finalxml, "final XML has removed the disk")
+is($finalxml, $initialxml, "final XML has removed the interface")
diff --git a/scripts/domain/215-nic-hotplug-many.t
b/scripts/domain/215-nic-hotplug-many.t
index 0270054..d4fa23e 100644
--- a/scripts/domain/215-nic-hotplug-many.t
+++ b/scripts/domain/215-nic-hotplug-many.t
@@ -41,15 +41,16 @@ END {
}
-my $xml = $tck->generic_domain(name => "tck")->as_xml;
+my $xml = $tck->generic_domain(name => "tck", fullos =>
1)->as_xml;
diag "Creating a new transient domain";
my $dom;
ok_domain(sub { $dom = $conn->create_domain($xml) }, "created transient domain
object");
+sleep(30);
-my $mac1 = "01:11:22:33:44:55";
-my $mac2 = "02:11:22:33:44:55";
-my $mac3 = "03:11:22:33:44:55";
+my $mac1 = "02:11:22:33:44:55";
+my $mac2 = "04:11:22:33:44:55";
+my $mac3 = "06:11:22:33:44:55";
my $model = "virtio";
my $netxml1 = <<EOF;
--
1.9.0