From nobody Thu May 15 03:37:36 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 1518055510805453.26897122954347; Wed, 7 Feb 2018 18:05:10 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 87AF080478; Thu, 8 Feb 2018 02:05: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 32EA46445E; Thu, 8 Feb 2018 02:05:09 +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 55D5E18033DD; Thu, 8 Feb 2018 02:05:07 +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 w182567Z023209 for ; Wed, 7 Feb 2018 21:05:06 -0500 Received: by smtp.corp.redhat.com (Postfix) id 273222166BB3; 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 EE7832156A32; Thu, 8 Feb 2018 02:05:05 +0000 (UTC) From: Laine Stump To: libvir-list@redhat.com Date: Wed, 7 Feb 2018 21:04:54 -0500 Message-Id: <20180208020459.16928-5-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 4/9] Fix no-ip-spoofing test script generation 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 08 Feb 2018 02:05:09 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The setting of the environment variable MASK was for some reason producing "8" instead of "24". Changing from using back-ticks "`" that resolved at the time the script was created, to using $(blah) resolved when the script is *run* magically fixed the problem. Note that this doesn't change the outcome of the test at all, since the guest never needs to connect outside the local subnet, and is immediately halted after setting the IP using $MASK. It just bothered me that the value was incorrect (and that backticks were being used, when $() is more portable - again it is duly noted that portability doesn't matter in this case, since we know that the script will always be executed on Fedora with bash). Reviewed-by: Daniel P. Berrange --- scripts/nwfilter/220-no-ip-spoofing.t | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/nwfilter/220-no-ip-spoofing.t b/scripts/nwfilter/220-n= o-ip-spoofing.t index 872dcc3..5903961 100644 --- a/scripts/nwfilter/220-no-ip-spoofing.t +++ b/scripts/nwfilter/220-no-ip-spoofing.t @@ -79,9 +79,10 @@ my $ssh =3D Net::OpenSSH->new($guestip, # now bring eth0 down, change IP and bring it up again diag "preparing ip spoof"; my $cmdfile =3D <