Re: [tck PATCH v2 2/5] default to no nwfilter in test domains

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

 



On 02/08/2018 02:19 PM, Laine Stump wrote:
When the nwfilter tests were added, the config for *all* test domains
was changed to apply the "clean-traffic" filter. This doesn't have an
ill effect on any test that I know of, but if nwfilter code happened
to be broken in just the right way, other tests that might be
unrelated could fail as well.

This patch changes the default nwfilter from "clean-traffic" to
nothing, and explicitly sets clean-traffic for those tests that
require it.

Signed-off-by: Laine Stump <laine@xxxxxxxxx>
---

New in V2. This was formerly a part of the previous patch.

  lib/Sys/Virt/TCK.pm                       | 4 ++--
  scripts/nwfilter/100-ping-still-working.t | 3 ++-
  scripts/nwfilter/210-no-mac-spoofing.t    | 3 ++-
  scripts/nwfilter/220-no-ip-spoofing.t     | 3 ++-
  scripts/nwfilter/240-no-arp-spoofing.t    | 3 ++-
  5 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/lib/Sys/Virt/TCK.pm b/lib/Sys/Virt/TCK.pm
index 01ce3ea..2259042 100644
--- a/lib/Sys/Virt/TCK.pm
+++ b/lib/Sys/Virt/TCK.pm
@@ -766,7 +766,7 @@ sub generic_machine_domain {
      my $caps = exists $params{caps} ? $params{caps} : die "caps parameter is required";
      my $ostype = exists $params{ostype} ? $params{ostype} : "hvm";
      my $fullos = exists $params{fullos} ? $params{fullos} : 0;
-    my $filterref = exists $params{filterref} ? $params{filterref} : "clean-traffic";
+    my $filterref = exists $params{filterref} ? $params{filterref} : undef;

      if ($fullos) {
  	my %config = $self->get_image($caps, $ostype);
@@ -897,7 +897,7 @@ sub generic_domain {
      my $ostype = exists $params{ostype} ? $params{ostype} : "hvm";
      my $fullos = exists $params{fullos} ? $params{fullos} : 0;
      my $netmode = exists $params{netmode} ? $params{netmode} : undef;
-    my $filterref = exists $params{filterref} ? $params{filterref} : "clean-traffic";
+    my $filterref = exists $params{filterref} ? $params{filterref} : undef;

      my $caps = Sys::Virt::TCK::Capabilities->new(xml => $self->conn->get_capabilities);

diff --git a/scripts/nwfilter/100-ping-still-working.t b/scripts/nwfilter/100-ping-still-working.t
index 5afc6a6..1bbd7c5 100644
--- a/scripts/nwfilter/100-ping-still-working.t
+++ b/scripts/nwfilter/100-ping-still-working.t
@@ -44,7 +44,8 @@ END {

  # create first domain and start it
  my $xml = $tck->generic_domain(name => "tck", fullos => 1,
-			       netmode => "network")->as_xml();
+                               netmode => "network",
+                               filterref => "clean-traffic")->as_xml();

  my $dom;
  ok_domain(sub { $dom = $conn->define_domain($xml) }, "created persistent domain object");
diff --git a/scripts/nwfilter/210-no-mac-spoofing.t b/scripts/nwfilter/210-no-mac-spoofing.t
index 63adf5c..3438f4a 100644
--- a/scripts/nwfilter/210-no-mac-spoofing.t
+++ b/scripts/nwfilter/210-no-mac-spoofing.t
@@ -44,7 +44,8 @@ END {

  # create first domain and start it
  my $xml = $tck->generic_domain(name => "tck", fullos => 1,
-			       netmode => "network")->as_xml();
+                               netmode => "network",
+                               filterref => "clean-traffic")->as_xml();

  my $dom;
  ok_domain(sub { $dom = $conn->define_domain($xml) }, "created persistent domain object");
diff --git a/scripts/nwfilter/220-no-ip-spoofing.t b/scripts/nwfilter/220-no-ip-spoofing.t
index 6e390ef..72dcae8 100644
--- a/scripts/nwfilter/220-no-ip-spoofing.t
+++ b/scripts/nwfilter/220-no-ip-spoofing.t
@@ -44,7 +44,8 @@ END {

  # create first domain and start it
  my $xml = $tck->generic_domain(name => "tck", fullos => 1,
-			       netmode => "network")->as_xml();
+                               netmode => "network",
+                               filterref => "clean-traffic")->as_xml();

  my $dom;
  ok_domain(sub { $dom = $conn->define_domain($xml) }, "created persistent domain object");
diff --git a/scripts/nwfilter/240-no-arp-spoofing.t b/scripts/nwfilter/240-no-arp-spoofing.t
index a7ba9d2..dfc8e08 100644
--- a/scripts/nwfilter/240-no-arp-spoofing.t
+++ b/scripts/nwfilter/240-no-arp-spoofing.t
@@ -45,7 +45,8 @@ END {

  # create first domain and start it
  my $xml = $tck->generic_domain(name => "tck", fullos => 1,
-			       netmode => "network")->as_xml();
+                               netmode => "network",
+                               filterref => "clean-traffic")->as_xml();

  my $dom;
  ok_domain(sub { $dom = $conn->define_domain($xml) }, "created persistent domain object");


All tests now have an explicit filter since 230-no-mac-broadcast.t got one in the previous patch.

Review-by: Stefan Berger <stefanb@xxxxxxxxxxxxxxxxxx>


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