From patchwork Wed Feb 28 11:56:35 2024 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: 776461 Delivered-To: patch@linaro.org Received: by 2002:adf:e94d:0:b0:33d:f458:43ce with SMTP id m13csp250867wrn; Wed, 28 Feb 2024 03:58:22 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXb6cT/SamHMeEH4V/PVva3H83MaeW1nGdWXw8K2Oy3BcIHZj3kiyjzcAwhWeUdxWDHQVarxctgjIbXpbT+tmQP X-Google-Smtp-Source: AGHT+IHyay80K/micMhTWWax5p1NUApEMELz90RlSoc85vX2Urb42hqwvVVIBBGfpxgYS6AbGcm/ X-Received: by 2002:a67:ee07:0:b0:470:5515:d8f4 with SMTP id f7-20020a67ee07000000b004705515d8f4mr10017162vsp.31.1709121502772; Wed, 28 Feb 2024 03:58:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709121502; cv=none; d=google.com; s=arc-20160816; b=tfDv06ta5EJSW15OS4bQ9/OR7GABrlD5Qm9Wiq5tzbkC3iGc7BUXZ6sdzrZtiRfTT+ 23IIWkklnbYrGS9qlETmmcXSCQ5h1Ea939TlqutgeOeARFtFFVxzuKBhIz65asEDvyMS EGL/tQEaya5ca3R1+ki2vizBYXrkjipRc+NPx5Y0XJdLHA2Vu1qF7mV1+/5v9OT8bvgP 0QrsMNcH/gvfUI6h8KjB/2egv6pe7GpWw0ESFConJY48H9LEeSjc05P1y6FTV8zI4FhN PAiHpSmQcp0GHiTqZii58dhAq50+tGQtdZ+1lJOFw+FVrFBI93aOGHy6sIO6FkdvMHoe hmKg== 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=Ey89Hl01uX5rJaJ7gx3TbpJ+bjSISZiGwEb8QHXuSjE=; fh=MB7eYd7rnLrXI3nJ9rdxTzQtDWXNOvVrI/pGOS81ev0=; b=YZZ8O/8/zv+reVmx8JQIN0CHPtg+5dEa3ovDqr1FcSF2hZudf6vk58f6mcl+78CdjV DMo5zW+u6Cdt7nuzbgqJ0tYO4T5A2aHF/U/iErLvUL90kDRHpQSAkYqBO7FPvPwjnWO9 af+JDwl792Ve6eeqKva+O3jSdFgdJH5Ak6fX1r32JtlO/AKMF6GOUTJ4jKy3zjP1nM7G H99TjsQS3+sBmQW/jh58VVnd8jbBbBEdLGcSCn8n3uHlhLJH797SFNXFQ5qjgfHcOx3x Ntje5IiWhEDyv3ema9VERYKa1N3mnPZ1iEkIPAJ+E5iMTWulV3MT7AHDjf9atcIFhD2v lwAg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KhBFcJns; 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 l9-20020ac84a89000000b0042dd04fe2b7si9404413qtq.294.2024.02.28.03.58.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Feb 2024 03:58:22 -0800 (PST) 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=KhBFcJns; 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 1rfIYk-0005ns-SY; Wed, 28 Feb 2024 06:57:14 -0500 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 1rfIYi-0005la-Qa for qemu-devel@nongnu.org; Wed, 28 Feb 2024 06:57:12 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rfIYc-0005hf-AL for qemu-devel@nongnu.org; Wed, 28 Feb 2024 06:57:12 -0500 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-33dd2f0a0c4so2337621f8f.0 for ; Wed, 28 Feb 2024 03:57:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709121423; x=1709726223; 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=Ey89Hl01uX5rJaJ7gx3TbpJ+bjSISZiGwEb8QHXuSjE=; b=KhBFcJnsRzWa9jYEiZv+G5/UCNmvGJKrqa/bWBIRZPHOOavnshpBVafjJ6AuU4tzMf 6Q6B2LmJfYPyFfjSKbtRZUyRzH/sOIl+uqgVr2bk/njvrkI5XBS3zWCU0I16uQ7+1lhz BU09XBvCPKxOczi+EH+eEogavDHeMlhHMeDWjk3qUmO02hemzNNjJ8G3Xb9Sv8UFSkoU TQ0vmPkYgLnfe6AzCm2Yr9gdGXn5O/cYsfakcNLFpheadQ6om3tE3FLNjUao/2+0TYo3 DDYIPFQJdc0AFqPe8xBuAQpBDMeeL5Azv0wpKjE4JIduU7Jv04virA6z4LrTqWi1HkwZ r23w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709121423; x=1709726223; 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=Ey89Hl01uX5rJaJ7gx3TbpJ+bjSISZiGwEb8QHXuSjE=; b=QF8lErB7b+c5g6DoGzdb0e8rAud87WZC+esyjvq4tCFAsKdBDX7pPFDlei4raRgKIj TplBPMtVUWm/tU2sx+GnnuVylBs/yZFM8/HCYzRPZ/Wr4LAG6+iNASkP60XDErYvO0qb BkW5qUbqsbTeegqLv0SMyF+11wwNKZmj6tsuy+jQR0yOuYIfZwlRMfQz7RNPvbhu6lvl tmG4lJygvkAKanVJkzZxi6Z+2jGUNwJ8OScbsK5SQiRYyRBCYufzv4IbcnmfnY1XNovd Z8ePwtFM2OuxX1C5VG3eIzwf09dlwKv73sRyFx6YhdP/ofhz2aGv+dNqmBr8skpXG62w /yrQ== X-Gm-Message-State: AOJu0YyhDIz2YAnnb43KG4mnA0Xtt52r4OwVdcmRvpt7IhGmDnrPjhZR phVKMXiHL9bnwp7QWnQCfYT9J5N1AyjKD9F+H8CCvFOaD6ca5r+9KkgZtcEgYMg= X-Received: by 2002:adf:f60f:0:b0:33d:77e:43ab with SMTP id t15-20020adff60f000000b0033d077e43abmr8397438wrp.34.1709121423170; Wed, 28 Feb 2024 03:57:03 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id g7-20020adfe407000000b0033d2ae84fafsm14265079wrm.52.2024.02.28.03.57.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 03:57:02 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2EF035F8F9; Wed, 28 Feb 2024 11:57:02 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 03/29] tests/vm: avoid re-building the VM images all the time Date: Wed, 28 Feb 2024 11:56:35 +0000 Message-Id: <20240228115701.1416107-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240228115701.1416107-1-alex.bennee@linaro.org> References: <20240228115701.1416107-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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 The main problem is that "check-venv" is a .PHONY target will always evaluate and trigger a full re-build of the VM images. While its tempting to drop it from the dependencies that does introduce a breakage on freshly configured builds. Fortunately we do have the otherwise redundant --force flag for the script which up until now was always on. If we make the usage of --force conditional on dependencies other than check-venv triggering the update we can avoid the costly rebuild and still run cleanly on a fresh checkout. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2118 Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20240227144335.1196131-4-alex.bennee@linaro.org> diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index bf12e0fa3c5..ac56824a87d 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -102,7 +102,7 @@ $(IMAGES_DIR)/%.img: $(SRC_PATH)/tests/vm/% \ $(if $(LOG_CONSOLE),--log-console) \ --source-path $(SRC_PATH) \ --image "$@" \ - --force \ + $(if $(filter-out check-venv, $?), --force) \ --build-image $@, \ " VM-IMAGE $*") diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index c0d62c08031..f8fd751eb14 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -646,9 +646,9 @@ def main(vmcls, config=None): vm = vmcls(args, config=config) if args.build_image: if os.path.exists(args.image) and not args.force: - sys.stderr.writelines(["Image file exists: %s\n" % args.image, + sys.stderr.writelines(["Image file exists, skipping build: %s\n" % args.image, "Use --force option to overwrite\n"]) - return 1 + return 0 return vm.build_image(args.image) if args.build_qemu: vm.add_source_dir(args.build_qemu)