From nobody Sat Nov 15 11:12:54 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1753354854; cv=none; d=zohomail.com; s=zohoarc; b=CvS7ImUywSGkTROZG2QchfQoPsf/jWM7jBMMeQSUn4aJKeagxblA4+jX2hzJSomY+HmsVO6ZH6ycl+vAAv0fH3mwrbeVfNeL3MStmGjvc3LEpl32sifxQyvMTuhoyaou34ZN9jDjp9KkJ0buri/L4QhivlGgpSEyeV40CyKUGTg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753354854; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=R6EYeOydwHeWT+0KjgI8rE6kC6uYaOoJ0ACHOIOUReQ=; b=RbR45wuUsJH188ehUF3ds2N2V+DeNghIlO88L3wr1k5L0Rr2htvRRfH0p7EilO/6atx4oQi9BYzwvWNkx6GAj2E+sQiX37alcePIyDFbyptT/6xTxJUrCrZa9USkJ2+uB6ldIVEl61jcQtT2Bj+GsLdrY8cnvDLMPPbI5yd+URI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1753354854587810.6000325274431; Thu, 24 Jul 2025 04:00:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uetgO-0007q4-45; Thu, 24 Jul 2025 07:00:17 -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 1uetg1-0007Ss-T8 for qemu-devel@nongnu.org; Thu, 24 Jul 2025 06:59:54 -0400 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uetg0-0007zX-28 for qemu-devel@nongnu.org; Thu, 24 Jul 2025 06:59:53 -0400 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-ae3ec622d2fso132980866b.1 for ; Thu, 24 Jul 2025 03:59:51 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-af47cd64da8sm96387966b.60.2025.07.24.03.59.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Jul 2025 03:59:44 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id E22755F8F1; Thu, 24 Jul 2025 11:59:40 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1753354790; x=1753959590; 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=R6EYeOydwHeWT+0KjgI8rE6kC6uYaOoJ0ACHOIOUReQ=; b=xfYutSfh5LQ9HPJ3Yk2H0cthMUhSGMa1QadrXxCsGU6/eJlTBch8hCkn87r67bw2/4 OOypcnHm5Whn/Ksk2B9RiaksedsuCD5GEHane+3DsatCXHKmtoKTjKWLpzyE41t1nPP3 i7IfzYiHiMy7JIaEYNza0iy0hCWisz9/H/pg+AA1T8s18qeyczN7Xes4CTKX2gAosH64 JvCKFaEXqfdFylyft3O2NMqfoGdqeW48Y+/EeBmGsFxfa+6KY/yU3Dgm/RUcU1EA714V aMHJMfXN0telrBR35+PiqxQfMtCRakxgNJBm5cUeXSeN3cFw2sC381BkLratnO93boFx 92nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753354790; x=1753959590; 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=R6EYeOydwHeWT+0KjgI8rE6kC6uYaOoJ0ACHOIOUReQ=; b=LRYiZeCWqn8IX6fPdo3JsaaFMssbqoogS/9evoFE16eF6PsCDnE7L0vOMP4S1ekw/T XsXJ7oyqsOSnLC36ZKUTFDhKpQ9++F3qzr8gb5LBu9/LWPb5hDusOJMOlpQDEVa3RBY0 Iwiq3rTOHBhL6cM9r7OVEIJjI/7lLKQuYUva2z5hGSOtsEG5E2/bQYJHC6FhzLu8VkUO K83NqjZVAWSujyIEWMMD+YVbBIpWD/bpDHWJZmxXVgL8o5Wz6ZxJQ0/+lU1tS1Ot/b76 XohQ1B1UiP6xW5dHeVfRvgczcFj336hEuzkk3wvsK40h+JrxN/c0i7GI8WG1ZpwRS33L 2dcQ== X-Gm-Message-State: AOJu0Yy7oftruBqeEPRcI72Gp1K2HWuq6p6Wyfnn9SUDHOVR+tVxoyVc IiquWUh7GE9pxBBlJMaXscNVtVFa+rE0yQPajLbm0y5LQ5m9uQsp73BnaR91I6Z6Jgc= X-Gm-Gg: ASbGncvBnnXquR+4jwjsuV6hvTrQP1TWxOrLoM3JzigxFsSLe9887G5ri2OobUxsPKR 1fLrZNwDRYPfwGB7eMngCc+k/m97hLhBeU+VLnKiR01cdTuTiHgUye4NupGcmoT+W2KlZUES31r NkNaNjJ1qroPaF7Sb6mP6rFDlEc/WUdUq36tvBYqoGvssLMzCOG7+yp8uw4Y21lABtpw6iK/tEO dZ7yZWHKmHM8iOlYo3vsJnuSasJMXNb+sKuYFHaZNmvw5rdsY3avXLuMuRETDzm6HAD2wP/Fjol nuRO4S8fa0F3BZGkW11VBr+v5rXqjeG7uNDQPlnYVE0P3pS7RDxciWnRHq565BKU38b7FOv/Ojj pH1+j9cSYvphwKlBbOICAFHw= X-Google-Smtp-Source: AGHT+IElkCmawROGosVEaY32z/FVCCKsjMcwMbxGZthmyJmTkhWRruBW6yCcbdpNZetD4wJv010WQw== X-Received: by 2002:a17:907:9612:b0:ae6:a8c1:c633 with SMTP id a640c23a62f3a-af2f895a512mr602231766b.34.1753354790317; Thu, 24 Jul 2025 03:59:50 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini , Thomas Huth Subject: [PATCH for 10.1 11/13] tests/tcg: reduce the number of plugin tests combinations Date: Thu, 24 Jul 2025 11:59:37 +0100 Message-ID: <20250724105939.2393230-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250724105939.2393230-1-alex.bennee@linaro.org> References: <20250724105939.2393230-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x636.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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1753354856070116600 As our set of multiarch tests has grown the practice of running every plugin with every test is becoming unsustainable. If we switch to ensuring every test gets run with at least one plugin we can speed things up. Some plugins do need to be run with specific tests (for example the memory instrumentation test). We can handle this by manually adding them to EXTRA_RUNS. We also need to wrap rules in a CONFIG_PLUGIN test so we don't enable the runs when plugins are not enabled. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Manos Pitsidianakis --- tests/tcg/Makefile.target | 23 ++++++++++++++----- tests/tcg/multiarch/Makefile.target | 8 +++++-- .../multiarch/system/Makefile.softmmu-target | 11 +++++---- 3 files changed, 30 insertions(+), 12 deletions(-) diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target index a12b15637ea..18afd5be194 100644 --- a/tests/tcg/Makefile.target +++ b/tests/tcg/Makefile.target @@ -173,14 +173,25 @@ PLUGINS=3D$(filter-out $(DISABLE_PLUGINS), \ # We need to ensure expand the run-plugin-TEST-with-PLUGIN # pre-requistes manually here as we can't use stems to handle it. We # only expand MULTIARCH_TESTS which are common on most of our targets -# to avoid an exponential explosion as new tests are added. We also -# add some special helpers the run-plugin- rules can use below. +# and rotate the plugins so we don't grow too out of control as new +# tests are added. Plugins that need to run with a specific test +# should ensure they add their combination to EXTRA_RUNS. =20 ifneq ($(MULTIARCH_TESTS),) -$(foreach p,$(PLUGINS), \ - $(foreach t,$(MULTIARCH_TESTS),\ - $(eval run-plugin-$(t)-with-$(p): $t $p) \ - $(eval RUN_TESTS+=3Drun-plugin-$(t)-with-$(p)))) + +NUM_PLUGINS :=3D $(words $(PLUGINS)) +NUM_TESTS :=3D $(words $(MULTIARCH_TESTS)) + +define mod_plus_one + $(shell $(PYTHON) -c "print( ($(1) % $(2)) + 1 )") +endef + +$(foreach _idx, $(shell seq 1 $(NUM_TESTS)), \ + $(eval _test :=3D $(word $(_idx), $(MULTIARCH_TESTS))) \ + $(eval _plugin :=3D $(word $(call mod_plus_one, $(_idx), $(NUM_PLUGINS)),= $(PLUGINS))) \ + $(eval run-plugin-$(_test)-with-$(_plugin): $(_test) $(_plugin)) \ + $(eval RUN_TESTS+=3Drun-plugin-$(_test)-with-$(_plugin))) + endif # MULTIARCH_TESTS endif # CONFIG_PLUGIN =20 diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Make= file.target index bfdf7197a7b..38345ff8805 100644 --- a/tests/tcg/multiarch/Makefile.target +++ b/tests/tcg/multiarch/Makefile.target @@ -189,6 +189,10 @@ run-plugin-semiconsole-with-%: TESTS +=3D semihosting semiconsole endif =20 +test-plugin-mem-access: CFLAGS+=3D-pthread -O0 +test-plugin-mem-access: LDFLAGS+=3D-pthread -O0 + +ifeq ($(CONFIG_PLUGIN),y) # Test plugin memory access instrumentation run-plugin-test-plugin-mem-access-with-libmem.so: \ PLUGIN_ARGS=3D$(COMMA)print-accesses=3Dtrue @@ -197,8 +201,8 @@ run-plugin-test-plugin-mem-access-with-libmem.so: \ $(SRC_PATH)/tests/tcg/multiarch/check-plugin-output.sh \ $(QEMU) $< =20 -test-plugin-mem-access: CFLAGS+=3D-pthread -O0 -test-plugin-mem-access: LDFLAGS+=3D-pthread -O0 +EXTRA_RUNS +=3D run-plugin-test-plugin-mem-access-with-libmem.so +endif =20 # Update TESTS TESTS +=3D $(MULTIARCH_TESTS) diff --git a/tests/tcg/multiarch/system/Makefile.softmmu-target b/tests/tcg= /multiarch/system/Makefile.softmmu-target index 5acf2700812..4171b4e6aa0 100644 --- a/tests/tcg/multiarch/system/Makefile.softmmu-target +++ b/tests/tcg/multiarch/system/Makefile.softmmu-target @@ -71,8 +71,11 @@ endif MULTIARCH_RUNS +=3D run-gdbstub-memory run-gdbstub-interrupt \ run-gdbstub-untimely-packet run-gdbstub-registers =20 +ifeq ($(CONFIG_PLUGIN),y) # Test plugin memory access instrumentation -run-plugin-memory-with-libmem.so: \ - PLUGIN_ARGS=3D$(COMMA)region-summary=3Dtrue -run-plugin-memory-with-libmem.so: \ - CHECK_PLUGIN_OUTPUT_COMMAND=3D$(MULTIARCH_SYSTEM_SRC)/validate-memory-cou= nts.py $@.out +run-plugin-memory-with-libmem.so: memory libmem.so +run-plugin-memory-with-libmem.so: PLUGIN_ARGS=3D$(COMMA)region-summary=3Dt= rue +run-plugin-memory-with-libmem.so: CHECK_PLUGIN_OUTPUT_COMMAND=3D$(MULTIARC= H_SYSTEM_SRC)/validate-memory-counts.py $@.out + +EXTRA_RUNS +=3D run-plugin-memory-with-libmem.so +endif --=20 2.47.2