From nobody Mon May 6 02:17:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1499877099331462.1070768191988; Wed, 12 Jul 2017 09:31:39 -0700 (PDT) Received: from localhost ([::1]:54649 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVKY4-0003Al-VL for importer@patchew.org; Wed, 12 Jul 2017 12:31:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVKSg-0006Wd-Nd for qemu-devel@nongnu.org; Wed, 12 Jul 2017 12:26:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVKSd-00071I-KP for qemu-devel@nongnu.org; Wed, 12 Jul 2017 12:26:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48124) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dVKSd-0006zm-EW for qemu-devel@nongnu.org; Wed, 12 Jul 2017 12:25:59 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4FC017484E; Wed, 12 Jul 2017 16:25:58 +0000 (UTC) Received: from t460.redhat.com (ovpn-117-189.ams2.redhat.com [10.36.117.189]) by smtp.corp.redhat.com (Postfix) with ESMTP id E24605DD70; Wed, 12 Jul 2017 16:25:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4FC017484E Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=berrange@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4FC017484E From: "Daniel P. Berrange" To: qemu-devel@nongnu.org Date: Wed, 12 Jul 2017 17:25:50 +0100 Message-Id: <20170712162550.8061-1-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 12 Jul 2017 16:25:58 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] Don't enable networking as a side-effect of DEBUG=1 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" When trying to debug problems with tests it is natural to set DEBUG=3D1 when starting the docker environment. Unfortunately this has a side-effect of enabling an eth0 network interface in the container, which changes the operating environment of the test suite. IOW tests with fail may suddenly start working again if DEBUG=3D1 is set, due to changed network setup. Add a separate NETWORK=3D1 option to allow enablement of networking separately from DEBUG=3D1, since common debugging tasks probably don't require networking anyway. Signed-off-by: Daniel P. Berrange Acked-by: Alex Benn=C3=A9e --- tests/docker/Makefile.include | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 037cb9e..a8c4b82 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -106,6 +106,7 @@ docker: @echo ' (default is 1)' @echo ' DEBUG=3D1 Stop and drop to shell in the created c= ontainer' @echo ' before running the command.' + @echo ' NETWORK=3D1 Enable eth0 virtual network interface.' @echo ' NOUSER Define to disable adding current user to = containers passwd.' @echo ' NOCACHE=3D1 Ignore cache when build images.' @echo ' EXECUTABLE=3D Include executable in image.' @@ -132,7 +133,8 @@ docker-run: docker-qemu-src $(SRC_PATH)/tests/docker/docker.py run \ $(if $(NOUSER),,-u $(shell id -u)) -t \ $(if $V,,--rm) \ - $(if $(DEBUG),-i,--net=3Dnone) \ + $(if $(DEBUG),-i,) \ + $(if $(NETWORK),,--net=3Dnone) \ -e TARGET_LIST=3D$(TARGET_LIST) \ -e EXTRA_CONFIGURE_OPTS=3D"$(EXTRA_CONFIGURE_OPTS)" \ -e V=3D$V -e J=3D$J -e DEBUG=3D$(DEBUG) \ --=20 2.9.4