[libvirt] [PATCH tck 0/6] Update TCK for current libvirt/qemu environments

Hi, TCK needs some changes in order to better handle current libvirt/qemu environments. This patch series contains patches to address most (not all*) of the issues I've been encountering: - IP addresses can no longer be retrieved from default.leases - NUMA flags AFFECT_LIVE and AFFECT_CONFIG are mutually exclusive - cow format is no longer supported by qemu - dnsmasq spawns a child process with the same process name and params In addition to the above fixes, additional delays improve the reliability of the nwfilter and hotplugging tests. Thanks, Mike * I'll post another series shortly, dealing with issues in 121-block-info.t. Mike Latimer (6): Retrieve ip address from arp instead of leases nwfilter startup and shutdown delay NUMA flags are exclusive Remove cow format tests Delay before hotplugging Handle dnsmasq child processes lib/Sys/Virt/TCK/NetworkHelpers.pm | 8 ++++---- scripts/domain/200-disk-hotplug.t | 1 + scripts/domain/202-numa-set-parameters.t | 14 +++++++++----- scripts/domain/210-nic-hotplug.t | 1 + scripts/domain/215-nic-hotplug-many.t | 1 + scripts/networks/networkxml2hostout/tck-testnet-1.dat | 2 +- scripts/networks/networkxml2hostout/tck-testnet-2.dat | 2 +- scripts/networks/networkxml2hostout/tck-testnet-3.dat | 2 +- scripts/nwfilter/100-ping-still-working.t | 4 ++-- scripts/nwfilter/210-no-mac-spoofing.t | 4 ++-- scripts/nwfilter/220-no-ip-spoofing.t | 15 ++++++++++++--- scripts/nwfilter/230-no-mac-broadcast.t | 4 ++-- scripts/nwfilter/240-no-arp-spoofing.t | 4 ++-- scripts/storage/100-create-vol-dir.t | 19 +------------------ scripts/storage/200-clone-vol-dir.t | 4 ++-- 15 files changed, 42 insertions(+), 43 deletions(-) -- 1.8.4.5

