From nobody Sun Sep 28 15:26:55 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=1758863904; cv=none; d=zohomail.com; s=zohoarc; b=dhSM0hU6Ld5vNI8YgutzsAjfdD6tk9syxMc8Rb+4s4K3ebYacUV48K1ohQABG4D+XOD4AD0NhrI5fFBZsIU2u1LsiUiVnXy0YHzMZlEFShsT0oiyhHDuvupAwCqnMz9ubrZZSWMuJvDGD8FQAiM7dx6I6lENEH30QH/p2nEwgog= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758863904; h=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=Q/DaP3+sddK+/zkpqYC7IOvKVE8r0PMX8jSbWoxB2MQ=; b=TZNXvJ8sEzGJknDsyU3/2OCZQn099j5ARhJZRUCZQc/VxeY53VaLVhsuZMOu0kfsAZhLPDv3uaqrdnlCm8oq8aNg8IC1q3XIic5wpOkTOAyV+efNfUT7LXkszuVb2wB41hVxAKWN60H9snuFp629HVe7GpO3+n7Tb+Zp+inF7T4= 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 1758863904601642.206454885018; Thu, 25 Sep 2025 22:18:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v20oo-0004iZ-UN; Fri, 26 Sep 2025 01:16:31 -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 1v20ok-0004hI-5u for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:16:26 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1v20oc-0005zc-Ji for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:16:25 -0400 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-26e68904f0eso19091305ad.0 for ; Thu, 25 Sep 2025 22:16:12 -0700 (PDT) Received: from gromero0.. (189-47-45-49.dsl.telesp.net.br. [189.47.45.49]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-27ed672a51fsm42160085ad.63.2025.09.25.22.16.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Sep 2025 22:16:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1758863769; x=1759468569; 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=Q/DaP3+sddK+/zkpqYC7IOvKVE8r0PMX8jSbWoxB2MQ=; b=W0b+5SP8Iu6Hh5b0nzdsLL7IuFlKT77tFNWVEZOo8tsxdYNn4oX+CMi52P/vxnZI7U TgQVWi4F5KsKeMKd1UDhC0Brk3PW5NFH34r2QQv9IZNu5YP56WcFLc7FgylcQgZiFCAK etOsc7rZTiTrNDYu2ziowyEDNp7Vjewa3G9YAhL/337iU3UfzAfNt6cm5I0mi2BgG8nt Q+W2/T2zsGJT4SCJCkWtKC9bkSlCj2LIlbg/fcVQKRWmz6V0+x7PNL39zF/rZ0OEny+9 HSNypmy0J200oaIPBNoiRX5wUVSISL8BXxMtOKrH03sbRuuLDrW4+zFAaCmuWvDMioMl Qi8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758863769; x=1759468569; 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=Q/DaP3+sddK+/zkpqYC7IOvKVE8r0PMX8jSbWoxB2MQ=; b=iDKx+B9MKUxziq2VQpnTuO0sQ0MwXi+ZiG8IVmi6o/EAylOxcFg3KMhAwTK6AdbwCD X0+2aEaFOVOo4RgCX/B1tqGr4BgW+bEplGV49EgNyGErrsEszW+di0VNHcJ0UC+r7EyM W7iBb5339LivE8UCjOookcYzb5SWiZThpru/BmdQYJgFoqTLCra7EF6JK9oqej9d+A3e klcPNR+f7bNA3cQjyP7mmHZvGta+5cEMEr2+LTTe+eKO4qjRqDNMWsrFQKE9zhAuGex1 MZFhfazxNAwJaVPhWWrwWsYs3rA345Pi8x9hL1eP0t3iBT4Ka9ee876P9nvFyY9lNjPg vFRA== X-Gm-Message-State: AOJu0YzS3C/+kNl5HmwDe3BpClBDi9jgcmbsol5lBrQOQNx0FOaNnSOa R//bT3nv/4+znkm3WldjFp95fclMJoapgUpBUHW7yRgVIhD8nclkSvibGnv8m3avAzIwE4nDhWv uko6o X-Gm-Gg: ASbGncvx6jYhm8AxskROAGW94zMETGHKIYVUSotOAinvp3Zfbi6xqmY3IWsJlkA4F45 mePbCbZMpH4XMFGk1izrYSB91PhU4KgsHM/xNrDQvvdoAmBNe5UyQ8qibTYki2U+Il54M04KddX lNvM8SkudGRnemPN1V58I/+44dPn++NR8ch3qny9H3gDMY4K6ECqJJV1WHEF/TPUEIcTSnub70B 45wtI4u6uL3z4qAUXVFvUNl4i3VTGgZTDgxJou7UGoi/quoa75TF9xrJudgtug1/UOuqgrLbNIK gyAGCh0Idc3Z5dV4EHd7m20fVLxAVe9y5aDkQkx06/ya3UsfLSjYB3QtbFLmHH4x5lxui3Gd1Uk S+DINuiCeJlG11gh9CbHPwJZpbUOEBHrrZoaol+Xi9RM94qbOh/on1lWQ2toyWWseckQZ X-Google-Smtp-Source: AGHT+IESTj0x93R9y1vcHTe6dMZBGTfzKVDf8ghASTb0VrAA9asIDF6CMBv9y+fa/iVXmwcG/6sh9Q== X-Received: by 2002:a17:902:da8a:b0:272:c95c:866 with SMTP id d9443c01a7336-27ed4a16b38mr83246405ad.20.1758863769238; Thu, 25 Sep 2025 22:16:09 -0700 (PDT) From: Gustavo Romero To: qemu-devel@nongnu.org, alex.bennee@linaro.org, thuth@redhat.com, berrange@redhat.com Cc: qemu-arm@nongnu.org, gustavo.romero@linaro.org, manos.pitsidianakis@linaro.org, peter.maydell@linaro.org Subject: [PATCH v4 1/9] tests/functional: Re-activate the check-venv target Date: Fri, 26 Sep 2025 05:15:34 +0000 Message-Id: <20250926051542.104432-2-gustavo.romero@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250926051542.104432-1-gustavo.romero@linaro.org> References: <20250926051542.104432-1-gustavo.romero@linaro.org> MIME-Version: 1.0 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=2607:f8b0:4864:20::632; envelope-from=gustavo.romero@linaro.org; helo=mail-pl1-x632.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: 1758863906463116600 Content-Type: text/plain; charset="utf-8" Add check-venv target as a dependency for the functional tests. This causes Python modules listed in pythondeps.toml, under the testdeps group, to be installed when 'make check-functional' is executed to prepare and run the functional tests. Signed-off-by: Gustavo Romero Suggested-by: Thomas Huth Reviewed-by: Thomas Huth --- tests/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 3538c0c740..d012a9b25d 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -109,7 +109,7 @@ $(FUNCTIONAL_TARGETS): @$(MAKE) SPEED=3Dthorough $(subst -functional,-func,$@) =20 .PHONY: check-functional -check-functional: +check-functional: check-venv @$(NINJA) precache-functional @QEMU_TEST_NO_DOWNLOAD=3D1 $(MAKE) SPEED=3Dthorough check-func check-func= -quick =20 --=20 2.34.1 From nobody Sun Sep 28 15:26:55 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=1758863904; cv=none; d=zohomail.com; s=zohoarc; b=brmtDYEvWIL8lymSlvv+9DF1EVaK0MxfCVGCXnoI8/iN0+079vGQowFNxcybJVpzEsKudDyB1f5CnTu8FX7geLySp6pw5VSKz6SvNdkk+61d4avrVhD9D77GmoeCiKr+cZTPX66QLVB7s/Enx+P1MhF3xmBKYabgt0imzLlpJ+g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758863904; h=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=gfw6pFN7dnHUrHR6X6D+GvMv/TVLaMbzCXTmrNOoSP0=; b=g9gx93roRbxfKh62FY+A4AldxhEexm8x9uq2iKQv2yQqDQU7pxVD6+4T87/bcYz6Vz7IqNDFWFzR/ZpUnGhJRD5xlyWj54uqfLcvMDN8TpB+Bp/NJUifKegOzhUEWurfTw1+bxTsxwat2V0LmFv8cipttiAP37G2Ch5xldc1h4A= 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 1758863904911466.7726446028794; Thu, 25 Sep 2025 22:18:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v20on-0004iS-LX; Fri, 26 Sep 2025 01:16:29 -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 1v20oi-0004fL-EK for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:16:24 -0400 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1v20oc-0005zp-Jh for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:16:23 -0400 Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-32e74ae0306so2499536a91.1 for ; Thu, 25 Sep 2025 22:16:14 -0700 (PDT) Received: from gromero0.. (189-47-45-49.dsl.telesp.net.br. [189.47.45.49]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-27ed672a51fsm42160085ad.63.2025.09.25.22.16.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Sep 2025 22:16:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1758863772; x=1759468572; 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=gfw6pFN7dnHUrHR6X6D+GvMv/TVLaMbzCXTmrNOoSP0=; b=YHbwLtX31PryrIlTldrR2vi1FITcOrDSwu7CgvFWQasDW8nSXyb3k+JrWOLQVl9jMe KpWkJmdw9rcJ5DTA0u4fs7s/ouKLflhvj9SIQewvUpcE5R00Ge8IYzvNdIXm2teQQCfv VVPC1McllqX2emMtE3HW23Z2zMlK+WuWHJ5iGE03UwUXfmAQRBfyOq8ISP0xYilU/lZQ Abvc5IrBWxRe0K2iTNoGwH+gPe/m4y50WcGZ6GP/y0zdLx6Dx/q/xGnYgiFfnGrp2OT3 meu0HjmU665pNmDPd4Ffj7jR+4iNXHrG+dADWFr/gqDkvhCWxM7omUUpWaFZ/4CLcbTe CQ3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758863772; x=1759468572; 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=gfw6pFN7dnHUrHR6X6D+GvMv/TVLaMbzCXTmrNOoSP0=; b=D66r5ndtg4ZTQtarO6NPw45yENQ7DsIKQLtbVN4czLjUjQd6Yn+zga0qmqJCABQ1NS UzaaqRpCDR8z4r7GbY8z2JaeplMzJYjSQPI5YYWudqjtdGEkWhwliroIJXfW/EnUCwcL HZolbPZo7UszJY87+3vyM207PBWL6Y7ro5toiT6y8uAgI+ipb+VdWb7+WDWWHVVxfu5h Gz+UZyPnCLHfSse/k34nHEpwOsnqJr7Li8yzEgmTXD/GjXKjuE1C8RZiIRpPpnOre3w3 5esYW0JoCl3yGRSZFY66TjKWFxgSJvEHXSKbrmA4nb0+mP9CP3Qh2yVqyHd+v246JCQ8 fA0Q== X-Gm-Message-State: AOJu0YzSm3yvAHSLq+hae3n5r0ki9KCAdiJhT62sKB948KbjEJjs1vB+ jZmXDEwbVGqMofDBjekW41RIX76Y0gWVh+RhsCgti5BcvhqLDwsBDhJQiolzmkIW1rbcWxQy/KF lgn39 X-Gm-Gg: ASbGncuACNbjO+96jZVEIlPNBOe3rW67todgZwMf8X+6TniFRm5iLAEfxi57V/O/CbP cj1eN+Mf4VLpsH5hmWxa/hWOAinutgB/iGEiLdnyIDv6zBUnXmBh6S5qeGOSOOtDkmLCxOToL/U k5TZAfYBHsDeUY/Nt+9V1vLr9AVkfmxPhq7MfGeYBzodGXZh8jTNAGowNZqLjN5diA8US1xPTzx fbKi9WLutLGF7nlk7lKft/tnviSlLGXkyP8UTgsDIUu1ZDAPkjl57V5Txsbz2RXGNXRQSLup1+V dhOfKM6k+vXoKaI33oTZH5Je2Ssezi5BsP+YLFwLCuOo8jEPXTu5NvDxijCCALygmOC63IMTHTd gLNl6vsTnaDV0DiFTym7UsCvhBHiveLfbhRfmWmr40C4ZcMvKiSiXdDaGtg== X-Google-Smtp-Source: AGHT+IFdImT+dvV4PUe/mWQhlxfU2I54JafCP6wqf0CCaG/0neUMikNw1l1puERlaBxmDuTb+lvNiQ== X-Received: by 2002:a17:903:1205:b0:269:95a1:94c2 with SMTP id d9443c01a7336-27ed6ad069cmr61483825ad.3.1758863771994; Thu, 25 Sep 2025 22:16:11 -0700 (PDT) From: Gustavo Romero To: qemu-devel@nongnu.org, alex.bennee@linaro.org, thuth@redhat.com, berrange@redhat.com Cc: qemu-arm@nongnu.org, gustavo.romero@linaro.org, manos.pitsidianakis@linaro.org, peter.maydell@linaro.org Subject: [PATCH v4 2/9] python: Install pygdbmi in meson's venv Date: Fri, 26 Sep 2025 05:15:35 +0000 Message-Id: <20250926051542.104432-3-gustavo.romero@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250926051542.104432-1-gustavo.romero@linaro.org> References: <20250926051542.104432-1-gustavo.romero@linaro.org> MIME-Version: 1.0 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=2607:f8b0:4864:20::1030; envelope-from=gustavo.romero@linaro.org; helo=mail-pj1-x1030.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: 1758863906445116600 Content-Type: text/plain; charset="utf-8" The upcoming changes in the reverse_debugging functional test to remove Avocado as a dependency will require pygdbmi for interacting with GDB, so install it in meson's venv (located in the build dir's pyvenv/). Signed-off-by: Gustavo Romero Reviewed-by: Thomas Huth --- pythondeps.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pythondeps.toml b/pythondeps.toml index 16fb2a989c..98e99e7900 100644 --- a/pythondeps.toml +++ b/pythondeps.toml @@ -33,3 +33,4 @@ sphinx_rtd_theme =3D { accepted =3D ">=3D0.5", installed = =3D "1.2.2" } =20 [testdeps] qemu.qmp =3D { accepted =3D ">=3D0.0.3", installed =3D "0.0.3" } +pygdbmi =3D { accepted =3D ">=3D0.11.0.0", installed =3D "0.11.0.0" } --=20 2.34.1 From nobody Sun Sep 28 15:26:55 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=1758863916; cv=none; d=zohomail.com; s=zohoarc; b=Xyw1BFUxDnP3G1tUVUakjuuleXvsPrICkeMnHeUWJgO/rjxJ2j7jEa+7HsFfIGJUJKz/hV9WaZ6FYI81v/aocWenxd0M3iBa0eUnfQgTNj5PaGTqH8FgJ47NCBkcDjjDvzzFQQ5nLRE61Y/AuJjvGVifYsu3a6QURkLMhuQhFYE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758863916; h=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=ErpjM5v///jsQEmH//OMXKSRg7T93UzIYGTiGLLhSpc=; b=GG8czyBaZFwnENDb+l4qU56uCgZ0Rgg7aG4Z56iejeLaJkDP8gFs6XWAmr57t0Ba5d3se76WBnux+GeQcp8iBBVwLRVzILb9JTV8v5YJ99i2CX11AEOMuTlPMqXlhF0lU17vT+L3h3GxzGZoOHw7DxDiZUvjHEVC7RNLYHvymvE= 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 1758863916588493.82473813745753; Thu, 25 Sep 2025 22:18:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v20p5-0004qG-FF; Fri, 26 Sep 2025 01:16:47 -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 1v20os-0004kV-23 for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:16:35 -0400 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1v20oi-00060B-1V for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:16:33 -0400 Received: by mail-pg1-x52d.google.com with SMTP id 41be03b00d2f7-b5565f0488bso1244075a12.2 for ; Thu, 25 Sep 2025 22:16:18 -0700 (PDT) Received: from gromero0.. (189-47-45-49.dsl.telesp.net.br. [189.47.45.49]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-27ed672a51fsm42160085ad.63.2025.09.25.22.16.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Sep 2025 22:16:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1758863775; x=1759468575; 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=ErpjM5v///jsQEmH//OMXKSRg7T93UzIYGTiGLLhSpc=; b=nMryvUoaMxaTTO6jqTBDLADTLhXmYoN5YQvl3H77qgorOGSv/ND+7+1KyvewOD2K4E /J7hJ+b3CZG/1MLDZZWzEuvtvpcwt2P5jQ+Jhz3suPUuRyL3V4PUDFU8RAeK72nsj7JY +ire1igJomlxadvUMB+xplUqeI3zgNWoz5TU4UoKaOUKyvQLuXwi7rAOHTEyNec+LKpq rflYhJTiQT79JZjZ9y0eQ4NHIBBdpc270QDMXWYSdKZONxLYPQxnxWtkqxHjKS33s3rC +P72xCmUIxlxp2yGevjzRdfuQ1Q65BGDvb/pIVZDEgfc7wBunWUoCXzfC6MqznDGXfks 4UgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758863775; x=1759468575; 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=ErpjM5v///jsQEmH//OMXKSRg7T93UzIYGTiGLLhSpc=; b=YFSsIsTsEfTI99DvCQy9qH07IJZ7gJERSFvRQTt+69WTUgQNUnfIvT3XaFyh60A5Fj T1s2f+44+xvSEgtriBWenHqm/9tmGE8UFCtwJ9rb/DNx3bZLVDid5T/mv77t0QZx0X4b ws3c29UOmzsIegXlRh2nJ3WFYwFY7d+IgsuSWFWpctQXtIuAUx9XPmZf3Hkux9nCL/mv 3dE0GWiiJ99fqq4O4b+/IcufF7dvD7AlqiWaL2UzLLDgqywmwa8+ZwD1hgKhymEXQ+a/ l++4/ui3DxqRWx4f6JSGx2XBRxCJD5UTcFvYI5u9Z2sIL/jucnkkTNI3/e0EE3K5MK+N eadQ== X-Gm-Message-State: AOJu0YwafCI7oIp2p9uR9T4eEfSdE1/vZ5nTKSmH+AR7ksQJCi+U/vsX yLyu44ICzTSvIfsyRvK1rytIZ/kbfQtUzSS6DjbY3edADczykbCVf3LphYVsO171QPICnbSJsPo rItJG X-Gm-Gg: ASbGnctaefIGY1+QjDHf1s079F/Gcysg2V69WoXu7DuMyiYBM35WWMzKCMk1xe83LBU iuZMU4ymrrRtjzwN4+VwuxXWxW5+WEUZhgJkUB6rTlsDTWpvH9AkQcWODex9PQ8vMsuC9R0NUAC Bvk1Zctn2NTV6mSBJ1hI1H5LVSmZ271tVXM87lJ60IOdU9aZDbKYfTG9f7YWllrlDJLYvl1n5ZJ 7foAL+Ps0e1RcDuaCvyfZwulr4D5llRIkAIeq/fCbGqkn9FTSdduwwhnBtoehyuXuY3+DmVy9Pk 06SEinYzMRDxG7M3T+PHlItDF7GrtQC4X0FMl9hZuxzLT9zTF3+wLtuvsHRFM3sTC/p87vX3wp3 S48hzrViYH7sWTONiZ+HYHzAE7AMNCCvO2tzqdOIODjpDFiNuIjbQU1hpTIX/CP1yhKqg X-Google-Smtp-Source: AGHT+IFRyPVOrEnEpQLIMDsrPcD3BrCW77aiKC4vjEC+82B5VTCizBN4m4Qj99MITrhmBs7V4SW/Aw== X-Received: by 2002:a17:902:ced2:b0:271:ac7a:8f18 with SMTP id d9443c01a7336-27ed4a9615cmr78110225ad.43.1758863774712; Thu, 25 Sep 2025 22:16:14 -0700 (PDT) From: Gustavo Romero To: qemu-devel@nongnu.org, alex.bennee@linaro.org, thuth@redhat.com, berrange@redhat.com Cc: qemu-arm@nongnu.org, gustavo.romero@linaro.org, manos.pitsidianakis@linaro.org, peter.maydell@linaro.org Subject: [PATCH v4 3/9] tests/functional: Provide GDB to the functional tests Date: Fri, 26 Sep 2025 05:15:36 +0000 Message-Id: <20250926051542.104432-4-gustavo.romero@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250926051542.104432-1-gustavo.romero@linaro.org> References: <20250926051542.104432-1-gustavo.romero@linaro.org> MIME-Version: 1.0 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=2607:f8b0:4864:20::52d; envelope-from=gustavo.romero@linaro.org; helo=mail-pg1-x52d.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, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1758863918801116600 Content-Type: text/plain; charset="utf-8" The probe of GDB is done in 'configure' and the full path is passed to meson.build via the -Dgdb=3Doption. Because a single functional test can cover different arches, such as aarch64, ppc64, and x86_64, only a GDB that supports all the arches in the target list is passed to Meson for use in the functional tests. To handle this check, a new shell function, is_target_arch_in_arch_list, is introduced in 'configure'. Meson then can pass the location of GDB to the test via an environment variable: QEMU_TEST_GDB. Signed-off-by: Gustavo Romero Signed-off-by: Thomas Huth --- configure | 21 +++++++++++++++++++++ meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 2 ++ tests/functional/meson.build | 6 ++++++ 4 files changed, 31 insertions(+) diff --git a/configure b/configure index 0f7eb95586..20e05d233f 100755 --- a/configure +++ b/configure @@ -1142,12 +1142,31 @@ fi ######################################### # gdb test =20 +# Check if all target arches are in a provided list of arches. +is_target_arch_in_arch_list() { + arch_list=3D$1 + for target in $target_list; do + arch=3D${target%%-*} + if test "${arch_list#*$arch}" =3D "$arch_list"; then + # Target arch not in arch list + return 1 + fi + done + return 0 +} + if test -n "$gdb_bin"; then gdb_version_string=3D$($gdb_bin --version | head -n 1) # Extract last field in the version string gdb_version=3D${gdb_version_string##* } if version_ge $gdb_version 9.1; then gdb_arches=3D$($python "$source_path/scripts/probe-gdb-support.py"= $gdb_bin) + + if is_target_arch_in_arch_list "$gdb_arches"; then + gdb_multiarch=3D"yes" + else + gdb_multiarch=3D"" + fi else gdb_bin=3D"" fi @@ -1984,6 +2003,8 @@ if test "$skip_meson" =3D no; then test -n "${LIB_FUZZING_ENGINE+xxx}" && meson_option_add "-Dfuzzing_engin= e=3D$LIB_FUZZING_ENGINE" test "$plugins" =3D yes && meson_option_add "-Dplugins=3Dtrue" test "$tcg" !=3D enabled && meson_option_add "-Dtcg=3D$tcg" + test "$gdb_multiarch" =3D yes && meson_option_add "-Dgdb=3D$gdb_bin" + run_meson() { NINJA=3D$ninja $meson setup "$@" "$PWD" "$source_path" } diff --git a/meson_options.txt b/meson_options.txt index fff1521e58..5bb41bcbc4 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -36,6 +36,8 @@ option('trace_file', type: 'string', value: 'trace', option('coroutine_backend', type: 'combo', choices: ['ucontext', 'sigaltstack', 'windows', 'wasm', 'auto'], value: 'auto', description: 'coroutine backend to use') +option('gdb', type: 'string', value: '', + description: 'Path to GDB') =20 # Everything else can be set via --enable/--disable-* option # on the configure script command line. After adding an option diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 0ebe6bc52a..f4bd21220e 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -58,6 +58,7 @@ meson_options_help() { printf "%s\n" ' --enable-ubsan enable undefined behaviour san= itizer' printf "%s\n" ' --firmwarepath=3DVALUES search PATH for firmware fil= es [share/qemu-' printf "%s\n" ' firmware]' + printf "%s\n" ' --gdb=3DVALUE Path to GDB' printf "%s\n" ' --iasl=3DVALUE Path to ACPI disassembler' printf "%s\n" ' --includedir=3DVALUE Header file directory [inclu= de]' printf "%s\n" ' --interp-prefix=3DVALUE where to find shared librari= es etc., use %M for' @@ -323,6 +324,7 @@ _meson_option_parse() { --disable-fuzzing) printf "%s" -Dfuzzing=3Dfalse ;; --enable-gcrypt) printf "%s" -Dgcrypt=3Denabled ;; --disable-gcrypt) printf "%s" -Dgcrypt=3Ddisabled ;; + --gdb=3D*) quote_sh "-Dgdb=3D$2" ;; --enable-gettext) printf "%s" -Dgettext=3Denabled ;; --disable-gettext) printf "%s" -Dgettext=3Ddisabled ;; --enable-gio) printf "%s" -Dgio=3Denabled ;; diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 2a0c5aa141..725630d308 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -77,6 +77,12 @@ foreach speed : ['quick', 'thorough'] test_env.set('PYTHONPATH', meson.project_source_root() / 'python:' + meson.current_source_dir()) =20 + # Define the GDB environment variable if gdb is available. + gdb =3D get_option('gdb') + if gdb !=3D '' + test_env.set('QEMU_TEST_GDB', gdb) + endif + foreach test : target_tests testname =3D '@0@-@1@'.format(target_base, test) if fs.exists('generic' / 'test_' + test + '.py') --=20 2.34.1 From nobody Sun Sep 28 15:26:55 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=1758863933; cv=none; d=zohomail.com; s=zohoarc; b=J86BsO6NGPhZDdB9EH1jxu8Lq9IExY8ehVzD3rMPFc9YBxVxXNZ4Ixj0GVfemFhBtlYnsfWkFa+2zb9TpmRHJ1/7KqsEsJA7HdHafMrx18TPBM3OFZbKbPKCA53PIf7+274ZZMIww+R0NXJIz6nh7JB6afzKJr5eIMYUrhL4rEY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758863933; h=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=UmMZ8OavtJPqXFVQhgzCSfktwxUsbE5ixRVmorJ3R6E=; b=GDb3rYLatwmKaCMesap/5lYNVEhetD9aa4zxbre1wwr9qV0LVuqGxKSR0N58MaiBMJBLbkGDErQI6G597VNpFz9JdS7tDP8LRz3MLIWC7RnHLs5gsSsCtYfj3277yzGqgjnmiZ/OvzB99FlXm3/XHMgOy0seiPF22bb+urN+Q4s= 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 17588639331618.102930951688677; Thu, 25 Sep 2025 22:18:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v20p0-0004nn-Tt; Fri, 26 Sep 2025 01:16:44 -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 1v20ou-0004lM-5U for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:16:37 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1v20oi-00060O-2g for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:16:35 -0400 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-27d69771e3eso15166115ad.3 for ; Thu, 25 Sep 2025 22:16:19 -0700 (PDT) Received: from gromero0.. (189-47-45-49.dsl.telesp.net.br. [189.47.45.49]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-27ed672a51fsm42160085ad.63.2025.09.25.22.16.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Sep 2025 22:16:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1758863777; x=1759468577; 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=UmMZ8OavtJPqXFVQhgzCSfktwxUsbE5ixRVmorJ3R6E=; b=JVJsKNYs+rb99/2j+xBjBX+BIyrdsm1S//8gaXce3axo6pFjAkarkRHTMKufnecNWH 4yjIq/HwMYpMdIR0Mtf4aLIKWvb2se2JaQqkYtfHwoPGeoc4kfx/xqfpErVtKaSYlHbM QQlkEbdLP/cl2lqGE/5Uty8GFJQxo7B2uVgefifECehbcPP0xAez5iKBxjDCHEmV1YmH VBhYloqHM67FjY1/JpBu0J55kybXRFLdoxbokFSovgfVOQf6GzyCR625SU7loE/DWOAg I15KP7n4NX63hzJbbJUYvOTr/c++DMaQZzzBdSJ4PVY77tyztruSLwW16v9MqcoAZy0+ A/uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758863777; x=1759468577; 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=UmMZ8OavtJPqXFVQhgzCSfktwxUsbE5ixRVmorJ3R6E=; b=a2q6iFPBcImoSZG1O2bAml1uZwxHwSPy5BTxrsyaKS9loyhXZr5XZ28vmSXS9f3xnG 6ojj5Zrq68a03fs3KsnSDzTbmETdZM1vvfWNXVB9J2cDbqTn8Q9cmpLgEs6LapTjTdMx hh1YjJSIlw1TLZ/ro15SjSSOzcSP86/hzXPY++lMpJVKIZ/RMV/zLJu/idbwOuWMKs8Y tl5flTAOZ65kLPn1J2iq72grbZzb53Ke7uG3DQ/1quuFqIu0TXVpIzToaOD8oqAu70EJ unGoJ6078fQJ5jJvGFRLGJ3qXudhame1TvX1SSLKKW8I6cd2TAOxdxldV/XqcL1Ew5SD N1oQ== X-Gm-Message-State: AOJu0YxxLgZeNHQ9TEYaDFQ2/Z5YEsjLkf5QBIf1TRyyJ0iP1/Obxvpi hiCu9LK3WGhGnCRJGbM3c3IfZXHO+uacJLJYPUI6MwFUGp7ZBUOKE1kwv35gLXUmJ5rrpeVOHVu djBRJ X-Gm-Gg: ASbGncu59SMN0DhMRQmAlFMfVQWNquXvTPoX1PYef2ERB/Mf0M50SnvbjPsZsstxEL/ +0pWeK0QWGJDrtS5CuwNImLlZDSdkKWAl6JwqBmJ6zx6KuoN+UG3QIIY+txBiZoYerGqTzgyFmE sHC/Oxsm2e8iXdQmBsWC5DtzO4ciTCNx23HymSjDeF6gYM7gkxx9BwO2n6XOC/5q/55wjJEbTUI py8tNRxq0t3tWmE/4mWekbnTkW+JxUCFqHKS9j47Y/XDIDu7EWAcOyMGTL5CBxx+1YoX5hYdhrJ ER2miuVnD9N+DAupOLfh8rQ2KnHEIzlaA5JLIOD7VsclkO4ADAQiGFr4qKZzI02SxHtFFyzYJdZ 6aJPE0p4pZNkHjt5cZoEonnnNUOc/63pV7qA0jWoCOIPCheBx35fX2vXcGA== X-Google-Smtp-Source: AGHT+IGz4CBWZEb5vkf9iuGypfPBXgcL/HApohmU/5SkQ2nu/NBWVYVaPmgYZwfxo/lXEN08sDH5tg== X-Received: by 2002:a17:902:d60d:b0:269:8edf:67f8 with SMTP id d9443c01a7336-27ed4ab6084mr65626315ad.52.1758863777412; Thu, 25 Sep 2025 22:16:17 -0700 (PDT) From: Gustavo Romero To: qemu-devel@nongnu.org, alex.bennee@linaro.org, thuth@redhat.com, berrange@redhat.com Cc: qemu-arm@nongnu.org, gustavo.romero@linaro.org, manos.pitsidianakis@linaro.org, peter.maydell@linaro.org Subject: [PATCH v4 4/9] tests/functional: Add GDB class Date: Fri, 26 Sep 2025 05:15:37 +0000 Message-Id: <20250926051542.104432-5-gustavo.romero@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250926051542.104432-1-gustavo.romero@linaro.org> References: <20250926051542.104432-1-gustavo.romero@linaro.org> MIME-Version: 1.0 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=2607:f8b0:4864:20::635; envelope-from=gustavo.romero@linaro.org; helo=mail-pl1-x635.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_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1758863934840116600 Content-Type: text/plain; charset="utf-8" Add GDB class, which provides methods to run and capture GDB command output. The GDB class is a wrapper around the pygdbmi module and interacts with GDB via GDB's machine interface (MI). Signed-off-by: Gustavo Romero Acked-by: Thomas Huth --- tests/functional/qemu_test/__init__.py | 1 + tests/functional/qemu_test/gdb.py | 85 ++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 tests/functional/qemu_test/gdb.py diff --git a/tests/functional/qemu_test/__init__.py b/tests/functional/qemu= _test/__init__.py index 6e666a059f..60d19891bf 100644 --- a/tests/functional/qemu_test/__init__.py +++ b/tests/functional/qemu_test/__init__.py @@ -18,3 +18,4 @@ skipIfMissingImports, skipIfOperatingSystem, skipLockedMemoryTest from .archive import archive_extract from .uncompress import uncompress +from .gdb import GDB diff --git a/tests/functional/qemu_test/gdb.py b/tests/functional/qemu_test= /gdb.py new file mode 100644 index 0000000000..15eb5eca18 --- /dev/null +++ b/tests/functional/qemu_test/gdb.py @@ -0,0 +1,85 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# A simple interface module built around pygdbmi for handling GDB commands. +# +# Copyright (c) 2025 Linaro Limited +# +# Author: +# Gustavo Romero +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +import re +from pygdbmi.gdbcontroller import GdbController + + +class GDB: + """Provides methods to run and capture GDB command output.""" + + + def __init__(self, gdb_path, echo=3DTrue, suffix=3D'# ', prompt=3D"$ "= ): + gdb_cmd =3D [gdb_path, "-q", "--interpreter=3Dmi2"] + self.gdbmi =3D GdbController(gdb_cmd) + self.echo =3D echo + self.suffix =3D suffix + self.prompt =3D prompt + self.response =3D None + self.cmd_output =3D None + + + def get_payload(self, response, kind): + output =3D [] + for o in response: + # Unpack payloads of the same type. + _type, _, payload, *_ =3D o.values() + if _type =3D=3D kind: + output +=3D [payload] + + # Some output lines do not end with \n but begin with it, + # so remove the leading \n and merge them with the next line + # that ends with \n. + lines =3D [line.lstrip('\n') for line in output] + lines =3D "".join(lines) + lines =3D lines.splitlines(keepends=3DTrue) + + return lines + + + def cli(self, cmd, timeout=3D4.0): + self.response =3D self.gdbmi.write(cmd, timeout_sec=3Dtimeout) + self.cmd_output =3D self.get_payload(self.response, "console") + if self.echo: + print(self.suffix + self.prompt + cmd) + + if len(self.cmd_output) > 0: + cmd_output =3D self.suffix.join(self.cmd_output) + print(self.suffix + cmd_output, end=3D"") + + return self + + + def get_addr(self): + address_pattern =3D r"0x[0-9A-Fa-f]+" + cmd_output =3D "".join(self.cmd_output) # Concat output lines. + + match =3D re.search(address_pattern, cmd_output) + + return int(match[0], 16) if match else None + + + def get_log(self): + r =3D self.get_payload(self.response, kind=3D"log") + r =3D "".join(r) + + return r + + + def get_console(self): + r =3D "".join(self.cmd_output) + + return r + + + def exit(self): + self.gdbmi.exit() --=20 2.34.1 From nobody Sun Sep 28 15:26:55 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=1758863903; cv=none; d=zohomail.com; s=zohoarc; b=b/GBSzmyFX/eScjs9PWm6g9mdmw2o3WRZPGUQy1Fm0KY3RC4lbiiDJRTNxF9OYQU4pq+ohlJPyIL9xjjPHjxhYlOfX2fdP5F5DnpplPZjjiNmBWRz7344RAPt6jRlCDSgYQcgzygJzvv4r2ALL1BK+ZI0l4KUv582Rc6ZHex8Ic= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758863903; 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=qbcIM6Ru+KfZSzivGndOpNutXXn65xOK6v6HYqWFFQA=; b=ZtyXb9+BTWu0RYqnPmMUxkPEMb+RaUooltCNo4qAo+wDp1NAL5W6utKNG+pIW8c9DZsGe28PO1pUUP8vs+0HEqU5db1RGncnRX5XwoA01ONWF+Jf02BYzm/Te3xY0HZusk+YUrs51lAiyMNyEbAMca+JSXMXmN+QvJSNAsOjIwk= 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 1758863903588525.0752686847679; Thu, 25 Sep 2025 22:18:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v20p4-0004pX-5T; Fri, 26 Sep 2025 01:16:46 -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 1v20ov-0004mC-Lv for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:16:38 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1v20om-00060k-AC for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:16:37 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-27d69771e3eso15166345ad.3 for ; Thu, 25 Sep 2025 22:16:23 -0700 (PDT) Received: from gromero0.. (189-47-45-49.dsl.telesp.net.br. [189.47.45.49]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-27ed672a51fsm42160085ad.63.2025.09.25.22.16.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Sep 2025 22:16:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1758863780; x=1759468580; 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=qbcIM6Ru+KfZSzivGndOpNutXXn65xOK6v6HYqWFFQA=; b=RlxoGNi9EkVISz1yxgW+/7q+h2uKZrvIGgLLhx3hkYZxKoHWNRUq2Ht4nnYa/3qpOO HRfqfJFug3niFqBI+lrws4J1VOsAwSAJ42PiVXl61S+95drWrRYWXj7SdRI7opU8y+u5 nyESgAPd7dcnfI3qJS2tTuaF/hk72flcxgVF2Z+lso8uGhUz4oQ4DQZig6CFyFtBl3g/ CWVTnbIKgLM5fq6+NQ+//9Vuy1oDdo/QeTPJxGW8rY3O46KLPc5w+yXMeQGv7I9gZSHG N4NmJoAmWsxapFVSHBpq1hWFZOhaLOGLM1x6eVmP2qmhTi6UElHaFelrpBL3/WwQUaXS q0hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758863780; x=1759468580; 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=qbcIM6Ru+KfZSzivGndOpNutXXn65xOK6v6HYqWFFQA=; b=VNl0AWHyJaWALC3Cqm9lbMXF6oEV+9xAgL4z4mjfKh127LcGAJugAtfQwOx3urLn27 4BrIpJcUCLznU7ZxysEfJaoJWWatLzu/t7ED3wfPAKRjJTnMotEKXqFMGuRvvePP2UAf 97M5QWGQzxHTo01N8hAJ9kIsBzrZGubxQN8oprrPIcpJdyYk2aT4gJt+M5vxlJs1gIKK Ii6OrKeBG2ph34sv70tFyuAYTEMbR6exJsR1NhoFo7Y57jf1IasInnvJEY9ApX7V4Cm+ /fC/LIFld2qT1zRheMFesrFclHPGZ+QQnNGvsFoWQ1Xv5RGVlstT3SKMwekIvOC2Z3dy G1/A== X-Gm-Message-State: AOJu0Yz9ctcifyCprAncobSSbok85814nJ4UvQMMGXgQnea/9a9UwyHL oeIYaofeljbUZ7VX8Za7iGU84MIonRLz+j8NtJDFfK9fpjhQ4eq2jrAM65YLfAvMWajmuZ7cMgk fN80E X-Gm-Gg: ASbGncszJb+tpqSsPAvnwrJu33600rlwyEAKvQh+n+iX5xMcPQPtlfcacj0MF9D8Alx DO66L6rhbWXX02R/MKxEx38eQI0JoRfADRLPBchB10cAOIAgounx/yOX/MCWw50KO8ukFUKbYQz +pytUu+wDtc2iNNXSjd+gGsk1ZS895yhChM7iB4RpZorMoYxCTIXLJSagxDQrbiibi++0PRPDRq pIs1YOOXseP/UKY/kRNlNLz8PoaOwvtU+0jKG9FLleAGXvDbLyBzfVwQEFMRUMz3pIlndWRJLAX sNOr3J4Pe9+YilChvgppzi6bZQktmi3HlJ5OLGZt6Ap4KVOg7oI/UPqcKDBdTGdP9mK3bffJans svqgS03094n/PzXw1quMfzIyl0SWu/KOKdlqmb5CGMs+a7Q92ICz4OBz9Zg== X-Google-Smtp-Source: AGHT+IE/+rh4i8OLGMJBItC4kYEuKliujmcOCqYvDVB8J8+aqhIAeK/4Jk9/mQ9ydvoYLkPl36oEeA== X-Received: by 2002:a17:903:1a2d:b0:25a:24f2:af00 with SMTP id d9443c01a7336-27ed4a06c8fmr64226065ad.12.1758863780084; Thu, 25 Sep 2025 22:16:20 -0700 (PDT) From: Gustavo Romero To: qemu-devel@nongnu.org, alex.bennee@linaro.org, thuth@redhat.com, berrange@redhat.com Cc: qemu-arm@nongnu.org, gustavo.romero@linaro.org, manos.pitsidianakis@linaro.org, peter.maydell@linaro.org Subject: [PATCH v4 5/9] tests/functional: replace avocado process with subprocess Date: Fri, 26 Sep 2025 05:15:38 +0000 Message-Id: <20250926051542.104432-6-gustavo.romero@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250926051542.104432-1-gustavo.romero@linaro.org> References: <20250926051542.104432-1-gustavo.romero@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=2607:f8b0:4864:20::62e; envelope-from=gustavo.romero@linaro.org; helo=mail-pl1-x62e.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: 1758863904805116600 From: Daniel P. Berrang=C3=A9 The standard python subprocess.check_call method is better than avocado.utils.process as it doesn't require stuffing all args into a single string. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Thomas Huth --- tests/functional/reverse_debugging.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/functional/reverse_debugging.py b/tests/functional/rever= se_debugging.py index f9a1d395f1..a7ff47cb90 100644 --- a/tests/functional/reverse_debugging.py +++ b/tests/functional/reverse_debugging.py @@ -11,6 +11,7 @@ # later. See the COPYING file in the top-level directory. import os import logging +from subprocess import check_output =20 from qemu_test import LinuxKernelTest, get_qemu_img from qemu_test.ports import Ports @@ -100,7 +101,6 @@ def vm_get_icount(vm): =20 def reverse_debugging(self, shift=3D7, args=3DNone): from avocado.utils import gdb - from avocado.utils import process =20 logger =3D logging.getLogger('replay') =20 @@ -111,8 +111,9 @@ def reverse_debugging(self, shift=3D7, args=3DNone): if qemu_img is None: self.skipTest('Could not find "qemu-img", which is required to= ' 'create the temporary qcow2 image') - cmd =3D '%s create -f qcow2 %s 128M' % (qemu_img, image_path) - process.run(cmd) + out =3D check_output([qemu_img, 'create', '-f', 'qcow2', image_pat= h, '128M'], + encoding=3D'utf8') + logger.info("qemu-img: %s" % out) =20 replay_path =3D os.path.join(self.workdir, 'replay.bin') =20 --=20 2.34.1 From nobody Sun Sep 28 15:26:55 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=1758863914; cv=none; d=zohomail.com; s=zohoarc; b=F6oA2F4P9fS++F/T2fsCV8Uhk2HEidJ8rsZgGA0rjbHFLtUOF2Out2nCRTpph+CfpD4RQXbrWjJM9MEmJEIxylAGBgJpjyUID4qfDGNF4MMPJScrb+zoWlptaD1GNoHiE05NQ5Dkneok7QxpWQegRomTpOFPihYKPl6Ujwyk0Nc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758863914; 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=A8qxry6y1z0qQGV3uHFHjxCr8kbyKn/3ReS6+iwe5go=; b=Qk+2cxTOSVQYEDE07W2mLcOmbvYPo/vcrWjOZHr9Mr5urgdj/ph3q8WglgVURmHxevmv7B0JpIiIXkhWvQnasgHAb+L55b0wR4Mq1jGfX7I6ib5IDJMHByhfzXE+Qj97yxi5/mXtvuoum6B+0zt9c4h63ohMmPNuJedrhf4UTB0= 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 1758863914858695.5260975146122; Thu, 25 Sep 2025 22:18:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v20p8-0004rS-M0; Fri, 26 Sep 2025 01:16:50 -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 1v20ow-0004mD-3g for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:16:38 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1v20op-00060z-Dc for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:16:37 -0400 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-27eceb38eb1so20637705ad.3 for ; Thu, 25 Sep 2025 22:16:27 -0700 (PDT) Received: from gromero0.. (189-47-45-49.dsl.telesp.net.br. [189.47.45.49]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-27ed672a51fsm42160085ad.63.2025.09.25.22.16.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Sep 2025 22:16:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1758863783; x=1759468583; 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=A8qxry6y1z0qQGV3uHFHjxCr8kbyKn/3ReS6+iwe5go=; b=pAEbcY4vJtZWge0MzehHUv/C42VRTlOYpFRWkC5J2dyBFGpnKXrXyhTMIuaOAo8tSS h/edFGeAewRPc3LC+6nqVMvWdyvepFOPY5MYw3qqBLIPX7+PIijWYdXauEFLp+ensAzG PIuSTyvzRJgg6NVKt5FuD7D0bpwpgEgOJOU/99bPgSZvTiaCOV62EVA9EXX1AzBblQRQ OlDXhcbxRfItMLxJWEf9BIYWlvGjTXgdMZtzS/G4ASDs9X/NSw33b/okFLUeXdf4rRog pieyS0Keq0cfUEHffhqYYmLlnh8NCh2wyxFf4PlFArDpKNncobkM1Nfu1D+S75SEgjEm Vnaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758863783; x=1759468583; 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=A8qxry6y1z0qQGV3uHFHjxCr8kbyKn/3ReS6+iwe5go=; b=jA/MBHEhRcmXCxvIKjFLaop7Q84HhlNGlpXsrmsIDwOMcYlyym5mckNSsH3Fcvw+3Z W/Hx1eoQS5Wh09cYrqmhKW95KPvnbNEyxl5pJpTbw66infOav/y4XJrH6aLbyQ1vlDsU q/v5n8zgPGoxzS+WIp5iXwxZSDGc6Gf12vw6CdYNlSFxzMTAiW/RdHSmcMJE+iXYaoKN 1aU/LnvwIn+7OQyuEWuAdmZilTXPxp3XKJBzlqef7vQZIlsqf7bqV7C9Cfm2xbr+9vvG 3DMH9S2V0i9T3/l6kNZmiS6p9iMKHNghw+QaE5y+GqE00oxAHLaeafn5Div5wbUzfljp rQJQ== X-Gm-Message-State: AOJu0YyV3VCd/ZszYK5NuEI9pEq3PNeD49YxIHzf2QRGITv9njyG57ug St6HF5dXosF6DqmIyNnNAJW6id54DGqFLdMXgttY1u34T4F/MabUd2sT4hHpUXq/7my+rfxSsuT b7vA+ X-Gm-Gg: ASbGncsY4We+e94hND9dip6Zix3NGg7nD6YY1vd6hVADE7129f2tXHMoJvSzvmxcLAB QvkpUpo8/f5n5R+NG4kW3tAeIoi9MlwdpjnHkmwtFXmmRaYSqBL1+JrCOH2/d3RkCW+V/aDLmT8 MBoymqxlpHDiriW3qLhw4xDef188iP1OdmgDr5yUFizxd20MJMi+v6DZwy8wLNxqNWHQVdRDcBE bDLXWjjMH5uzud7/hjVJd+E0r5OgiTIgx/PFtRcn6yHqv7jHZFSlQn919YiUXpRORljYZKkqUeJ uJ3ISgsPmt8QC04dnQQX70zHyDlxVV5ARWvVjr2n4z/SG+xI8F6n1Cb3I8nmtGlJBRJJP7O7Z+j v+3xL95/AALnTAipYrzLPSjEVDytN26WaDGLZ3T017Dv/Cdo7TVFuv6P6lrBXh6NuVkdS X-Google-Smtp-Source: AGHT+IGbsw6PoUjjNBRK/UL3bi1UNQOe1bXaSwEcY/e2fh2jEivINMtlpTKtmOZ6o4HV+auqGSnnww== X-Received: by 2002:a17:903:2c9:b0:259:5fdf:d79c with SMTP id d9443c01a7336-27ed4ad65e1mr54084735ad.51.1758863782936; Thu, 25 Sep 2025 22:16:22 -0700 (PDT) From: Gustavo Romero To: qemu-devel@nongnu.org, alex.bennee@linaro.org, thuth@redhat.com, berrange@redhat.com Cc: qemu-arm@nongnu.org, gustavo.romero@linaro.org, manos.pitsidianakis@linaro.org, peter.maydell@linaro.org Subject: [PATCH v4 6/9] tests/functional: drop datadrainer class in reverse debugging Date: Fri, 26 Sep 2025 05:15:39 +0000 Message-Id: <20250926051542.104432-7-gustavo.romero@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250926051542.104432-1-gustavo.romero@linaro.org> References: <20250926051542.104432-1-gustavo.romero@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=2607:f8b0:4864:20::62b; envelope-from=gustavo.romero@linaro.org; helo=mail-pl1-x62b.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1758863916684116601 From: Daniel P. Berrang=C3=A9 The reverse debugging test uses the avocado datadrainer class to create a background thread that reads from the console socket and dumps it via python logger. Most tests log console output as a side effect of doing calls to match strings, but this test never tries to match anything. This isn't critical, so just drop the functionality. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Thomas Huth --- tests/functional/reverse_debugging.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/functional/reverse_debugging.py b/tests/functional/rever= se_debugging.py index a7ff47cb90..7fd8c7607f 100644 --- a/tests/functional/reverse_debugging.py +++ b/tests/functional/reverse_debugging.py @@ -34,8 +34,6 @@ class ReverseDebugging(LinuxKernelTest): endian_is_le =3D True =20 def run_vm(self, record, shift, args, replay_path, image_path, port): - from avocado.utils import datadrainer - logger =3D logging.getLogger('replay') vm =3D self.get_vm(name=3D'record' if record else 'replay') vm.set_console() @@ -53,10 +51,6 @@ def run_vm(self, record, shift, args, replay_path, image= _path, port): if args: vm.add_args(*args) vm.launch() - console_drainer =3D datadrainer.LineLogger(vm.console_socket.filen= o(), - logger=3Dself.log.getChild('console'), - stop_check=3D(lambda : not vm.is_runni= ng())) - console_drainer.start() return vm =20 @staticmethod --=20 2.34.1 From nobody Sun Sep 28 15:26:55 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=1758863973; cv=none; d=zohomail.com; s=zohoarc; b=ENcNSsWzAEXpfl4S+Qbx2+xHbOwMRTbhplc3acBSYg2w9r+eMHmiPPNyB1FYshm4z7rxBXNNeLzzme1Wyc2maLh4NHVQZNue8WoGyVlaTSYvvo+mUMkRX/8Zt097ze5Lt93UdNNOMWu5M6IOD/s0QGkj0Qg1SBsGLyiblbWT+q0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758863973; h=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=tqvAjhF9PeBnkzh7otQwLKhrmJazNmoc6H8q1BcmrGw=; b=f9/bzSFVDdUYNQFm76WSS2D/Lrnf5p5eG5c0oCfcHDchb6+HuGTpBiWdvCbDjPB8kY4hI/dIwQmeQtyRJR/sv2BGF6KipoM9teb0rjZ3nXH3pe7rxVAZoZg0I9rbwmiVgl/dsTJVIzjbMvKfeWQ9vzWftV0q4VqRQ/PN/hZsRrE= 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 175886397299623.77113921624732; Thu, 25 Sep 2025 22:19:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v20p8-0004sD-7Z; Fri, 26 Sep 2025 01:16:50 -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 1v20p1-0004oB-56 for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:16:45 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1v20op-00061Q-Pw for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:16:42 -0400 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-27eed7bdfeeso6914925ad.0 for ; Thu, 25 Sep 2025 22:16:27 -0700 (PDT) Received: from gromero0.. (189-47-45-49.dsl.telesp.net.br. [189.47.45.49]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-27ed672a51fsm42160085ad.63.2025.09.25.22.16.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Sep 2025 22:16:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1758863786; x=1759468586; 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=tqvAjhF9PeBnkzh7otQwLKhrmJazNmoc6H8q1BcmrGw=; b=epBtE1i+Lp+TTTgh2haWFmw146XpCUImdLq742wFplHj68xW/CLyDYVOADAafmTO/9 uriE+oMmYZwcqNdTdRrW1+bbwgkW2JWm6YTKyNxVBvhGCnrC/A75N2jTS4mYgWXBdj3o OvSKY5iPITrVF/RYWVQAAte00mPMV4OMlAsZFTt3+WQtor6PDW//e3v0gTm9ud2Eo5JX ItjdeJbmTM4v0Glp2K3d0pAENQOkHhGAdeFLqEXXtLxCG/7ujfrwr+T0BALuU+NzHkY1 BBvLO/k1fhFUGr9SNosRQKBaVqtMCEW2Eb5KsYk0aWkNXtuuSj7eqH3hVy6y+duDMRxt ohqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758863786; x=1759468586; 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=tqvAjhF9PeBnkzh7otQwLKhrmJazNmoc6H8q1BcmrGw=; b=ayZk/ptZ0+C2FIZHZW9+MD9fMmL4I9vvRuCE3clOrqkWPzuWzdFEGgzWi5mFKCC6yC ECt3j/xYsgKsI0c8LJMEh5DAwPgnFB+9R0Q/0NRjn2XeXRhDn8gw3zjStDWoRDYZTzaA jQtpKWXGykq6CcWb0/EQXG2esRRkWGfbhUsoyv1iOLNcUCzAuN8TWuXCH9fc1qoCdBKp 4Qg8WeCCF0Q21EQ5qBdm6wFVRtqHVlGdq2ag7Qk2rH9fQvlKI6LmJ2rODfd2bvPtenf3 tcm7+qLygxpblSfTCEQ/LDJNnHeb2/hND3td4PYxgc27BLcrA+n2VShx+dzMjor6GX6h GueQ== X-Gm-Message-State: AOJu0Yyn17q60U69o0QGZOCTZvo/Z9e5+OwbwlKGO/HmKhuhk3+qXGTE Y+aplncA2JrVb6Dkc7NXy5p0oGjiRttGGB9JGuG8akaPODsXVzwbUT1mdXARo2KUveURp1Q2Omn GGGgy X-Gm-Gg: ASbGncv9xVEtAovM6skOZ7RjbfrBii+fUTC1ntNxaUGOECaN/LqWdg1kE03OiR/RiqE Ooo3gLnbRInl6ARYZcv30ZfALfN3LHZQgH16hQIiF/Z++Og7Lsljik/Fa5UNySUwB4aRO6DYwPT 6Cyp8E9L9AWqR4dhgjFqquj5B7LZg5bYx2t5rjBmQe+IWzrQZTJioEGGtJOhkc1+uT00dToXIQ4 ZncRw0oPHYw11Ao2SLxVTH+qOcAxjpavm5jKErgMhvRt9MKs1lM7Dg53YbcZx+BX8qZwjygwQJO CRiSpTiQ4J32ybXe/NKXMVnG2JcuxXk/QRRpbI5rlmXD7xj7N3liOcqGoY0zfCmAd05YKTNse0L Gn8MkqElf027/f8PzKAMB9KnE8xiZLteZjLbvjLLItoAooHAJR56jhSPGMkp0ZwOtLAz1 X-Google-Smtp-Source: AGHT+IHYIWi5gcV0fp9+TeSsY77WtkC+hvKT/qc8RXgBb+kfZWgiPvxz6FshJdgCPkH6cON97RS6HA== X-Received: by 2002:a17:902:e745:b0:272:d27d:48de with SMTP id d9443c01a7336-27ed6e05744mr64600655ad.18.1758863785704; Thu, 25 Sep 2025 22:16:25 -0700 (PDT) From: Gustavo Romero To: qemu-devel@nongnu.org, alex.bennee@linaro.org, thuth@redhat.com, berrange@redhat.com Cc: qemu-arm@nongnu.org, gustavo.romero@linaro.org, manos.pitsidianakis@linaro.org, peter.maydell@linaro.org Subject: [PATCH v4 7/9] tests/functional: Add decorator to skip test on missing env vars Date: Fri, 26 Sep 2025 05:15:40 +0000 Message-Id: <20250926051542.104432-8-gustavo.romero@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250926051542.104432-1-gustavo.romero@linaro.org> References: <20250926051542.104432-1-gustavo.romero@linaro.org> MIME-Version: 1.0 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=2607:f8b0:4864:20::632; envelope-from=gustavo.romero@linaro.org; helo=mail-pl1-x632.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1758863975110116600 Content-Type: text/plain; charset="utf-8" Add a decorator to skip tests on missing env variable(s). Multiple variable names can be provided and if one or more of them are not set in the test environment the test is skipped and the missing vars are printed out. Signed-off-by: Gustavo Romero Reviewed-by: Thomas Huth --- tests/functional/qemu_test/__init__.py | 3 ++- tests/functional/qemu_test/decorators.py | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/tests/functional/qemu_test/__init__.py b/tests/functional/qemu= _test/__init__.py index 60d19891bf..320193591b 100644 --- a/tests/functional/qemu_test/__init__.py +++ b/tests/functional/qemu_test/__init__.py @@ -15,7 +15,8 @@ from .linuxkernel import LinuxKernelTest from .decorators import skipIfMissingCommands, skipIfNotMachine, \ skipFlakyTest, skipUntrustedTest, skipBigDataTest, skipSlowTest, \ - skipIfMissingImports, skipIfOperatingSystem, skipLockedMemoryTest + skipIfMissingImports, skipIfOperatingSystem, skipLockedMemoryTest, \ + skipIfMissingEnv from .archive import archive_extract from .uncompress import uncompress from .gdb import GDB diff --git a/tests/functional/qemu_test/decorators.py b/tests/functional/qe= mu_test/decorators.py index c0d1567b14..b239295804 100644 --- a/tests/functional/qemu_test/decorators.py +++ b/tests/functional/qemu_test/decorators.py @@ -11,6 +11,24 @@ from .cmd import which =20 ''' +Decorator to skip execution of a test if the provided +environment variables are not set. +Example: + + @skipIfMissingEnv("QEMU_ENV_VAR0", "QEMU_ENV_VAR1") +''' +def skipIfMissingEnv(*vars_): + missing_vars =3D [] + for var in vars_: + if os.getenv(var) =3D=3D None: + missing_vars.append(var) + + has_vars =3D True if len(missing_vars) =3D=3D 0 else False + + return skipUnless(has_vars, f"Missing env var(s): {', '.join(missing_v= ars)}") + +''' + Decorator to skip execution of a test if the list of command binaries is not available in $PATH. Example: --=20 2.34.1 From nobody Sun Sep 28 15:26:55 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=1758863914; cv=none; d=zohomail.com; s=zohoarc; b=VHWYTePrX6zpxBmYtj9P75q4ssuL/gmU+feus/ZYO47uxTqzUD7vtbajDEKn4E2LOMFvrRV9M59rs+7z1f7OvK8DxEa9eumipBfihB/DfwNWzYS92akFxifJTVNBwu7UeEiBVqUDugGJNNlMUYhO45vvWAKLtNq4mvS39S7HzC4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758863914; h=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=YK36azP6oOgCQtElb4HgeO0m9NeDE6FMPmb4sfTtQPg=; b=XS/Y8JvSI5hVgCTzSQErkWEZPpG+CmdeJID4JkYIvbVTfz5PmNVpg90b02NYeWioUDP51vve7PxKI8EQVnaOrKCPLNb9XTl6DMbTXGjzUWIdG+m7jDr8nrsU+HzTbRxkJcwOkkJY1+pQZW2BWlaDuTrV7aG0nTnI5yQP6QChSFY= 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 17588639143071005.2912392334146; Thu, 25 Sep 2025 22:18:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v20p9-0004sx-VT; Fri, 26 Sep 2025 01:16:52 -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 1v20p4-0004pb-5G for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:16:46 -0400 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1v20ov-00061p-3x for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:16:45 -0400 Received: by mail-pg1-x52c.google.com with SMTP id 41be03b00d2f7-b555b0fb839so1298381a12.3 for ; Thu, 25 Sep 2025 22:16:32 -0700 (PDT) Received: from gromero0.. (189-47-45-49.dsl.telesp.net.br. [189.47.45.49]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-27ed672a51fsm42160085ad.63.2025.09.25.22.16.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Sep 2025 22:16:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1758863788; x=1759468588; 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=YK36azP6oOgCQtElb4HgeO0m9NeDE6FMPmb4sfTtQPg=; b=mMx6BhwK82iQYoLM10RuvAfgG6/HPnlNFbQCDFL+EhxuaMICIL+8JPU9HeY7Onhr96 2uOIV9F5bmRPL7Syo88tR7dYfoaCW5G6HCWpP95Hdlh8RQImZW5aU/f2c72lpnB5FbDV wsppa6O1urII/x1JzBhrJw8qmBVdzvDM5qHvvuX4UpdUNMos6aTeym/57Uj8IyDXkad3 3+waMFZcPLzfoSiBgeZbUDY/JI1cmGqKYiKz2ZufXexpiJd2yJlM4IwwPOhTSIN/9rJc YoBzmEAmYULB7Wao6k0EMGPmm1vPVTKEC8OXicntVzOEI6ShR+kWdRLJai6Z3w/G7crb /qYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758863788; x=1759468588; 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=YK36azP6oOgCQtElb4HgeO0m9NeDE6FMPmb4sfTtQPg=; b=sfE4TKjOPdbUEyi7EkZfkjuyTOVgK/UxfK7ySNIb/3VtSCNc6Ia1ynqPFnjacrP0+o h0jCioOQKbNBqP7vR5WFnhsNRXqt5lEQZSUkAz2OQzcXfwkZTKuFk9XTa7mLKpVDguoW 5LgYh2TdL94zkI5cHcbCz13pdu9OdKYyPdz4yKn4JaRW6+/g0qTtcEWY2uLYN30ZeQaO wEtujvI9lkRt7FKlGoEw8+RsgIDlxVvOn1CeTA+7dkh0x750Ra0BsfDEjbxvraty/uKL ddalvX3gU4ZpF8TW18+XAhgLvkg99JuyQvkaTxA71pkUE9hqbTwWzWtjjkFVIRwl4QiG Z2ww== X-Gm-Message-State: AOJu0YxiYOfNq+YD8mlzos50n7DxP3wqyOFHowtXymC0Ike1Xm88UohT wT/F4LdT4aQtsY+9h+fDPB/tjnGHjA27uTIxjzxCqx/S5yVFcrDg4svWZnGHBYwfvKZ7N0M3s1L Yfb8/ X-Gm-Gg: ASbGncsWRnbEX6Dq9y7ySCLAuIBqPIw0Fy4Xu0XxPogf+A3bDBjomOhyTL+YEneY4G0 E1xKS7A9plJTmMFmbzl7MRfbazXLZgEy9LChL5PpefRLwyDEaWzsnM2jwP/CQbxuFZC6Va9u3do arU6QYmS3ZxYPvKCU2/HLohS9Uia0FB15vlZuwct0uZvfAoyaMmk9pk+LCpdE5cm6NcRB+IuD70 8fjyVgw2UwP3s19ca4brABmL0xxIr57udqWpg+IrwEQWUdflRRDMiB0HgJgSQfXam8u3RjX6sDV h/OnpyATB5gq+HfGgB2qHtCQTApPvzhqM/WXXE/prabs52Re+agxMEKLcvDIIwFG06pX2YO70cT FFvOU0wwYCUglxHb3MIKCg2EZWGIwwmXTYvMKJL5g7puM/XPSRMlD/kr1o8pdQcbuiW7n X-Google-Smtp-Source: AGHT+IH+Q9C1XpS4cbBUrNuuddIisnUeD8gMNtxRGplXbkIoZXsBEjwQDoZv+BMrrmtBKAJrXYVjRg== X-Received: by 2002:a17:903:3c26:b0:264:ede2:683d with SMTP id d9443c01a7336-27ed4adb732mr60136045ad.56.1758863788431; Thu, 25 Sep 2025 22:16:28 -0700 (PDT) From: Gustavo Romero To: qemu-devel@nongnu.org, alex.bennee@linaro.org, thuth@redhat.com, berrange@redhat.com Cc: qemu-arm@nongnu.org, gustavo.romero@linaro.org, manos.pitsidianakis@linaro.org, peter.maydell@linaro.org Subject: [PATCH v4 8/9] tests/functional: Adapt reverse_debugging to run w/o Avocado Date: Fri, 26 Sep 2025 05:15:41 +0000 Message-Id: <20250926051542.104432-9-gustavo.romero@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250926051542.104432-1-gustavo.romero@linaro.org> References: <20250926051542.104432-1-gustavo.romero@linaro.org> MIME-Version: 1.0 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=2607:f8b0:4864:20::52c; envelope-from=gustavo.romero@linaro.org; helo=mail-pg1-x52c.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1758863916862116600 Content-Type: text/plain; charset="utf-8" This commit removes Avocado as a dependency for running the reverse_debugging test. The main benefit, beyond eliminating an extra dependency, is that there is no longer any need to handle GDB packets manually. This removes the need for ad-hoc functions dealing with endianness and arch-specific register numbers, making the test easier to read. The timeout variable is also removed, since Meson now manages timeouts automatically. reverse_debugging now uses the pygdbmi module to interact with GDB, if it's available in the test environment, otherwise the test is skipped. GDB is detect via the QEMU_TEST_GDB env. variable. This commit also significantly improves the output for the test and now prints all the GDB commands used in sequence. It also adds some clarifications to existing comments, for example, clarifying that once the replay-break is reached, a SIGINT is captured in GDB. reverse_debugging is kept "skipped" for aarch64, ppc64, and x86_64, so won't run unless QEMU_TEST_FLAKY_TESTS=3D1 is set in the test environment, before running 'make check-functional' or 'meson test [...]'. Signed-off-by: Gustavo Romero --- tests/functional/reverse_debugging.py | 127 +++++++++++++------------- 1 file changed, 61 insertions(+), 66 deletions(-) diff --git a/tests/functional/reverse_debugging.py b/tests/functional/rever= se_debugging.py index 7fd8c7607f..4e4200dd48 100644 --- a/tests/functional/reverse_debugging.py +++ b/tests/functional/reverse_debugging.py @@ -1,19 +1,23 @@ -# Reverse debugging test -# # SPDX-License-Identifier: GPL-2.0-or-later # +# Reverse debugging test +# # Copyright (c) 2020 ISP RAS +# Copyright (c) 2025 Linaro Limited # # Author: # Pavel Dovgalyuk +# Gustavo Romero (Run without Avocado) # # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. -import os + import logging +import os +from pygdbmi.constants import GdbTimeoutError from subprocess import check_output =20 -from qemu_test import LinuxKernelTest, get_qemu_img +from qemu_test import LinuxKernelTest, get_qemu_img, GDB, skipIfMissingEnv from qemu_test.ports import Ports =20 =20 @@ -29,9 +33,7 @@ class ReverseDebugging(LinuxKernelTest): that the execution is stopped at the last of them. """ =20 - timeout =3D 10 STEPS =3D 10 - endian_is_le =3D True =20 def run_vm(self, record, shift, args, replay_path, image_path, port): logger =3D logging.getLogger('replay') @@ -53,49 +55,11 @@ def run_vm(self, record, shift, args, replay_path, imag= e_path, port): vm.launch() return vm =20 - @staticmethod - def get_reg_le(g, reg): - res =3D g.cmd(b'p%x' % reg) - num =3D 0 - for i in range(len(res))[-2::-2]: - num =3D 0x100 * num + int(res[i:i + 2], 16) - return num - - @staticmethod - def get_reg_be(g, reg): - res =3D g.cmd(b'p%x' % reg) - return int(res, 16) - - def get_reg(self, g, reg): - # value may be encoded in BE or LE order - if self.endian_is_le: - return self.get_reg_le(g, reg) - else: - return self.get_reg_be(g, reg) - - def get_pc(self, g): - return self.get_reg(g, self.REG_PC) - - def check_pc(self, g, addr): - pc =3D self.get_pc(g) - if pc !=3D addr: - self.fail('Invalid PC (read %x instead of %x)' % (pc, addr)) - - @staticmethod - def gdb_step(g): - g.cmd(b's', b'T05thread:01;') - - @staticmethod - def gdb_bstep(g): - g.cmd(b'bs', b'T05thread:01;') - @staticmethod def vm_get_icount(vm): return vm.qmp('query-replay')['return']['icount'] =20 def reverse_debugging(self, shift=3D7, args=3DNone): - from avocado.utils import gdb - logger =3D logging.getLogger('replay') =20 # create qcow2 for snapshots @@ -124,68 +88,99 @@ def reverse_debugging(self, shift=3D7, args=3DNone): with Ports() as ports: port =3D ports.find_free_port() vm =3D self.run_vm(False, shift, args, replay_path, image_path= , port) - logger.info('connecting to gdbstub') - g =3D gdb.GDBRemote('127.0.0.1', port, False, False) - g.connect() - r =3D g.cmd(b'qSupported') - if b'qXfer:features:read+' in r: - g.cmd(b'qXfer:features:read:target.xml:0,ffb') - if b'ReverseStep+' not in r: + + try: + logger.info('Connecting to gdbstub...') + self.reverse_debugging_run(vm, port, last_icount) + logger.info('Test passed.') + except GdbTimeoutError: + self.fail("Connection to gdbstub timeouted...") + + @skipIfMissingEnv("QEMU_TEST_GDB") + def reverse_debugging_run(self, vm, port, last_icount): + logger =3D logging.getLogger('replay') + + gdb_cmd =3D os.getenv('QEMU_TEST_GDB') + gdb =3D GDB(gdb_cmd) + + gdb.cli("set debug remote 1") + + c =3D gdb.cli(f"target remote localhost:{port}").get_console() + if not f"Remote debugging using localhost:{port}" in c: + self.fail("Could not connect to gdbstub!") + + # Remote debug messages are in 'log' payloads. + r =3D gdb.get_log() + if 'ReverseStep+' not in r: self.fail('Reverse step is not supported by QEMU') - if b'ReverseContinue+' not in r: + if 'ReverseContinue+' not in r: self.fail('Reverse continue is not supported by QEMU') =20 + gdb.cli("set debug remote 0") + logger.info('stepping forward') steps =3D [] # record first instruction addresses for _ in range(self.STEPS): - pc =3D self.get_pc(g) + pc =3D gdb.cli("print $pc").get_addr() logger.info('saving position %x' % pc) steps.append(pc) - self.gdb_step(g) + gdb.cli("stepi") =20 # visit the recorded instruction in reverse order logger.info('stepping backward') for addr in steps[::-1]: - self.gdb_bstep(g) - self.check_pc(g, addr) logger.info('found position %x' % addr) + gdb.cli("reverse-stepi") + pc =3D gdb.cli("print $pc").get_addr() + if pc !=3D addr: + logger.info('Invalid PC (read %x instead of %x)' % (pc, ad= dr)) + self.fail('Reverse stepping failed!') =20 # visit the recorded instruction in forward order logger.info('stepping forward') for addr in steps: - self.check_pc(g, addr) - self.gdb_step(g) logger.info('found position %x' % addr) + pc =3D gdb.cli("print $pc").get_addr() + if pc !=3D addr: + logger.info('Invalid PC (read %x instead of %x)' % (pc, ad= dr)) + self.fail('Forward stepping failed!') + gdb.cli("stepi") =20 # set breakpoints for the instructions just stepped over logger.info('setting breakpoints') for addr in steps: - # hardware breakpoint at addr with len=3D1 - g.cmd(b'Z1,%x,1' % addr, b'OK') + gdb.cli(f"break *{hex(addr)}") =20 # this may hit a breakpoint if first instructions are executed # again logger.info('continuing execution') vm.qmp('replay-break', icount=3Dlast_icount - 1) # continue - will return after pausing - # This could stop at the end and get a T02 return, or by - # re-executing one of the breakpoints and get a T05 return. - g.cmd(b'c') + # This can stop at the end of the replay-break and gdb gets a SIGI= NT, + # or by re-executing one of the breakpoints and gdb stops at a + # breakpoint. + gdb.cli("continue") + + pc =3D gdb.cli("print $pc").get_addr() if self.vm_get_icount(vm) =3D=3D last_icount - 1: logger.info('reached the end (icount %s)' % (last_icount - 1)) else: logger.info('hit a breakpoint again at %x (icount %s)' % - (self.get_pc(g), self.vm_get_icount(vm))) + (pc, self.vm_get_icount(vm))) =20 logger.info('running reverse continue to reach %x' % steps[-1]) # reverse continue - will return after stopping at the breakpoint - g.cmd(b'bc', b'T05thread:01;') + gdb.cli("reverse-continue") =20 # assume that none of the first instructions is executed again # breaking the order of the breakpoints - self.check_pc(g, steps[-1]) + pc =3D gdb.cli("print $pc").get_addr() + if pc !=3D steps[-1]: + self.fail("'reverse-continue' did not hit the first PC in reve= rse order!") + logger.info('successfully reached %x' % steps[-1]) =20 logger.info('exiting gdb and qemu') + gdb.exit() vm.shutdown() --=20 2.34.1 From nobody Sun Sep 28 15:26:55 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=1758864013; cv=none; d=zohomail.com; s=zohoarc; b=TZWZUCs1hPQ/amvvem85zIFniUHk0MBRKp12kx0umYVJLi/B41Qf/oV8WENlZUpvttEteTgfLJJIW4CCk3osPRX6pycNnyQU8y3a9ndqZX72bBzwmoQY5KLuxTf2R4++qfnEHj31ac2YwVsa/s7NszkdDoFTeqdXXEe0Ty65PD4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758864013; h=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=OqHlEJ+jUmeTVk3QBFsrihdSuV3s/WcYtgmO87+cyMw=; b=MpAv630HEf4zqltSEoJFC6KCEWZwttk9AmcG2FM2TgAUrfliPHtv/S10Y0WID7V1Va5oZqU5k5zzD+w+mgMbkEY9Z+HD52cQ1lZDWtkgu5Jo1U9EBt28n4g1h+dBAwbCF8xvEekgCet5jE9quZPnM/SnbRm2a8F0eALeKlkJUkg= 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 1758864013078880.4864778964542; Thu, 25 Sep 2025 22:20:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v20p7-0004rA-7o; Fri, 26 Sep 2025 01:16:49 -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 1v20oz-0004nN-Aj for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:16:42 -0400 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1v20ot-000626-1t for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:16:41 -0400 Received: by mail-pg1-x535.google.com with SMTP id 41be03b00d2f7-b54a74f9150so1585472a12.0 for ; Thu, 25 Sep 2025 22:16:33 -0700 (PDT) Received: from gromero0.. (189-47-45-49.dsl.telesp.net.br. [189.47.45.49]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-27ed672a51fsm42160085ad.63.2025.09.25.22.16.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Sep 2025 22:16:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1758863791; x=1759468591; 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=OqHlEJ+jUmeTVk3QBFsrihdSuV3s/WcYtgmO87+cyMw=; b=n9njWQtGQ+uSw4E0iyv4/l9oWsbKzwPlxBpmqybh1kHI3g+H35lwUfOqsKPMxyJjRE QWTJg+e7qzWhwKAQD5TQE70hV7s0iEtQf8+s4jD14Ag8bgZY6Y+0K81a/lU6ZKwSUcBp rmlrUsFJk9yAC2vV4H4UkApILs+fu+xs81HtLmohVLTX4MlaH0Ea95Dnxszxs+9u2V/C pvrAO+a7iDLcA8YICuOJji9mYGupDyH9CqJhUum+n+1kAHF/RLDtxgrpT1zCkKf/TOva OC2wihivIg0Z5PnD/ELgJruGKvxeomF4Uw5a7ZdIcip0JU1ZgAq+6PN5lShIbBYP0BXs BNDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758863791; x=1759468591; 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=OqHlEJ+jUmeTVk3QBFsrihdSuV3s/WcYtgmO87+cyMw=; b=C26QiB2sul8DmWxrlPsLFuJ9uh9xLmtohUCOkusW3mxSGnvrplZiCNu6et4X6LOtJ3 diwM+0mz+wuKkCrEBHJttNEP/wwQsVGywyqXsfGcGPHUbVSJPFJYxGX/kxMVeM71X9nk 6qMqlfoUAwZ/VUQDHsib35jk0W0ois5sLkwDJn9oRergvQXTv0DAQehC6cLcrqkoxpbH l9iXgUviR9agJahzOmFa7XYhkGjTe/w/VQl2wEbDXvsVdO0kx4+To/G5cGtXPzPDDzr4 2YKTg3+z3YRYAdOP2WbMTVkOGh4ZVFv/pomY3lIhnAn9EvEHTNu0pq+6Vld0OJyxwS0C F0sA== X-Gm-Message-State: AOJu0YxCMg3phRBLqUNyECeIJsqx5gDuQFyiWIgd5AywRDm4t3dq5VLg bAErzNOgbOBBtvvLLyS/0YENsVoVNKyY9bHpeOMXhwbhn6Sxop6/lOYSqyCLJz6rVroA8fQPlWL fJWQC X-Gm-Gg: ASbGncvwvxAyx8SjEa7UaDydfgidaCHCt6nGc+CHM+6lveyzq9Z1ybsGJQirJAQ47ea YiHAlFFHu4M5S46B98HGQbwSmTnLEnWesKzxrWmNhcMMlJ0Vu4Ut3e9/ooh4jdryHA0cKQLkI83 lbXX4kq41lM3HcWtaX6TsJyoh9/T8Eo6FnbpqhnnJKm6/oXsj1sXwVZPypgHY3hr25lAsly/tPG ezbmuZn769L97bZ4BHrcK2z7j/0x8FMfvpMROWAaFPwjj7R1Wev+sWQT9+L+oHhZls63E4fDAYX NDmm+YIEDqUULttfg8HnBvQi2GHyg8ZA1wbE7Rzl+SV2znZh7iHhP1/N4mCmKuGrDBiU1BqeiEm cVOtQ21BIzV1xEmHlB5JNKBpad4mOEl+B7hKUAoPgji0DG09aBaqwzi8JuaANfmXUltce X-Google-Smtp-Source: AGHT+IGzmVsc84Fl2ldR80zJxrie/O1D/yXSLfFIG+5awoeIvIti2ck03SfIC8nF38q4kiUfgvJdrg== X-Received: by 2002:a17:902:da89:b0:267:f7bc:673c with SMTP id d9443c01a7336-27ed4ab0972mr60172605ad.44.1758863791110; Thu, 25 Sep 2025 22:16:31 -0700 (PDT) From: Gustavo Romero To: qemu-devel@nongnu.org, alex.bennee@linaro.org, thuth@redhat.com, berrange@redhat.com Cc: qemu-arm@nongnu.org, gustavo.romero@linaro.org, manos.pitsidianakis@linaro.org, peter.maydell@linaro.org Subject: [PATCH v4 9/9] tests/functional: Adapt arches to reverse_debugging w/o Avocado Date: Fri, 26 Sep 2025 05:15:42 +0000 Message-Id: <20250926051542.104432-10-gustavo.romero@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250926051542.104432-1-gustavo.romero@linaro.org> References: <20250926051542.104432-1-gustavo.romero@linaro.org> MIME-Version: 1.0 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=2607:f8b0:4864:20::535; envelope-from=gustavo.romero@linaro.org; helo=mail-pg1-x535.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: 1758864013741116600 Content-Type: text/plain; charset="utf-8" reverse_debugging no longer depends on Avocado, so remove the import checks for Avocado, the per-arch endianness tweaks, and the per-arch register settings. All of these are now handled in the ReverseDebugging class, automatically. Signed-off-by: Gustavo Romero Reviewed-by: Thomas Huth --- tests/functional/aarch64/test_reverse_debug.py | 9 ++++----- tests/functional/ppc64/test_reverse_debug.py | 11 ++++------- tests/functional/x86_64/test_reverse_debug.py | 13 ++++--------- 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/tests/functional/aarch64/test_reverse_debug.py b/tests/functio= nal/aarch64/test_reverse_debug.py index 8bc91ccfde..36985a4a1d 100755 --- a/tests/functional/aarch64/test_reverse_debug.py +++ b/tests/functional/aarch64/test_reverse_debug.py @@ -2,25 +2,24 @@ # # SPDX-License-Identifier: GPL-2.0-or-later # -# Reverse debugging test +# Reverse debugging test for aarch64 # # Copyright (c) 2020 ISP RAS +# Copyright (c) 2025 Linaro Limited # # Author: # Pavel Dovgalyuk +# Gustavo Romero (Run without Avocado) # # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. =20 -from qemu_test import Asset, skipIfMissingImports, skipFlakyTest +from qemu_test import Asset, skipFlakyTest from reverse_debugging import ReverseDebugging =20 =20 -@skipIfMissingImports('avocado.utils') class ReverseDebugging_AArch64(ReverseDebugging): =20 - REG_PC =3D 32 - ASSET_KERNEL =3D Asset( ('https://archives.fedoraproject.org/pub/archive/fedora/linux/' 'releases/29/Everything/aarch64/os/images/pxeboot/vmlinuz'), diff --git a/tests/functional/ppc64/test_reverse_debug.py b/tests/functiona= l/ppc64/test_reverse_debug.py index 5931adef5a..b32a186a9a 100755 --- a/tests/functional/ppc64/test_reverse_debug.py +++ b/tests/functional/ppc64/test_reverse_debug.py @@ -2,38 +2,35 @@ # # SPDX-License-Identifier: GPL-2.0-or-later # -# Reverse debugging test +# Reverse debugging test for ppc64 # # Copyright (c) 2020 ISP RAS +# Copyright (c) 2025 Linaro Limited # # Author: # Pavel Dovgalyuk +# Gustavo Romero (Run without Avocado) # # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. =20 -from qemu_test import skipIfMissingImports, skipFlakyTest +from qemu_test import skipFlakyTest from reverse_debugging import ReverseDebugging =20 =20 -@skipIfMissingImports('avocado.utils') class ReverseDebugging_ppc64(ReverseDebugging): =20 - REG_PC =3D 0x40 - @skipFlakyTest("https://gitlab.com/qemu-project/qemu/-/issues/1992") def test_ppc64_pseries(self): self.set_machine('pseries') # SLOF branches back to its entry point, which causes this test # to take the 'hit a breakpoint again' path. That's not a problem, # just slightly different than the other machines. - self.endian_is_le =3D False self.reverse_debugging() =20 @skipFlakyTest("https://gitlab.com/qemu-project/qemu/-/issues/1992") def test_ppc64_powernv(self): self.set_machine('powernv') - self.endian_is_le =3D False self.reverse_debugging() =20 =20 diff --git a/tests/functional/x86_64/test_reverse_debug.py b/tests/function= al/x86_64/test_reverse_debug.py index d713e91e14..63d08bbada 100755 --- a/tests/functional/x86_64/test_reverse_debug.py +++ b/tests/functional/x86_64/test_reverse_debug.py @@ -2,29 +2,24 @@ # # SPDX-License-Identifier: GPL-2.0-or-later # -# Reverse debugging test +# Reverse debugging test for x86_64 # # Copyright (c) 2020 ISP RAS +# Copyright (c) 2025 Linaro Limited # # Author: # Pavel Dovgalyuk +# Gustavo Romero (Run without Avocado) # # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. =20 -from qemu_test import skipIfMissingImports, skipFlakyTest +from qemu_test import skipFlakyTest from reverse_debugging import ReverseDebugging =20 =20 -@skipIfMissingImports('avocado.utils') class ReverseDebugging_X86_64(ReverseDebugging): =20 - REG_PC =3D 0x10 - REG_CS =3D 0x12 - def get_pc(self, g): - return self.get_reg_le(g, self.REG_PC) \ - + self.get_reg_le(g, self.REG_CS) * 0x10 - @skipFlakyTest("https://gitlab.com/qemu-project/qemu/-/issues/2922") def test_x86_64_pc(self): self.set_machine('pc') --=20 2.34.1