[tck PATCH v2 09/13] scripts: fix the various hotplug tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



PCI device hotunplug requires a running guest OS that cooperates with
the ACPI unplug request. We must thus boot a real guest and wait for it
to be ready before running the tests.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 scripts/domain/200-disk-hotplug.t          | 4 +++-
 scripts/domain/205-disk-hotplug-ordering.t | 5 ++++-
 scripts/domain/210-nic-hotplug.t           | 5 ++++-
 scripts/domain/215-nic-hotplug-many.t      | 5 ++++-
 4 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/scripts/domain/200-disk-hotplug.t b/scripts/domain/200-disk-hotplug.t
index 4c54b6b..87c0e53 100644
--- a/scripts/domain/200-disk-hotplug.t
+++ b/scripts/domain/200-disk-hotplug.t
@@ -41,12 +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");
 
+diag "Waiting 30 seconds for guest to finish booting";
+sleep(30);
 
 my $path = $tck->create_sparse_disk("200-disk-hotplug", "extra.img", 100);
 
diff --git a/scripts/domain/205-disk-hotplug-ordering.t b/scripts/domain/205-disk-hotplug-ordering.t
index bc4990f..b76cd54 100644
--- a/scripts/domain/205-disk-hotplug-ordering.t
+++ b/scripts/domain/205-disk-hotplug-ordering.t
@@ -41,12 +41,15 @@ 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");
 
+diag "Waiting 30 seconds for guest to finish booting";
+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..7106fd0 100644
--- a/scripts/domain/210-nic-hotplug.t
+++ b/scripts/domain/210-nic-hotplug.t
@@ -41,12 +41,15 @@ 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");
 
+diag "Waiting 30 seconds for guest to finish booting";
+sleep(30);
+
 my $mac = "00:11:22:33:44:55";
 my $model = "virtio";
 
diff --git a/scripts/domain/215-nic-hotplug-many.t b/scripts/domain/215-nic-hotplug-many.t
index eaa282a..558e6e7 100644
--- a/scripts/domain/215-nic-hotplug-many.t
+++ b/scripts/domain/215-nic-hotplug-many.t
@@ -41,12 +41,15 @@ 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");
 
+diag "Waiting 30 seconds for guest to finish booting";
+sleep(30);
+
 my $mac1 = "02:11:22:33:44:55";
 my $mac2 = "02:12:22:33:44:55";
 my $mac3 = "02:13:22:33:44:55";
-- 
2.17.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux