From nobody Thu May 15 03:36:30 2025 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 1518055530841681.0459280588503; Wed, 7 Feb 2018 18:05:30 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E1C8128204; Thu, 8 Feb 2018 02:05:29 +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 B4606609CC; Thu, 8 Feb 2018 02:05:29 +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 7048218033E8; Thu, 8 Feb 2018 02:05:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w182560I023220 for ; Wed, 7 Feb 2018 21:05:07 -0500 Received: by smtp.corp.redhat.com (Postfix) id CCDDA2166BB3; Thu, 8 Feb 2018 02:05:06 +0000 (UTC) Received: from tlap.laine.org.com (ovpn-120-186.rdu2.redhat.com [10.10.120.186]) by smtp.corp.redhat.com (Postfix) with ESMTP id A52942166BAE; Thu, 8 Feb 2018 02:05:06 +0000 (UTC) From: Laine Stump To: libvir-list@redhat.com Date: Wed, 7 Feb 2018 21:04:57 -0500 Message-Id: <20180208020459.16928-8-laine@laine.org> In-Reply-To: <20180208020459.16928-1-laine@laine.org> References: <20180208020459.16928-1-laine@laine.org> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [tck PATCH 7/9] Fix ebtables check in no-mac-broadcast test 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: , MIME-Version: 1.0 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 08 Feb 2018 02:05:30 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Once the correct filter is enabled for the no-mac-broadcast test, the original test to validate ebtables rules is no longer correct - it was checking for the presence of the test guest's MAC address in the ebtables output on the host, but the no-mac-broadcast filter doesn't have the guest's MAC address anywhere. This patch changes the code to look for "-d Broadcast -j DROP", which actually is added to ebtables for no-mac-broadcast. Reviewed-by: Daniel P. Berrange --- scripts/nwfilter/230-no-mac-broadcast.t | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/nwfilter/230-no-mac-broadcast.t b/scripts/nwfilter/230= -no-mac-broadcast.t index 292c056..8895a53 100644 --- a/scripts/nwfilter/230-no-mac-broadcast.t +++ b/scripts/nwfilter/230-no-mac-broadcast.t @@ -74,12 +74,9 @@ diag "ip is $guestip"; =20 # check ebtables entry my $ebtables =3D (-e '/sbin/ebtables') ? '/sbin/ebtables' : '/usr/sbin/ebt= ables'; -my $ebtable =3D `$ebtables -L;$ebtables -t nat -L`; +my $ebtable =3D `$ebtables -t nat -L`; diag $ebtable; -# ebtables shortens :00: to :0: so we need to do that too -$_ =3D $mac; -s/00/0/g; -ok($ebtable =3D~ $_, "check ebtables entry"); +ok($ebtable =3D~ "-d Broadcast -j DROP", "check ebtables entry for \"-d Br= oadcast -j DROP\""); =20 # prepare tcpdump diag "prepare tcpdump"; --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list