From patchwork Mon Oct 9 16:40:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 731001 Delivered-To: patch@linaro.org Received: by 2002:a5d:574c:0:b0:31d:da82:a3b4 with SMTP id q12csp1311396wrw; Mon, 9 Oct 2023 09:44:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFWl0JowXa74pCu1LSEh10O1f775p2ivgjJi6Kc4fmZ17x9qHmCj38vf/1SGOORU89SQhSq X-Received: by 2002:a05:620a:2802:b0:776:f8b5:c4c with SMTP id f2-20020a05620a280200b00776f8b50c4cmr12417426qkp.20.1696869846573; Mon, 09 Oct 2023 09:44:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696869846; cv=none; d=google.com; s=arc-20160816; b=on3izNad7gGQRAlLSPIx46qK6i1bAqL5LnwNVsugROp3nfPYEdLRiQFgUrqzTZE4cP MgroEJ4N9iPOZwSk9dR6ZprQ8yk5Pb5cLz3d8B03gYn1Meo9ZBkoBMj9an+yWYVflBd9 Glg8fzLcUE4a5tcBNDiPWfHwPBqP5Kcf/dkM8P4BTlV7PS1gosm9cwmZdpdqtz6RtxBY ymM3vO34slEBsHB8s8EFLTcznD/zWC0e1MD4wlRH53cof0frD1OBPfpUTrCJSHgP3MAo z5hd6nC0fFHSC+O4HIh/39aVLUPOYiuUXh7Yp4+xRFR7wGut8g2AjIPp5kyIyq3naqiI 2lPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zh7N0HFTIxBax5KXX0zczKhvUC5xK1l1PfGLSBYFHwc=; fh=hH+hY2AOPCtQWK44NzX0H5SWS0EYJFmL3o+I0zvKKVU=; b=EEfwzWgpR32fCBN5QOmHcXZrnTJ0+SLZDVkqSFMAX/lgeRDb4IhQ6aLy5NH+j4M9Rp aC5YnQ53AG5ZPSNKWMOd/YEuDtPapRzP0E2qNqLwsKGbjz+Sak5vsqM7yNWbxChHEWr9 XP0+xNh8RKvwDWuTuD4TxZ3GF6AJYrmfh/1NX2aZZ+Fg5CRUppthaiZyY2n7tFt8XiB3 rU5BOYDcLvcHivvJnEWJf+Naw2d7RSfpvAQamNUzk2GaMVtjsegCYk6jJM22HS9b4VuU GY3igqNMYRzJ+gZ2Ep2OK/aI2wLX236q4vDwfHOLLmnmpCr7smPmJvC35oZ1cB8tcNwq B5eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PwcDzxlt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m6-20020a05620a290600b007742abceac8si6567332qkp.665.2023.10.09.09.44.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Oct 2023 09:44:06 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PwcDzxlt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qptM0-0000pe-MU; Mon, 09 Oct 2023 12:43:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qptJx-0005IS-FE for qemu-devel@nongnu.org; Mon, 09 Oct 2023 12:41:35 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qptJe-0001Uc-4W for qemu-devel@nongnu.org; Mon, 09 Oct 2023 12:41:25 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-406618d080eso45689115e9.2 for ; Mon, 09 Oct 2023 09:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696869668; x=1697474468; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zh7N0HFTIxBax5KXX0zczKhvUC5xK1l1PfGLSBYFHwc=; b=PwcDzxltD5YR3ShAQzhz1eilmfTYm+45rVXlqOy5QEK22HJ6XkKQg6F/fwvpa0lFhQ r4EnyvkmDC0sEQcNLlpbpOFo5Ucb+AnkUbfTfCfpEA7lbpmwTNdzb2uUlCsFiL6H06cf 4g3XWhP9r6dlYIeJimRqK2FuXmfr/QQ3mluXWvgGflcH7f9F/gerNLzzD7BfdqGKwDa0 vxCynn1Hf0BCWK8mvwkjt/wiWdQAQWvh3g3pmXMbYvDL7jpRNGt0t/lee76Ahw78N/SA YPmoQ60Ce5N0OYuPjULpVZmd0fNE2WPqxXEpYvE1OGj2tXHuz47wrl6CbWsNUX3+fJ3N JPpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696869668; x=1697474468; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zh7N0HFTIxBax5KXX0zczKhvUC5xK1l1PfGLSBYFHwc=; b=P65HRzrgfs3PT2EgvLh/KbOGb94FGSrykHiySqf8nk3d+VP+B4QU6JmxsTWaYJcWtW pb9ffyi44qNc+bTAnTDl2GABjEE2SrK5yICpAiv9BKCIh9OZSXuJaskpRP6u8zqlTbyy 9JAXG90q3SMlKauZzwS5mjcKHpHu68U7cl8m0MUyq74DLMw57mEpVpHZlwJXjrD9b9aH 9BKLBmEdLJB8X1T6DUcnEu6v//a2fQKvf9AP2AigWEtQA2Gi7JT1/HCJ0LOSJqyPCRRs ILmx2O/7Uc9aO23s3PdzIDugzrW8PAXk3HbaTvqw8GTnAqrNfpfU6fAUrH+4wQul2zf4 DA/Q== X-Gm-Message-State: AOJu0Yx2THfDpBjCt1nbdCWrXHXXPYnsYm64YZsSSNJu0rWJD7agdG+C MLHHmJ2teSjbjokFtmzZv1/fOQ== X-Received: by 2002:a05:600c:2317:b0:406:6964:7e96 with SMTP id 23-20020a05600c231700b0040669647e96mr13462745wmo.13.1696869668212; Mon, 09 Oct 2023 09:41:08 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id v10-20020a05600c470a00b00407460234f9sm6145168wmo.21.2023.10.09.09.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 09:41:07 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id BDDBC1FFC0; Mon, 9 Oct 2023 17:41:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Xiaojuan Yang , =?utf-8?q?C=C3=A9dric_Le_Goater?= , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Bastian Koppelmann , Brad Smith , Radoslaw Biernacki , David Hildenbrand , Cleber Rosa , Ilya Leoshkevich , qemu-riscv@nongnu.org, Daniel Henrique Barboza , Alexandre Iooss , Nicholas Piggin , Bin Meng , Leif Lindholm , Paolo Bonzini , Eduardo Habkost , Alistair Francis , qemu-ppc@nongnu.org, John Snow , Liu Zhiwei , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Palmer Dabbelt , Peter Maydell , Yanan Wang , Weiwei Li , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Marcel Apfelbaum , Beraldo Leal , Yoshinori Sato , Mahmoud Mandour , Richard Henderson , Song Gao , Marcin Juszkiewicz , qemu-s390x@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 05/25] tests/docker: make docker engine choice entirely configure driven Date: Mon, 9 Oct 2023 17:40:44 +0100 Message-Id: <20231009164104.369749-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231009164104.369749-1-alex.bennee@linaro.org> References: <20231009164104.369749-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Since 0b1a649047 (tests/docker: use direct RUNC call to build containers) we ended up with the potential for the remaining docker.py script calls to deviate from the direct RUNC calls. Fix this by dropping the use of ENGINE in the makefile and rely entirely on what we detect at configure time. We also tweak the RUNC detection so podman users can still run things from the source tree. Signed-off-by: Alex Bennée Reviewed-by: Alistair Francis --- v2 - add RUNC stanza suggested by Paolo --- configure | 1 - tests/docker/Makefile.include | 9 +++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/configure b/configure index e08127045d..707132a3ae 100755 --- a/configure +++ b/configure @@ -1694,7 +1694,6 @@ if test -n "$gdb_bin"; then fi if test "$container" != no; then - echo "ENGINE=$container" >> $config_host_mak echo "RUNC=$runc" >> $config_host_mak fi echo "SUBDIRS=$subdirs" >> $config_host_mak diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index dfabafab92..ab68b2dbad 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -16,9 +16,8 @@ DOCKER_DEFAULT_REGISTRY := registry.gitlab.com/qemu-project/qemu endif DOCKER_REGISTRY := $(if $(REGISTRY),$(REGISTRY),$(DOCKER_DEFAULT_REGISTRY)) -RUNC ?= docker -ENGINE ?= auto -DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py --engine $(ENGINE) +RUNC ?= $(if $(shell command -v docker), docker, podman) +DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py --engine $(RUNC) CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$) DOCKER_SRC_COPY := $(BUILD_DIR)/docker-src.$(CUR_TIME) @@ -158,7 +157,7 @@ $(foreach i,$(filter-out $(DOCKER_PARTIAL_IMAGES),$(DOCKER_IMAGES)), \ ) docker: - @echo 'Build QEMU and run tests inside Docker or Podman containers' + @echo 'Build QEMU and run tests inside $(RUNC) containers' @echo @echo 'Available targets:' @echo @@ -198,8 +197,6 @@ docker: @echo ' EXECUTABLE= Include executable in image.' @echo ' EXTRA_FILES=" [... ]"' @echo ' Include extra files in image.' - @echo ' ENGINE=auto/docker/podman' - @echo ' Specify which container engine to run.' @echo ' REGISTRY=url Cache builds from registry (default:$(DOCKER_REGISTRY))' docker-help: docker