From nobody Fri Apr 19 17:08:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 154959532767298.73393330099736; Thu, 7 Feb 2019 19:08:47 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0F280C057F36; Fri, 8 Feb 2019 03:08:45 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B99A462A2C; Fri, 8 Feb 2019 03:08:44 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 3DF7D18033A5; Fri, 8 Feb 2019 03:08:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x1838cLS007778 for ; Thu, 7 Feb 2019 22:08:39 -0500 Received: by smtp.corp.redhat.com (Postfix) id D443616BFF; Fri, 8 Feb 2019 03:08:38 +0000 (UTC) Received: from vhost2.laine.org (ovpn-116-56.phx2.redhat.com [10.3.116.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7CD1518E22; Fri, 8 Feb 2019 03:08:38 +0000 (UTC) From: Laine Stump To: libvir-list@redhat.com Date: Thu, 7 Feb 2019 22:08:28 -0500 Message-Id: <20190208030831.6790-2-laine@laine.org> In-Reply-To: <20190208030831.6790-1-laine@laine.org> References: <20190208030831.6790-1-laine@laine.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [tck PATCH 1/4] storage: skip qcow1 tests when qcow1 isn't supported by qemu-img X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 08 Feb 2019 03:08:46 +0000 (UTC) Content-Type: text/plain; charset="utf-8" RHEL8 has dropped support for qcow1 format images, so skip the tests related to creating/cloning qcow1 images (based on the output of qemu-img -help). Signed-off-by: Laine Stump Reviewed-by: Daniel P. Berrang=C3=A9 --- scripts/storage/100-create-vol-dir.t | 22 ++++++++----- scripts/storage/200-clone-vol-dir.t | 48 ++++++++++++++++------------ 2 files changed, 41 insertions(+), 29 deletions(-) diff --git a/scripts/storage/100-create-vol-dir.t b/scripts/storage/100-cre= ate-vol-dir.t index 952012c..6262d69 100644 --- a/scripts/storage/100-create-vol-dir.t +++ b/scripts/storage/100-create-vol-dir.t @@ -99,18 +99,24 @@ lives_ok(sub { $vol->delete(0) }, "deleted volume"); =20 =20 =20 -ok_volume(sub { $vol =3D $pool->create_volume($volqcow1xml) }, "create qco= w volume"); +SKIP: { + if (`qemu-img -help` !~ "^Supported formats: .* qcow ") { + skip "qcow1 format not supported", 4; + } =20 -$path =3D xpath($vol, "string(/volume/target/path)"); -$st =3D stat($path); + ok_volume(sub { $vol =3D $pool->create_volume($volqcow1xml) }, "create= qcow volume"); =20 -ok($st, "path $path exists"); + $path =3D xpath($vol, "string(/volume/target/path)"); + $st =3D stat($path); =20 -# Don't know exactly how large a qcow1 empty file is, but it -# should be quite small :-) -ok($st->size < 1024*1024, "basic qcow1 header is allocated"); + ok($st, "path $path exists"); =20 -lives_ok(sub { $vol->delete(0) }, "deleted volume"); + # Don't know exactly how large a qcow1 empty file is, but it + # should be quite small :-) + ok($st->size < 1024*1024, "basic qcow1 header is allocated"); + + lives_ok(sub { $vol->delete(0) }, "deleted volume"); +} =20 =20 =20 diff --git a/scripts/storage/200-clone-vol-dir.t b/scripts/storage/200-clon= e-vol-dir.t index cc0daba..787564f 100644 --- a/scripts/storage/200-clone-vol-dir.t +++ b/scripts/storage/200-clone-vol-dir.t @@ -106,39 +106,45 @@ diag "Now testing cloning of various formats"; my @formats =3D qw(raw qcow qcow2 vmdk vpc); =20 foreach my $format (@formats) { - diag "Cloning source volume to $format format"; - my $volclonexml =3D $tck->generic_volume("tck$format", $format, ((1024= *1024*50)+4096))->as_xml; + SKIP: { + if (($format eq "qcow") and (`qemu-img -help` !~ "^Supported forma= ts: .* qcow ")) { + skip "qcow1 format not supported", 9; + } =20 - my $clone; - ok_volume(sub { $clone =3D $pool->clone_volume($volclonexml, $vol) }, = "clone to $format volume"); + diag "Cloning source volume to $format format"; + my $volclonexml =3D $tck->generic_volume("tck$format", $format, ((= 1024*1024*50)+4096))->as_xml; =20 - $path =3D xpath($clone, "string(/volume/target/path)"); - $st =3D stat($path); - ok($st, "path $path exists"); - ok($st->size >=3D ((1024*1024*50)+4096), "size is at least 50M"); + my $clone; + ok_volume(sub { $clone =3D $pool->clone_volume($volclonexml, $vol)= }, "clone to $format volume"); =20 + $path =3D xpath($clone, "string(/volume/target/path)"); + $st =3D stat($path); + ok($st, "path $path exists"); + ok($st->size >=3D ((1024*1024*50)+4096), "size is at least 50M"); =20 - diag "Cloning cloned volume back to raw format"; - my $voldstxml =3D $tck->generic_volume("tckdst", "raw", ((1024*1024*50= )+4096))->as_xml; - my $result; - ok_volume(sub { $result =3D $pool->clone_volume($voldstxml, $clone) },= "clone back to raw volume"); =20 + diag "Cloning cloned volume back to raw format"; + my $voldstxml =3D $tck->generic_volume("tckdst", "raw", ((1024*102= 4*50)+4096))->as_xml; + my $result; + ok_volume(sub { $result =3D $pool->clone_volume($voldstxml, $clone= ) }, "clone back to raw volume"); =20 - $path =3D xpath($result, "string(/volume/target/path)"); =20 - $st =3D stat($path); - ok($st, "path $path exists"); + $path =3D xpath($result, "string(/volume/target/path)"); =20 - is($st->size, ((1024*1024*50)+4096), "size is 50M"); + $st =3D stat($path); + ok($st, "path $path exists"); =20 - diag "Comparing data between source & result volume"; + is($st->size, ((1024*1024*50)+4096), "size is 50M"); =20 - my $dstdigest =3D &digest($path); + diag "Comparing data between source & result volume"; =20 - is($srcdigest, $dstdigest, "digests match"); + my $dstdigest =3D &digest($path); =20 - lives_ok(sub { $clone->delete(0) }, "deleted clone volume"); - lives_ok(sub { $result->delete(0) }, "deleted result volume"); + is($srcdigest, $dstdigest, "digests match"); + + lives_ok(sub { $clone->delete(0) }, "deleted clone volume"); + lives_ok(sub { $result->delete(0) }, "deleted result volume"); + } } =20 =20 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri Apr 19 17:08:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15495953511591016.1748354485354; Thu, 7 Feb 2019 19:09:11 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 342A1356D3; Fri, 8 Feb 2019 03:09:09 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E48F65C6A6; Fri, 8 Feb 2019 03:09:08 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 75F2518033A6; Fri, 8 Feb 2019 03:09:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x1838dQZ007783 for ; Thu, 7 Feb 2019 22:08:39 -0500 Received: by smtp.corp.redhat.com (Postfix) id 64D241701C; Fri, 8 Feb 2019 03:08:39 +0000 (UTC) Received: from vhost2.laine.org (ovpn-116-56.phx2.redhat.com [10.3.116.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0B5EE450B; Fri, 8 Feb 2019 03:08:38 +0000 (UTC) From: Laine Stump To: libvir-list@redhat.com Date: Thu, 7 Feb 2019 22:08:29 -0500 Message-Id: <20190208030831.6790-3-laine@laine.org> In-Reply-To: <20190208030831.6790-1-laine@laine.org> References: <20190208030831.6790-1-laine@laine.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [tck PATCH 2/4] storage: fix/improve diagnostic messages X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 08 Feb 2019 03:09:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Due to copy/paste, the tests for several other formats were described as "qcow". Also, a couple of messages didn't give the image format. Signed-off-by: Laine Stump Reviewed-by: Daniel P. Berrang=C3=A9 --- scripts/storage/100-create-vol-dir.t | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/storage/100-create-vol-dir.t b/scripts/storage/100-cre= ate-vol-dir.t index 6262d69..9663d28 100644 --- a/scripts/storage/100-create-vol-dir.t +++ b/scripts/storage/100-create-vol-dir.t @@ -94,7 +94,7 @@ is($st->size, 1024*1024*50, "size is 50M"); # overhead for a file ok($st->blocks >=3D (1024*1024*50/512), "alot of blocks allocated"); =20 -lives_ok(sub { $vol->delete(0) }, "deleted volume"); +lives_ok(sub { $vol->delete(0) }, "deleted raw volume"); =20 =20 =20 @@ -104,7 +104,7 @@ SKIP: { skip "qcow1 format not supported", 4; } =20 - ok_volume(sub { $vol =3D $pool->create_volume($volqcow1xml) }, "create= qcow volume"); + ok_volume(sub { $vol =3D $pool->create_volume($volqcow1xml) }, "create= qcow1 volume"); =20 $path =3D xpath($vol, "string(/volume/target/path)"); $st =3D stat($path); @@ -121,7 +121,7 @@ SKIP: { =20 =20 =20 -ok_volume(sub { $vol =3D $pool->create_volume($volqcow2xml) }, "create qco= w volume"); +ok_volume(sub { $vol =3D $pool->create_volume($volqcow2xml) }, "create qco= w2 volume"); =20 $path =3D xpath($vol, "string(/volume/target/path)"); $st =3D stat($path); @@ -132,12 +132,12 @@ ok($st, "path $path exists"); # should be quite small :-) ok($st->size < 1024*1024, "basic qcow2 header is allocated"); =20 -lives_ok(sub { $vol->delete(0) }, "deleted volume"); +lives_ok(sub { $vol->delete(0) }, "deleted qcow2 volume"); =20 =20 =20 =20 -ok_volume(sub { $vol =3D $pool->create_volume($volvmdkxml) }, "create qcow= volume"); +ok_volume(sub { $vol =3D $pool->create_volume($volvmdkxml) }, "create vmdk= volume"); =20 $path =3D xpath($vol, "string(/volume/target/path)"); $st =3D stat($path); @@ -148,12 +148,12 @@ ok($st, "path $path exists"); # should be quite small :-) ok($st->size < 1024*1024, "basic vmdk header is allocated"); =20 -lives_ok(sub { $vol->delete(0) }, "deleted volume"); +lives_ok(sub { $vol->delete(0) }, "deleted vmdk volume"); =20 =20 =20 =20 -ok_volume(sub { $vol =3D $pool->create_volume($volvpcxml) }, "create qcow = volume"); +ok_volume(sub { $vol =3D $pool->create_volume($volvpcxml) }, "create vpc v= olume"); =20 $path =3D xpath($vol, "string(/volume/target/path)"); $st =3D stat($path); @@ -164,5 +164,5 @@ ok($st, "path $path exists"); # should be quite small :-) ok($st->size < 1024*1024, "basic vpc header is allocated"); =20 -lives_ok(sub { $vol->delete(0) }, "deleted volume"); +lives_ok(sub { $vol->delete(0) }, "deleted vpc volume"); =20 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri Apr 19 17:08:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1549595351001891.1014724152719; Thu, 7 Feb 2019 19:09:11 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EA645C057F3A; Fri, 8 Feb 2019 03:09:08 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9E6E016BFF; Fri, 8 Feb 2019 03:09:08 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2D2C141F8A; Fri, 8 Feb 2019 03:09:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x1838daF007793 for ; Thu, 7 Feb 2019 22:08:39 -0500 Received: by smtp.corp.redhat.com (Postfix) id EA4EE16BFF; Fri, 8 Feb 2019 03:08:39 +0000 (UTC) Received: from vhost2.laine.org (ovpn-116-56.phx2.redhat.com [10.3.116.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8FC0F18E22; Fri, 8 Feb 2019 03:08:39 +0000 (UTC) From: Laine Stump To: libvir-list@redhat.com Date: Thu, 7 Feb 2019 22:08:30 -0500 Message-Id: <20190208030831.6790-4-laine@laine.org> In-Reply-To: <20190208030831.6790-1-laine@laine.org> References: <20190208030831.6790-1-laine@laine.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [tck PATCH 3/4] networks: remove stray use of brctl command X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 08 Feb 2019 03:09:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" brctl has been deprecated for a long time, and distros are starting to remove it. "ip link blah type bridge" should be used instead. Signed-off-by: Laine Stump Reviewed-by: Daniel P. Berrang=C3=A9 --- scripts/networks/340-guest-network-bridge.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/networks/340-guest-network-bridge.t b/scripts/networks= /340-guest-network-bridge.t index e5db0ff..498bcb6 100644 --- a/scripts/networks/340-guest-network-bridge.t +++ b/scripts/networks/340-guest-network-bridge.t @@ -36,9 +36,9 @@ my $conn =3D eval { $tck->setup(); }; BAIL_OUT "failed to setup test harness: $@" if $@; END { $tck->cleanup if $tck; } =20 -((system "brctl addbr tck") =3D=3D 0) or die "cannot create bridge 'tck'"; +((system "ip link add name tck type bridge") =3D=3D 0) or die "cannot crea= te bridge 'tck'"; =20 -END { system "brctl delbr tck" } +END { system "ip link del tck" } =20 my $b =3D Sys::Virt::TCK::NetworkBuilder->new(name =3D> "tck"); $b->bridge("tck"); --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri Apr 19 17:08:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1549595356889288.8854236569266; Thu, 7 Feb 2019 19:09:16 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 64AFB8666B; Fri, 8 Feb 2019 03:09:14 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1C9D462985; Fri, 8 Feb 2019 03:09:14 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B3EF63F954; Fri, 8 Feb 2019 03:09:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x1838ekH007798 for ; Thu, 7 Feb 2019 22:08:40 -0500 Received: by smtp.corp.redhat.com (Postfix) id 761E916BFF; Fri, 8 Feb 2019 03:08:40 +0000 (UTC) Received: from vhost2.laine.org (ovpn-116-56.phx2.redhat.com [10.3.116.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1DF2D18E22; Fri, 8 Feb 2019 03:08:40 +0000 (UTC) From: Laine Stump To: libvir-list@redhat.com Date: Thu, 7 Feb 2019 22:08:31 -0500 Message-Id: <20190208030831.6790-5-laine@laine.org> In-Reply-To: <20190208030831.6790-1-laine@laine.org> References: <20190208030831.6790-1-laine@laine.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [tck PATCH 4/4] nwfilter: allow for ebtables *not* removing leading 0 from mac addresses X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 08 Feb 2019 03:09:15 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The ebtables command in RHEL8 prints 00 in a MAC address as.... "00", unlike e.g. Fedora 29, which prints it as "0". Allow for both. Signed-off-by: Laine Stump Reviewed-by: Daniel P. Berrang=C3=A9 --- scripts/nwfilter/100-ping-still-working.t | 4 ++-- scripts/nwfilter/210-no-mac-spoofing.t | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/nwfilter/100-ping-still-working.t b/scripts/nwfilter/1= 00-ping-still-working.t index a88eb02..656722d 100644 --- a/scripts/nwfilter/100-ping-still-working.t +++ b/scripts/nwfilter/100-ping-still-working.t @@ -76,9 +76,9 @@ diag "ip is $guestip"; my $ebtables =3D (-e '/sbin/ebtables') ? '/sbin/ebtables' : '/usr/sbin/ebt= ables'; my $ebtable =3D `$ebtables -L;$ebtables -t nat -L`; diag $ebtable; -# ebtables shortens :00: to :0: so we need to do that too +# ebtables *might* shorten :00: to :0: so we need to allow for both when s= earching $_ =3D $mac; -s/00/0/g; +s/0([0-9])/0{0,1}$1/g; ok($ebtable =3D~ $_, "check ebtables entry"); =20 # ping guest1 diff --git a/scripts/nwfilter/210-no-mac-spoofing.t b/scripts/nwfilter/210-= no-mac-spoofing.t index 78c500c..95f003a 100644 --- a/scripts/nwfilter/210-no-mac-spoofing.t +++ b/scripts/nwfilter/210-no-mac-spoofing.t @@ -81,9 +81,9 @@ diag "guest ip is $guestip"; my $ebtables =3D (-e '/sbin/ebtables') ? '/sbin/ebtables' : '/usr/sbin/ebt= ables'; my $ebtable =3D `$ebtables -L;$ebtables -t nat -L`; diag $ebtable; -# ebtables shortens :00: to :0: so we need to do that too +# ebtables *might* shorten :00: to :0: so we need to allow for both when s= earching $_ =3D $mac; -s/00/0/g;=20 +s/0([0-9])/0{0,1}$1/g; ok($ebtable =3D~ $_, "check ebtables entry"); =20 my $macfalse =3D "52:54:00:f9:21:22"; --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri Apr 19 17:08:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1549739004897847.3119183486617; Sat, 9 Feb 2019 11:03:24 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7CD3AC059B87; Sat, 9 Feb 2019 19:03:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 474B35C234; Sat, 9 Feb 2019 19:03:19 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 683DC1803390; Sat, 9 Feb 2019 19:03:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x19J3DMb008400 for ; Sat, 9 Feb 2019 14:03:13 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5CD0010E81C2; Sat, 9 Feb 2019 19:03:13 +0000 (UTC) Received: from vhost2.laine.org (ovpn-116-51.phx2.redhat.com [10.3.116.51]) by smtp.corp.redhat.com (Postfix) with ESMTP id F360D1001943; Sat, 9 Feb 2019 19:03:09 +0000 (UTC) From: Laine Stump To: libvir-list@redhat.com Date: Sat, 9 Feb 2019 14:03:05 -0500 Message-Id: <20190209190305.6513-1-laine@laine.org> In-Reply-To: <20190208030831.6790-1-laine@laine.org> References: <20190208030831.6790-1-laine@laine.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [tck PATCH 5/4] nwfilter: account for more leading 0's in MAC addresses in ebtables output X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Sat, 09 Feb 2019 19:03:22 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Since this test (050-apply-verify-host.t), we can't use a regexp in the string to be compared. The fix method that leads to the least changes is to use sed to remove potential leading 0's. Signed-off-by: Laine Stump Reviewed-by: Daniel P. Berrang=C3=A9 --- (These changes fix *almost* all failures in nwfilter/050-apply-verify-host.t on RHEL8. The rest look like they might be legitimate problems with ebtables and IPv6) scripts/nwfilter/nwfilter2vmtest.sh | 2 +- scripts/nwfilter/nwfilterxml2fwallout/arp-test.fwall | 2 +- scripts/nwfilter/nwfilterxml2fwallout/ip-test.fwall | 2 +- scripts/nwfilter/nwfilterxml2fwallout/mac-test.fwall | 2 +- scripts/nwfilter/nwfilterxml2fwallout/rarp-test.fwall | 2 +- scripts/nwfilter/nwfilterxml2fwallout/stp-test.fwall | 4 ++-- scripts/nwfilter/nwfilterxml2fwallout/target-test.fwall | 2 +- scripts/nwfilter/nwfilterxml2fwallout/testvm.fwall.dat | 2 +- scripts/nwfilter/nwfilterxml2fwallout/vlan-test.fwall | 4 ++-- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/nwfilter/nwfilter2vmtest.sh b/scripts/nwfilter/nwfilte= r2vmtest.sh index 778013b..2e8c0b0 100644 --- a/scripts/nwfilter/nwfilter2vmtest.sh +++ b/scripts/nwfilter/nwfilter2vmtest.sh @@ -653,7 +653,7 @@ main() { exit 1 fi =20 - createVM "${vm2}" "${TESTFILTERNAME}" "10.1.1.1" "52:54:0:9f:33:da" \ + createVM "${vm2}" "${TESTFILTERNAME}" "10.1.1.1" "52:54:10:9f:33:da" \ "${flags}" if [ $? -ne 0 ]; then echo "Could not create VM ${vm2}. Exiting." diff --git a/scripts/nwfilter/nwfilterxml2fwallout/arp-test.fwall b/scripts= /nwfilter/nwfilterxml2fwallout/arp-test.fwall index 34174a0..a3c04df 100644 --- a/scripts/nwfilter/nwfilterxml2fwallout/arp-test.fwall +++ b/scripts/nwfilter/nwfilterxml2fwallout/arp-test.fwall @@ -1,4 +1,4 @@ -#ebtables -t nat -L libvirt-I-vnet0 | grep -v "^Bridge" | grep -v "^$" +#ebtables -t nat -L libvirt-I-vnet0 | sed s/01:02:03:04:05:06/1:2:3:4:5:6/= g | sed s/0a:0b:0c:0d:0e:0f/a:b:c:d:e:f/g | grep -v "^Bridge" | grep -v "^$" -p ARP -s 1:2:3:4:5:6 -d aa:bb:cc:dd:ee:ff --arp-op Request --arp-htype 12= --arp-ptype 0x22 --arp-mac-src 1:2:3:4:5:6 --arp-mac-dst a:b:c:d:e:f -j AC= CEPT=20 -p ARP -s 1:2:3:4:5:6 --arp-op Request --arp-htype 255 --arp-ptype 0xff -j= ACCEPT=20 -p ARP -s 1:2:3:4:5:6 --arp-op 11 --arp-htype 256 --arp-ptype 0x100 -j ACC= EPT=20 diff --git a/scripts/nwfilter/nwfilterxml2fwallout/ip-test.fwall b/scripts/= nwfilter/nwfilterxml2fwallout/ip-test.fwall index 83441c2..6933a15 100644 --- a/scripts/nwfilter/nwfilterxml2fwallout/ip-test.fwall +++ b/scripts/nwfilter/nwfilterxml2fwallout/ip-test.fwall @@ -2,7 +2,7 @@ -i vnet0 -j libvirt-I-vnet0 #ebtables -t nat -L POSTROUTING | grep vnet0 -o vnet0 -j libvirt-O-vnet0 -#ebtables -t nat -L libvirt-I-vnet0 | grep -v "^Bridge" | grep -v "^$" +#ebtables -t nat -L libvirt-I-vnet0 | sed s/01:02:03:04:05:06/1:2:3:4:5:6/= g | grep -v "^Bridge" | grep -v "^$" -p IPv4 -s 1:2:3:4:5:6 -d aa:bb:cc:dd:ee:ff --ip-src 10.1.2.3 --ip-dst 10.= 1.2.3 --ip-proto udp --ip-sport 20:22 --ip-dport 100:101 -j ACCEPT=20 -p IPv4 --ip-src 10.1.0.0/17 --ip-dst 10.1.2.0/24 --ip-tos 0x3F --ip-proto= udp -j ACCEPT=20 #ebtables -t nat -L libvirt-O-vnet0 | grep -v "^Bridge" | grep -v "^$" diff --git a/scripts/nwfilter/nwfilterxml2fwallout/mac-test.fwall b/scripts= /nwfilter/nwfilterxml2fwallout/mac-test.fwall index bb00629..7ecace2 100644 --- a/scripts/nwfilter/nwfilterxml2fwallout/mac-test.fwall +++ b/scripts/nwfilter/nwfilterxml2fwallout/mac-test.fwall @@ -2,7 +2,7 @@ -i vnet0 -j libvirt-I-vnet0 #ebtables -t nat -L POSTROUTING | grep vnet0 | grep -v "^Bridge" | grep -v= "^$" -o vnet0 -j libvirt-O-vnet0 -#ebtables -t nat -L libvirt-I-vnet0 | grep -v "^Bridge" | grep -v "^$" +#ebtables -t nat -L libvirt-I-vnet0 | sed s/01:02:03:04:05:06/1:2:3:4:5:6/= g | grep -v "^Bridge" | grep -v "^$" -p ARP -s 1:2:3:4:5:6 -j ACCEPT=20 #ebtables -t nat -L libvirt-O-vnet0 | grep -v "^Bridge" | grep -v "^$" -p IPv4 -d aa:bb:cc:dd:ee:ff -j ACCEPT=20 diff --git a/scripts/nwfilter/nwfilterxml2fwallout/rarp-test.fwall b/script= s/nwfilter/nwfilterxml2fwallout/rarp-test.fwall index e0d9c8c..7dd98e5 100644 --- a/scripts/nwfilter/nwfilterxml2fwallout/rarp-test.fwall +++ b/scripts/nwfilter/nwfilterxml2fwallout/rarp-test.fwall @@ -1,4 +1,4 @@ -#ebtables -t nat -L libvirt-I-vnet0 | sed s/0x8035/RARP/g | grep -v "^Brid= ge" | grep -v "^$" +#ebtables -t nat -L libvirt-I-vnet0 | sed s/01:02:03:04:05:06/1:2:3:4:5:6/= g | sed s/0a:0b:0c:0d:0e:0f/a:b:c:d:e:f/g | sed s/0x8035/RARP/g | grep -v "= ^Bridge" | grep -v "^$" -p RARP -s 1:2:3:4:5:6 -d aa:bb:cc:dd:ee:ff --arp-op Request --arp-htype 1= 2 --arp-ptype 0x22 --arp-mac-src 1:2:3:4:5:6 --arp-mac-dst a:b:c:d:e:f -j A= CCEPT=20 -p RARP -s 1:2:3:4:5:6 --arp-op Request --arp-htype 255 --arp-ptype 0xff -= j ACCEPT=20 -p RARP -s 1:2:3:4:5:6 --arp-op 11 --arp-htype 256 --arp-ptype 0x100 -j AC= CEPT=20 diff --git a/scripts/nwfilter/nwfilterxml2fwallout/stp-test.fwall b/scripts= /nwfilter/nwfilterxml2fwallout/stp-test.fwall index 5ee2545..b95ea26 100644 --- a/scripts/nwfilter/nwfilterxml2fwallout/stp-test.fwall +++ b/scripts/nwfilter/nwfilterxml2fwallout/stp-test.fwall @@ -6,9 +6,9 @@ -i vnet0 -j libvirt-I-vnet0 #ebtables -t nat -L POSTROUTING | grep vnet0 -o vnet0 -j libvirt-O-vnet0 -#ebtables -t nat -L I-vnet0-stp-xyz | grep -v "^Bridge" | grep -v "^$" +#ebtables -t nat -L I-vnet0-stp-xyz | sed s/01:02:03:04:05:06/1:2:3:4:5:6/= g | sed s/06:05:04:03:02:01/6:5:4:3:2:1/g | grep -v "^Bridge" | grep -v "^$" -s 1:2:3:4:5:6 -d BGA --stp-root-prio 4660:9029 --stp-root-addr 6:5:4:3:2= :1 --stp-root-cost 287454020:573785173 -j RETURN=20 -#ebtables -t nat -L O-vnet0-stp-xyz | grep -v "^Bridge" | grep -v "^$" +#ebtables -t nat -L O-vnet0-stp-xyz | sed s/01:02:03:04:05:06/1:2:3:4:5:6/= g | sed s/06:05:04:03:02:01/6:5:4:3:2:1/g | grep -v "^Bridge" | grep -v "^$" -s 1:2:3:4:5:6 -d BGA --stp-type 18 --stp-flags 68 -j CONTINUE=20 -s 1:2:3:4:5:6 -d BGA --stp-sender-prio 4660 --stp-sender-addr 6:5:4:3:2:= 1 --stp-port 123:234 --stp-msg-age 5544:5555 --stp-max-age 7777:8888 --s= tp-hello-time 12345:12346 --stp-forward-delay 54321:65432 -j DROP=20 =20 diff --git a/scripts/nwfilter/nwfilterxml2fwallout/target-test.fwall b/scri= pts/nwfilter/nwfilterxml2fwallout/target-test.fwall index 849e364..8d1cf76 100644 --- a/scripts/nwfilter/nwfilterxml2fwallout/target-test.fwall +++ b/scripts/nwfilter/nwfilterxml2fwallout/target-test.fwall @@ -50,7 +50,7 @@ FO-vnet0 all -- 0.0.0.0/0 0.0.0.0/0 [goto] PHYSDEV match = --physdev-out vnet0 --p -i vnet0 -j libvirt-I-vnet0 #ebtables -t nat -L POSTROUTING | grep vnet0 | grep -v "^Bridge" | grep -v= "^$" -o vnet0 -j libvirt-O-vnet0 -#ebtables -t nat -L libvirt-I-vnet0 | grep -v "^Bridge" | grep -v "^$" +#ebtables -t nat -L libvirt-I-vnet0 | sed s/01:02:03:04:05:06/1:2:3:4:5:6/= g | grep -v "^Bridge" | grep -v "^$" -p ARP -s 1:2:3:4:5:6 -j ACCEPT=20 -p ARP -s 1:2:3:4:5:6 -j DROP=20 -p ARP -s 1:2:3:4:5:6 -j DROP=20 diff --git a/scripts/nwfilter/nwfilterxml2fwallout/testvm.fwall.dat b/scrip= ts/nwfilter/nwfilterxml2fwallout/testvm.fwall.dat index 1b5f3ce..499ed5b 100644 --- a/scripts/nwfilter/nwfilterxml2fwallout/testvm.fwall.dat +++ b/scripts/nwfilter/nwfilterxml2fwallout/testvm.fwall.dat @@ -24,7 +24,7 @@ #ebtables -t nat -L O-vnet0-ipv4 | grep -v "^Bridge" | grep -v "^$" -j ACCEPT=20 #ebtables -t nat -L I-vnet0-arp-mac | grep -v "^Bridge" | grep -v "^$" --p ARP --arp-mac-src 52:54:0:9f:33:da -j RETURN=20 +-p ARP --arp-mac-src 52:54:10:9f:33:da -j RETURN=20 -j DROP=20 #ebtables -t nat -L I-vnet0-arp-ip | grep -v "^Bridge" | grep -v "^$" -p ARP --arp-ip-src 10.1.1.1 -j RETURN=20 diff --git a/scripts/nwfilter/nwfilterxml2fwallout/vlan-test.fwall b/script= s/nwfilter/nwfilterxml2fwallout/vlan-test.fwall index a2fbfd3..4a08381 100644 --- a/scripts/nwfilter/nwfilterxml2fwallout/vlan-test.fwall +++ b/scripts/nwfilter/nwfilterxml2fwallout/vlan-test.fwall @@ -1,9 +1,9 @@ -#ebtables -t nat -L libvirt-I-vnet0 | grep -v "^Bridge" | grep -v "^$" +#ebtables -t nat -L libvirt-I-vnet0 | sed s/01:02:03:04:05:06/1:2:3:4:5:6/= g | grep -v "^Bridge" | grep -v "^$" -p 802_1Q -s aa:bb:cc:dd:ee:ff -d 1:2:3:4:5:6 --vlan-id 291 -j CONTINUE=20 -p 802_1Q -s aa:bb:cc:dd:ee:ff -d 1:2:3:4:5:6 --vlan-id 1234 -j RETURN=20 -p 802_1Q -s 1:2:3:4:5:6 -d aa:bb:cc:dd:ee:ff --vlan-encap 2054 -j DROP=20 -p 802_1Q -s 1:2:3:4:5:6 -d aa:bb:cc:dd:ee:ff --vlan-encap 4660 -j ACCEPT=20 -#ebtables -t nat -L libvirt-O-vnet0 | grep -v "^Bridge" | grep -v "^$" +#ebtables -t nat -L libvirt-O-vnet0 | sed s/01:02:03:04:05:06/1:2:3:4:5:6/= g | grep -v "^Bridge" | grep -v "^$" -p 802_1Q -s 1:2:3:4:5:6 -d aa:bb:cc:dd:ee:ff --vlan-id 291 -j CONTINUE=20 -p 802_1Q -s 1:2:3:4:5:6 -d aa:bb:cc:dd:ee:ff --vlan-id 1234 -j RETURN=20 -p 802_1Q -s 1:2:3:4:5:6 -d aa:bb:cc:dd:ee:ff --vlan-id 291 -j DROP=20 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list