[PATCH tck 3/6] NUMA flags are exclusive

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

 



Libvirt commit 47171cd1 causes VIR_DOMAIN_AFFECT_LIVE and
VIR_DOMAIN_AFFECT_CONFIG to be mutually exclusive. This patch modifies
202-numa-set-parameters.t to take that change into consideration and test
the AFFECT_LIVE flag individually. After setting NUMA parameters with this
flag, the domain is restarted and the NUMA settings are compared to the
default flags (stored prior to any AFFECT_LIVE changes).

Signed-off-by: Mike Latimer <mlatimer@xxxxxxxx>
---
 scripts/domain/202-numa-set-parameters.t | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/scripts/domain/202-numa-set-parameters.t b/scripts/domain/202-numa-set-parameters.t
index f5ed871..1055edd 100644
--- a/scripts/domain/202-numa-set-parameters.t
+++ b/scripts/domain/202-numa-set-parameters.t
@@ -57,23 +57,27 @@ my %params = (
     Sys::Virt::Domain::NUMA_NODESET => '0',
 );
 
-diag "Set numa parameters, affects live and config";
-lives_ok(sub {$dom->set_numa_parameters(\%params, Sys::Virt::Domain::AFFECT_LIVE | Sys::Virt::Domain::AFFECT_CONFIG)}, "set_numa_parameters");
+diag "Get default numa parameters";
+my $params = $dom->get_numa_parameters(Sys::Virt::Domain::AFFECT_LIVE);
+my $default_nodeset = ($params->{Sys::Virt::Domain::NUMA_NODESET});
+
+diag "Set numa parameters, affects live config only";
+lives_ok(sub {$dom->set_numa_parameters(\%params, Sys::Virt::Domain::AFFECT_LIVE)}, "set_numa_parameters");
 
 diag "Get numa parameters";
-my $params = $dom->get_numa_parameters(Sys::Virt::Domain::AFFECT_LIVE);
+$params = $dom->get_numa_parameters(Sys::Virt::Domain::AFFECT_LIVE);
 ok($params->{Sys::Virt::Domain::NUMA_NODESET} eq '0', 'Check nodeset');
 
 diag "Destroy the domain";
 $dom->destroy;
 
-diag "Make sure the domain can be started after setting numa parameters";
+diag "Make sure the domain is started with the default nodeset after setting numa parameters";
 $dom->create;
 ok($dom->get_id > 0, "running domain with ID > 0");
 
 diag "Get numa parameters";
 $params = $dom->get_numa_parameters(Sys::Virt::Domain::AFFECT_LIVE);
-ok($params->{Sys::Virt::Domain::NUMA_NODESET} eq '0', 'Check nodeset');
+ok($params->{Sys::Virt::Domain::NUMA_NODESET} eq '$default_nodeset', 'Check nodeset');
 
 diag "Destroy the domain";
 $dom->destroy;
-- 
1.8.4.5

--
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]