Libvirt commit 0f87054b adds the --leasefile-ro option to dnsmasq. This change results in the default.leases no longer containing the ip address for the test domain. Instead of using the leases file, use arp to provide the ip address. Signed-off-by: Mike Latimer <mlatimer@suse.com> --- lib/Sys/Virt/TCK/NetworkHelpers.pm | 6 +++--- scripts/nwfilter/100-ping-still-working.t | 2 +- scripts/nwfilter/210-no-mac-spoofing.t | 2 +- scripts/nwfilter/220-no-ip-spoofing.t | 2 +- scripts/nwfilter/230-no-mac-broadcast.t | 2 +- scripts/nwfilter/240-no-arp-spoofing.t | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/Sys/Virt/TCK/NetworkHelpers.pm b/lib/Sys/Virt/TCK/NetworkHelpers.pm index 133064b..deda0f3 100644 --- a/lib/Sys/Virt/TCK/NetworkHelpers.pm +++ b/lib/Sys/Virt/TCK/NetworkHelpers.pm @@ -9,11 +9,11 @@ sub get_first_macaddress { return $mac; } -sub get_ip_from_leases{ +sub get_ip_from_arp{ my $mac = shift; - my $tmp = `grep $mac /var/lib/libvirt/dnsmasq/default.leases`; + my $tmp = `arp -n | grep $mac`; my @fields = split(/ /, $tmp); - my $ip = $fields[2]; + my $ip = $fields[0]; return $ip; } diff --git a/scripts/nwfilter/100-ping-still-working.t b/scripts/nwfilter/100-ping-still-working.t index a20b95d..cf03d90 100644 --- a/scripts/nwfilter/100-ping-still-working.t +++ b/scripts/nwfilter/100-ping-still-working.t @@ -69,7 +69,7 @@ sleep(10); my $mac = get_first_macaddress($dom); diag "mac is $mac"; -my $guestip = get_ip_from_leases($mac); +my $guestip = get_ip_from_arp($mac); diag "ip is $guestip"; # check ebtables entry diff --git a/scripts/nwfilter/210-no-mac-spoofing.t b/scripts/nwfilter/210-no-mac-spoofing.t index b81fc4a..14c54db 100644 --- a/scripts/nwfilter/210-no-mac-spoofing.t +++ b/scripts/nwfilter/210-no-mac-spoofing.t @@ -69,7 +69,7 @@ sleep(10); my $mac = get_first_macaddress($dom); diag "mac is $mac"; -my $guestip = get_ip_from_leases($mac); +my $guestip = get_ip_from_arp($mac); diag "ip is $guestip"; # check ebtables entry diff --git a/scripts/nwfilter/220-no-ip-spoofing.t b/scripts/nwfilter/220-no-ip-spoofing.t index 3a0213d..1217c52 100644 --- a/scripts/nwfilter/220-no-ip-spoofing.t +++ b/scripts/nwfilter/220-no-ip-spoofing.t @@ -60,7 +60,7 @@ sleep(30); my $mac = get_first_macaddress($dom); diag "mac is $mac"; -my $guestip = get_ip_from_leases($mac); +my $guestip = get_ip_from_arp($mac); diag "ip is $guestip"; # check ebtables entry diff --git a/scripts/nwfilter/230-no-mac-broadcast.t b/scripts/nwfilter/230-no-mac-broadcast.t index 16ce60d..cdf08fe 100644 --- a/scripts/nwfilter/230-no-mac-broadcast.t +++ b/scripts/nwfilter/230-no-mac-broadcast.t @@ -68,7 +68,7 @@ sleep(10); my $mac = get_first_macaddress($dom); diag "mac is $mac"; -my $guestip = get_ip_from_leases($mac); +my $guestip = get_ip_from_arp($mac); diag "ip is $guestip"; # check ebtables entry diff --git a/scripts/nwfilter/240-no-arp-spoofing.t b/scripts/nwfilter/240-no-arp-spoofing.t index 284033d..5590ed5 100644 --- a/scripts/nwfilter/240-no-arp-spoofing.t +++ b/scripts/nwfilter/240-no-arp-spoofing.t @@ -70,7 +70,7 @@ sleep(10); my $mac = get_first_macaddress($dom); diag "mac is $mac"; -my $guestip = get_ip_from_leases($mac); +my $guestip = get_ip_from_arp($mac); diag "ip is $guestip"; # check ebtables entry -- 1.8.4.5

On Mon, 2015-10-05 at 17:18 -0600, Mike Latimer wrote:
Libvirt commit 0f87054b adds the --leasefile-ro option to dnsmasq. This change results in the default.leases no longer containing the ip address for the test domain. Instead of using the leases file, use arp to provide the ip address.
Signed-off-by: Mike Latimer <mlatimer@suse.com> --- lib/Sys/Virt/TCK/NetworkHelpers.pm | 6 +++--- scripts/nwfilter/100-ping-still-working.t | 2 +- scripts/nwfilter/210-no-mac-spoofing.t | 2 +- scripts/nwfilter/220-no-ip-spoofing.t | 2 +- scripts/nwfilter/230-no-mac-broadcast.t | 2 +- scripts/nwfilter/240-no-arp-spoofing.t | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/Sys/Virt/TCK/NetworkHelpers.pm b/lib/Sys/Virt/TCK/NetworkHelpers.pm index 133064b..deda0f3 100644 --- a/lib/Sys/Virt/TCK/NetworkHelpers.pm +++ b/lib/Sys/Virt/TCK/NetworkHelpers.pm @@ -9,11 +9,11 @@ sub get_first_macaddress { return $mac; }
-sub get_ip_from_leases{ +sub get_ip_from_arp{ my $mac = shift; - my $tmp = `grep $mac /var/lib/libvirt/dnsmasq/default.leases`; + my $tmp = `arp -n | grep $mac`; my @fields = split(/ /, $tmp); - my $ip = $fields[2]; + my $ip = $fields[0]; return $ip; }
diff --git a/scripts/nwfilter/100-ping-still-working.t b/scripts/nwfilter/100-ping-still-working.t index a20b95d..cf03d90 100644 --- a/scripts/nwfilter/100-ping-still-working.t +++ b/scripts/nwfilter/100-ping-still-working.t @@ -69,7 +69,7 @@ sleep(10); my $mac = get_first_macaddress($dom); diag "mac is $mac";
-my $guestip = get_ip_from_leases($mac); +my $guestip = get_ip_from_arp($mac); diag "ip is $guestip";
# check ebtables entry diff --git a/scripts/nwfilter/210-no-mac-spoofing.t b/scripts/nwfilter/210-no-mac-spoofing.t index b81fc4a..14c54db 100644 --- a/scripts/nwfilter/210-no-mac-spoofing.t +++ b/scripts/nwfilter/210-no-mac-spoofing.t @@ -69,7 +69,7 @@ sleep(10); my $mac = get_first_macaddress($dom); diag "mac is $mac";
-my $guestip = get_ip_from_leases($mac); +my $guestip = get_ip_from_arp($mac); diag "ip is $guestip";
# check ebtables entry diff --git a/scripts/nwfilter/220-no-ip-spoofing.t b/scripts/nwfilter/220-no-ip-spoofing.t index 3a0213d..1217c52 100644 --- a/scripts/nwfilter/220-no-ip-spoofing.t +++ b/scripts/nwfilter/220-no-ip-spoofing.t @@ -60,7 +60,7 @@ sleep(30); my $mac = get_first_macaddress($dom); diag "mac is $mac";
-my $guestip = get_ip_from_leases($mac); +my $guestip = get_ip_from_arp($mac); diag "ip is $guestip";
# check ebtables entry diff --git a/scripts/nwfilter/230-no-mac-broadcast.t b/scripts/nwfilter/230-no-mac-broadcast.t index 16ce60d..cdf08fe 100644 --- a/scripts/nwfilter/230-no-mac-broadcast.t +++ b/scripts/nwfilter/230-no-mac-broadcast.t @@ -68,7 +68,7 @@ sleep(10); my $mac = get_first_macaddress($dom); diag "mac is $mac";
-my $guestip = get_ip_from_leases($mac); +my $guestip = get_ip_from_arp($mac); diag "ip is $guestip";
# check ebtables entry diff --git a/scripts/nwfilter/240-no-arp-spoofing.t b/scripts/nwfilter/240-no-arp-spoofing.t index 284033d..5590ed5 100644 --- a/scripts/nwfilter/240-no-arp-spoofing.t +++ b/scripts/nwfilter/240-no-arp-spoofing.t @@ -70,7 +70,7 @@ sleep(10); my $mac = get_first_macaddress($dom); diag "mac is $mac";
-my $guestip = get_ip_from_leases($mac); +my $guestip = get_ip_from_arp($mac); diag "ip is $guestip";
# check ebtables entry
ACK -- Cedric

When using larger test domains, additional time is required to ensure the domain is fully started and ready for the nwfilter tests. These same domains can also required a longer time to gracefully shutdown. This patch increases both timeouts, and modifies 220-no-ip-spoofing.t to match the startup changes introduced in libvirt-tck commit 83ef279c. Signed-off-by: Mike Latimer <mlatimer@suse.com> --- lib/Sys/Virt/TCK/NetworkHelpers.pm | 2 +- scripts/nwfilter/100-ping-still-working.t | 2 +- scripts/nwfilter/210-no-mac-spoofing.t | 2 +- scripts/nwfilter/220-no-ip-spoofing.t | 13 +++++++++++-- scripts/nwfilter/230-no-mac-broadcast.t | 2 +- scripts/nwfilter/240-no-arp-spoofing.t | 2 +- 6 files changed, 16 insertions(+), 7 deletions(-) diff --git a/lib/Sys/Virt/TCK/NetworkHelpers.pm b/lib/Sys/Virt/TCK/NetworkHelpers.pm index deda0f3..7e7aab7 100644 --- a/lib/Sys/Virt/TCK/NetworkHelpers.pm +++ b/lib/Sys/Virt/TCK/NetworkHelpers.pm @@ -21,7 +21,7 @@ sub get_ip_from_arp{ sub shutdown_vm_gracefully { my $dom = shift; - my $target = time() + 30; + my $target = time() + 60; $dom->shutdown; while ($dom->is_active()) { sleep(1); diff --git a/scripts/nwfilter/100-ping-still-working.t b/scripts/nwfilter/100-ping-still-working.t index cf03d90..1433396 100644 --- a/scripts/nwfilter/100-ping-still-working.t +++ b/scripts/nwfilter/100-ping-still-working.t @@ -64,7 +64,7 @@ do { } while ($stats->{"tx_packets"} < 10 && $tries < 10); # Wait a little bit more to make sure dhcp is started in the guest -sleep(10); +sleep(20); my $mac = get_first_macaddress($dom); diag "mac is $mac"; diff --git a/scripts/nwfilter/210-no-mac-spoofing.t b/scripts/nwfilter/210-no-mac-spoofing.t index 14c54db..aba5ce1 100644 --- a/scripts/nwfilter/210-no-mac-spoofing.t +++ b/scripts/nwfilter/210-no-mac-spoofing.t @@ -63,7 +63,7 @@ do { } while ($stats->{"tx_packets"} < 10 && $tries < 10); # Wait a little bit more to make sure dhcp is started in the guest -sleep(10); +sleep(20); # ping guest first nic my $mac = get_first_macaddress($dom); diff --git a/scripts/nwfilter/220-no-ip-spoofing.t b/scripts/nwfilter/220-no-ip-spoofing.t index 1217c52..96cedf0 100644 --- a/scripts/nwfilter/220-no-ip-spoofing.t +++ b/scripts/nwfilter/220-no-ip-spoofing.t @@ -53,8 +53,17 @@ diag "Start domain"; $dom->create; ok($dom->get_id() > 0, "running domain has an ID > 0"); -diag "Waiting 30 seconds for guest to finish booting"; -sleep(30); +diag "Waiting for guest to finish booting"; +my $stats; +my $tries = 0; +do { + sleep(10); + $stats = $dom->interface_stats("vnet0"); + $tries++; +} while ($stats->{"tx_packets"} < 10 && $tries < 10); + +# Wait a little bit more to make sure dhcp is started in the guest +sleep(20); # ping guest first nic my $mac = get_first_macaddress($dom); diff --git a/scripts/nwfilter/230-no-mac-broadcast.t b/scripts/nwfilter/230-no-mac-broadcast.t index cdf08fe..054e682 100644 --- a/scripts/nwfilter/230-no-mac-broadcast.t +++ b/scripts/nwfilter/230-no-mac-broadcast.t @@ -62,7 +62,7 @@ do { } while ($stats->{"tx_packets"} < 10 && $tries < 10); # Wait a little bit more to make sure dhcp is started in the guest -sleep(10); +sleep(20); # ping guest first nic my $mac = get_first_macaddress($dom); diff --git a/scripts/nwfilter/240-no-arp-spoofing.t b/scripts/nwfilter/240-no-arp-spoofing.t index 5590ed5..7f48663 100644 --- a/scripts/nwfilter/240-no-arp-spoofing.t +++ b/scripts/nwfilter/240-no-arp-spoofing.t @@ -64,7 +64,7 @@ do { } while ($stats->{"tx_packets"} < 10 && $tries < 10); # Wait a little bit more to make sure dhcp is started in the guest -sleep(10); +sleep(20); # ping guest first nic my $mac = get_first_macaddress($dom); -- 1.8.4.5

On Mon, 2015-10-05 at 17:18 -0600, Mike Latimer wrote:
When using larger test domains, additional time is required to ensure the domain is fully started and ready for the nwfilter tests. These same domains can also required a longer time to gracefully shutdown. This patch increases both timeouts, and modifies 220-no-ip-spoofing.t to match the startup changes introduced in libvirt-tck commit 83ef279c.
Isn't that change also required for the first boot? -- Cedric
Signed-off-by: Mike Latimer <mlatimer@suse.com> --- lib/Sys/Virt/TCK/NetworkHelpers.pm | 2 +- scripts/nwfilter/100-ping-still-working.t | 2 +- scripts/nwfilter/210-no-mac-spoofing.t | 2 +- scripts/nwfilter/220-no-ip-spoofing.t | 13 +++++++++++-- scripts/nwfilter/230-no-mac-broadcast.t | 2 +- scripts/nwfilter/240-no-arp-spoofing.t | 2 +- 6 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/lib/Sys/Virt/TCK/NetworkHelpers.pm b/lib/Sys/Virt/TCK/NetworkHelpers.pm index deda0f3..7e7aab7 100644 --- a/lib/Sys/Virt/TCK/NetworkHelpers.pm +++ b/lib/Sys/Virt/TCK/NetworkHelpers.pm @@ -21,7 +21,7 @@ sub get_ip_from_arp{ sub shutdown_vm_gracefully { my $dom = shift;
- my $target = time() + 30; + my $target = time() + 60; $dom->shutdown; while ($dom->is_active()) { sleep(1); diff --git a/scripts/nwfilter/100-ping-still-working.t b/scripts/nwfilter/100-ping-still-working.t index cf03d90..1433396 100644 --- a/scripts/nwfilter/100-ping-still-working.t +++ b/scripts/nwfilter/100-ping-still-working.t @@ -64,7 +64,7 @@ do { } while ($stats->{"tx_packets"} < 10 && $tries < 10);
# Wait a little bit more to make sure dhcp is started in the guest -sleep(10); +sleep(20);
my $mac = get_first_macaddress($dom); diag "mac is $mac"; diff --git a/scripts/nwfilter/210-no-mac-spoofing.t b/scripts/nwfilter/210-no-mac-spoofing.t index 14c54db..aba5ce1 100644 --- a/scripts/nwfilter/210-no-mac-spoofing.t +++ b/scripts/nwfilter/210-no-mac-spoofing.t @@ -63,7 +63,7 @@ do { } while ($stats->{"tx_packets"} < 10 && $tries < 10);
# Wait a little bit more to make sure dhcp is started in the guest -sleep(10); +sleep(20);
# ping guest first nic my $mac = get_first_macaddress($dom); diff --git a/scripts/nwfilter/220-no-ip-spoofing.t b/scripts/nwfilter/220-no-ip-spoofing.t index 1217c52..96cedf0 100644 --- a/scripts/nwfilter/220-no-ip-spoofing.t +++ b/scripts/nwfilter/220-no-ip-spoofing.t @@ -53,8 +53,17 @@ diag "Start domain"; $dom->create; ok($dom->get_id() > 0, "running domain has an ID > 0");
-diag "Waiting 30 seconds for guest to finish booting"; -sleep(30); +diag "Waiting for guest to finish booting"; +my $stats; +my $tries = 0; +do { + sleep(10); + $stats = $dom->interface_stats("vnet0"); + $tries++; +} while ($stats->{"tx_packets"} < 10 && $tries < 10); + +# Wait a little bit more to make sure dhcp is started in the guest +sleep(20);
# ping guest first nic my $mac = get_first_macaddress($dom); diff --git a/scripts/nwfilter/230-no-mac-broadcast.t b/scripts/nwfilter/230-no-mac-broadcast.t index cdf08fe..054e682 100644 --- a/scripts/nwfilter/230-no-mac-broadcast.t +++ b/scripts/nwfilter/230-no-mac-broadcast.t @@ -62,7 +62,7 @@ do { } while ($stats->{"tx_packets"} < 10 && $tries < 10);
# Wait a little bit more to make sure dhcp is started in the guest -sleep(10); +sleep(20);
# ping guest first nic my $mac = get_first_macaddress($dom); diff --git a/scripts/nwfilter/240-no-arp-spoofing.t b/scripts/nwfilter/240-no-arp-spoofing.t index 5590ed5..7f48663 100644 --- a/scripts/nwfilter/240-no-arp-spoofing.t +++ b/scripts/nwfilter/240-no-arp-spoofing.t @@ -64,7 +64,7 @@ do { } while ($stats->{"tx_packets"} < 10 && $tries < 10);
# Wait a little bit more to make sure dhcp is started in the guest -sleep(10); +sleep(20);
# ping guest first nic my $mac = get_first_macaddress($dom);

On Mon, Oct 05, 2015 at 05:18:39PM -0600, Mike Latimer wrote:
When using larger test domains, additional time is required to ensure the domain is fully started and ready for the nwfilter tests. These same domains can also required a longer time to gracefully shutdown. This patch increases both timeouts, and modifies 220-no-ip-spoofing.t to match the startup changes introduced in libvirt-tck commit 83ef279c.
Signed-off-by: Mike Latimer <mlatimer@suse.com>
IIRC, the main thing these tests all need is existance of SSH server, so rather than having a fixed sleep, can we just poll on connect() on the ssh port until we see that it is open. That way we sleep the minimum required time. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

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@suse.com> --- 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

On Mon, 2015-10-05 at 17:18 -0600, Mike Latimer wrote:
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@suse.com> --- 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;
ACK -- Cedric

Qemu removed support for the cow format in 550830f9. This patch drops all cow related tests in libvirt-tck. Signed-off-by: Mike Latimer <mlatimer@suse.com> --- scripts/storage/100-create-vol-dir.t | 19 +------------------ scripts/storage/200-clone-vol-dir.t | 4 ++-- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/scripts/storage/100-create-vol-dir.t b/scripts/storage/100-create-vol-dir.t index 574e61a..952012c 100644 --- a/scripts/storage/100-create-vol-dir.t +++ b/scripts/storage/100-create-vol-dir.t @@ -28,7 +28,7 @@ with a filesystem pool. use strict; use warnings; -use Test::More tests => 33; +use Test::More tests => 29; use Sys::Virt::TCK; use Test::Exception; @@ -56,7 +56,6 @@ lives_ok(sub { $pool->create }, "started storage pool"); my $volsparsexml = $tck->generic_volume("tck1", "raw", 1024*1024*50)->allocation(0)->as_xml; my $volallocxml = $tck->generic_volume("tck2", "raw", 1024*1024*50)->allocation(1024*1024*50)->as_xml; -my $volcowxml = $tck->generic_volume("tck3", "cow", 1024*1024*50)->as_xml; my $volqcow1xml = $tck->generic_volume("tck4", "qcow", 1024*1024*50)->as_xml; my $volqcow2xml = $tck->generic_volume("tck5", "qcow2", 1024*1024*50)->as_xml; my $volvmdkxml = $tck->generic_volume("tck6", "vmdk", 1024*1024*50)->as_xml; @@ -100,22 +99,6 @@ lives_ok(sub { $vol->delete(0) }, "deleted volume"); -ok_volume { $vol = $pool->create_volume($volcowxml) } "create cow volume"; - -$path = xpath($vol, "string(/volume/target/path)"); -$st = stat($path); - -ok($st, "path $path exists"); - -# Don't know exactly how large a cow empty file is, but it -# should be quite small :-) -ok($st->size < 1024*1024, "basic cow header is allocated"); - -lives_ok(sub { $vol->delete(0) }, "deleted volume"); - - - - ok_volume(sub { $vol = $pool->create_volume($volqcow1xml) }, "create qcow volume"); $path = xpath($vol, "string(/volume/target/path)"); diff --git a/scripts/storage/200-clone-vol-dir.t b/scripts/storage/200-clone-vol-dir.t index 28043fb..cc0daba 100644 --- a/scripts/storage/200-clone-vol-dir.t +++ b/scripts/storage/200-clone-vol-dir.t @@ -31,7 +31,7 @@ checksummed and validated use strict; use warnings; -use Test::More tests => 61; +use Test::More tests => 52; use Sys::Virt::TCK; use Test::Exception; @@ -103,7 +103,7 @@ my $srcdigest = &digest($path); diag "Now testing cloning of various formats"; -my @formats = qw(raw cow qcow qcow2 vmdk vpc); +my @formats = qw(raw qcow qcow2 vmdk vpc); foreach my $format (@formats) { diag "Cloning source volume to $format format"; -- 1.8.4.5

On Mon, 2015-10-05 at 17:18 -0600, Mike Latimer wrote:
Qemu removed support for the cow format in 550830f9. This patch drops all cow related tests in libvirt-tck.
Signed-off-by: Mike Latimer <mlatimer@suse.com> --- scripts/storage/100-create-vol-dir.t | 19 +------------------ scripts/storage/200-clone-vol-dir.t | 4 ++-- 2 files changed, 3 insertions(+), 20 deletions(-)
diff --git a/scripts/storage/100-create-vol-dir.t b/scripts/storage/100-create-vol-dir.t index 574e61a..952012c 100644 --- a/scripts/storage/100-create-vol-dir.t +++ b/scripts/storage/100-create-vol-dir.t @@ -28,7 +28,7 @@ with a filesystem pool. use strict; use warnings;
-use Test::More tests => 33; +use Test::More tests => 29;
use Sys::Virt::TCK; use Test::Exception; @@ -56,7 +56,6 @@ lives_ok(sub { $pool->create }, "started storage pool");
my $volsparsexml = $tck->generic_volume("tck1", "raw", 1024*1024*50)->allocation(0)->as_xml; my $volallocxml = $tck->generic_volume("tck2", "raw", 1024*1024*50)->allocation(1024*1024*50)->as_xml; -my $volcowxml = $tck->generic_volume("tck3", "cow", 1024*1024*50)->as_xml; my $volqcow1xml = $tck->generic_volume("tck4", "qcow", 1024*1024*50)->as_xml; my $volqcow2xml = $tck->generic_volume("tck5", "qcow2", 1024*1024*50)->as_xml; my $volvmdkxml = $tck->generic_volume("tck6", "vmdk", 1024*1024*50)->as_xml; @@ -100,22 +99,6 @@ lives_ok(sub { $vol->delete(0) }, "deleted volume");
-ok_volume { $vol = $pool->create_volume($volcowxml) } "create cow volume"; - -$path = xpath($vol, "string(/volume/target/path)"); -$st = stat($path); - -ok($st, "path $path exists"); - -# Don't know exactly how large a cow empty file is, but it -# should be quite small :-) -ok($st->size < 1024*1024, "basic cow header is allocated"); - -lives_ok(sub { $vol->delete(0) }, "deleted volume"); - - - - ok_volume(sub { $vol = $pool->create_volume($volqcow1xml) }, "create qcow volume");
$path = xpath($vol, "string(/volume/target/path)"); diff --git a/scripts/storage/200-clone-vol-dir.t b/scripts/storage/200-clone-vol-dir.t index 28043fb..cc0daba 100644 --- a/scripts/storage/200-clone-vol-dir.t +++ b/scripts/storage/200-clone-vol-dir.t @@ -31,7 +31,7 @@ checksummed and validated use strict; use warnings;
-use Test::More tests => 61; +use Test::More tests => 52;
use Sys::Virt::TCK; use Test::Exception; @@ -103,7 +103,7 @@ my $srcdigest = &digest($path);
diag "Now testing cloning of various formats";
-my @formats = qw(raw cow qcow qcow2 vmdk vpc); +my @formats = qw(raw qcow qcow2 vmdk vpc);
foreach my $format (@formats) { diag "Cloning source volume to $format format";
ACK -- Cedric

When testing larger domains, a delay is necessary to ensure the test domain is fully initialized before hotplugging disks and/or nics. Signed-off-by: Mike Latimer <mlatimer@suse.com> --- scripts/domain/200-disk-hotplug.t | 1 + scripts/domain/210-nic-hotplug.t | 1 + scripts/domain/215-nic-hotplug-many.t | 1 + 3 files changed, 3 insertions(+) diff --git a/scripts/domain/200-disk-hotplug.t b/scripts/domain/200-disk-hotplug.t index 4c54b6b..2edf0c9 100644 --- a/scripts/domain/200-disk-hotplug.t +++ b/scripts/domain/200-disk-hotplug.t @@ -46,6 +46,7 @@ my $xml = $tck->generic_domain(name => "tck")->as_xml; diag "Creating a new transient domain"; my $dom; ok_domain(sub { $dom = $conn->create_domain($xml) }, "created transient domain object"); +sleep(20); my $path = $tck->create_sparse_disk("200-disk-hotplug", "extra.img", 100); diff --git a/scripts/domain/210-nic-hotplug.t b/scripts/domain/210-nic-hotplug.t index ac9048e..6053222 100644 --- a/scripts/domain/210-nic-hotplug.t +++ b/scripts/domain/210-nic-hotplug.t @@ -46,6 +46,7 @@ my $xml = $tck->generic_domain(name => "tck")->as_xml; diag "Creating a new transient domain"; my $dom; ok_domain(sub { $dom = $conn->create_domain($xml) }, "created transient domain object"); +sleep(20); 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 0270054..9b345d0 100644 --- a/scripts/domain/215-nic-hotplug-many.t +++ b/scripts/domain/215-nic-hotplug-many.t @@ -46,6 +46,7 @@ my $xml = $tck->generic_domain(name => "tck")->as_xml; diag "Creating a new transient domain"; my $dom; ok_domain(sub { $dom = $conn->create_domain($xml) }, "created transient domain object"); +sleep(20); my $mac1 = "01:11:22:33:44:55"; my $mac2 = "02:11:22:33:44:55"; -- 1.8.4.5

On Mon, Oct 05, 2015 at 05:18:42PM -0600, Mike Latimer wrote:
When testing larger domains, a delay is necessary to ensure the test domain is fully initialized before hotplugging disks and/or nics.
Signed-off-by: Mike Latimer <mlatimer@suse.com> --- scripts/domain/200-disk-hotplug.t | 1 + scripts/domain/210-nic-hotplug.t | 1 + scripts/domain/215-nic-hotplug-many.t | 1 + 3 files changed, 3 insertions(+)
diff --git a/scripts/domain/200-disk-hotplug.t b/scripts/domain/200-disk-hotplug.t index 4c54b6b..2edf0c9 100644 --- a/scripts/domain/200-disk-hotplug.t +++ b/scripts/domain/200-disk-hotplug.t @@ -46,6 +46,7 @@ my $xml = $tck->generic_domain(name => "tck")->as_xml; diag "Creating a new transient domain"; my $dom; ok_domain(sub { $dom = $conn->create_domain($xml) }, "created transient domain object"); +sleep(20);
I'm really not a fan to adding arbitrary 20 second delays to so many of our tests, as it dramatically increases the running time of the test suite. Can you explain more about the actual failure / problem scenario you are seeing ? Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On Thu, Oct 08, 2015 at 10:17:23AM +0100, Daniel P. Berrange wrote:
On Mon, Oct 05, 2015 at 05:18:42PM -0600, Mike Latimer wrote:
When testing larger domains, a delay is necessary to ensure the test domain is fully initialized before hotplugging disks and/or nics.
Signed-off-by: Mike Latimer <mlatimer@suse.com> --- scripts/domain/200-disk-hotplug.t | 1 + scripts/domain/210-nic-hotplug.t | 1 + scripts/domain/215-nic-hotplug-many.t | 1 + 3 files changed, 3 insertions(+)
diff --git a/scripts/domain/200-disk-hotplug.t b/scripts/domain/200-disk-hotplug.t index 4c54b6b..2edf0c9 100644 --- a/scripts/domain/200-disk-hotplug.t +++ b/scripts/domain/200-disk-hotplug.t @@ -46,6 +46,7 @@ my $xml = $tck->generic_domain(name => "tck")->as_xml; diag "Creating a new transient domain"; my $dom; ok_domain(sub { $dom = $conn->create_domain($xml) }, "created transient domain object"); +sleep(20);
I'm really not a fan to adding arbitrary 20 second delays to so many of our tests, as it dramatically increases the running time of the test suite.
Can you explain more about the actual failure / problem scenario you are seeing ?
Although we don't use ssh in these tests, perhaps it is reasonable to also poll on connect() on the ssh port to identify when the SSH server has started, and use that as an indication that the guest has booted. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Hi Daniel, On Thursday, October 08, 2015 10:20:48 AM Daniel P. Berrange wrote:
On Thu, Oct 08, 2015 at 10:17:23AM +0100, Daniel P. Berrange wrote:
On Mon, Oct 05, 2015 at 05:18:42PM -0600, Mike Latimer wrote:
diag "Creating a new transient domain"; my $dom; ok_domain(sub { $dom = $conn->create_domain($xml) }, "created transient domain object");> > +sleep(20);
I'm really not a fan to adding arbitrary 20 second delays to so many of our tests, as it dramatically increases the running time of the test suite.
Can you explain more about the actual failure / problem scenario you are seeing ?
Sure. There are actually two different types of tests that are more reliable (in my environment) with the sleeps added - domain/21[05]-nic-hotplug* and nwfilter/[12]*. (I'm not actually seeing a problem with domain/200-disk- hotplug, but I wanted to be consistent across the tests, and the additional 20 seconds didn't impact me.) The nic-hotplug tests don't spin up an entire vm (contrary to my poor description in patch 5/6). Instead, they just use the kernel and initrd found in /var/cache/libvirt-tck/os-x86_64-hvm, and an empty 100MB disk. Regardless of what kernel I have in place (Fedora 19/22, openSUSE 13.2/Leap), these tests attach the NIC properly, and appear to detach the NIC properly. However, the final test finds the NIC still defined in the XML. Adding an 11-13 second delay immediately after creating the domain resolves the problem (across all kernel/initrds). In the nwfilter tests, there are two problems I sometimes encounter. The first is that the domain (which is an actual working domain), does not obtain an IP address before the test tries to find and use that address. Sleeping for an additional 5-10 seconds before trying to get the address is enough to avoid the problem. The second nwfilter issue is that I have seen instances where the domain will not shutdown in 30 seconds. Increasing the graceful shutdown window to 60 seconds resolve this issue. (This change does not increase test time when using a domain that does shut down quicker.)
Although we don't use ssh in these tests, perhaps it is reasonable to also poll on connect() on the ssh port to identify when the SSH server has started, and use that as an indication that the guest has booted.
In the nic hotplug tests, there is no SSH server. Sorry for misleading you based on my incorrect "testing larger domains" comment. In the nwfilter tests, this approach will not work as the necessary delays are all before the domain is up and running with an IP address. Any ideas (other than sleeping)? (I'm happy to rework the patch to drop the delay in the block hotplug script as that is not necessary. I can also reduce the other sleeps by 5 seconds or so, if it matters.) Thanks, Mike

On Mon, 2015-10-05 at 17:18 -0600, Mike Latimer wrote:
When testing larger domains, a delay is necessary to ensure the test domain is fully initialized before hotplugging disks and/or nics.
Signed-off-by: Mike Latimer <mlatimer@suse.com> --- scripts/domain/200-disk-hotplug.t | 1 + scripts/domain/210-nic-hotplug.t | 1 + scripts/domain/215-nic-hotplug-many.t | 1 + 3 files changed, 3 insertions(+)
diff --git a/scripts/domain/200-disk-hotplug.t b/scripts/domain/200-disk-hotplug.t index 4c54b6b..2edf0c9 100644 --- a/scripts/domain/200-disk-hotplug.t +++ b/scripts/domain/200-disk-hotplug.t @@ -46,6 +46,7 @@ my $xml = $tck->generic_domain(name => "tck")->as_xml; diag "Creating a new transient domain"; my $dom; ok_domain(sub { $dom = $conn->create_domain($xml) }, "created transient domain object"); +sleep(20);
my $path = $tck->create_sparse_disk("200-disk-hotplug", "extra.img", 100); diff --git a/scripts/domain/210-nic-hotplug.t b/scripts/domain/210-nic-hotplug.t index ac9048e..6053222 100644 --- a/scripts/domain/210-nic-hotplug.t +++ b/scripts/domain/210-nic-hotplug.t @@ -46,6 +46,7 @@ my $xml = $tck->generic_domain(name => "tck")->as_xml; diag "Creating a new transient domain"; my $dom; ok_domain(sub { $dom = $conn->create_domain($xml) }, "created transient domain object"); +sleep(20);
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 0270054..9b345d0 100644 --- a/scripts/domain/215-nic-hotplug-many.t +++ b/scripts/domain/215-nic-hotplug-many.t @@ -46,6 +46,7 @@ my $xml = $tck->generic_domain(name => "tck")->as_xml; diag "Creating a new transient domain"; my $dom; ok_domain(sub { $dom = $conn->create_domain($xml) }, "created transient domain object"); +sleep(20);
my $mac1 = "01:11:22:33:44:55"; my $mac2 = "02:11:22:33:44:55";
ACK -- Cedric

The 100-apply-verify-host.t can fail 3 tests due to multiple instances of the 'dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/tck-testnet.conf' process being returned in a process listing. This is due to libvirt launching one dnsmasq process as root, and that process spawning a second instance of the same process owned by the dnsmasq user. This patch resolves the problem by adding `uniq` to the command generating the process list. Signed-off-by: Mike Latimer <mlatimer@suse.com> --- scripts/networks/networkxml2hostout/tck-testnet-1.dat | 2 +- scripts/networks/networkxml2hostout/tck-testnet-2.dat | 2 +- scripts/networks/networkxml2hostout/tck-testnet-3.dat | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/networks/networkxml2hostout/tck-testnet-1.dat b/scripts/networks/networkxml2hostout/tck-testnet-1.dat index fff6ca3..56aa37c 100644 --- a/scripts/networks/networkxml2hostout/tck-testnet-1.dat +++ b/scripts/networks/networkxml2hostout/tck-testnet-1.dat @@ -9,7 +9,7 @@ ACCEPT all -- 0.0.0.0/0 10.1.2.0/24 state RELATED,ESTAB ACCEPT all -- 10.1.2.0/24 0.0.0.0/0 #ip -o route show dev tck-testbr | gawk '{print $1" "$7}' 10.1.2.0/24 10.1.2.1 -#ps aux | sed -n '/dnsmasq .*tck-testnet/ s|.*\(\/dnsmasq\/tck-testnet.conf\).*|\1|p' +#ps aux | sed -n '/dnsmasq .*tck-testnet/ s|.*\(\/dnsmasq\/tck-testnet.conf\).*|\1|p' | uniq /dnsmasq/tck-testnet.conf #grep bind-dynamic `ps aux | sed -n '0,/dnsmasq .*tck-testnet/ s|.*--conf-file=\(.*tck-testnet.conf\).*|\1|p'` bind-dynamic diff --git a/scripts/networks/networkxml2hostout/tck-testnet-2.dat b/scripts/networks/networkxml2hostout/tck-testnet-2.dat index 7f8c86c..cc812be 100644 --- a/scripts/networks/networkxml2hostout/tck-testnet-2.dat +++ b/scripts/networks/networkxml2hostout/tck-testnet-2.dat @@ -4,7 +4,7 @@ ACCEPT all -- 10.1.2.0/24 0.0.0.0/0 #iptables -t nat -L -n | grep ' 10\.1\.2\.' #ip -o route show dev tck-testbr | gawk '{print $1" "$7}' 10.1.2.0/24 10.1.2.1 -#ps aux | sed -n '/dnsmasq .*tck-testnet/ s|.*\(\/dnsmasq\/tck-testnet.conf\).*|\1|p' +#ps aux | sed -n '/dnsmasq .*tck-testnet/ s|.*\(\/dnsmasq\/tck-testnet.conf\).*|\1|p' | uniq /dnsmasq/tck-testnet.conf #grep bind-dynamic `ps aux | sed -n '0,/dnsmasq .*tck-testnet/ s|.*--conf-file=\(.*tck-testnet.conf\).*|\1|p'` bind-dynamic diff --git a/scripts/networks/networkxml2hostout/tck-testnet-3.dat b/scripts/networks/networkxml2hostout/tck-testnet-3.dat index 5fbf742..67745d3 100644 --- a/scripts/networks/networkxml2hostout/tck-testnet-3.dat +++ b/scripts/networks/networkxml2hostout/tck-testnet-3.dat @@ -12,7 +12,7 @@ ACCEPT all ::/0 2001:db8:ac10:fd01::/64 ACCEPT all 2001:db8:ac10:fd01::/64 ::/0 ACCEPT all ::/0 2001:db8:ac10:fe01::/64 ACCEPT all 2001:db8:ac10:fe01::/64 ::/0 -#ps aux | sed -n '/dnsmasq .*tck-testnet/ s|.*\(\/dnsmasq\/tck-testnet.conf\).*|\1|p' +#ps aux | sed -n '/dnsmasq .*tck-testnet/ s|.*\(\/dnsmasq\/tck-testnet.conf\).*|\1|p' | uniq /dnsmasq/tck-testnet.conf #grep bind-dynamic `ps aux | sed -n '0,/dnsmasq .*tck-testnet/ s|.*--conf-file=\(.*tck-testnet.conf\).*|\1|p'` bind-dynamic -- 1.8.4.5

On Mon, 2015-10-05 at 17:18 -0600, Mike Latimer wrote:
The 100-apply-verify-host.t can fail 3 tests due to multiple instances of the 'dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/tck-testnet.conf' process being returned in a process listing. This is due to libvirt launching one dnsmasq process as root, and that process spawning a second instance of the same process owned by the dnsmasq user. This patch resolves the problem by adding `uniq` to the command generating the process list.
Signed-off-by: Mike Latimer <mlatimer@suse.com> --- scripts/networks/networkxml2hostout/tck-testnet-1.dat | 2 +- scripts/networks/networkxml2hostout/tck-testnet-2.dat | 2 +- scripts/networks/networkxml2hostout/tck-testnet-3.dat | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/networks/networkxml2hostout/tck-testnet-1.dat b/scripts/networks/networkxml2hostout/tck-testnet-1.dat index fff6ca3..56aa37c 100644 --- a/scripts/networks/networkxml2hostout/tck-testnet-1.dat +++ b/scripts/networks/networkxml2hostout/tck-testnet-1.dat @@ -9,7 +9,7 @@ ACCEPT all -- 0.0.0.0/0 10.1.2.0/24 state RELATED,ESTAB ACCEPT all -- 10.1.2.0/24 0.0.0.0/0 #ip -o route show dev tck-testbr | gawk '{print $1" "$7}' 10.1.2.0/24 10.1.2.1 -#ps aux | sed -n '/dnsmasq .*tck-testnet/ s|.*\(\/dnsmasq\/tck-testnet.conf\).*|\1|p' +#ps aux | sed -n '/dnsmasq .*tck-testnet/ s|.*\(\/dnsmasq\/tck-testnet.conf\).*|\1|p' | uniq /dnsmasq/tck-testnet.conf #grep bind-dynamic `ps aux | sed -n '0,/dnsmasq .*tck-testnet/ s|.*--conf-file=\(.*tck-testnet.conf\).*|\1|p'` bind-dynamic diff --git a/scripts/networks/networkxml2hostout/tck-testnet-2.dat b/scripts/networks/networkxml2hostout/tck-testnet-2.dat index 7f8c86c..cc812be 100644 --- a/scripts/networks/networkxml2hostout/tck-testnet-2.dat +++ b/scripts/networks/networkxml2hostout/tck-testnet-2.dat @@ -4,7 +4,7 @@ ACCEPT all -- 10.1.2.0/24 0.0.0.0/0 #iptables -t nat -L -n | grep ' 10\.1\.2\.' #ip -o route show dev tck-testbr | gawk '{print $1" "$7}' 10.1.2.0/24 10.1.2.1 -#ps aux | sed -n '/dnsmasq .*tck-testnet/ s|.*\(\/dnsmasq\/tck-testnet.conf\).*|\1|p' +#ps aux | sed -n '/dnsmasq .*tck-testnet/ s|.*\(\/dnsmasq\/tck-testnet.conf\).*|\1|p' | uniq /dnsmasq/tck-testnet.conf #grep bind-dynamic `ps aux | sed -n '0,/dnsmasq .*tck-testnet/ s|.*--conf-file=\(.*tck-testnet.conf\).*|\1|p'` bind-dynamic diff --git a/scripts/networks/networkxml2hostout/tck-testnet-3.dat b/scripts/networks/networkxml2hostout/tck-testnet-3.dat index 5fbf742..67745d3 100644 --- a/scripts/networks/networkxml2hostout/tck-testnet-3.dat +++ b/scripts/networks/networkxml2hostout/tck-testnet-3.dat @@ -12,7 +12,7 @@ ACCEPT all ::/0 2001:db8:ac10:fd01::/64 ACCEPT all 2001:db8:ac10:fd01::/64 ::/0 ACCEPT all ::/0 2001:db8:ac10:fe01::/64 ACCEPT all 2001:db8:ac10:fe01::/64 ::/0 -#ps aux | sed -n '/dnsmasq .*tck-testnet/ s|.*\(\/dnsmasq\/tck-testnet.conf\).*|\1|p' +#ps aux | sed -n '/dnsmasq .*tck-testnet/ s|.*\(\/dnsmasq\/tck-testnet.conf\).*|\1|p' | uniq /dnsmasq/tck-testnet.conf #grep bind-dynamic `ps aux | sed -n '0,/dnsmasq .*tck-testnet/ s|.*--conf-file=\(.*tck-testnet.conf\).*|\1|p'` bind-dynamic
ACK -- Cedric
participants (3)
-
Cedric Bosdonnat
-
Daniel P. Berrange
-
Mike Latimer