The 202-numa-set-parameters.t test would attempt to fetch NUMA parameters while the guest is shutoff using the VIR_DOMAIN_AFFECT_LIVE parameter. Change it to use the param AFFECT_CONFIG instead, and add a separate test for AFFECT_LIVE after the guest has been started again. Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx> --- scripts/domain/202-numa-set-parameters.t | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/domain/202-numa-set-parameters.t b/scripts/domain/202-numa-set-parameters.t index c0baf0b..886a979 100644 --- a/scripts/domain/202-numa-set-parameters.t +++ b/scripts/domain/202-numa-set-parameters.t @@ -28,7 +28,7 @@ after the API call to set NUMA parameters for a domain. use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 12; use Sys::Virt::TCK; use Test::Exception; @@ -80,7 +80,7 @@ diag "Set numa parameters, affects next boot"; lives_ok(sub {$dom->set_numa_parameters(\%params, Sys::Virt::Domain::AFFECT_CONFIG)}, "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_CONFIG); ok($params->{Sys::Virt::Domain::NUMA_MODE} == Sys::Virt::Domain::NUMATUNE_MEM_STRICT, 'Check mode'); ok($params->{Sys::Virt::Domain::NUMA_NODESET} eq '0', 'Check nodeset'); @@ -88,6 +88,11 @@ diag "Make sure the domain can be started 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_MODE} == Sys::Virt::Domain::NUMATUNE_MEM_STRICT, 'Check mode'); +ok($params->{Sys::Virt::Domain::NUMA_NODESET} eq '0', 'Check nodeset'); + diag "Destroying the persistent domain"; $dom->destroy; $dom->undefine; -- 1.8.5.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list