From patchwork Mon Nov 25 15:20:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885082 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C1449D58D5D for ; Mon, 25 Nov 2024 15:21:49 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFatl-0003vn-Il; Mon, 25 Nov 2024 10:21:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFatj-0003uL-CY for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:11 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFath-0001jo-Hu for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:11 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-43162cf1eaaso57922335e9.0 for ; Mon, 25 Nov 2024 07:21:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548067; x=1733152867; 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=RvK4bKDeVOpZ19QqnWXbDR0Dq2nUudgpqwsRQwj1P8o=; b=i326yPNlZkAnnHQDFCJJo2ix6J+FDhs0AMhphHZaZ/L7sfEuVWKOXWKUtZKLIXPbw/ 6LMzKRVxvoIKXgCDyna0cVZG9o7/1BBKFRW7JDAhDpAKC7gFHPJG2Rf6B34Cz4OrFmfw A3GoJuT9CSJY5n67JBp6k5RYvNjXBnxw0sk0jQNqlIGszEyKm+RyAadPir7PSSVSjBf5 878fnXM2R97hVprmj0LmcWWxphhsr+i58hyWEGbXwI7VUgL8XzqCLFQqrcdhsnJ9kdE+ 5hZwY+iFi/oL/7CrCi5dPMPOLo8ocTE3c5cbh/fWxrWm3HiUXU2truDviemJAu4iyxQL yBfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548067; x=1733152867; 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=RvK4bKDeVOpZ19QqnWXbDR0Dq2nUudgpqwsRQwj1P8o=; b=lsiaIrcH7ITwDDE86wN8e0xe3D7NtYXa7TFQvJ0mc8qycc62owX/dyg44EeCfTBQam soJlvbVhvT/9TOs2iFWa8hPdTaavL1lLKn4h4KdyneQ+El8f3BHYROn1t2wyVQLmszQu 9ztiZPY4hh2Ie7o2eDhUlZGg16eCbHFg/PgkYZkQ8Wx1jFsIhXvWF0uKwV6QxZBRQmFH lllz5g5Z66zyXR0L2xBI6CgH6GO/wYwtRzeBS6EpiPMqqoVSA0AKmAhzBhX7UI2Vq8zY YMyteVCfZUG3Sb1jrUyRGEHK2d0+9fdxA2hlu3mSHam/5gMM8jGO1IUrZFokVUB2Dtfn F6pw== X-Gm-Message-State: AOJu0YzDi0CSud16ORGICsxc6FC0O/10CZUHmkeQeYxVb5H2oOGnZO2t 20r7yr1t9uBba+bPWlZmveIX/8/wyIC4Aak/ZSCjA2/lTdkY5xsTZjEZrGtNsCs= X-Gm-Gg: ASbGncsHGFOzFfR56xYHD4sf6jotk6+JWLzsn2DmHtq1Y6NQEVlsyoPw4KWW5w6/oEG uzn9/pMs1IX5QYt83FWz5IJIlgn4l4gUtsPcfPvh+42GW6YEu02Bm4MW3+qP4M13211Ffswlevl /QVklYKGrMctBZi9N39mBGASA5dzkZmEwSMNQqGedZe1k2W2bVGHsgSv4WMtOTBCKIHlxZdGazG kZu8ei7V0986OsmLSt502c5tqj0lTeW/fqPRpfIohG9gqp7 X-Google-Smtp-Source: AGHT+IHhtr/o/AxUlCIDcMq3Epmjf0JFVpX4ctuvVRGb2YCQb0gqHm+DHZx5+8ejNe1XDz7duOpOkg== X-Received: by 2002:a05:600c:3b12:b0:431:604d:b22 with SMTP id 5b1f17b1804b1-433ce426874mr154669405e9.16.1732548067192; Mon, 25 Nov 2024 07:21:07 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434a14ace5asm21584425e9.9.2024.11.25.07.21.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:21:06 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id DFE6F5F8B7; Mon, 25 Nov 2024 15:21:05 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= , =?utf-8?q?Philippe_Ma?= =?utf-8?q?thieu-Daud=C3=A9?= , Aurelien Jarno , Jiaxun Yang Subject: [PULL 01/28] tests/functional: fix mips64el test to honour workdir Date: Mon, 25 Nov 2024 15:20:38 +0000 Message-Id: <20241125152105.2100395-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Daniel P. Berrangé The missing directory separator resulted in the kernel file being created 1 level higher than expected. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Daniel P. Berrangé Message-Id: <20241121154218.1423005-2-berrange@redhat.com> Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-2-alex.bennee@linaro.org> diff --git a/tests/functional/test_mips64el_malta.py b/tests/functional/test_mips64el_malta.py index 6c6355b131..24ebcdb9c1 100755 --- a/tests/functional/test_mips64el_malta.py +++ b/tests/functional/test_mips64el_malta.py @@ -129,7 +129,7 @@ def do_test_i6400_framebuffer_logo(self, cpu_cores_count): screendump_path = os.path.join(self.workdir, 'screendump.pbm') kernel_path_gz = self.ASSET_KERNEL_4_7_0.fetch() - kernel_path = self.workdir + "vmlinux" + kernel_path = self.workdir + "/vmlinux" gzip_uncompress(kernel_path_gz, kernel_path) tuxlogo_path = self.ASSET_TUXLOGO.fetch() From patchwork Mon Nov 25 15:20:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885107 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BBF60D58D5D for ; Mon, 25 Nov 2024 15:24:10 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFatn-0003ws-Gt; Mon, 25 Nov 2024 10:21:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFatk-0003uy-S7 for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:12 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFath-0001js-Hl for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:12 -0500 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-382433611d0so3891427f8f.3 for ; Mon, 25 Nov 2024 07:21:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548068; x=1733152868; 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=W2LvUWK0oXyNULzh/PoP5B4uyQP6aDypt8ae/Sui1l0=; b=AGqP9kDrBkKHlDLOERGUgRimaUr3FCS7HAQImFWXHgtafd9ICndOdwPkiJF9Rk9sUg hLoi/fRncU1PG0fDhaZqabq3L5Kxgqa0zgRzdPBm7qkydciuk1HSGg8znX/iDMoGa8qH XtuhOY7I5LHxyZZOPYiGPzOMQYIeEujfOwKGtqzTdY1PGQnrIIHUURY820PQxYUBJ48A tqVnQL+WEiVuw28zBQzfCvw/4q6Dgn/vVme97BlMwZCEnVrqrjGP3tmCa11Gs0C552Mw YjrH8JkIGw1l9T9ihJRkM7ivdszVB2hOXa2ZSQdjXjxuO/baoirDe99dD+hiahQtmSHt 4bhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548068; x=1733152868; 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=W2LvUWK0oXyNULzh/PoP5B4uyQP6aDypt8ae/Sui1l0=; b=qM+3TtdHJuN1UwxXLWAr/MKnQv0XEJJMkQlyEwsis6gDsXzzgdSJjTx4HxTcHIuxYq rPzFWf7BqXqCjpTl2558uE0Ovv9uSlhXfN112KLQgesTGSMu7XAp78s2HQ3/k4CP6FYR fdlH+UINkYV9tHVS07TkdA1HrovfVa9/8ZWdHhUqL1B6m8uqZVMsDUv7mTgy2JaQqaoG oglneFLbuLwQlgUOsbsmfJP3NWGAhLlVjPhvM440i5xQBq+4N8cGcvxkl3whJKlZpnGw w0zz0fxGQuMcoYmUD/o0+jdbB4grXcwn6UTB+RsYdpgH2RIQECclqPpVGv5gK4hxnQ8h FbuQ== X-Gm-Message-State: AOJu0YwbfaQ9StmgoI7EKhYamYs74aOzWJqTPdUQddWJ4vjtOCRQ41YZ WWwnfSC0xaZIxEUBEF2rM/uUB8rzGATwfFuartFzejmTI3oZ36YTbhLwfcoSYOg= X-Gm-Gg: ASbGncshmGmA22fc3PRdiYhqNv32Wc4wLlXL8EYB2YX6XZ+om2qzZpratLBbaXKFrig K2pqUpDJ2pfF6mVI0CSmRDRSJaEfFyv/aJ+GIKwpKDa+AO3FsQnxpmSL+tON02UUIde1r9XbfXW ZeMRBxa7r7Tv6xJn5b4VR+H4rs6C5iZVELqtY7DA28LcreilFV3xD2zTwQSnGsWP7teFe5WiSSE CTudsB3mt9/AYBieIV7hQ48flJV84ThMc2i4F8u/4bL/Ge5 X-Google-Smtp-Source: AGHT+IH0j5Dau9BvakrrsFuRV0m2i/pKx8mBp1Xedx6g9OPPxpfNeWmDY2QsLnclKs63as0MYEupVw== X-Received: by 2002:a05:6000:184d:b0:382:465f:336d with SMTP id ffacd0b85a97d-38260b3cabbmr15409059f8f.1.1732548067824; Mon, 25 Nov 2024 07:21:07 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fafe147sm10577475f8f.30.2024.11.25.07.21.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:21:06 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 0303B5F8FE; Mon, 25 Nov 2024 15:21:06 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 02/28] tests/functional: automatically clean up scratch files after tests Date: Mon, 25 Nov 2024 15:20:39 +0000 Message-Id: <20241125152105.2100395-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Daniel P. Berrangé The build/tests/functional subdirectories are consuming huge amounts of disk space. Split the location for scratch files into a 'scratch' sub-directory, separate from log files, and delete it upon completion of each test. The new env variable QEMU_TEST_KEEP_SCRATCH can be set to preserve this scratch dir for debugging access if required. Reviewed-by: Alex Bennée Signed-off-by: Daniel P. Berrangé Message-Id: <20241121154218.1423005-3-berrange@redhat.com> Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-3-alex.bennee@linaro.org> diff --git a/docs/devel/testing/functional.rst b/docs/devel/testing/functional.rst index bf6f1bb81e..6b5d0c5b98 100644 --- a/docs/devel/testing/functional.rst +++ b/docs/devel/testing/functional.rst @@ -65,6 +65,12 @@ to the QEMU binary that should be used for the test, for example:: $ export QEMU_TEST_QEMU_BINARY=$PWD/qemu-system-x86_64 $ python3 ../tests/functional/test_file.py +The test framework will automatically purge any scratch files created during +the tests. If needing to debug a failed test, it is possible to keep these +files around on disk by setting ```QEMU_TEST_KEEP_SCRATCH=1``` as an env +variable. Any preserved files will be deleted the next time the test is run +without this variable set. + Overview -------- diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py index 411978b5ef..b9418e2ac0 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -13,8 +13,9 @@ import logging import os -import subprocess import pycotap +import shutil +import subprocess import sys import unittest import uuid @@ -40,11 +41,12 @@ def setUp(self, bin_prefix): self.assertIsNotNone(self.qemu_bin, 'QEMU_TEST_QEMU_BINARY must be set') self.arch = self.qemu_bin.split('-')[-1] - self.workdir = os.path.join(BUILD_DIR, 'tests/functional', self.arch, - self.id()) + self.outputdir = os.path.join(BUILD_DIR, 'tests', 'functional', + self.arch, self.id()) + self.workdir = os.path.join(self.outputdir, 'scratch') os.makedirs(self.workdir, exist_ok=True) - self.logdir = self.workdir + self.logdir = self.outputdir self.log_filename = os.path.join(self.logdir, 'base.log') self.log = logging.getLogger('qemu-test') self.log.setLevel(logging.DEBUG) @@ -56,6 +58,8 @@ def setUp(self, bin_prefix): self.log.addHandler(self._log_fh) def tearDown(self): + if "QEMU_TEST_KEEP_SCRATCH" not in os.environ: + shutil.rmtree(self.workdir) self.log.removeHandler(self._log_fh) def main(): @@ -108,7 +112,7 @@ def setUp(self): console_log = logging.getLogger('console') console_log.setLevel(logging.DEBUG) - self.console_log_name = os.path.join(self.workdir, 'console.log') + self.console_log_name = os.path.join(self.logdir, 'console.log') self._console_log_fh = logging.FileHandler(self.console_log_name, mode='w') self._console_log_fh.setLevel(logging.DEBUG) From patchwork Mon Nov 25 15:20:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885093 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A1A73D58D5F for ; Mon, 25 Nov 2024 15:23:36 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFatm-0003wC-D6; Mon, 25 Nov 2024 10:21:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFatk-0003uw-MF for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:12 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFati-0001k6-DD for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:12 -0500 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-38230ed9baeso3240002f8f.1 for ; Mon, 25 Nov 2024 07:21:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548069; x=1733152869; 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=9xy5oFlaPkvPwNoncoXfXZpBDbwAIbVa+1JyITx0C4k=; b=ByjD9kDkc+WptvGbsHiLjioU9Jc39KEfzgWT9nTZlWj2DsbChB2LWbReXyRY9e5NMM yl6XQYIlZ0OpMqYeYwSXQNrEBlhSOION4aoxRV1PwcApSdixGHL7vh0Vhx5SN27yN1XO 2scVoa4vYr8ual4Pjpq4PlM5WVobQyYgChTxRKeJNStAkyksOxjA6wl10+3ocumxQYrI 9PrcmcR9AGoPacSZE4vLq9UJWO2YS8ooBTCJVv5JeBQe0+4mT7U17X60VOsSGXI66sza O+cY/1yl3aV7cpP/kpSeG4I2+r9R1mJusjzX7RSCZ/1onefhZ8R8M7EVQCULaQyaFSV5 Hqkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548069; x=1733152869; 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=9xy5oFlaPkvPwNoncoXfXZpBDbwAIbVa+1JyITx0C4k=; b=nNaC8RgXg5n48XN+WsVO5Kl+9MYqcuhnMrm9tFtt5MYd1SFJKEizHjk2kosqoQt49f 3o2yHgh2Mteehpt+bdr27qprz2wfY8xF0DXhcjMxoL9KrbBhY+9ABre7G7Aro+ow1Mtt WBL9LUQWNw+lyrkn56E9WoQThdjRhe1+yRSu2ikI6JiIY0BmTVRXiRsxHffFjaR01jR6 ezPuDm6s4sTOB9ARsRR69Gekz4g/XrAew2R84pB+JTxxhV12KGSWKeqbgtfsd1W2PBhs DP/8giu0G0Jar/v3EGyHL44Ptl1OaBGJWKyPdnWqfGIkzDgTOYLv3ngYymVHpri9ea1W AgQA== X-Gm-Message-State: AOJu0Yw1bND/nvXq6D4jlYMGdlSVjFa4q0UCvK0CrRKfEiBWHQoRgbRz n4JoAIYkolXMK66Jwy1pcuqNyYvhJyJQOgClJ2GkjazM6UjN9Xcu6j8ofR8IiBc= X-Gm-Gg: ASbGnctd97YzmMpKTRdiM1nL+mjRk+A0XDRbUV3g7elFhq3vkEj1acrSR3R0SU7Va/x lZPOnKasaJC14CzWNig6JcGEUhneG7XvNNLDfgvLIhJwEQnCT4ZqT0JFjduLkhnNrA0pooSZqQS CeVAdvE/P8By5OraVBhTh681rXA4ICMf9JRP5L0Od4sIAd89+V/nsBtzNumViO38baK855b16aO jBy3N2+8Gp9ctclF/kB5xyhZJimoe37a+8qZgW0qRD5GLlG X-Google-Smtp-Source: AGHT+IHacDaIj7+VpoFydEtb1tf7Wc/5Eih4ujK9ZBPJ7SblUc9lE6fWQy2hCkplz46031oP2jqXtg== X-Received: by 2002:a05:6000:1f8c:b0:382:5492:466c with SMTP id ffacd0b85a97d-38260bcd0fcmr11147644f8f.45.1732548068984; Mon, 25 Nov 2024 07:21:08 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fad6441sm10919004f8f.4.2024.11.25.07.21.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:21:06 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 187F65F93E; Mon, 25 Nov 2024 15:21:06 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= , =?utf-8?q?Philippe_Ma?= =?utf-8?q?thieu-Daud=C3=A9?= , Aurelien Jarno Subject: [PULL 03/28] tests/functional: remove "AVOCADO" from env variable name Date: Mon, 25 Nov 2024 15:20:40 +0000 Message-Id: <20241125152105.2100395-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Daniel P. Berrangé This env variable is a debugging flag to save screendumps in the mips64el malta tests. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Daniel P. Berrangé Message-Id: <20241121154218.1423005-4-berrange@redhat.com> Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-4-alex.bennee@linaro.org> diff --git a/tests/functional/test_mips64el_malta.py b/tests/functional/test_mips64el_malta.py index 24ebcdb9c1..6d1195d362 100755 --- a/tests/functional/test_mips64el_malta.py +++ b/tests/functional/test_mips64el_malta.py @@ -159,7 +159,7 @@ def do_test_i6400_framebuffer_logo(self, cpu_cores_count): loc = np.where(result >= match_threshold) tuxlogo_count = 0 h, w = tuxlogo_bgr.shape[:2] - debug_png = os.getenv('AVOCADO_CV2_SCREENDUMP_PNG_PATH') + debug_png = os.getenv('QEMU_TEST_CV2_SCREENDUMP_PNG_PATH') for tuxlogo_count, pt in enumerate(zip(*loc[::-1]), start=1): logger.debug('found Tux at position (x, y) = %s', pt) cv2.rectangle(screendump_bgr, pt, From patchwork Mon Nov 25 15:20:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885081 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 60A31D58D5A for ; Mon, 25 Nov 2024 15:21:49 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFatp-0003xf-0D; Mon, 25 Nov 2024 10:21:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFatl-0003vE-7A for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:13 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFatj-0001kB-8j for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:12 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-3823194a879so3288407f8f.0 for ; Mon, 25 Nov 2024 07:21:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548069; x=1733152869; 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=aTG3Y5tKOEfi9fqNN9BGVUN5gFj9NcGy0+qiUrm1Pjg=; b=q5LaW0QJjlBTsaq4DnQYc2Ly1AMyOkONxbjPVG5qXA+D88QtcyLy7mF9Zi7Zlg/pUz ZB0t3zL1bMUEg8tVhbNg/DFfbeVMwaWyMx543AephCgZnieKRirrqIaRKAVp8AgbAE+N 1GnL0mZ3Vkf/sUOaQcjlmkhQFzHSQdcrDyiwrh4bYf2FwQBzwrXJRWLCNHkSgzeFwsZa nG1+2h57LuH13DlHjGJi9YzbCdLu2xnDxylTkACnS9wsTNqIea66DoztMW+HtV3yrsQl 6CVG0HtCRnCMIlywxtmTpqjIZi6AicoejBeGjtUZZpG6iOTJtL8eIiOe6M1x4vMoSGts ppEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548069; x=1733152869; 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=aTG3Y5tKOEfi9fqNN9BGVUN5gFj9NcGy0+qiUrm1Pjg=; b=ZAa6L0FLMS8COfg45t2mGC59IgG/nk2Vdi7Ah9ifStxIlEUFxTQfOyDZTrBsf2BP/H +JCDBSvD1HtekqF7wCDnZN9WlD2rRFfeeDPc97BYZhRpyqtnddnVkjaWRX2vYp2QXnzw cBcDmuUUJvQFf5UR5S/bAieqaZ/8473iCZnywmrlir1zboFyBpZUb+UsIRVmGDxAcCsZ T1CirSsqn9BeWZ6HSNGYvB5KBq5hcRxtpGiEM8gpCc636LuZzdQmYnlc2WQEFEljKubd MkUKO7sezj2/XVC4NSqSC9LEcKIs12Q4eYQ9Ml7b0GJXvlKi15KkVxvIrysoXphHHc4x EZZA== X-Gm-Message-State: AOJu0YwDy+H9bSC0wZCZYifSt1ZW6MzvqViy2ayOpg/emM8p8h8zWdCw Y0yrX5bnCK4wBOYNPB/oKYVYnFYpMZJJUV2R5Oy7ZQl9dVX8j6wvY2xXIb5R0yE= X-Gm-Gg: ASbGncvxzSjjdpnaFjLiu/nrsxIcMvaAb417zG8SxBYAePz117xEwa6a+nOPm5+WrT0 FJSOpeIinutKTIfHlP2cr2zX3WGIhpKXNUhI5Au0slwvfQmDmbOcnDwda0NjIfV8c1NuHtRn1qR c7n/5gID4dFujU6mkWswfBz0TwYm4HPoFAUVbg6sVIpqt2Pw4i1mjsln585QIXFHAPd9PYk2B20 bhiGat8S7K4sMbq5EO8XRVkXXj5Ex4pXbdekvHqHFVgQyfQ X-Google-Smtp-Source: AGHT+IEsMhhF6mUF1FELVG2Yg4OyrfcQOYTEGn2JoZ6kGCoZh5jWW/Zz78iFPsye7sWkPV/dIURRCg== X-Received: by 2002:a05:6000:400b:b0:382:4f70:10cf with SMTP id ffacd0b85a97d-38260b6213cmr11679493f8f.20.1732548069467; Mon, 25 Nov 2024 07:21:09 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fb2685csm10901782f8f.46.2024.11.25.07.21.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:21:06 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2DF985F94A; Mon, 25 Nov 2024 15:21:06 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= , Thomas Huth Subject: [PULL 04/28] tests/functional: remove todo wrt avocado.utils.wait_for Date: Mon, 25 Nov 2024 15:20:41 +0000 Message-Id: <20241125152105.2100395-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Daniel P. Berrangé We're not using avocado anymore, so while the TODO item is still relevant, suggesting use of avocado.utils is not. Reviewed-by: Alex Bennée Signed-off-by: Daniel P. Berrangé Message-Id: <20241121154218.1423005-5-berrange@redhat.com> Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-5-alex.bennee@linaro.org> diff --git a/tests/functional/test_m68k_nextcube.py b/tests/functional/test_m68k_nextcube.py index 89385a134a..0124622c40 100755 --- a/tests/functional/test_m68k_nextcube.py +++ b/tests/functional/test_m68k_nextcube.py @@ -37,8 +37,7 @@ def check_bootrom_framebuffer(self, screenshot_path): self.vm.launch() self.log.info('VM launched, waiting for display') - # TODO: Use avocado.utils.wait.wait_for to catch the - # 'displaysurface_create 1120x832' trace-event. + # TODO: wait for the 'displaysurface_create 1120x832' trace-event. time.sleep(2) self.vm.cmd('human-monitor-command', From patchwork Mon Nov 25 15:20:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885094 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 50AD1D58D5A for ; Mon, 25 Nov 2024 15:23:47 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFatq-0003z1-Kf; Mon, 25 Nov 2024 10:21:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFatm-0003wP-T5 for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:15 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFatk-0001kp-Ut for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:14 -0500 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-382296631f1so3628411f8f.3 for ; Mon, 25 Nov 2024 07:21:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548071; x=1733152871; 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=HJTcMOGu4Rz/KLNl0XK5myUSFbP+D68peueJmqGiUuo=; b=SHswGY7HXNJvoyF8XT8+OMqVti3FLWifOfuvH3+U2DKA+otEG3RAdPBY/X8AMA0ZbW Fdf1pxHB0I9g7rxvqErMkmHxbNMokNqf0h0bgLWfZwKyO1OWStmQH8yjtlOE8ko4eIgc TrNJKntR4QrqqBcAbEN3cnp43bmEL66o5NBd/GX2ZHX4yO+F3aEMMxAwOgkchPhaudQ2 5DtYmqj7TkOCVDTOCMv7tNu4APwCGn91+YaCakEhTKcMhmywSFaLO3TiCfwRjpaPDQN0 V8JdgXotTjyriWXhL8/mQrH+J5Tu9YXYSelQsx6wrXVgVUxYaAZEZJouAflYdcXfPZKN SJ/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548071; x=1733152871; 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=HJTcMOGu4Rz/KLNl0XK5myUSFbP+D68peueJmqGiUuo=; b=j8G61eC29oEQwwzaCTKekXGlQ6/3MoqH8n0WkasQEAWqxxJbb/Ub0ZrMlEQ7ffaZbG eNx6uHK9NB+Swc2kw6Az/zUKTHa6D0wuU55T0hk85Vm0FGcbLqWOQwXSGDM7ww2Luxgl DcL9jliL9ru6Sm2CjczQvlk4fnIVzCSJ7jjq0WMYGBLcVC7JUpO2sSFeQEhosSBMXrIO N5DUHPV0h01mcNSCN+fWMUfTLMEur7QrfZjm6fpOVFquRXd06Dnkg1XgTMa6iIrNhGVp kOMZiRlkMM6BdDnWoBYqbm4CXnS+QVhOxMHtR6C38wmioPBtC1iTzyOtaH43mltjiBEv elUw== X-Gm-Message-State: AOJu0YwE0nVYYgquDTIMF9lcrbSpSKiSjKWK69UbKGVzAJ0Svg27m0na hqkOhaVcmBQH4XWbeqfUhPxpBFBP6gw7xf2kDDTxOLj0Am5Izicz5SIH3Dhz7NE= X-Gm-Gg: ASbGncvfvhfF3Etlqwgaq29Z2dby3Qg5Nw6DNmdWnNKQtdANlC8n8Xi30TK1zaKUM3v hgtr/MHheszRainyn8/ca7snzeqwRVxBWNGUZo08kpZHTkzY2vcYaIsDk7nDB3vhrV2a1lFrdUO /et2YrHZrsy4MDzH9bteJPvTpdmnABh9Vu9WGNsFOMhfz8D75cDWm6tVtgfDrBL1+Svde6/XTUq bqTzHzoz9Bzxk0Uy/bJS+qk+4gZ0PTcM51XjAmlSPb8v8K/ X-Google-Smtp-Source: AGHT+IFaHD1Sl380Xi6m5E2Lh2VGcI3OhSOLec5XSmhUeuNWTKYD0Z6LTbP8bGv7aqaMPH5pmwvsdg== X-Received: by 2002:a5d:6da7:0:b0:382:450c:2628 with SMTP id ffacd0b85a97d-38260bcac4fmr12246813f8f.44.1732548071468; Mon, 25 Nov 2024 07:21:11 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbedebfsm10679155f8f.100.2024.11.25.07.21.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:21:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 43C725F9CF; Mon, 25 Nov 2024 15:21:06 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= , Niek Linnenbank , qemu-arm@nongnu.org (open list:Allwinner-h3) Subject: [PULL 05/28] tests/functional: remove leftover :avocado: tags Date: Mon, 25 Nov 2024 15:20:42 +0000 Message-Id: <20241125152105.2100395-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Daniel P. Berrangé These tags are not honoured under the new functional test harness. Reviewed-by: Alex Bennée Signed-off-by: Daniel P. Berrangé Message-Id: <20241121154218.1423005-6-berrange@redhat.com> Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-6-alex.bennee@linaro.org> diff --git a/tests/functional/test_arm_bpim2u.py b/tests/functional/test_arm_bpim2u.py index 2f9fa145e3..35ea58d46c 100755 --- a/tests/functional/test_arm_bpim2u.py +++ b/tests/functional/test_arm_bpim2u.py @@ -37,11 +37,6 @@ class BananaPiMachine(LinuxKernelTest): '5b41b4e11423e562c6011640f9a7cd3bdd0a3d42b83430f7caa70a432e6cd82c') def test_arm_bpim2u(self): - """ - :avocado: tags=arch:arm - :avocado: tags=machine:bpim2u - :avocado: tags=accel:tcg - """ self.set_machine('bpim2u') deb_path = self.ASSET_DEB.fetch() kernel_path = self.extract_from_deb(deb_path, @@ -64,11 +59,6 @@ def test_arm_bpim2u(self): os.remove(dtb_path) def test_arm_bpim2u_initrd(self): - """ - :avocado: tags=arch:arm - :avocado: tags=accel:tcg - :avocado: tags=machine:bpim2u - """ self.set_machine('bpim2u') deb_path = self.ASSET_DEB.fetch() kernel_path = self.extract_from_deb(deb_path, @@ -105,11 +95,6 @@ def test_arm_bpim2u_initrd(self): os.remove(initrd_path) def test_arm_bpim2u_gmac(self): - """ - :avocado: tags=arch:arm - :avocado: tags=machine:bpim2u - :avocado: tags=device:sd - """ self.set_machine('bpim2u') self.require_netdev('user') @@ -160,11 +145,6 @@ def test_arm_bpim2u_gmac(self): @skipUnless(os.getenv('QEMU_TEST_ALLOW_LARGE_STORAGE'), 'storage limited') def test_arm_bpim2u_openwrt_22_03_3(self): - """ - :avocado: tags=arch:arm - :avocado: tags=machine:bpim2u - :avocado: tags=device:sd - """ self.set_machine('bpim2u') # This test download a 8.9 MiB compressed image and expand it # to 127 MiB. diff --git a/tests/functional/test_arm_orangepi.py b/tests/functional/test_arm_orangepi.py index d2ed5fcc82..6d57223a03 100755 --- a/tests/functional/test_arm_orangepi.py +++ b/tests/functional/test_arm_orangepi.py @@ -49,11 +49,6 @@ class BananaPiMachine(LinuxKernelTest): '20d3e07dc057e15c12452620e90ecab2047f0f7940d9cba8182ebc795927177f') def test_arm_orangepi(self): - """ - :avocado: tags=arch:arm - :avocado: tags=machine:orangepi-pc - :avocado: tags=accel:tcg - """ self.set_machine('orangepi-pc') deb_path = self.ASSET_DEB.fetch() kernel_path = self.extract_from_deb(deb_path, @@ -75,11 +70,6 @@ def test_arm_orangepi(self): os.remove(dtb_path) def test_arm_orangepi_initrd(self): - """ - :avocado: tags=arch:arm - :avocado: tags=accel:tcg - :avocado: tags=machine:orangepi-pc - """ self.set_machine('orangepi-pc') deb_path = self.ASSET_DEB.fetch() kernel_path = self.extract_from_deb(deb_path, @@ -115,12 +105,6 @@ def test_arm_orangepi_initrd(self): os.remove(initrd_path) def test_arm_orangepi_sd(self): - """ - :avocado: tags=arch:arm - :avocado: tags=accel:tcg - :avocado: tags=machine:orangepi-pc - :avocado: tags=device:sd - """ self.set_machine('orangepi-pc') self.require_netdev('user') deb_path = self.ASSET_DEB.fetch() @@ -167,11 +151,6 @@ def test_arm_orangepi_sd(self): @skipUnless(os.getenv('QEMU_TEST_ALLOW_LARGE_STORAGE'), 'storage limited') def test_arm_orangepi_armbian(self): - """ - :avocado: tags=arch:arm - :avocado: tags=machine:orangepi-pc - :avocado: tags=device:sd - """ self.set_machine('orangepi-pc') # This test download a 275 MiB compressed image and expand it # to 1036 MiB, but the underlying filesystem is 1552 MiB... @@ -208,12 +187,6 @@ def test_arm_orangepi_armbian(self): @skipUnless(os.getenv('QEMU_TEST_ALLOW_LARGE_STORAGE'), 'storage limited') def test_arm_orangepi_uboot_netbsd9(self): - """ - :avocado: tags=arch:arm - :avocado: tags=machine:orangepi-pc - :avocado: tags=device:sd - :avocado: tags=os:netbsd - """ self.set_machine('orangepi-pc') # This test download a 304MB compressed image and expand it to 2GB deb_path = self.ASSET_UBOOT.fetch() From patchwork Mon Nov 25 15:20:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885092 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0F44CD58D5A for ; Mon, 25 Nov 2024 15:23:36 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFats-00040o-F3; Mon, 25 Nov 2024 10:21:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFatl-0003vj-Fx for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:13 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFatj-0001kH-Mn for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:13 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-434a2f3bae4so3214875e9.3 for ; Mon, 25 Nov 2024 07:21:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548070; x=1733152870; 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=aC/VsGSzvY9jjiY0UK+gHwAgON+jU91JMadHvfV8yi4=; b=Hr8rdluRTnx1CnVR50ZV8A/xvZPrDwH4LEh9pQSyTKJziNgq4uFAp5zoRtR6H1gjCV 7ZsSmkADmTAGDkdka406w6xmS6M0mWU9eTjJ2L4VtthHEHAHYltR1kHHL/MKpNVAWTbu owpfH9jMEzryV77/ld3CzT8h7S8CucqXY93mUP1VC9w51EWGPENzxehFs5MLEItn6utC UJb89stJLaV97NE4ocNM07BWFKmIy01aiXNBp3PCIV6RRDEsIFrQUu5igOoqk2ol3iaY zjbZG8LRdsEB5RuDxr4d5EnEvOjlNOn5s+ZTtdWhJKGTFivPipBNiR9uuPBnKZyTwmSV Msiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548070; x=1733152870; 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=aC/VsGSzvY9jjiY0UK+gHwAgON+jU91JMadHvfV8yi4=; b=A4LjNo+Ird6IwYHWy1aQ2fhgrzLf8E6N6B+kdlxfag0qulMS4FuNOnJ805nxAEh7p0 M/d01JIGci53bVL3+1Kktw9rfY0cVf4CVApkyA6lOcTmmg3xZ0g9ItLO4332nJsAoa3n Wfhzwsw1xeejLEOqZsaxrKvpGkCv3JYPOldRhMg21AiwQNRk3BPESj3BxpHgPXqKDUTx TX03jvnfPkn9D/zgaKgQpMMyi4k+SLqj10v7mVfNgzeLhV8FaJXqe1z3agMUe90of4Bt MhJLUsz+cYQ+YsS5ecB8NABwquHgCbNke9quiFQEXFmMh8GelaLWlqGqu/S1emn4i0Vn rh1A== X-Gm-Message-State: AOJu0YwNIifxkDbkuDCIUi9eD+YUqLP/CJrhuAPTkD7544SLK1axN91z +fbWnsx9Wn5INJMHbccFHfsSDJnqOpD6/6QfN7+DxX1zU2NgSb3QpLn9cCw8skw= X-Gm-Gg: ASbGncvAPH/4c1S/HuhkY7eYU4H65Vm6A+tkv15gKP/v85fLLmzRARZvfyqFqMektDP ntZE1xlQV7DvxSV7b9EgHfI0KwUnV7059vhnlBBqyRWMJuR/31PJEPgzM0Qm73XQ52GPxZapMMF 0RA24qQ6m2NOZN6yDXmzZB24Wmkyp81f5LlUVd79ned8R6UJWC8lmxsB+svfA/rnTXAmLt8uD/T KCHstYSneWQCBpAf2/dl4HG1RqF0VXPKYIQPLUqQLSV6bez X-Google-Smtp-Source: AGHT+IHJrmQ5QF4bYexo9G2WUBUBTr3hQ3zcZQBADafvkAjFeVTdQIqOPckPsgDHClayM9zjrZD8EA== X-Received: by 2002:a05:600c:3514:b0:428:f0c2:ef4a with SMTP id 5b1f17b1804b1-433ce4250dbmr123903565e9.13.1732548070132; Mon, 25 Nov 2024 07:21:10 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-433b45bd7d7sm199298425e9.13.2024.11.25.07.21.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:21:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 5C8435F9D1; Mon, 25 Nov 2024 15:21:06 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 06/28] tests/functional: remove obsolete reference to avocado bug Date: Mon, 25 Nov 2024 15:20:43 +0000 Message-Id: <20241125152105.2100395-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Daniel P. Berrangé Historical bugs in avocado related to zstd support are not relevant to the code now that it uses QEMU's native test harness. Reviewed-by: Alex Bennée Signed-off-by: Daniel P. Berrangé Message-Id: <20241121154218.1423005-7-berrange@redhat.com> Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-7-alex.bennee@linaro.org> diff --git a/tests/functional/qemu_test/tuxruntest.py b/tests/functional/qemu_test/tuxruntest.py index f05aa96ad7..ed2b238c92 100644 --- a/tests/functional/qemu_test/tuxruntest.py +++ b/tests/functional/qemu_test/tuxruntest.py @@ -39,7 +39,6 @@ def setUp(self): super().setUp() # We need zstd for all the tuxrun tests - # See https://github.com/avocado-framework/avocado/issues/5609 (has_zstd, msg) = has_cmd('zstd') if has_zstd is False: self.skipTest(msg) From patchwork Mon Nov 25 15:20:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885108 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 52573D58D5A for ; Mon, 25 Nov 2024 15:24:28 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFatn-0003wb-BK; Mon, 25 Nov 2024 10:21:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFatm-0003vz-1U for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:14 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFatk-0001kO-BD for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:13 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-3822ec43fb0so3565268f8f.3 for ; Mon, 25 Nov 2024 07:21:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548071; x=1733152871; 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=f876UYCjxWzb/D/C1siZ0PBv6QO/F33fPkM03nCnrnI=; b=RfME4+iDg8873elAiS9ekAZZBezu0Pj3WhFHdg3YwbwbSJv4bMYK/EBLFwxo1axsC0 kY403BreLd1yYYAaDnQFPI8T1BEOUwu7YS/jGcN8Xa0jmrdsbKZIjS3HLMa0pOvStT+2 ArmVnBRLIfCEHOXsJrmqj0YbV9uZGW+s3mFXImVl9nVC7gxdTtP/hFaKXCUX/HMcAcTz orNJu/iLEA6L9gXUjrTDUaPEmRS1MSmzJP3Sj/Wh1VeDPWEdJlje/QIevrfBxU4qtENa OgL5WUIF5mUkPsp4EZvj0I0ZxrkU66myEDFRmVlNkUqFC5bMeEv48iRmjbfol6qgz75N 64tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548071; x=1733152871; 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=f876UYCjxWzb/D/C1siZ0PBv6QO/F33fPkM03nCnrnI=; b=TPcx1RA7qvjdwaylENDrE8iCgFwSmCMV9+MTNhKBKye6pD6Fx0VbdpL4zLQ5o4rNS9 mPFa1j1chaxNtxFwOXcVjuPymvzs6HChWbnF1WiWm98qu4NXeHuMC2zeSgDuRGNYv5Wl tcM3Eb2BZjWogNwFAbpkfEL9dKXBlhCPeJ4gIZtY0UD5xnh9famtp6Z8X7cEDYAygMUT PzInLi8BL1EC6E5MWcZXh4N899KXdn0NFD9vvXBmz/TNeLwDh1qE8yn1Jth6NQOsUNo+ ICF24X17D6Xap7wyHhUgnhwKCSSmVm7TZsEIBUWptIuHhn6IQnZq7NcFUJqqS44OFykQ MTqA== X-Gm-Message-State: AOJu0YyCspTuqMbg8LndsH7b9383+ON3gKu7UfAweM3Ja6aCykOdJtPZ mxqParP4Kd+k+ACKukkzqS54tQrMcw6GcRTyz8SWR6ztGFVQjir5zFn7mgysyig= X-Gm-Gg: ASbGncu1gtyNhrJExwN9BXXHrsc98wzMT7WCdtNoQbCWO7YMpLdmkFznxLeGjj92FEW FHl4Pee8UXjMFT3OZs47XJlM6TmN6EdN1pGS8CDXBDt89HE7SKXKp42HlSru2jW+ekqH+1I5g7M pLHdQmITvyaBiWr6sY7maoeydCAP76I8tZM0VFJrY8G61YOGiSaDCXPX7MoswetpPn1TDak2ZBm KFqc2grwyL0FNoQFqGJinZKz4PsT1HzU2GAGcZQ99mENoWt X-Google-Smtp-Source: AGHT+IHrzjhLMuFtWxIyb1jz9gmAKrY6jeiH5/8QQirZjIU/GljGUWoQGSyRcnIqZh6zjAybZQpOyQ== X-Received: by 2002:a05:6000:1845:b0:382:442c:2c54 with SMTP id ffacd0b85a97d-38260b81426mr10539381f8f.28.1732548070683; Mon, 25 Nov 2024 07:21:10 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825faf9be8sm10674878f8f.24.2024.11.25.07.21.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:21:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 73E795F9D9; Mon, 25 Nov 2024 15:21:06 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Pierrick Bouvier , =?utf-8?q?Alex_Benn=C3=A9e?= , Ani Sinha , "Michael S. Tsirkin" Subject: [PULL 07/28] tests/functional: remove comments talking about avocado Date: Mon, 25 Nov 2024 15:20:44 +0000 Message-Id: <20241125152105.2100395-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Daniel P. Berrangé The first comment is still relevant but should talk about our own test harness instead. The second comment adds no value over reading the code and can be removed. Signed-off-by: Daniel P. Berrangé Message-Id: <20241121154218.1423005-8-berrange@redhat.com> Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-8-alex.bennee@linaro.org> diff --git a/tests/functional/test_acpi_bits.py b/tests/functional/test_acpi_bits.py index ee40647d5b..4c192d95cc 100755 --- a/tests/functional/test_acpi_bits.py +++ b/tests/functional/test_acpi_bits.py @@ -196,11 +196,12 @@ def copy_test_scripts(self): for filename in os.listdir(bits_test_dir): if os.path.isfile(os.path.join(bits_test_dir, filename)) and \ filename.endswith('.py2'): - # all test scripts are named with extension .py2 so that - # avocado does not try to load them. These scripts are - # written for python 2.7 not python 3 and hence if avocado - # loaded them, it would complain about python 3 specific - # syntaxes. + # All test scripts are named with extension .py2 so that + # they are not run by accident. + # + # These scripts are intended to run inside the test VM + # and are written for python 2.7 not python 3, hence + # would cause syntax errors if loaded ouside the VM. newfilename = os.path.splitext(filename)[0] + '.py' shutil.copy2(os.path.join(bits_test_dir, filename), os.path.join(target_test_dir, newfilename)) @@ -399,8 +400,6 @@ def test_acpi_smbios_bits(self): # biosbits has been configured to run all the specified test suites # in batch mode and then automatically initiate a vm shutdown. - # Set timeout to BITS_TIMEOUT for SHUTDOWN event from bits VM at par - # with the avocado test timeout. self._vm.event_wait('SHUTDOWN', timeout=BITS_TIMEOUT) self._vm.wait(timeout=None) self.logger.debug("Checking console output ...") From patchwork Mon Nov 25 15:20:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885084 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D291ED58D5A for ; Mon, 25 Nov 2024 15:22:18 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFatu-00042W-T1; Mon, 25 Nov 2024 10:21:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFatq-0003yo-2m for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:18 -0500 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFatn-0001mK-Vv for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:17 -0500 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-539f6e1f756so5123303e87.0 for ; Mon, 25 Nov 2024 07:21:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548074; x=1733152874; 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=XtUaFCn29c62i9cIZ+z0ThKUyrSmt2dDjZxz8gXQfGk=; b=p9CiWip98+ETpnZkqm4TtY81VqY3mU+Wa2LFlQMTMTL3R6/rlNoPmd4Y6zlcRhFS6r QSrHnJLOJG9S5Q0DkP+0BDJR2Eu7TClh4b+aKjoItAHBITEfApN60lCCP55t1eDp0XC6 S9MG3hscT7TNd8HiiR5KcYTpxy1PjZNRW7evfl9oWXjeugo0G9x1z92FgapHLVA4Ecdb MDVnrQEBogYvdVFD0aVdBh0gSHzVD5zFIE88torC/wa9AG0JsAUsmYgpYv82ZH2EIdHU WJQDWY9KLipdvGSrrbid5/9PxIF4G33LbfvoB8NXIj4h6U2urQVSPqNxR6ka5Bv84Vnn fZtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548074; x=1733152874; 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=XtUaFCn29c62i9cIZ+z0ThKUyrSmt2dDjZxz8gXQfGk=; b=vXTpYQ9T2T6mvN6Fpml0k8Qs0smb5eKqnqBRWkpna/KmX2+E2mfrrL62ZuvjV2a3tE dlsyL/ABptCXseTqRABNnZV8GCOvBNaAeWJ1v+CeKj8xDSdMjbRSgmMVLNK8oMNj9Xcg Wn+p2642LBQsxuMoMyNymFGJePAhGt8lG/vj7f9z9Dyujn2uW8KbVw/s0BxxuLgH7aqX sZxYhBEHTZIHUS6s4GPAMJ0yjQ/KaL3fODpy9hQ/EgckbNzDgLVdnGozYichzMolBZEk RNdlrTjcbktOizUstvKqHum8CdFfi6Wm68q5gUzeZyG8/+pVOyim0hX2nzwe2TZWPUMe 9Tyg== X-Gm-Message-State: AOJu0Yzg6aUbPzNtvzB/5iWmuRG9strJLiUxw8M+518dNLeri2PCwiJs pL73LXNM9MuO+zGsjQSTYfEqI9S01blZz5yhTRBw4eeqN4SGs4wP35UTWsnThi8= X-Gm-Gg: ASbGncseKPIjFG/HP+q9gtHmuHH2c73lyYSOdVBqLDK3HoFqG/57GfXpD5+5OSL+Uyt JFtVMNVdbynIEwsfP3H4eQbKMQkQXaAcJc+nPQZFHNmSQ+DMl9CD9yVWRQwlVHyG6zGk4mDgq/W dpWd75lq4+092skREXB1dNWrBCCnYgLZAXcacDs14blm3NrHrDZmhmL9AqQ+/Ez6HnRUEJTuFsr yomYLCb00hUNBzMWjY4NpOKR2ttfiTb5FufU7lHU/xSPMwg X-Google-Smtp-Source: AGHT+IE0JhZ57eXk2itG3IVNhRoCBlICGROZXa6BbWit2NuWEpdirIr4fxa6zlrJ5fPvdC/Sp5Qnlw== X-Received: by 2002:a05:6512:2244:b0:539:f8da:b466 with SMTP id 2adb3069b0e04-53dd35a5108mr5981217e87.11.1732548072557; Mon, 25 Nov 2024 07:21:12 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4349b70aa23sm72513635e9.14.2024.11.25.07.21.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:21:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 8BC945F9EC; Mon, 25 Nov 2024 15:21:06 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= , Ani Sinha , "Michael S. Tsirkin" Subject: [PULL 08/28] tests/functional: honour self.workdir in ACPI bits tests Date: Mon, 25 Nov 2024 15:20:45 +0000 Message-Id: <20241125152105.2100395-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::134; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x134.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Daniel P. Berrangé The ACPI bits test sets up its own private temporary directory into it creates scratch files. This is justified by a suggestion that we need to be able to preserve the scratch files. We have the ability to preserve the scratch dir with our functional harness, so there's no reason to diverge from standard practice in file placement. Reviewed-by: Alex Bennée Signed-off-by: Daniel P. Berrangé Message-Id: <20241121154218.1423005-9-berrange@redhat.com> Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-9-alex.bennee@linaro.org> diff --git a/tests/functional/test_acpi_bits.py b/tests/functional/test_acpi_bits.py index 4c192d95cc..3498b96787 100755 --- a/tests/functional/test_acpi_bits.py +++ b/tests/functional/test_acpi_bits.py @@ -150,7 +150,6 @@ class AcpiBitsTest(QemuBaseTest): #pylint: disable=too-many-instance-attributes def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self._vm = None - self._workDir = None self._baseDir = None self._debugcon_addr = '0x403' @@ -169,7 +168,7 @@ def copy_bits_config(self): config_file = 'bits-cfg.txt' bits_config_dir = os.path.join(self._baseDir, 'acpi-bits', 'bits-config') - target_config_dir = os.path.join(self._workDir, + target_config_dir = os.path.join(self.workdir, 'bits-%d' %self.BITS_INTERNAL_VER, 'boot') self.assertTrue(os.path.exists(bits_config_dir)) @@ -186,7 +185,7 @@ def copy_test_scripts(self): bits_test_dir = os.path.join(self._baseDir, 'acpi-bits', 'bits-tests') - target_test_dir = os.path.join(self._workDir, + target_test_dir = os.path.join(self.workdir, 'bits-%d' %self.BITS_INTERNAL_VER, 'boot', 'python') @@ -225,8 +224,8 @@ def fix_mkrescue(self, mkrescue): the directory where we have extracted our pre-built bits grub tarball. """ - grub_x86_64_mods = os.path.join(self._workDir, 'grub-inst-x86_64-efi') - grub_i386_mods = os.path.join(self._workDir, 'grub-inst') + grub_x86_64_mods = os.path.join(self.workdir, 'grub-inst-x86_64-efi') + grub_i386_mods = os.path.join(self.workdir, 'grub-inst') self.assertTrue(os.path.exists(grub_x86_64_mods)) self.assertTrue(os.path.exists(grub_i386_mods)) @@ -247,11 +246,11 @@ def generate_bits_iso(self): """ Uses grub-mkrescue to generate a fresh bits iso with the python test scripts """ - bits_dir = os.path.join(self._workDir, + bits_dir = os.path.join(self.workdir, 'bits-%d' %self.BITS_INTERNAL_VER) - iso_file = os.path.join(self._workDir, + iso_file = os.path.join(self.workdir, 'bits-%d.iso' %self.BITS_INTERNAL_VER) - mkrescue_script = os.path.join(self._workDir, + mkrescue_script = os.path.join(self.workdir, 'grub-inst-x86_64-efi', 'bin', 'grub-mkrescue') @@ -290,17 +289,7 @@ def setUp(self): # pylint: disable=arguments-differ self._baseDir = Path(__file__).parent - # workdir could also be avocado's own workdir in self.workdir. - # At present, I prefer to maintain my own temporary working - # directory. It gives us more control over the generated bits - # log files and also for debugging, we may chose not to remove - # this working directory so that the logs and iso can be - # inspected manually and archived if needed. - self._workDir = tempfile.mkdtemp(prefix='acpi-bits-', - suffix='.tmp') - self.logger.info('working dir: %s', self._workDir) - - prebuiltDir = os.path.join(self._workDir, 'prebuilt') + prebuiltDir = os.path.join(self.workdir, 'prebuilt') if not os.path.isdir(prebuiltDir): os.mkdir(prebuiltDir, mode=0o775) @@ -321,10 +310,10 @@ def setUp(self): # pylint: disable=arguments-differ # extract the bits software in the temp working directory with zipfile.ZipFile(bits_zip_file, 'r') as zref: - zref.extractall(self._workDir) + zref.extractall(self.workdir) with tarfile.open(grub_tar_file, 'r', encoding='utf-8') as tarball: - tarball.extractall(self._workDir) + tarball.extractall(self.workdir) self.copy_test_scripts() self.copy_bits_config() @@ -334,7 +323,7 @@ def parse_log(self): """parse the log generated by running bits tests and check for failures. """ - debugconf = os.path.join(self._workDir, self._debugcon_log) + debugconf = os.path.join(self.workdir, self._debugcon_log) log = "" with open(debugconf, 'r', encoding='utf-8') as filehandle: log = filehandle.read() @@ -360,25 +349,18 @@ def tearDown(self): """ if self._vm: self.assertFalse(not self._vm.is_running) - if not os.getenv('BITS_DEBUG') and self._workDir: - self.logger.info('removing the work directory %s', self._workDir) - shutil.rmtree(self._workDir) - else: - self.logger.info('not removing the work directory %s ' \ - 'as BITS_DEBUG is ' \ - 'passed in the environment', self._workDir) super().tearDown() def test_acpi_smbios_bits(self): """The main test case implementation.""" - iso_file = os.path.join(self._workDir, + iso_file = os.path.join(self.workdir, 'bits-%d.iso' %self.BITS_INTERNAL_VER) self.assertTrue(os.access(iso_file, os.R_OK)) self._vm = QEMUBitsMachine(binary=self.qemu_bin, - base_temp_dir=self._workDir, + base_temp_dir=self.workdir, debugcon_log=self._debugcon_log, debugcon_addr=self._debugcon_addr) From patchwork Mon Nov 25 15:20:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885086 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 54FC9D58D5A for ; Mon, 25 Nov 2024 15:22:43 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFatr-0003zW-6D; Mon, 25 Nov 2024 10:21:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFatn-0003wf-A6 for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:15 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFatl-0001l0-KU for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:15 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-434a044dce2so11246025e9.2 for ; Mon, 25 Nov 2024 07:21:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548072; x=1733152872; 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=bvsNr4Df8dgQwXoKfq/mRwCgqjZY1WDoGHrJ+i24+B8=; b=CpN5VYVpMAkNkOJeSnv+92281rCzOrJhmZ04sT8jhb5JReIhrdz/2Y1iB2tqc+qn2P PQV+W1p/vYJieLtdz34W/f5NX8RCPNHcG6iEoOZwTAh0MJlhAtGFameoW5tTDpV4f+1c 8NfemN52NV0WHCiGcagwJ9X3pAuIQTQgG+y1Khqe+lujiysvWuv6G1dNWFwW2hzmH8Kc yE9ReGmeeA1mHSUzJZg1JpB/G5klRRNpeycXsiYNlC9vTMy9ntjO3WXcoawrZvTMjd/S BEbWPBkG2xtd3WHQGhqG0GnNs6ypMK8yqePFXDYNL0jKOYblDq1JSd1/MN8Hik6L0b33 WJyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548072; x=1733152872; 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=bvsNr4Df8dgQwXoKfq/mRwCgqjZY1WDoGHrJ+i24+B8=; b=ImbJ0CDMkuH9YWfq7ZLAE/8deOqx+EAIzPwTFCOAnPjRZR6rnSAWGAjAZX7NgnLJf6 mnlV8xWOnai7MHUWAABYgf+9B5pPtVoQRaVLwd0yAavDjfX5Q0USEpTLP+oh9TvHv/9W xshAaRVzw8Az7XuZ2ynDtyAr1BAbloPnX5eGkp4d7v5B5o4X2csaHrWTIU1W8PteZwTK A3rrncEjhAYV2Knct4VAqkp+DqwEv1z5Vpjo8LQy9UQDo3+FIoC5mkmPhVglT7MnUy9A 7pLc45gr9+p7fshI20EbOUFIhigd+KUYyrC+yXUM4y1A0Hqx2lToRdPmr5/+XVXeBgc1 LxNw== X-Gm-Message-State: AOJu0YwZInhmU6TLfuqOGHLHz+27lCpoguOV1hogVEByH2KoddN33+aN MDM8a/mpTQhuwzJJ3KkG4sE9Y42G9vTK81/qK9aTpPtnoWs59knDM6dzR/2OeCE= X-Gm-Gg: ASbGnctmhouS0Z8bxfvR3jKByS1c/OmwVFUNzvkmELU+P+ZJGQGhn1S3Ld90LQslYPu SN7vS3d35763Ul6q/MQtpaZgb6TUBGSkTq2IijLL0auiBI0nhaN2k1im4wOBNiXlWGjG/fPqPd2 fh3KPebordCBcFDE+MDRtltBGnADapDEYahHoH9n7iYp6Sxfn/ciZJmJuLU6KPpXW/p/CTk29ee +KH7UZOJQTcaJnNjkCdq5qcf/v7M1yJsoKzpSUC6DM9R2zk X-Google-Smtp-Source: AGHT+IGKvs9ll3CoQ/vZrykuDJxyKcih2CGOIVVcEAjwijNtGNnjfcp1Dn7NIbeNIbH4JEQJA7aV3Q== X-Received: by 2002:a05:600c:28c:b0:434:9f88:a751 with SMTP id 5b1f17b1804b1-4349f88a8f1mr37445915e9.20.1732548071883; Mon, 25 Nov 2024 07:21:11 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbee043sm10672772f8f.104.2024.11.25.07.21.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:21:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id A1D505F9F7; Mon, 25 Nov 2024 15:21:06 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 09/28] tests/functional: put QEMUMachine logs in testcase log directory Date: Mon, 25 Nov 2024 15:20:46 +0000 Message-Id: <20241125152105.2100395-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Daniel P. Berrangé We are not passing the 'log_dir' parameter to QEMUMachine, so the QEMU stdout/err logs are being placed in a temp directory and thus deleted after execution. This makes them inaccessible as gitlab CI artifacts. Pass the testcase log directory path into QEMUMachine to make the logs persistent. Reviewed-by: Alex Bennée Signed-off-by: Daniel P. Berrangé Message-Id: <20241121154218.1423005-10-berrange@redhat.com> Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-10-alex.bennee@linaro.org> diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py index b9418e2ac0..ca13af244b 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -163,10 +163,11 @@ def require_device(self, devicename): self.skipTest('no support for device ' + devicename) def _new_vm(self, name, *args): - vm = QEMUMachine(self.qemu_bin, base_temp_dir=self.workdir) + vm = QEMUMachine(self.qemu_bin, + base_temp_dir=self.workdir, + log_dir=self.logdir) self.log.debug('QEMUMachine "%s" created', name) self.log.debug('QEMUMachine "%s" temp_dir: %s', name, vm.temp_dir) - self.log.debug('QEMUMachine "%s" log_dir: %s', name, vm.log_dir) if args: vm.add_args(*args) return vm From patchwork Mon Nov 25 15:20:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885087 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A97F2D58D5D for ; Mon, 25 Nov 2024 15:22:48 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFatq-0003ys-9O; Mon, 25 Nov 2024 10:21:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFato-0003xK-JV for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:16 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFatn-0001m0-0X for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:16 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4349fd77b33so8490365e9.2 for ; Mon, 25 Nov 2024 07:21:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548073; x=1733152873; 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=0dc+EYqX0ebrk/C4YZBuFVDjzfyMWYqa1VdwvhYwR1Q=; b=RiiupRLJzkFjMBx2cBpFHYaHKwNOYk5S0ObtzuJL3EYWGjNtIVxHhMiTi+Dg6Y98Vt 6wxJy7yKZBL94kaXdYblcRKWwB70MyJUW3TwweWm1lLZHGLVlzPUze5J9aLqUNLHT5D2 eB+EVkQAPlJ3g6ni/OfoCuW3uWIjf3/O3kBf3xLf9fP3VJYNBqqG1Wvk6pYcNjPXqkiF KRNvaYwSZXnQ7yhnxTenq8uw/SvJjsDYM1V8Vbd8BjpWYrXNH48VmvRJgXo4Vqtb7er9 WtMKwkEsGVYyuuTqhwXYYEOhK/dW41iVSNMP+NHLPTltJ8bqjVYPTzdlYnKof49k+a+9 rrDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548073; x=1733152873; 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=0dc+EYqX0ebrk/C4YZBuFVDjzfyMWYqa1VdwvhYwR1Q=; b=FNzsC4FyMDVgwBNKLiwEtR91waG0iSohR/0f9wVOkThukmg9jHjstZZ+k7REyS0l4Z ei+OrdnpJi4poo9vKm+TVcrA07v/E6hXbV5wW3eWSh8jPScLa0XX3C5J5GUhoULm65nO 47a97LZMuCkW1xBwh4SNYn3X9XOuD+ST4fdd30ArJezVg99FbB4+1yvVC/MbAz/faOaO i5/BVojLZ3/KqZ/V6xhxyrdlYX36t8FPqbYYZmUJXXDPZmd8ij3I0gX0+IpVLYMfgfVM hFMytRcs4w9THcvceKh1OJI6XdqrwglfkyMvV1iZrBX6rmjBdKsoVsKy/L1PQUNq9g5i LXQw== X-Gm-Message-State: AOJu0YyjAB1ieCiLoyWD9+ZkIs3jFsRQMb0brNXMUbl/kIfAF2MP/5Tl ozVvk8k17IJ8EB1uPNoQ1Sz4fkwOlt7o3CMBosJoctPiIBwdKXkQloNQOZIsyRg= X-Gm-Gg: ASbGncvkF68OP84MB+kQQuVdeEQByfLWFTI+i3xfHLQJRRlsAgXkzdkSzfwxD15uDiQ KAIWsEpe69zeLdrpydhWTe0YFMPTGigCUpF0szF+o6d5LgHyxwB1oFfLPVcehdq7xvUkyNYNTQb 1e+qyPThHd0OkHVeBg5Mm8sT+2kWmn/4pCgd/D3dGccI0LqtvFeXfkPt5tZ7bt+R89a/6BgpHSc Mu42Lfr2DSZB4TOfXazEmZHgIPXETbIsHpLxMwo/4n4X25b X-Google-Smtp-Source: AGHT+IHWYA1pg6eHg4hP7Wg/i9+GZfgQDFoCNrHl4lrH84vZVCreA3bXaQ9r0F5SicBRS0eulQ+w2g== X-Received: by 2002:a05:600c:3b97:b0:42c:a580:71cf with SMTP id 5b1f17b1804b1-433ce4e7b6amr125896845e9.30.1732548073508; Mon, 25 Nov 2024 07:21:13 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4349c89a113sm67298675e9.21.2024.11.25.07.21.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:21:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id B706E60A96; Mon, 25 Nov 2024 15:21:06 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PULL 10/28] tests/functional: honour requested test VM name in QEMUMachine Date: Mon, 25 Nov 2024 15:20:47 +0000 Message-Id: <20241125152105.2100395-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x336.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Daniel P. Berrangé The functional test case class is going to the trouble of passing around a machine name, but then fails to give this QEMUMachine. As a result, QEMUMachine will create a completely random name. Since log file names match the machine name, this results in log files accumulating over time. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé Message-Id: <20241121154218.1423005-11-berrange@redhat.com> Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-11-alex.bennee@linaro.org> diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py index ca13af244b..f9c9de1166 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -164,6 +164,7 @@ def require_device(self, devicename): def _new_vm(self, name, *args): vm = QEMUMachine(self.qemu_bin, + name=name, base_temp_dir=self.workdir, log_dir=self.logdir) self.log.debug('QEMUMachine "%s" created', name) From patchwork Mon Nov 25 15:20:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885090 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E9608D58D5D for ; Mon, 25 Nov 2024 15:23:09 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFatq-0003zI-Vj; Mon, 25 Nov 2024 10:21:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFato-0003xJ-GR for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:16 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFatm-0001lj-TH for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:16 -0500 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-3824038142aso3011698f8f.2 for ; Mon, 25 Nov 2024 07:21:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548073; x=1733152873; 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=75aAdTQGB89uDYpLUkbXQ/KFedluLHMzOUSJGMjOfUE=; b=kn5/qhN8pJWzefUOE9B3+IyswA0MsfWgGORUJ/BJJiYcYNhdwgPPDEEefJ4yQL5B7q AMZqxk9o5p59UAQ9c2cJSE+t0HhaFzoSH+QfYRI70Wtbo24ptk5AmTXitGW/N3TnNo3H blNRpB0noIYERyJoZ+qVYxgd/H0CUoj+YBpqmfjcVHbeUsSQGKP0xbggDFk2RBRQ4L/X 95sxTb1B5AhxVPO6FxELAFnzPa6gAjb3dhDa3VHBPn5z/HUBLAZXygXRBF2hqLoUtqKc HZp0J5cqb8q6FUxECddqW/AnQIeQob+LuSO31AI1ORM7t7BOuVEvXVWQARJyXhStvDU7 RB+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548073; x=1733152873; 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=75aAdTQGB89uDYpLUkbXQ/KFedluLHMzOUSJGMjOfUE=; b=O/go3Y3RHSaLUndadbYeoZFcYcQyBreY3NLmxofbhyMb3BrzlD1PUUFMxZeadKtMLq J07ZCs08JukphH4HHM5jXONG5ZS7kWMwYD0mvSr2bRg/qNS/VahUDysha4sk9NjZ88Pe dbKkH14j/4HCXN8HGkJCUEJbxvdtpjPBZIP0oQbOKgYrKvS4MooaJAwYqs/6TEHMGabK XkAgqAM5p8ms3cGXOHU3o8/bbVfcC0wBEltLvnKRIpoVWNH2Hf+F3S/Ii9BW4mbh3HYm nSbRr5WiyYR252FSoyEC+xnfzPanfqPv/RSdQTzgSlbVlu3g3G9rne7o3wrVZE0aHNyc ls6w== X-Gm-Message-State: AOJu0Yz0KmZmWoS7IbKQ+WQ7jhzOhVMA11nyFUd//IWRo+F+enI9DbJi kuxTwgrfhHF5xUDFW686tgPrszNIovEdqwmJuRYU7fInMBQBqP+6Hu9XSQEaezI= X-Gm-Gg: ASbGnct1qH98hHF0NjpD9N5VucE7h3kR4Au9kkTZpTLggGjaa/km7cE3cK2So9PtJjt gKtFggEFf2xEmSN5iap45A7uxyxuUTI3sYtTK2TGu57WveUzqOQmMuxRi1mJjguqUKCckEO+v8P kKnIayrD99kT8UiD4HDVnXJrdSuE/8AkHJGpH0ZdyPJ6Q0WPdLhtJImzOpZgzOz2zodqQLJZ18B tWNDzMQq/hRoXYZ2YA85Nz/elz9UFAEr3tIRbFzTgq1PCmw X-Google-Smtp-Source: AGHT+IE7q3edF5KizPAMTnUHFCjhnm4T7xPP5lob2NDTxOFeNh308FMQ2g8W2AXghjZmkK74livIrQ== X-Received: by 2002:a5d:6da7:0:b0:382:4926:98fa with SMTP id ffacd0b85a97d-38260bccdf8mr10429308f8f.40.1732548073107; Mon, 25 Nov 2024 07:21:13 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-433b01e1188sm202319975e9.1.2024.11.25.07.21.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:21:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id CB8C060B5A; Mon, 25 Nov 2024 15:21:06 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PULL 11/28] tests/functional: enable debug logging for QEMUMachine Date: Mon, 25 Nov 2024 15:20:48 +0000 Message-Id: <20241125152105.2100395-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Daniel P. Berrangé Set the 'qemu.machine' logger to 'DEBUG' level, to ensure we see log messages related to the QEMUMachine class. Most importantly this ensures we capture the full QEMU command line args for instances we spawn. Signed-off-by: Daniel P. Berrangé Message-Id: <20241121154218.1423005-12-berrange@redhat.com> Tested-by: Thomas Huth Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Message-Id: <20241121165806.476008-12-alex.bennee@linaro.org> diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py index f9c9de1166..e2a329c3e5 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -57,9 +57,15 @@ def setUp(self, bin_prefix): self._log_fh.setFormatter(fileFormatter) self.log.addHandler(self._log_fh) + # Capture QEMUMachine logging + self.machinelog = logging.getLogger('qemu.machine') + self.machinelog.setLevel(logging.DEBUG) + self.machinelog.addHandler(self._log_fh) + def tearDown(self): if "QEMU_TEST_KEEP_SCRATCH" not in os.environ: shutil.rmtree(self.workdir) + self.machinelog.removeHandler(self._log_fh) self.log.removeHandler(self._log_fh) def main(): From patchwork Mon Nov 25 15:20:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885085 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 33B38D58D5A for ; Mon, 25 Nov 2024 15:22:24 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFatr-0003za-Q8; Mon, 25 Nov 2024 10:21:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFatp-0003y2-Ao for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:17 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFatn-0001mE-PS for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:17 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-43155abaf0bso42349395e9.0 for ; Mon, 25 Nov 2024 07:21:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548074; x=1733152874; 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=u553UREy8BrfaQ1eQJGRMRlQygWldbMBkNQMqilnB1A=; b=QGyxGRbKvP9kS3faklCLMlSS9RBfhaLteMl6xOXYLgtwT7R5yhmKZ+hPL5mCNRRjP4 JFgAVbCdSGsG8gu9c3jwRpaqjIsw2WhqKBkxS2G2UVQR69S5qb+OC0fCMTPKc/v4F5ea mDZFSvVvqnHGqXCI/6PicTLzBT+5SJICpZzuqJURYRaboYAC+qij/AFh3O3LdHppUN8l ZNHuG6URS0I5nro7DPvyhrlAS1HNfGan04sxnQX7ktg7KZiB0ItA6XUCjpxWDR3tWF3f A7jNs3ttxhTpgkgwMVThjfcdW09yzayRdWs+d4tXpqb5xTj64ERHq+GXL+G809dVohjb YskQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548074; x=1733152874; 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=u553UREy8BrfaQ1eQJGRMRlQygWldbMBkNQMqilnB1A=; b=wD3Q+otCe5m5iTUNJrguxVk8IPIvwvAzpUd6ZGchEGtovraqZxDeT4yoZfaodM/UG/ mzFKCdh+ZP5bRGowp5NFfP7VElOwk+DBsMvYHJ8VTtq10qBIF1KRp6ggSn0Lo1rlRbM5 QQeC6gCqK8yoSc0E3w16x+TxRZT2xGlRz7Kb20QTrW6dystZXVdJFlt6mz+IS4r8zptB V1j57DP4+zfkqmZd+aiJyQYgXPtz9Y4zSO1ulz9VGXyywC4590YyqR9sr/JSav8hmmTl 3YX4f2u4F5/jy8ox2ye7fS0h74gXjOktMwgPhu7tEOxmJEXVfr/icQevE2j3VoIPU2O0 ZqGg== X-Gm-Message-State: AOJu0YzmgzSJ7LrxU/BaiOOGx6OpN4M+pMIrY1MDIlWZ5SWFKpr6RxHU LoMe9HKuRjhHISi9eV4bCFBrHN3P6w3BjnG9si9LjvQfRBzi0u+F/oh6HJKG2Ik= X-Gm-Gg: ASbGncukGhqdqGQEpErEMm/YnrcF3r01+5udaF3lbUVRuSMoBU9i/Ae0nSxYmzS95Qh TwNDwe1X1TT9vCTF6fmDwDtiNmiJRiwP3YOutGforh478mQYhaSBeG4GB6p0Qmj9BDdaU+S55AT be/8h1kOs5Isk29Nie31BqBQSAi6kXlSyHV6V1D9TpIpQT0XxCqqfjE0zI/J2HtwXUTdaQRBViC JlKQAT/s8DTidpZWPJmfchawbIarcuulLwgU91DVnlF4Gxb X-Google-Smtp-Source: AGHT+IHqER4S1kj95mLNDBKF6qTdGBXKaSnt35oeHHi3bBEhzR/I2JsZekcbVlZlUHz9GZr12gG27w== X-Received: by 2002:a05:600c:4e91:b0:431:6083:cd38 with SMTP id 5b1f17b1804b1-433ce417b2amr108505855e9.6.1732548074155; Mon, 25 Nov 2024 07:21:14 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fb30590sm10692523f8f.57.2024.11.25.07.21.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:21:10 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id E10DE60B68; Mon, 25 Nov 2024 15:21:06 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PULL 12/28] tests/functional: logs details of console interaction operations Date: Mon, 25 Nov 2024 15:20:49 +0000 Message-Id: <20241125152105.2100395-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Daniel P. Berrangé When functional tests go wrong, it will often be related to the console interaction wait state. By logging the messages that we're looking for, and data we're about to be sending, it'll be easier to diagnose where tests are getting stuck. Signed-off-by: Daniel P. Berrangé Message-Id: <20241121154218.1423005-13-berrange@redhat.com> Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-13-alex.bennee@linaro.org> diff --git a/tests/functional/qemu_test/cmd.py b/tests/functional/qemu_test/cmd.py index cbabb1ceed..98722a9cf6 100644 --- a/tests/functional/qemu_test/cmd.py +++ b/tests/functional/qemu_test/cmd.py @@ -85,6 +85,9 @@ def _console_interaction(test, success_message, failure_message, vm = test.vm console = vm.console_file console_logger = logging.getLogger('console') + test.log.debug( + f"Console interaction: success_msg='{success_message}' " + + f"failure_msg='{failure_message}' send_string='{send_string}'") while True: if send_string: vm.console_socket.sendall(send_string.encode()) From patchwork Mon Nov 25 15:20:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885105 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CB7ADD58D5E for ; Mon, 25 Nov 2024 15:23:54 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFau1-00045N-B9; Mon, 25 Nov 2024 10:21:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFatv-000430-Qq for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:23 -0500 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFatq-0001nM-T4 for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:23 -0500 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-539eb97f26aso5064039e87.2 for ; Mon, 25 Nov 2024 07:21:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548077; x=1733152877; 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=f/9NmZeUsPKrEXQM/VYYoqE8OEZ3mgV8GxzNtjGupA8=; b=eMFpTKkghoEv/F514X7XKCb0t//39jUVOe1J8Rd+qyOHRDE+YSVnR2GsKNFjSKUQVh qn5sdRNY2nsgYrCTbtkT5IwqO1Bjx8JXeHvqi0pHYPee2E/cQY1eblfm9Uwa6zkM94C2 PKExTK/HT+IYQL+I5ahDtbJYTpp00OWwU41WTcoXm5rMajyWkA+QRZjBnIy4vkXlPZl4 GoFPpDC2uEGG//85UjCaPsXQLN2JwdySofeFlBZZYEoEdGaPjjLrN1+237C/UIovXmoB 0+vn5HMxGUC+LoLnzFq5oR1ylJyCv9LNeRBeSCNFmiBLZKh+kL/IDEe/U+F2ysZCN9D+ Nwuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548077; x=1733152877; 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=f/9NmZeUsPKrEXQM/VYYoqE8OEZ3mgV8GxzNtjGupA8=; b=wOvAw07bPh5GHAR5cWLVylaJp5jUScjSSafjYoUezdHJ2z2jeQ7TKa/87xm0xSEHmn uddpHBpwjd+tmAbv2hq/AMj1hNeYcqCOWZp81Okf/KusP0rsaKFOLv9Wa+G6f4poDEGA lLNTHAoc9qAQ8bH/xYaEUTsp4dSP/Bq+ytnS2cnVNpR4INMg7FMO1bp1cOcX3oR+B26B 7RdA+tCbWsX6/hCZRhCUELYjXgHWQQlfTkKQ6UlLylYhg7hsGXdYxtjLuu915Qr42Opm GlLyOBvl4RlBpKDXSRWUgAldv+nrjFLbs3YwwcbRQUT9bFGMkVNYDpfy8K66b21UcyDD acig== X-Gm-Message-State: AOJu0YxJsM+UOzWWdmDEwVIogGTNif/DNuNHixFUZ4J8m15i9o2FvB1/ L8IjL7OKbKn6Hcv+yyJ5DsifQVngtTPEEzSPo8gv0fjfUpHWZB3HuBT5/Hbm6pM= X-Gm-Gg: ASbGncvlzkGA2kZ6D0iT7NuGrbmRnMheg5RkW1jXkRibF6be+rbN8jDKmSwyGckc//t 5UI36vB6BJtz1ZpRDTGFKj/BVUpJFLXJCBgByM4y9RTcoe8TeAXXgEnmpKwEgK1TzXlDsZmO/Xg tjLE3qbxgp/RiQF+D4bsYi0FjyfRp+86WXo6ttM5vBMnjDrWbcG4aKDayhcceaTZZoak3UALGAb OQOgCHJnDB+QVIKnrhMMQIOOWcTjNIbKAnqTboSgi7q9SuZ X-Google-Smtp-Source: AGHT+IFGIPnDG14AlwKZkeVefHwuHxMCWxaAf1S8VdvJWt7eQ0/ZIjrVfSIKGexiNJ7cWPeWSxkG3g== X-Received: by 2002:a05:6512:1303:b0:53d:ab0d:b9f9 with SMTP id 2adb3069b0e04-53dd36aa6a1mr5702270e87.23.1732548075950; Mon, 25 Nov 2024 07:21:15 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4349b70aa23sm72514665e9.14.2024.11.25.07.21.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:21:13 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 00AD260B7D; Mon, 25 Nov 2024 15:21:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PULL 13/28] tests/functional: don't try to wait for the empty string Date: Mon, 25 Nov 2024 15:20:50 +0000 Message-Id: <20241125152105.2100395-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12b; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x12b.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Daniel P. Berrangé Telling exec_command_wand_wait_for_pattern to wait for the empty string does not make any conceptual sense, as a check for empty string will always succeed. It makes even less sense when followed by a call to wait_for_console_pattern() with a real match. Signed-off-by: Daniel P. Berrangé Message-Id: <20241121154218.1423005-14-berrange@redhat.com> Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-14-alex.bennee@linaro.org> diff --git a/tests/functional/test_virtio_gpu.py b/tests/functional/test_virtio_gpu.py index 441cbdcf2d..d5027487ac 100755 --- a/tests/functional/test_virtio_gpu.py +++ b/tests/functional/test_virtio_gpu.py @@ -80,9 +80,8 @@ def test_virtio_vga_virgl(self): self.wait_for_console_pattern("as init process") exec_command_and_wait_for_pattern( - self, "/usr/sbin/modprobe virtio_gpu", "" + self, "/usr/sbin/modprobe virtio_gpu", "features: +virgl +edid" ) - self.wait_for_console_pattern("features: +virgl +edid") def test_vhost_user_vga_virgl(self): # FIXME: should check presence of vhost-user-gpu, virgl, memfd etc From patchwork Mon Nov 25 15:20:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885106 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9B32CD58D5A for ; Mon, 25 Nov 2024 15:23:54 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFatw-000432-0E; Mon, 25 Nov 2024 10:21:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFatr-0003zb-Du for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:19 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFatp-0001mz-NK for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:19 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-3822ba3cdbcso2844996f8f.0 for ; Mon, 25 Nov 2024 07:21:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548076; x=1733152876; 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=xTSgqyxDsK0Oo0m3pWRtTEQfgAp9aCc6vBTDVarFPdg=; b=ZbDwWsNvDXx/EO+4d/LZVF2EMpBUvtVfX5k/1/k8jLpXfqOwatKjd81WBGAAkl4RDR LruPgLbtpkHCHdA3bLo8VMZOgOEHd14dtAI6qgm2ad8+7GXcqf8lj+SEzdPBDfRFwR74 Vjoz2PiiufDNnULcqAaD2n3PPnreSy3jHu3Rwu8C6jPxuIq7QR7WBDmjKaW03YFZisXV 8E3mNdVRKWcnzehwgKyVM7c6cDIVv3pWKfS5kZvl9nJwYVTFKkrN5xO93ZcxB1iiqJEs r85O+KFK2lpwT4HzO2/swuw9ahV+XzXSiRze2RaAu4+pgHeFG7nRU5fLNdko0Z5VqKAo gbSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548076; x=1733152876; 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=xTSgqyxDsK0Oo0m3pWRtTEQfgAp9aCc6vBTDVarFPdg=; b=Fl1iKz2rCBXSgdmvOs7x8pUOuXGyMlVYfCPx1La3T3uCT460VDMqaJr0eJCtb6TPAc pIltzfbAQUh+/utrqRsrXCdK12gyD7fcI5dbETyun6PJU6G1PRQgqSiZEa61+LpE9pDI tE0SlNebm2+8AzN6yVCFxOxzuytcRkj/s70ODOzlVnglD6ICysucrwF3C3VAwdBOMz25 HQVkQno4VJwEptw63VzFLjFLuFf5IZ13FmdnxvJIuXkQnp4WxtTJDkGo9m2FvStpoHjl Mn0lKIR7Z1gwUC/U0HefZmiMZVJnEkNPCWajAS2PRLoo+dydkvZL3sHsbuenmVPL8Fd6 MPCQ== X-Gm-Message-State: AOJu0YydMfUXQhuoTU3XOzNQMpm9emZJ/y11etpe+O3BALYYYHqHsAVq yTkZkzpSYlYC2CrvkSg8LvLRrsRMp/UsEGy/779XpB1Xab5sN5YjIO/IJmH6deM= X-Gm-Gg: ASbGncvTmYxqJMp3uaa0QLgOiCrIdXXBttA90bDhiMiLEHOWyROTTONbYRaIsttbQml 96fpJdAr/Qc7x46ySAUiVxkLXcoyQXcnXXb+J0Drszzz/Sdk++2FDdT0MC+K5g0W1yUjpSxE3U7 y3DdeaA/0thqr0hnHghs5fo/s3cNjMmnDUwKQLPvRhtfASdWiNmcA10/hoQ6o3TKHwSxRDKO5P2 lTxi2spIr1sdL5fFyzuZT/8JxmMcCbkUEFmpAXz6SrDxZvL X-Google-Smtp-Source: AGHT+IEG0zIqaOlFy68rp/k6386Hc7lJsMMHijoofJHfFGo5MCvZvb7KVO6F176TIf37mrTGvKIq4Q== X-Received: by 2002:a05:6000:4910:b0:382:50a7:beef with SMTP id ffacd0b85a97d-38260b6cc86mr11938162f8f.24.1732548076243; Mon, 25 Nov 2024 07:21:16 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4349e47f3d1sm51561925e9.17.2024.11.25.07.21.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:21:13 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 17D2560B84; Mon, 25 Nov 2024 15:21:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PULL 14/28] tests/functional: require non-NULL success_message for console wait Date: Mon, 25 Nov 2024 15:20:51 +0000 Message-Id: <20241125152105.2100395-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Daniel P. Berrangé When waiting for expected output, the 'success_message' is a mandatory parameter, with 'failure_message' defaulting to None. The code has logic which indicates it was trying to cope with 'success_message' being None and 'failure_message' being non-None but it does not appear able to actually do anything useful. The check for 'success_message is None' will break out of the loop before any check for 'failure_message' has been performed. IOW, for practcal purposes 'success_message' must be non-None unless 'send_string' is set. Assert this expectation and simplify the loop logic. Signed-off-by: Daniel P. Berrangé Message-Id: <20241121154218.1423005-15-berrange@redhat.com> Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-15-alex.bennee@linaro.org> diff --git a/tests/functional/qemu_test/cmd.py b/tests/functional/qemu_test/cmd.py index 98722a9cf6..f6c4e4dda1 100644 --- a/tests/functional/qemu_test/cmd.py +++ b/tests/functional/qemu_test/cmd.py @@ -81,6 +81,8 @@ def is_readable_executable_file(path): def _console_interaction(test, success_message, failure_message, send_string, keep_sending=False, vm=None): assert not keep_sending or send_string + assert success_message or send_string + if vm is None: vm = test.vm console = vm.console_file @@ -95,7 +97,7 @@ def _console_interaction(test, success_message, failure_message, send_string = None # send only once # Only consume console output if waiting for something - if success_message is None and failure_message is None: + if success_message is None: if send_string is None: break continue @@ -107,7 +109,7 @@ def _console_interaction(test, success_message, failure_message, if not msg: continue console_logger.debug(msg) - if success_message is None or success_message in msg: + if success_message in msg: break if failure_message and failure_message in msg: console.close() @@ -138,6 +140,7 @@ def interrupt_interactive_console_until_pattern(test, success_message, :param interrupt_string: a string to send to the console before trying to read a new line """ + assert success_message _console_interaction(test, success_message, failure_message, interrupt_string, True) @@ -152,6 +155,7 @@ def wait_for_console_pattern(test, success_message, failure_message=None, :param success_message: if this message appears, test succeeds :param failure_message: if this message appears, test fails """ + assert success_message _console_interaction(test, success_message, failure_message, None, vm=vm) def exec_command(test, command): @@ -180,6 +184,7 @@ def exec_command_and_wait_for_pattern(test, command, :param success_message: if this message appears, test succeeds :param failure_message: if this message appears, test fails """ + assert success_message _console_interaction(test, success_message, failure_message, command + '\r') def get_qemu_img(test): From patchwork Mon Nov 25 15:20:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885109 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DF519D58D5D for ; Mon, 25 Nov 2024 15:26:38 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFayt-00071c-Tr; Mon, 25 Nov 2024 10:26:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFaym-0006wn-DY for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:24 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFaye-0002Xr-Vc for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:19 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4314c4cb752so41719895e9.2 for ; Mon, 25 Nov 2024 07:26:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548375; x=1733153175; 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=HimKTyPFtW6rFT9usgI1bgC8yYLBliDU5dFu/UuBzj8=; b=dwBE04r7n8Wj1UDmfrkzJ7X7XEy0N1r++iI9cx1rJ8KpFkeFYIBgteLk6HMEpItRl7 XyxDNECVEI0vUBEZsk6BrS2rUjL5V8nQ1JyY8DKE8Wcv4tynj07QgG6djlZRbuxBh4pU xN33s6d29O5zAQrTjd+4wPeyJbLReYyg6LR43Rh1mAQ+GV00oM6Hk/hByrDWkBOPu3h4 3rN7QRhWAR644kqWe3NazRlDQpw0d0k5HAhNo5cR/ql+K7/xwd8BCWaqBtgTPlzb4tsx qhySA1xJWNXh2fqAC0iRpT0jFhQR7zuhrrdzbfV9lCfVuk1Ob2qQmltjAb/XmBOEw9Hc y18g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548375; x=1733153175; 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=HimKTyPFtW6rFT9usgI1bgC8yYLBliDU5dFu/UuBzj8=; b=IIRx889dQ892DgDHXSWX3+hyrQXFrhCk2LSj917Zale0+/4hQEUSCbDxd8Hn5DlAeG qilr4vfuwUDmb4am4Fqhwrt7Qt8LGKj9oVxN4EGdNipiUQCJw0k2OTqexgjVaF75ZCa/ 1S3Us824ALIaJxx/MuBjhHyapy/srD9HElAx4LmRXmy6i0B2lARZrFVLVaEEt9jaCZ/g +qi7MLgP6imzambOY+iNxlXs0Tb3sd8Rb43OjHVbq2YHpAsaveq5+4xDA4cQPr/0urDn gnPPFJfCLK4NoSzxBst6BBNME17tfGe+xGfL7/8L/hEvmrnnEIo3x5hxT/TXkJmznQkw t/rg== X-Gm-Message-State: AOJu0YySW+FggNIRoaDBPIk5uw8QtaVxQyj252yk4tV/ndyBpXD5INRm FpsQmb+RAL1hFuiW9w6oDSYudTUD7Jn2NYtjJXefYwSv20nScueXFrkU9NZQAQQ= X-Gm-Gg: ASbGncvWUkcKBIbbhhDNeHXPd2e2W1opsB4vyVL+HxA9c5hPznn4rMmoM1IC3yp9AaU r08p7OjGE+IwHokDA0koM+qb/q40v9fJ8wIuNaBXHCpZB2JcQCWTaYcmJj5YByy01R9I7jRHINR qgxk2nGeqKwoK0u7rHX8MLwLnLyIayhT+RF57544GBv2DKXuc4ZZI1EqXsKIea9+o0kwwLMgBaP rVGQtKeyaUCL5hOfbcGivY4yyDfs1lvttg+/6zsFNoEjzgd X-Google-Smtp-Source: AGHT+IFaSFuquoh+olNl6LuqJYp/wuU0mAlZDYGTSBou/oWQIMUMpTJ5+xYftTYYX9p9sF5v9gEpGg== X-Received: by 2002:a05:600c:314b:b0:431:58bc:ad5e with SMTP id 5b1f17b1804b1-433ce4a9d55mr95228775e9.28.1732548375186; Mon, 25 Nov 2024 07:26:15 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbc415asm10880068f8f.75.2024.11.25.07.26.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:26:14 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2E75760B8E; Mon, 25 Nov 2024 15:21:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?C?= =?utf-8?q?=C3=A9dric_Le_Goater?= , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 15/28] tests/functional: rewrite console handling to be bytewise Date: Mon, 25 Nov 2024 15:20:52 +0000 Message-Id: <20241125152105.2100395-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Daniel P. Berrangé The console interaction that waits for predicted strings uses readline(), and thus is only capable of waiting for strings that are followed by a newline. This is inconvenient when needing to match on some things, particularly login prompts, or shell prompts, causing tests to use time.sleep(...) instead, which is unreliable. Switch to reading the console 1 byte at a time, comparing against the success/failure messages until we see a match, regardless of whether a newline is encountered. The success/failure comparisons are done with the python bytes type, rather than strings, to avoid the problem of needing to decode partially received multibyte utf8 characters. Heavily inspired by a patch proposed by Cédric, but written again to work in bytes, rather than strings. Co-developed-by: Cédric Le Goater Signed-off-by: Daniel P. Berrangé Message-Id: <20241121154218.1423005-16-berrange@redhat.com> Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-16-alex.bennee@linaro.org> diff --git a/tests/functional/qemu_test/cmd.py b/tests/functional/qemu_test/cmd.py index f6c4e4dda1..11c8334a7c 100644 --- a/tests/functional/qemu_test/cmd.py +++ b/tests/functional/qemu_test/cmd.py @@ -78,6 +78,54 @@ def run_cmd(args): def is_readable_executable_file(path): return os.path.isfile(path) and os.access(path, os.R_OK | os.X_OK) +# @test: functional test to fail if @failure is seen +# @vm: the VM whose console to process +# @success: a non-None string to look for +# @failure: a string to look for that triggers test failure, or None +# +# Read up to 1 line of text from @vm, looking for @success +# and optionally @failure. +# +# If @success or @failure are seen, immediately return True, +# even if end of line is not yet seen. ie remainder of the +# line is left unread. +# +# If end of line is seen, with neither @success or @failure +# return False +# +# If @failure is seen, then mark @test as failed +def _console_read_line_until_match(test, vm, success, failure): + msg = bytes([]) + done = False + while True: + c = vm.console_socket.recv(1) + if c is None: + done = True + test.fail( + f"EOF in console, expected '{success}'") + break + msg += c + + if success in msg: + done = True + break + if failure and failure in msg: + done = True + vm.console_socket.close() + test.fail( + f"'{failure}' found in console, expected '{success}'") + + if c == b'\n': + break + + console_logger = logging.getLogger('console') + try: + console_logger.debug(msg.decode().strip()) + except: + console_logger.debug(msg) + + return done + def _console_interaction(test, success_message, failure_message, send_string, keep_sending=False, vm=None): assert not keep_sending or send_string @@ -85,11 +133,22 @@ def _console_interaction(test, success_message, failure_message, if vm is None: vm = test.vm - console = vm.console_file - console_logger = logging.getLogger('console') + test.log.debug( f"Console interaction: success_msg='{success_message}' " + f"failure_msg='{failure_message}' send_string='{send_string}'") + + # We'll process console in bytes, to avoid having to + # deal with unicode decode errors from receiving + # partial utf8 byte sequences + success_message_b = None + if success_message is not None: + success_message_b = success_message.encode() + + failure_message_b = None + if failure_message is not None: + failure_message_b = failure_message.encode() + while True: if send_string: vm.console_socket.sendall(send_string.encode()) @@ -102,20 +161,10 @@ def _console_interaction(test, success_message, failure_message, break continue - try: - msg = console.readline().decode().strip() - except UnicodeDecodeError: - msg = None - if not msg: - continue - console_logger.debug(msg) - if success_message in msg: + if _console_read_line_until_match(test, vm, + success_message_b, + failure_message_b): break - if failure_message and failure_message in msg: - console.close() - fail = 'Failure message found in console: "%s". Expected: "%s"' % \ - (failure_message, success_message) - test.fail(fail) def interrupt_interactive_console_until_pattern(test, success_message, failure_message=None, From patchwork Mon Nov 25 15:20:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885080 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 71DE8D58D5E for ; Mon, 25 Nov 2024 15:21:49 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFatw-000435-13; Mon, 25 Nov 2024 10:21:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFatr-0003zX-5R for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:19 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFatp-0001mi-8B for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:18 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-382442b7d9aso3503802f8f.1 for ; Mon, 25 Nov 2024 07:21:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548075; x=1733152875; 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=nUCdTQ7gpHma3kBEA41WeT+vE2SwWkH8lZ6tNfxSmDY=; b=HA8uIE3GXftq8ve7I9mgZfH3vg0ydwBJBCY64qI3v9JjnIeJobu+N43qTt+Sbe1gVb tQIWorfSpLGsDAf80udEg9K7wR+ul/lfC0mD+/yh3ncV8MqW/OaML6hnXSgUQzy3ooOY Wdaf0P10iy3+/lgyTuPVml2EINXFpCYwwHejN1hUKldCizTJgVqHoCShxyKAjp1hLA4P QCy7mJw1h9ulMMJEm38g+8eBIljvodC2okv6NtOrsLeW0PhTWt4KmWO9jywsgMlsgh3j +DidX81JIDfEesYiQ3pXGUYda23Ciz5Q1LlEQrhyRqHrlvjbYGRQw5RjdvCADyU/4B+1 1iig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548075; x=1733152875; 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=nUCdTQ7gpHma3kBEA41WeT+vE2SwWkH8lZ6tNfxSmDY=; b=Qcia0lM4/LnQbgDxnWJ1lsVlAN5Tpb+vVcImskFKhBPGveouBeWEuC7gX+FoB8t7+r tgZZr8MaKb18cWpbc70u5IQJ8FvrVKtNdHevkKwiK5pP7dNDu33Ww2KIuoIhFUUU5W5u U2zh/b9QFZJGfi/dNsQu31qcxzA4ercIqApB0YkTNiDTgq4QfRQEjx62xBsLiJbmzEyq HtcZdxuHZPt5/avG4kMUQPuosNplEm6zfEcAax6pck04JpyvII1qIr6Uu1Px9RG5yq+h Yx/Npo0uLqkbcVuN4mnY2dAq9Tvrje0/lIpqVG5q9U8qXkcpWyMLoIEjSXY5EOcYg87f Ouvg== X-Gm-Message-State: AOJu0YyFyPzUC0uM2j3xizx8upTttmb1zNOz/Mhni5Qts9KMyYfDjI7O mNv407fmr/SgSdhsQESDf7Ri01OGwOnlYxC/K2MdIjFROx/fC6IJST9PXEGgDyc= X-Gm-Gg: ASbGncugVn3lrTkEg7h1i1apwJEhj+N8ooixFbOvZHtffZUNV3FCAXc327gAN8M1OSZ AJMGaGpislVyIddCPYs7TO6RK8baYDOouHJYPE5w6GoU4p4YNpLqzu2xd6DWlbnrY/O3AbXNmXN FuHUuKvsNWWDthM1cHIoOhE2h3V/L4dzC146JSHS1rOgQyrgixpe2IYuUp1yDNjpvV0ZblfuKo7 OLRpqzWOLOdEy89BVdhHfK87HtCPwVfYom9DlEs636tYeSy X-Google-Smtp-Source: AGHT+IEDBwQA24S8ZXvPjnlgY0jY3GAX2llgHQx11r2y4G/hFZga0O2iRIRwrhRPqegqlX14UCrgvA== X-Received: by 2002:a05:6000:2807:b0:382:372a:572d with SMTP id ffacd0b85a97d-38260b71395mr7712934f8f.27.1732548075569; Mon, 25 Nov 2024 07:21:15 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fb25d74sm10795103f8f.47.2024.11.25.07.21.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:21:14 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 43775610F1; Mon, 25 Nov 2024 15:21:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PULL 16/28] tests/functional: remove time.sleep usage from tuxrun tests Date: Mon, 25 Nov 2024 15:20:53 +0000 Message-Id: <20241125152105.2100395-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Daniel P. Berrangé The tuxrun tests send a series of strings to the guest to login and then run commands. Since we have been unable to match on console output that isn't followed by a newline, the test used many time.sleep() statements to pretend to synchronize with the guest. This has proved to be unreliable for the aarch64be instance of the tuxrun tests, with the test often hanging. The hang is a very subtle timing problem, and it is suspected that some (otherwise apparently harmless) I/O error messages could be resulting in full FIFO buffers, stalling interaction with the guest. With the newly rewritten console interaction able to match strings that don't have a following newline, the tux run tests can now match directly on the login prompt, and/or shell PS1 prompt. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2689 Signed-off-by: Daniel P. Berrangé Message-Id: <20241121154218.1423005-17-berrange@redhat.com> Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-17-alex.bennee@linaro.org> diff --git a/tests/functional/qemu_test/tuxruntest.py b/tests/functional/qemu_test/tuxruntest.py index ed2b238c92..ab3b27da43 100644 --- a/tests/functional/qemu_test/tuxruntest.py +++ b/tests/functional/qemu_test/tuxruntest.py @@ -124,16 +124,12 @@ def run_tuxtest_tests(self, haltmsg): then do a few things on the console. Trigger a shutdown and wait to exit cleanly. """ - self.wait_for_console_pattern("Welcome to TuxTest") - time.sleep(0.2) - exec_command(self, 'root') - time.sleep(0.2) - exec_command(self, 'cat /proc/interrupts') - time.sleep(0.1) - exec_command(self, 'cat /proc/self/maps') - time.sleep(0.1) - exec_command(self, 'uname -a') - time.sleep(0.1) + ps1='root@tuxtest:~#' + self.wait_for_console_pattern('tuxtest login:') + exec_command_and_wait_for_pattern(self, 'root', ps1) + exec_command_and_wait_for_pattern(self, 'cat /proc/interrupts', ps1) + exec_command_and_wait_for_pattern(self, 'cat /proc/self/maps', ps1) + exec_command_and_wait_for_pattern(self, 'uname -a', ps1) exec_command_and_wait_for_pattern(self, 'halt', haltmsg) # Wait for VM to shut down gracefully if it can From patchwork Mon Nov 25 15:20:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885113 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F35C7D58D5D for ; Mon, 25 Nov 2024 15:27:20 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFayn-0006yd-6n; Mon, 25 Nov 2024 10:26:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFayg-0006uU-O0 for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:18 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFaye-0002Xp-VJ for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:18 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-38242abf421so3065614f8f.2 for ; Mon, 25 Nov 2024 07:26:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548375; x=1733153175; 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=vAncWUHXyfA57+KSZY1P9qzVPf7uUwxapVn6zYWCi3g=; b=yQEdAk89NP8AEo2nC1uVIh69LDfMQxOV9pyc1Exte2dSd2QGiTr21d+QOXLrIDMSnX RBOB4pJAtVhOXHjej9ycU2GAVXaH7VCSKZKaTjBGX859qxziKEjRH/Zp9uYNdf2Jikd1 bTEbX7Ouq3k6zTL5itcPPiRsG/XxuVjBhTEjfNLpiv5bpPZNlBwZJf2eAuJXHFohXFVs h71CD/J7GifLcyevlrG+WbynUC2KhQ23BW8dBunb7yqtxktS7UNN7S904ETiDhXokq5b n523cXt8sdBeoDMMGADNjnHR2Z/Gk9t3DI+a6C8dFYJwpl7QkkPyPlxOz6yG4qh+aiAP czQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548375; x=1733153175; 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=vAncWUHXyfA57+KSZY1P9qzVPf7uUwxapVn6zYWCi3g=; b=oll3GyuIrL/oNVwf/iIT+KbubrIjcWW6XkttfgbXw6vV4atTbHLFx4alCzuC1djfq1 oh2wsb3fUe5MkoSX0jWyf2jwADsLHeDkxYHXNiP3nVsiGTDrGcFjdUFz7SqNTjs/BUks B3IeEvcIDl6jPmnLMfMnsmGhhRDOByCXcEKYlRfeMpPiek+v8OPNn9E54acDdVtN+qYc eZFMSgaAxezgHhuDBfgY3d91PfR9RK644JA8ovDReD+c+Xhd0m2J2QMD4qv+WLISiz/2 ccWmZiHHgSLcHvmxkfsocipIDJiTdqQFBYGuC2LoGMIhnh65QxnpYD53UaBKeP5fFog+ 5DMA== X-Gm-Message-State: AOJu0Yxv+3TjRvw9j9253xDBiI1iYNz4U7ApU/+umZV6m7mL1RP5K5dq Hoj7gv0ZtqvdhrpseErGKvqi5KIkGia7uv3aco9GUzGWrc/dt4QPAhaQj3BLGDE= X-Gm-Gg: ASbGncu9gv4HPaBVVcUUjrQI5/Ea6ycmovz65oArR0q99twLDvbVJO4NVTVOeBG+XA+ RnclEqTL9PFwHum7tgR25JZFcJREG2BP7gTZ4cQULTwElB69lBgFU3xFqxkEeh2TKRlc9Nh93J1 LqQR2G2ffw7ozuxejOFR9YnvJ/QkhKQFnnkzkYfC32ZWazOg3QF2VfJc/p4LcNUGQReDX3sIv9e Z6iA43Qrb7Il3lx79Eq8v9GRzLpK9SjFGNa+DyxEeWtLqR1 X-Google-Smtp-Source: AGHT+IHs5kBLqvglIGb0rAAHuNp1SW6Ksisw7uVNx58pzjDAU6zTXIFFVB/6IZ05F2dSuGF1mY8+3g== X-Received: by 2002:a05:6000:18ae:b0:374:c847:852 with SMTP id ffacd0b85a97d-38260b806f8mr11899215f8f.29.1732548374880; Mon, 25 Nov 2024 07:26:14 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fafe98asm10565203f8f.39.2024.11.25.07.26.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:26:14 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 5786D5F8B7; Mon, 25 Nov 2024 15:21:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PULL 17/28] tests/functional: add a QMP backdoor for debugging stalled tests Date: Mon, 25 Nov 2024 15:20:54 +0000 Message-Id: <20241125152105.2100395-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Daniel P. Berrangé Support the QEMU_TEST_QMP_BACKDOOR=backdoor.sock env variable as a way to get a QMP backdoor for debugging a stalled QEMU test. Most typically this would be used if running the tests directly: $ QEMU_TEST_QMP_BACKDOOR=backdoor.sock \ QEMU_TEST_QEMU_BINARY=./build/qemu-system-arm \ PYTHONPATH=./python \ ./tests/functional/test_arm_tuxrun.py And then, when the test stalls, in a second shell run: $ ./scripts/qmp/qmp-shell backdoor.sock Signed-off-by: Daniel P. Berrangé Message-Id: <20241121154218.1423005-18-berrange@redhat.com> Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-18-alex.bennee@linaro.org> diff --git a/docs/devel/testing/functional.rst b/docs/devel/testing/functional.rst index 6b5d0c5b98..b8ad7b0bf7 100644 --- a/docs/devel/testing/functional.rst +++ b/docs/devel/testing/functional.rst @@ -176,6 +176,16 @@ primarily depend on the value of the ``qemu_bin`` class attribute. If it is not explicitly set by the test code, its default value will be the result the QEMU_TEST_QEMU_BINARY environment variable. +Debugging hung QEMU +^^^^^^^^^^^^^^^^^^^ + +When test cases go wrong it may be helpful to debug a stalled QEMU +process. While the QEMUMachine class owns the primary QMP monitor +socket, it is possible to request a second QMP monitor be created +by setting the ``QEMU_TEST_QMP_BACKDOOR`` env variable to refer +to a UNIX socket name. The ``qmp-shell`` command can then be +attached to the stalled QEMU to examine its live state. + Attribute reference ------------------- diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py index e2a329c3e5..fceafb32b0 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -175,6 +175,13 @@ def _new_vm(self, name, *args): log_dir=self.logdir) self.log.debug('QEMUMachine "%s" created', name) self.log.debug('QEMUMachine "%s" temp_dir: %s', name, vm.temp_dir) + + sockpath = os.environ.get("QEMU_TEST_QMP_BACKDOOR", None) + if sockpath is not None: + vm.add_args("-chardev", + f"socket,id=backdoor,path={sockpath},server=on,wait=off", + "-mon", "chardev=backdoor,mode=control") + if args: vm.add_args(*args) return vm From patchwork Mon Nov 25 15:20:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885118 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D5924D58D5A for ; Mon, 25 Nov 2024 15:27:42 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFayq-0006zs-CN; Mon, 25 Nov 2024 10:26:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFaym-0006wm-DF for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:24 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFayh-0002YH-58 for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:20 -0500 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3824a8a5c56so3076647f8f.3 for ; Mon, 25 Nov 2024 07:26:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548377; x=1733153177; 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=sVMl7r/1fgVSH8/n/aNIg8kgc7q28d2pUpabg4PkhwM=; b=BoBqtQS85eTH1xTXXUSWMj9Hzi9YjXuYSZhV2xSrBJlDsY2rkDgWRJ0inbz+NOGjG3 bZ67vXwvUTIkuP+JQxGVu02oyw5Kuj05wEAL/3eh8MZNhaG4wePHUdvkxeEYWKhshr5c EE2vJAa8B1d1/bX4RLDfYQI3uliBde8wM4BVm9Dtdi5JRIcLuRWAozhsMrvVAjD3Pkp2 cASgwJtttUWwOg0+SPIusOqvHt4ATePNsa3GQ0pBKKNUDPBqTfvT6liTLWB2GjrdlurW mmQVlwROgd68C7K12/n8G/jlmHK41ZQIGWHnlsnA5wBUk7WLOGygTT8A+ZD5xIV8/y2P fnig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548377; x=1733153177; 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=sVMl7r/1fgVSH8/n/aNIg8kgc7q28d2pUpabg4PkhwM=; b=VVAHWeSQnKPu1gVeERVLSsX7t0a3GHdJz3EiPk6av7vh4UE4k3B2nV6fhJZP9LfCkf k2Ch1rjA8UKN1eTBmnHG12C2OUZ1QHjcjXRqv9i10N4v+9cFDDSneK51tchzE4VHHSnA 2L4oYhFt6yfYQnxSW+LUIuW7f55AO3Em/ULtCSMaPYC3qrPrz8MX5+GkXcob1PxGQsW1 yTpOUW/bpKxD2e0JTpVBzQRJT1d+Xqom6EawnmPG3tazPWhJX6PoDB+SZ9bEFueKRU+g F/6i7DUSlIuVwetouXImTL5vl0Be5vZ6AsvsirIMrrZ9iK0JiAHqwf29ttU5Sk5hBltJ L2Lw== X-Gm-Message-State: AOJu0YxvKl7kCBuvsfKimSMItmmEEfYH2WOheMw/QDj/vh5yAXGKpEfR f7kjNVv51MrIHj4CW/qiqaxKvLGE28GpJiiCEcNK8LaASmqMjxsrn0zdLadUQPo= X-Gm-Gg: ASbGnctNNPIEsMlhmTYuBOqIRLVRKqkATAbCPrLbElX32PKYRayanxQXvQjyjR3ogVB dJ09Rwge7J2dPhZ7XC76Gg0drLJTqqbsGBfUvne+5zlpCOLARhjo+KJTpjG7Smgd8uysY///QSe xL8miCEmBkNYQFY9vXKe6E56CrbTuRO+ziLD4rGPoHTjU6F6M/FXzV/67TyTdghOqosx2B0Mos5 Wsmout67ur4cd+VbbhcsMg2vvxr840FanJiMxIjjaI0a7Qz X-Google-Smtp-Source: AGHT+IEEKr6dXMb+Aunofvy+nuwN9wTujrt5Og8F/L2UCry/5ep7kSHTKF7fvE0G281Tdt2Mc3yITw== X-Received: by 2002:a05:6000:1f82:b0:37d:5364:d738 with SMTP id ffacd0b85a97d-38260bcc4cemr11861047f8f.45.1732548377338; Mon, 25 Nov 2024 07:26:17 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fb4ecd8sm10658416f8f.60.2024.11.25.07.26.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:26:16 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 6DEFD614E3; Mon, 25 Nov 2024 15:21:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PULL 18/28] tests/functional: avoid accessing log_filename on earlier failures Date: Mon, 25 Nov 2024 15:20:55 +0000 Message-Id: <20241125152105.2100395-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Daniel P. Berrangé If a failure occurs early in the QemuBaseTest constructor, the 'log_filename' object atttribute may not exist yet. This happens most notably if the QEMU_TEST_QEMU_BINARY is not set. We can't initialize 'log_filename' earlier as we use the binary to identify the architecture which is then used to build the path in which the logs are stored. Signed-off-by: Daniel P. Berrangé Message-Id: <20241121154218.1423005-19-berrange@redhat.com> Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-19-alex.bennee@linaro.org> diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py index fceafb32b0..90ae59eb54 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -81,10 +81,12 @@ def main(): res = unittest.main(module = None, testRunner = tr, exit = False, argv=["__dummy__", path]) for (test, message) in res.result.errors + res.result.failures: - print('More information on ' + test.id() + ' could be found here:' - '\n %s' % test.log_filename, file=sys.stderr) - if hasattr(test, 'console_log_name'): - print(' %s' % test.console_log_name, file=sys.stderr) + + if hasattr(test, "log_filename"): + print('More information on ' + test.id() + ' could be found here:' + '\n %s' % test.log_filename, file=sys.stderr) + if hasattr(test, 'console_log_name'): + print(' %s' % test.console_log_name, file=sys.stderr) sys.exit(not res.result.wasSuccessful()) From patchwork Mon Nov 25 15:20:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885115 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 67ABED58D5D for ; Mon, 25 Nov 2024 15:27:33 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFayq-00070K-DG; Mon, 25 Nov 2024 10:26:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFaym-0006wt-FW for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:24 -0500 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFayh-0002YK-CO for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:22 -0500 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-53de27f1478so1643397e87.2 for ; Mon, 25 Nov 2024 07:26:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548377; x=1733153177; 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=hs4NIJpS4GDhESrRpIniIOaaQZDtuYfQr9U5rHDCt0U=; b=bskyjQcK1/diK/CKaSuLBh6qs0OXqMDzAuB/L9ZzK+FKcOB7k0V/O+LuDadZ390G5P 1KRTbFhynU65hHkKwbCrAidME2iNbgifejRdRfZam7SD5W2SgL5RWv6IAlJdjyHZFzYI eQXKp0y10GIgwi7IRnoZtJj6gXNe/PNJVH1gBOiw6TKmkheXS/aIeUP7aLenhRZmqO7D da4Gz490y6IGx4mvMvHFMBWEsAzh1ldaLtGcCVKZPu5lepsA69EaTfojyiNc0Z4igcqs b9s2vki8ZLUv4gWVHQtc6WCtPfcBfKP29VHDJ1c3LVoKIX/MGmTna4yYcyNQ7bcKiGbH IyKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548377; x=1733153177; 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=hs4NIJpS4GDhESrRpIniIOaaQZDtuYfQr9U5rHDCt0U=; b=LO5c4OHQwMFKmIHuhF2FXlYf5tFJYB+0LLtKfsp6SWr7xKVOMF58adNrMJokjKhd4G NkjM/A/f4Tw6kvWp/5Tg626F1KHEvTeodr22ltfDR+GCAFc/6JokTSwLUP+SkGWEEmjQ wpWjjld70T1qoHOGX1QsnlFTehnzO8+HuUedOTAjAKXN/J3UQM6M33Dnu5AtPL3kSsrt GDmWjJ3HjjQ+6Q2hMqz2OsJA2IhLu7rfP09AFMqhYZFMUwaIH1P/mz/hL8843mA8aAqC y9ddI1ei3yYVMrb26nKInapSYVlJSwvBX3V8zOWOVXMwhxjKtm0sXVjV8dhMMDpGXmZj ih5w== X-Gm-Message-State: AOJu0YwyZdX0MkQfjPEUEQxIIO2t+n5dYOZWxApQKhCSyZoKT6ABSfQN Lq5o5bf3cranuSVgEjeW10R4zdZNbStainTyFhgmBn9d1yb+JIA0inrmTZBek7Y= X-Gm-Gg: ASbGncsNsE4NDP2h6JpBH0hE8zJMjh3Ps4BDW+YgyivYR6FUfdtceJpLXSuGdrCgYKs f/HnB4+M6DP8rvE1Ecws9cy3lOOzkbmEtFHvtn2b2UCkbKtpGsoagXIGF5ml2wNjBU+UknNtUmr ldHYDn5f9hpAXf3mYxi6X6OCFf+K658M7lRULk3Zq2kiFuJTk4NRPYO9FP7656lRyCOUZ9wZq5U 3culnOqufoCq1F8k+zOKpgM/u2ewEJJUtZI4ELu42U3hRPz X-Google-Smtp-Source: AGHT+IFm6ff9mXjpNEaSfptCFvykhHZe/hvru3gPBMS9Sp+Xiu1qWbegK4T8Ju3vW7Kev7jjun8FdA== X-Received: by 2002:a05:6512:3c8c:b0:53d:db99:c79e with SMTP id 2adb3069b0e04-53ddb99e8cdmr4260469e87.3.1732548376583; Mon, 25 Nov 2024 07:26:16 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-433b45bdbabsm194746775e9.18.2024.11.25.07.26.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:26:14 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 861D7620B7; Mon, 25 Nov 2024 15:21:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Wainer dos Santos Moschetta , qemu-arm@nongnu.org (open list:Virt) Subject: [PULL 19/28] tests/functional: Convert the Avocado aarch64 tuxrun tests Date: Mon, 25 Nov 2024 15:20:56 +0000 Message-Id: <20241125152105.2100395-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x135.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Thomas Huth Move the tests to a new file so that they can be run via qemu-system-aarch64 in the functional framework. Since these were the last tests in tests/avocado/tuxrun_baselines.py, we can now remove that file, too. Signed-off-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-20-alex.bennee@linaro.org> diff --git a/MAINTAINERS b/MAINTAINERS index acc7405aed..eb7149bf1a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -994,6 +994,7 @@ F: hw/arm/virt* F: include/hw/arm/virt.h F: docs/system/arm/virt.rst F: tests/functional/test_aarch64_virt.py +F: tests/functional/test_aarch64_tuxrun.py F: tests/functional/test_arm_tuxrun.py Xilinx Zynq @@ -4129,7 +4130,7 @@ F: scripts/ci/ F: tests/docker/ F: tests/vm/ F: tests/lcitool/ -F: tests/avocado/tuxrun_baselines.py +F: tests/functional/test_*_tuxrun.py F: scripts/archive-source.sh F: docs/devel/testing.rst W: https://gitlab.com/qemu-project/qemu/pipelines diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_baselines.py deleted file mode 100644 index 38064840da..0000000000 --- a/tests/avocado/tuxrun_baselines.py +++ /dev/null @@ -1,224 +0,0 @@ -# Functional test that boots known good tuxboot images the same way -# that tuxrun (www.tuxrun.org) does. This tool is used by things like -# the LKFT project to run regression tests on kernels. -# -# Copyright (c) 2023 Linaro Ltd. -# -# Author: -# Alex Bennée -# -# SPDX-License-Identifier: GPL-2.0-or-later - -import os -import time -import tempfile - -from avocado import skip, skipUnless -from avocado_qemu import QemuSystemTest -from avocado_qemu import exec_command, exec_command_and_wait_for_pattern -from avocado_qemu import wait_for_console_pattern -from avocado.utils import process -from avocado.utils.path import find_command - -class TuxRunBaselineTest(QemuSystemTest): - """ - :avocado: tags=accel:tcg - """ - - KERNEL_COMMON_COMMAND_LINE = 'printk.time=0' - # Tests are ~10-40s, allow for --debug/--enable-gcov overhead - timeout = 100 - - def get_tag(self, tagname, default=None): - """ - Get the metadata tag or return the default. - """ - utag = self._get_unique_tag_val(tagname) - print(f"{tagname}/{default} -> {utag}") - if utag: - return utag - - return default - - def setUp(self): - super().setUp() - - # We need zstd for all the tuxrun tests - # See https://github.com/avocado-framework/avocado/issues/5609 - zstd = find_command('zstd', False) - if zstd is False: - self.cancel('Could not find "zstd", which is required to ' - 'decompress rootfs') - self.zstd = zstd - - # Process the TuxRun specific tags, most machines work with - # reasonable defaults but we sometimes need to tweak the - # config. To avoid open coding everything we store all these - # details in the metadata for each test. - - # The tuxboot tag matches the root directory - self.tuxboot = self.get_tag('tuxboot') - - # Most Linux's use ttyS0 for their serial port - self.console = self.get_tag('console', "ttyS0") - - # Does the machine shutdown QEMU nicely on "halt" - self.shutdown = self.get_tag('shutdown') - - # The name of the kernel Image file - self.image = self.get_tag('image', "Image") - - self.root = self.get_tag('root', "vda") - - # Occasionally we need extra devices to hook things up - self.extradev = self.get_tag('extradev') - - self.qemu_img = super().get_qemu_img() - - def wait_for_console_pattern(self, success_message, vm=None): - wait_for_console_pattern(self, success_message, - failure_message='Kernel panic - not syncing', - vm=vm) - - def fetch_tuxrun_assets(self, csums=None, dt=None): - """ - Fetch the TuxBoot assets. They are stored in a standard way so we - use the per-test tags to fetch details. - """ - base_url = f"https://storage.tuxboot.com/20230331/{self.tuxboot}/" - - # empty hash if we weren't passed one - csums = {} if csums is None else csums - ksum = csums.get(self.image, None) - isum = csums.get("rootfs.ext4.zst", None) - - kernel_image = self.fetch_asset(base_url + self.image, - asset_hash = ksum, - algorithm = "sha256") - disk_image_zst = self.fetch_asset(base_url + "rootfs.ext4.zst", - asset_hash = isum, - algorithm = "sha256") - - cmd = f"{self.zstd} -d {disk_image_zst} -o {self.workdir}/rootfs.ext4" - process.run(cmd) - - if dt: - dsum = csums.get(dt, None) - dtb = self.fetch_asset(base_url + dt, - asset_hash = dsum, - algorithm = "sha256") - else: - dtb = None - - return (kernel_image, self.workdir + "/rootfs.ext4", dtb) - - def prepare_run(self, kernel, disk, drive, dtb=None, console_index=0): - """ - Setup to run and add the common parameters to the system - """ - self.vm.set_console(console_index=console_index) - - # all block devices are raw ext4's - blockdev = "driver=raw,file.driver=file," \ - + f"file.filename={disk},node-name=hd0" - - kcmd_line = self.KERNEL_COMMON_COMMAND_LINE - kcmd_line += f" root=/dev/{self.root}" - kcmd_line += f" console={self.console}" - - self.vm.add_args('-kernel', kernel, - '-append', kcmd_line, - '-blockdev', blockdev) - - # Sometimes we need extra devices attached - if self.extradev: - self.vm.add_args('-device', self.extradev) - - self.vm.add_args('-device', - f"{drive},drive=hd0") - - # Some machines need an explicit DTB - if dtb: - self.vm.add_args('-dtb', dtb) - - def run_tuxtest_tests(self, haltmsg): - """ - Wait for the system to boot up, wait for the login prompt and - then do a few things on the console. Trigger a shutdown and - wait to exit cleanly. - """ - self.wait_for_console_pattern("Welcome to TuxTest") - time.sleep(0.2) - exec_command(self, 'root') - time.sleep(0.2) - exec_command(self, 'cat /proc/interrupts') - time.sleep(0.1) - exec_command(self, 'cat /proc/self/maps') - time.sleep(0.1) - exec_command(self, 'uname -a') - time.sleep(0.1) - exec_command_and_wait_for_pattern(self, 'halt', haltmsg) - - # Wait for VM to shut down gracefully if it can - if self.shutdown == "nowait": - self.vm.shutdown() - else: - self.vm.wait() - - def common_tuxrun(self, - csums=None, - dt=None, - drive="virtio-blk-device", - haltmsg="reboot: System halted", - console_index=0): - """ - Common path for LKFT tests. Unless we need to do something - special with the command line we can process most things using - the tag metadata. - """ - (kernel, disk, dtb) = self.fetch_tuxrun_assets(csums, dt) - - self.prepare_run(kernel, disk, drive, dtb, console_index) - self.vm.launch() - self.run_tuxtest_tests(haltmsg) - - - # - # The tests themselves. The configuration is derived from how - # tuxrun invokes qemu (with minor tweaks like using -blockdev - # consistently). The tuxrun equivalent is something like: - # - # tuxrun --device qemu-{ARCH} \ - # --kernel https://storage.tuxboot.com/{TUXBOOT}/{IMAGE} - # - - def test_arm64(self): - """ - :avocado: tags=arch:aarch64 - :avocado: tags=cpu:cortex-a57 - :avocado: tags=machine:virt - :avocado: tags=tuxboot:arm64 - :avocado: tags=console:ttyAMA0 - :avocado: tags=shutdown:nowait - """ - sums = {"Image" : - "ce95a7101a5fecebe0fe630deee6bd97b32ba41bc8754090e9ad8961ea8674c7", - "rootfs.ext4.zst" : - "bbd5ed4b9c7d3f4ca19ba71a323a843c6b585e880115df3b7765769dbd9dd061"} - self.common_tuxrun(csums=sums) - - def test_arm64be(self): - """ - :avocado: tags=arch:aarch64 - :avocado: tags=cpu:cortex-a57 - :avocado: tags=endian:big - :avocado: tags=machine:virt - :avocado: tags=tuxboot:arm64be - :avocado: tags=console:ttyAMA0 - :avocado: tags=shutdown:nowait - """ - sums = { "Image" : - "e0df4425eb2cd9ea9a283e808037f805641c65d8fcecc8f6407d8f4f339561b4", - "rootfs.ext4.zst" : - "e6ffd8813c8a335bc15728f2835f90539c84be7f8f5f691a8b01451b47fb4bd7"} - self.common_tuxrun(csums=sums) diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 758145d1e5..923f9e7078 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -14,6 +14,7 @@ test_timeouts = { 'aarch64_raspi4' : 480, 'aarch64_sbsaref_alpine' : 720, 'aarch64_sbsaref_freebsd' : 720, + 'aarch64_tuxrun' : 240, 'aarch64_virt' : 720, 'acpi_bits' : 420, 'arm_aspeed' : 600, @@ -52,6 +53,7 @@ tests_aarch64_system_thorough = [ 'aarch64_sbsaref', 'aarch64_sbsaref_alpine', 'aarch64_sbsaref_freebsd', + 'aarch64_tuxrun', 'aarch64_virt', 'multiprocess', ] diff --git a/tests/functional/test_aarch64_tuxrun.py b/tests/functional/test_aarch64_tuxrun.py new file mode 100755 index 0000000000..da56aee4ed --- /dev/null +++ b/tests/functional/test_aarch64_tuxrun.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python3 +# +# Functional test that boots known good tuxboot images the same way +# that tuxrun (www.tuxrun.org) does. This tool is used by things like +# the LKFT project to run regression tests on kernels. +# +# Copyright (c) 2023 Linaro Ltd. +# +# Author: +# Alex Bennée +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from qemu_test.tuxruntest import TuxRunBaselineTest + +class TuxRunAarch64Test(TuxRunBaselineTest): + + ASSET_ARM64_KERNEL = Asset( + 'https://storage.tuxboot.com/20230331/arm64/Image', + 'ce95a7101a5fecebe0fe630deee6bd97b32ba41bc8754090e9ad8961ea8674c7') + ASSET_ARM64_ROOTFS = Asset( + 'https://storage.tuxboot.com/20230331/arm64/rootfs.ext4.zst', + 'bbd5ed4b9c7d3f4ca19ba71a323a843c6b585e880115df3b7765769dbd9dd061') + + def test_arm64(self): + self.set_machine('virt') + self.cpu='cortex-a57' + self.console='ttyAMA0' + self.wait_for_shutdown=False + self.common_tuxrun(kernel_asset=self.ASSET_ARM64_KERNEL, + rootfs_asset=self.ASSET_ARM64_ROOTFS) + + ASSET_ARM64BE_KERNEL = Asset( + 'https://storage.tuxboot.com/20230331/arm64be/Image', + 'e0df4425eb2cd9ea9a283e808037f805641c65d8fcecc8f6407d8f4f339561b4') + ASSET_ARM64BE_ROOTFS = Asset( + 'https://storage.tuxboot.com/20230331/arm64be/rootfs.ext4.zst', + 'e6ffd8813c8a335bc15728f2835f90539c84be7f8f5f691a8b01451b47fb4bd7') + + def test_arm64be(self): + self.set_machine('virt') + self.cpu='cortex-a57' + self.console='ttyAMA0' + self.wait_for_shutdown=False + self.common_tuxrun(kernel_asset=self.ASSET_ARM64BE_KERNEL, + rootfs_asset=self.ASSET_ARM64BE_ROOTFS) + +if __name__ == '__main__': + TuxRunBaselineTest.main() From patchwork Mon Nov 25 15:20:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885112 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2CB52D58D5D for ; Mon, 25 Nov 2024 15:27:18 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFaz1-00076D-53; Mon, 25 Nov 2024 10:26:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFaym-0006wo-Du for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:24 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFayf-0002Xt-2R for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:19 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-431616c23b5so25947065e9.0 for ; Mon, 25 Nov 2024 07:26:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548375; x=1733153175; 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=e4h6aEw9LYtmJIIcDDymcXrZ9jlAyL6XBEIid/PrQo0=; b=Ph0aeLY94OHVv6Kr4Tml4e0GzT+57rKKD4G0CF7ZC1ROcCiO01XjOmGVOhChmIQU2M UNrne83o28hnNMFcUs6JSXy95cAqktFHImY4wDQBVC2T2YtVMj04LkHM0Lrxqc6XiKi8 YYPLZiZM+RFW3CX/D/gxMbrZoYyimAn9br2LXzwTBSmSv4mC6kuAnX3MYtcfDXDkiaVo aLAoBfDGKOo7zo8xh2AZJ0sK7HyFFrGcqDQaFTJlG1Kh11A2f21phRIlac1BveMMCHWY MwBlNctikgcqFAV/MnjCH7oA9MxM5i/Oq3VX8IAECJqzYoVIn/j5uTJxSMn67MyYzFG9 szdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548375; x=1733153175; 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=e4h6aEw9LYtmJIIcDDymcXrZ9jlAyL6XBEIid/PrQo0=; b=Ldktev4bNEjfSJ7AN5fPxJf32eX/W6Nfj0PEtKgMMMSndvny6FCBpZ14gaWzeSmBmH 6nQXHanu5F/P1cZs2nuXGSd9erd9xWQ7a9nhr2rvgVCX9P9V99sGOi7Sbz2nsrz5Sm9J 4nGe3M/5EYdvhpIhhtnApMZ7fsW6+n+1AMkujAs+ifHtOQszW6Hggc7EzUQ5xO2o8Vs/ 3h5chNKufliqF3Ym1l/0zdLcWgZDLNtzv+Mr+qzgTdFvd+zJ8onomDICRP9QFUN62Vl+ /wfRBBzqMSVsauesgdOUHwZpWx91xB5Pk/9hOWJe1pDv05f2niBz1leXN72so42c5LHH lNww== X-Gm-Message-State: AOJu0Yy0kA10Bc6qbQ9zw0Ynp94lKioVXUJMaVQOBwrd4yyTa6vd6D+o FaajAhXyrZSRjqqPD7CCJSQfCUIAN9VidtihI8rl7U3WyzV39uh4uywiRgQMKMw= X-Gm-Gg: ASbGnctbs/oMTZWoQr0VbiJNENmmRg6XDpHL3oHB4iXFWSFeUhzNxT9a+9rcuUuyEEi T5gdCxkbYxjXTvPwagAu1e9aJQWUBefUz5IAEOWpLXXdWf53iYjHX8tOeCkuzxupfPq+pqA3em5 SoGlyjSwsRS5BsCqUkE3daLou3p0HH1VxMWDIdCXJN8EajnSedMR4qK/ySY3+jEcUwav7ejiDvY pSH/oOLpew0Dtm1C+NFiNChhmzPXTQmi5V8umEc3sfunHmq X-Google-Smtp-Source: AGHT+IGSybAa9ZEgN/23gNMpxtvTIF9z6Ba3QA7Yszz3ayXdrGUM/t4R9PXImw66v8Ym+chbS7osRA== X-Received: by 2002:a05:600c:a0b:b0:431:4a82:97f2 with SMTP id 5b1f17b1804b1-433c5c95780mr147723625e9.6.1732548375496; Mon, 25 Nov 2024 07:26:15 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43366cbcdd8sm183016145e9.1.2024.11.25.07.26.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:26:14 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 9AED35F869; Mon, 25 Nov 2024 15:21:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Anders Roxell , Thomas Huth , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Wainer dos Santos Moschetta , qemu-arm@nongnu.org (open list:Virt) Subject: [PULL 20/28] tests/functional: update the aarch64 tuxrun tests Date: Mon, 25 Nov 2024 15:20:57 +0000 Message-Id: <20241125152105.2100395-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Now there are new up to date images available we should update to them. With the new rootfs the blk I/O errors also go away on arm64be. Cc: Anders Roxell Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-22-alex.bennee@linaro.org> diff --git a/tests/functional/test_aarch64_tuxrun.py b/tests/functional/test_aarch64_tuxrun.py index da56aee4ed..75adc8acb8 100755 --- a/tests/functional/test_aarch64_tuxrun.py +++ b/tests/functional/test_aarch64_tuxrun.py @@ -17,11 +17,11 @@ class TuxRunAarch64Test(TuxRunBaselineTest): ASSET_ARM64_KERNEL = Asset( - 'https://storage.tuxboot.com/20230331/arm64/Image', - 'ce95a7101a5fecebe0fe630deee6bd97b32ba41bc8754090e9ad8961ea8674c7') + 'https://storage.tuxboot.com/buildroot/20241119/arm64/Image', + 'b74743c5e89e1cea0f73368d24ae0ae85c5204ff84be3b5e9610417417d2f235') ASSET_ARM64_ROOTFS = Asset( - 'https://storage.tuxboot.com/20230331/arm64/rootfs.ext4.zst', - 'bbd5ed4b9c7d3f4ca19ba71a323a843c6b585e880115df3b7765769dbd9dd061') + 'https://storage.tuxboot.com/buildroot/20241119/arm64/rootfs.ext4.zst', + 'a1acaaae2068df4648d04ff75f532aaa8c5edcd6b936122b6f0db4848a07b465') def test_arm64(self): self.set_machine('virt') @@ -32,11 +32,11 @@ def test_arm64(self): rootfs_asset=self.ASSET_ARM64_ROOTFS) ASSET_ARM64BE_KERNEL = Asset( - 'https://storage.tuxboot.com/20230331/arm64be/Image', - 'e0df4425eb2cd9ea9a283e808037f805641c65d8fcecc8f6407d8f4f339561b4') + 'https://storage.tuxboot.com/buildroot/20241119/arm64be/Image', + 'fd6af4f16689d17a2c24fe0053cc212edcdf77abdcaf301800b8d38fa9f6e109') ASSET_ARM64BE_ROOTFS = Asset( - 'https://storage.tuxboot.com/20230331/arm64be/rootfs.ext4.zst', - 'e6ffd8813c8a335bc15728f2835f90539c84be7f8f5f691a8b01451b47fb4bd7') + 'https://storage.tuxboot.com/buildroot/20241119/arm64be/rootfs.ext4.zst', + 'f5e9371b62701aab8dead52592ca7488c8a9e255c9be8d7635c7f30f477c2c21') def test_arm64be(self): self.set_machine('virt') From patchwork Mon Nov 25 15:20:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885117 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8C1FDD58D5E for ; Mon, 25 Nov 2024 15:27:36 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFazA-0007ms-IQ; Mon, 25 Nov 2024 10:26:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFayp-000704-FR for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:27 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFaym-0002Yp-5x for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:27 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-434a2f3bae4so3267925e9.3 for ; Mon, 25 Nov 2024 07:26:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548379; x=1733153179; 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=+4ComUgm0VsNi+m3XoSttwvHYd1J7DrWJSpG+S4G9WI=; b=B3YpDNlMGxd+8iyWODfOeyW4BiTsIh8KCx8Zm0CiBAgmCvVr2mrdhy0kj+guX87B+G Q4cMTRK3MB2UvL71puxy/6n5497NZU5nLXswdDmY73TobgWF2c0VrmJnzYZiuqdQ3Kpk Pegy9nHkZsHrSa4f/SuZbF/mHSvvvD9fgm5W8CAFpKogPZWoLN6D5LYkU4lGbO6nj1/8 0oCaRlm8Z0hOvEBAbvR05YBlBZIbHE4chHgReKp7iJ/wrkLgxPo1F3yRwJLnqdxWIxxW 9+iZQWiN/ZBcem4e391/WKiyxFnkBPdXmFUPGVCIzwJBpophDlnX6hTTm7K04wR2Vh8g TFDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548379; x=1733153179; 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=+4ComUgm0VsNi+m3XoSttwvHYd1J7DrWJSpG+S4G9WI=; b=fW+JKPLK1Zm2ihmdCfkvquUMKrUazNoAnP/y8Ojnn0ibgzYE//76o1icaaCyzwmX/C F0Eo/Unt1x2zqvbTaORwW41obIeLvlkZeJCn/wmgEVlVroXdA6hu7/0jVcEKtC0TrH3X nAoIsNmTvfccQnMWq14TPo4R0hm67RRlT8sxh4rKDQBwEVbAGSyNRvDakUTA7mB20/EK tzndbKvW7r/KV1NI/Xrsjq1kq2wnXiQ7v4YC1KyRXtWEfK4vMJnv4smFYyi74u7GoBkh VQBKTCuoX0HjDMm2aj+JIhnbMep3Iua2EiJuB/TpsKLyN0Tua1DPbrX40XTjshBx5+Hq /swA== X-Gm-Message-State: AOJu0Yz8GKlXP5qIS8V0W6jSrfd7FVJAMe42TGWMzb1qxS730ktx7JJA TFe++7jU7+VVPyqIPQvvKsIEsPzYYMGCNz4F5k+Wp4F5IV9iFJJdtTUqlNvuHBw= X-Gm-Gg: ASbGncv42vppowTgHbvnRXdIVP6Y7Jx5YA22Di0x8Hh0b9qM5JMCPTT2BEEVxKzKXuK eR0EUGE+h273A/Ng66nXyXAhE8rCjp7n2xFjHzhUxwbaIQIVdKjxskS/v1dmW3V1HQTSdR8TObu eM8LoE/HJCmAh6yQpnrq2kJKUt+yx7pDzZANQERqP0FI7HMN3n4h1Bq1HOnw7dxfElAlPf7uvjS lq+YQEXPlA7Mmeadx+dvixnWnnt8Xa1mcSra31IF55aSxdH X-Google-Smtp-Source: AGHT+IH722bugulfuUBYdRcspq0o7wykmZNoQ3Pgu+dwnJDb6T6mtjejE09gTz9OyFxIeHpyLjBQlA== X-Received: by 2002:a7b:cc06:0:b0:431:59ab:15cf with SMTP id 5b1f17b1804b1-434891a1dc5mr97627645e9.19.1732548379059; Mon, 25 Nov 2024 07:26:19 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434a0c889c5sm26615595e9.2.2024.11.25.07.26.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:26:16 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id AE9F962644; Mon, 25 Nov 2024 15:21:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= Subject: [PULL 21/28] plugins: add missing export for qemu_plugin_num_vcpus Date: Mon, 25 Nov 2024 15:20:58 +0000 Message-Id: <20241125152105.2100395-22-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Pierrick Bouvier Fixes: 4a448b148ca ("plugins: add qemu_plugin_num_vcpus function") Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier Message-Id: <20241112212622.3590693-2-pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-36-alex.bennee@linaro.org> diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 622c9a0232..0fba36ae02 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -803,6 +803,7 @@ void qemu_plugin_register_atexit_cb(qemu_plugin_id_t id, qemu_plugin_udata_cb_t cb, void *userdata); /* returns how many vcpus were started at this point */ +QEMU_PLUGIN_API int qemu_plugin_num_vcpus(void); /** From patchwork Mon Nov 25 15:20:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885110 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 05133D58D5D for ; Mon, 25 Nov 2024 15:27:02 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFaz6-0007Wd-Uk; Mon, 25 Nov 2024 10:26:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFayn-0006zk-TO for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:25 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFayk-0002Ym-RZ for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:25 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-382442b7d9aso3508324f8f.1 for ; Mon, 25 Nov 2024 07:26:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548379; x=1733153179; 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=YZrySn/V6spoVfFw52szUouQyzG89nZr7ULlEg8CZ30=; b=Y8VK0qKg7bkAwMDBZehEzPKgIdfh77XUwkZ9aneEy8ByeyjA8cMihoIWYD2LzUVDV/ vakJtPaMN4twUMOub4WIa9mWwZfaa/m3K6UqSIDgd89GfslGLLcMnDM38qBX5bDqVp1i RkZUzBjPVFr2VqKfCJiV/kHlmwCUEOvqUvhPVPDJErk8wIrHYg0vefc2QZaomu+s5/iS CFPuRyEsh1Ir9Y0yQ1wWUc7kmR8dbSS8yRdOo7ZCmLGc9ZCJk5pA0jSc/1u2v71NuIuJ Jr0ooeTV0L/BoIc0xjHUrNMhlrAgM1CUUfvDDu8B0eH398BqzlYc3ENHRloW5LH8yS6g EojQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548379; x=1733153179; 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=YZrySn/V6spoVfFw52szUouQyzG89nZr7ULlEg8CZ30=; b=Fn13D/NVZ7C75TfVQSCxgjsP/ag2aoq1Uky6siWifrkWQvjHn8u3ZWzchj2a3yHQ7x 2pH8ccfQjssclWCtu4ahoCMyxLFjSQfj670qx5zKGhiulJ4Wq0ujKG2l51wWkIzIvmID cfg+VxiaXd+vMUBOKsoqT5hsUBPH8ClSezgmi9pU2Lz+zXF1oRrGA2Yhw498zGp7P0j4 8cuyYLOh9v2rNAwqaXoSRHU+zRn7pRuOm7+vuvA7qGKrdFyLXsPUn/W0t0ROvUGkMnOO H0Qq3V53F+6srCY0fOCAFIttt75wSxa+4Yana03HulgrSaA5uE8QWpeoqsIWoSsdZNb/ 1QMg== X-Gm-Message-State: AOJu0YzB3rbnvg/OOnsIjIoK75lf1fXeCgTSJKNjarRSyRLNaJIHfAYb Ea61RGclaeoQ7xXLVOfbBn6iGDYZKixXaw2j4SBPt4QtrPNdDPXvYzpqTQfrcPs= X-Gm-Gg: ASbGncurWiPid663udaljZn6vNGJYCTuPKmuVZYVGz8cqjlcg676CczBYruQddcZDoO poGJqqxOj06M7b3oFOKydAMq/vuIQZWJvi6rXrOZlEfHuuan7kILrYnfYCiqy3FPb+MS7MLsx2q u+fM+b4KPB5DfOUgRt1dpYFKBL2a/o+qW97y2oZEjDP07K9NEr/Dp+hWyWayUhD9zvfDrBhXUTs tbjmAPwNUSl4p5G4rDL9ov4AUauZWCYq7vo6/gtCg4AzfzU X-Google-Smtp-Source: AGHT+IFegvUvrTW5uM/EorYhklEIGS0i1K9NRZZrMB5qzIcglBsw1bsvvJWj10buUiRpMCFV6byWzg== X-Received: by 2002:a05:6000:144c:b0:37d:2d27:cd93 with SMTP id ffacd0b85a97d-38260bcb460mr12243489f8f.43.1732548378686; Mon, 25 Nov 2024 07:26:18 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbee043sm10684677f8f.104.2024.11.25.07.26.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:26:16 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id C8EED62948; Mon, 25 Nov 2024 15:21:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Alexandre Iooss , Mahmoud Mandour , John Snow , Cleber Rosa Subject: [PULL 22/28] plugins: detect qemu plugin API symbols from header Date: Mon, 25 Nov 2024 15:20:59 +0000 Message-Id: <20241125152105.2100395-23-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Pierrick Bouvier Instead of using a static file (error prone and hard to keep in sync), we generate it using a script. Note: if a symbol is not exported, we'll now notice it when linking for Windows/MacOS platforms. Signed-off-by: Pierrick Bouvier Message-Id: <20241112212622.3590693-3-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-37-alex.bennee@linaro.org> diff --git a/MAINTAINERS b/MAINTAINERS index eb7149bf1a..2b1c4abed6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3752,6 +3752,7 @@ F: plugins/ F: tests/tcg/plugins/ F: tests/functional/test_aarch64_tcg_plugins.py F: contrib/plugins/ +F: scripts/qemu-plugin-symbols.py AArch64 TCG target M: Richard Henderson diff --git a/plugins/meson.build b/plugins/meson.build index 1cc039d29b..98542e926f 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -2,17 +2,23 @@ if not get_option('plugins') subdir_done() endif +qemu_plugin_symbols = configure_file( + input: files('../include/qemu/qemu-plugin.h'), + output: 'qemu-plugin.symbols', + capture: true, + command: [files('../scripts/qemu-plugin-symbols.py'), '@INPUT@']) + # Modules need more symbols than just those in plugins/qemu-plugins.symbols if not enable_modules if host_os == 'darwin' configure_file( - input: files('qemu-plugins.symbols'), + input: qemu_plugin_symbols, output: 'qemu-plugins-ld64.symbols', capture: true, command: ['sed', '-ne', 's/^[[:space:]]*\\(qemu_.*\\);/_\\1/p', '@INPUT@']) emulator_link_args += ['-Wl,-exported_symbols_list,plugins/qemu-plugins-ld64.symbols'] else - emulator_link_args += ['-Xlinker', '--dynamic-list=' + (meson.project_source_root() / 'plugins/qemu-plugins.symbols')] + emulator_link_args += ['-Xlinker', '--dynamic-list=' + qemu_plugin_symbols.full_path()] endif endif @@ -23,7 +29,7 @@ if host_os == 'windows' # First, create a .def file listing all the symbols a plugin should expect to have # available in qemu win32_plugin_def = configure_file( - input: files('qemu-plugins.symbols'), + input: qemu_plugin_symbols, output: 'qemu_plugin_api.def', capture: true, command: ['sed', '-e', '0,/^/s//EXPORTS/; s/[{};]//g', '@INPUT@']) diff --git a/scripts/qemu-plugin-symbols.py b/scripts/qemu-plugin-symbols.py new file mode 100755 index 0000000000..e285ebb8f9 --- /dev/null +++ b/scripts/qemu-plugin-symbols.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# Extract QEMU Plugin API symbols from a header file +# +# Copyright 2024 Linaro Ltd +# +# Author: Pierrick Bouvier +# +# This work is licensed under the terms of the GNU GPL, version 2 or later. +# See the COPYING file in the top-level directory. +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import argparse +import re + +def extract_symbols(plugin_header): + with open(plugin_header) as file: + content = file.read() + # Remove QEMU_PLUGIN_API macro definition. + content = content.replace('#define QEMU_PLUGIN_API', '') + expected = content.count('QEMU_PLUGIN_API') + # Find last word between QEMU_PLUGIN_API and (, matching on several lines. + # We use *? non-greedy quantifier. + syms = re.findall(r'QEMU_PLUGIN_API.*?(\w+)\s*\(', content, re.DOTALL) + syms.sort() + # Ensure we found as many symbols as API markers. + assert len(syms) == expected + return syms + +def main() -> None: + parser = argparse.ArgumentParser(description='Extract QEMU plugin symbols') + parser.add_argument('plugin_header', help='Path to QEMU plugin header.') + args = parser.parse_args() + + syms = extract_symbols(args.plugin_header) + + print('{') + for s in syms: + print(" {};".format(s)) + print('};') + +if __name__ == '__main__': + main() From patchwork Mon Nov 25 15:21:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885111 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0DE2CD58D5D for ; Mon, 25 Nov 2024 15:27:05 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFayz-00073u-P7; Mon, 25 Nov 2024 10:26:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFayp-000703-8Y for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:27 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFaym-0002Yt-6K for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:27 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-434a1fe2b43so4514255e9.2 for ; Mon, 25 Nov 2024 07:26:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548379; x=1733153179; 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=lwRDTRQGY0zbI0152zlPGQl3hD2A8MDzl25gnWUNB94=; b=UMzoZpOcnNotx2/O5Ov+Ss0nX9qOMVTQh3RKDUe8spydFKYsG4B0K6Uox4jNsFicSi k6MQ6eSG2HZRUiSl56zSm15FxhUDN3fHwBdO4GrFO0V8DtpvF93e0d2roboiRP380krM t3bIxnKyvk6JgdNJLGl4zV5z8RNzUsFs8L27dgVKF1vPlN0xX8mzM1y0vIrqZnLNtPlQ 2uIx/82LbMTPDPRqzNOuPeVwsfRg946pf6V6HxMWKBYLv/m9HGoT/nOIWoDSW5lzDzAz qzjnTv06jVSKLTfq3f7aofZW05CBncWHhGTNVcXkeOa9DQTWD1LIXUYXu2/Zp+41iPRG jsEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548379; x=1733153179; 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=lwRDTRQGY0zbI0152zlPGQl3hD2A8MDzl25gnWUNB94=; b=mWdtCOcLsLyEjFBRfLEi9sy26YAGwmsdQsRhICNL2u+gptjA/Jf2V2o8EgnJ0aJvT+ 9h/kkQa4djAVQf1fM8XdFVIDME87ctSqRoIUxrWif1+1Zn5oEmrdPfNX5qhCLG9PG/F7 n6dLWwsc24QmvyvfnL6uSBCrJLbGn6PuWxVFghgcHchWdRmdtuXVC/tsXJHhzSBPQNEC GXltdWdF5K0CaTqMAUMHWkrb7uPpY26E83+TePb5ImKUmcrHogm4HA4evtm0pNHLZPr6 QS3uGFKkzl3vpqkpshK/9vrSCmdqQ8ua94gKwUfHSN5Gsph1VaPHAeAnDhSNtD12MwEA v5MA== X-Gm-Message-State: AOJu0YwFZRdOtq6SBRNzQbG8Uy1JCfH+aW9LBzWKWxm6CUTg9bXs4ELA E+ersRYtND4+BALFlHLnjYaRXQs2nw9ARisoUDFqLzKLhN5LNcAkL95kieccd2U= X-Gm-Gg: ASbGncunEpQdgTAHCnmacgq/e4VeAlVkxoh9i5lHLt6caAiS16Rcg6cTZi7eqlru58p 6iR57kYqtINJmSdjkt3qQjhwy0sVFjSizwyazxIMRP4QFN+AJKwtcHmxcAjZESUu0ZLMvdwSdkb lMRQt4z7bSApnp/e+WN7N8IdpHmSnYi3Ha/+S/9mpDpafVbRjweIUO7iObBcjJWD8X4SOwXOMBA mKwvjyBjXFDAjM1UHcwFwQjaNkiWRMmrSzH83rC1YkwqtDL X-Google-Smtp-Source: AGHT+IEcdPf3GD8xS8mve7R6P5d3eZCdHEwpFk0puZ8HKU9BDupOwlH6/NcsHguKeVI5lSAtI3snuw== X-Received: by 2002:a05:600c:348b:b0:42c:c003:edd1 with SMTP id 5b1f17b1804b1-433ce41ce4emr136359265e9.10.1732548379357; Mon, 25 Nov 2024 07:26:19 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43498a31432sm75044365e9.28.2024.11.25.07.26.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:26:16 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id DEB4C62A14; Mon, 25 Nov 2024 15:21:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= Subject: [PULL 23/28] plugins: eradicate qemu-plugins.symbols static file Date: Mon, 25 Nov 2024 15:21:00 +0000 Message-Id: <20241125152105.2100395-24-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Pierrick Bouvier Signed-off-by: Pierrick Bouvier Message-Id: <20241112212622.3590693-4-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-38-alex.bennee@linaro.org> diff --git a/plugins/qemu-plugins.symbols b/plugins/qemu-plugins.symbols deleted file mode 100644 index 032661f9ea..0000000000 --- a/plugins/qemu-plugins.symbols +++ /dev/null @@ -1,59 +0,0 @@ -{ - qemu_plugin_bool_parse; - qemu_plugin_end_code; - qemu_plugin_entry_code; - qemu_plugin_get_hwaddr; - qemu_plugin_get_registers; - qemu_plugin_hwaddr_device_name; - qemu_plugin_hwaddr_is_io; - qemu_plugin_hwaddr_phys_addr; - qemu_plugin_insn_data; - qemu_plugin_insn_disas; - qemu_plugin_insn_haddr; - qemu_plugin_insn_size; - qemu_plugin_insn_symbol; - qemu_plugin_insn_vaddr; - qemu_plugin_mem_get_value; - qemu_plugin_mem_is_big_endian; - qemu_plugin_mem_is_sign_extended; - qemu_plugin_mem_is_store; - qemu_plugin_mem_size_shift; - qemu_plugin_num_vcpus; - qemu_plugin_outs; - qemu_plugin_path_to_binary; - qemu_plugin_read_memory_vaddr; - qemu_plugin_read_register; - qemu_plugin_register_atexit_cb; - qemu_plugin_register_flush_cb; - qemu_plugin_register_vcpu_exit_cb; - qemu_plugin_register_vcpu_idle_cb; - qemu_plugin_register_vcpu_init_cb; - qemu_plugin_register_vcpu_insn_exec_cb; - qemu_plugin_register_vcpu_insn_exec_cond_cb; - qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu; - qemu_plugin_register_vcpu_mem_cb; - qemu_plugin_register_vcpu_mem_inline_per_vcpu; - qemu_plugin_register_vcpu_resume_cb; - qemu_plugin_register_vcpu_syscall_cb; - qemu_plugin_register_vcpu_syscall_ret_cb; - qemu_plugin_register_vcpu_tb_exec_cb; - qemu_plugin_register_vcpu_tb_exec_cond_cb; - qemu_plugin_register_vcpu_tb_exec_inline_per_vcpu; - qemu_plugin_register_vcpu_tb_trans_cb; - qemu_plugin_request_time_control; - qemu_plugin_reset; - qemu_plugin_scoreboard_free; - qemu_plugin_scoreboard_find; - qemu_plugin_scoreboard_new; - qemu_plugin_start_code; - qemu_plugin_tb_get_insn; - qemu_plugin_tb_n_insns; - qemu_plugin_tb_vaddr; - qemu_plugin_u64_add; - qemu_plugin_u64_get; - qemu_plugin_u64_set; - qemu_plugin_u64_sum; - qemu_plugin_uninstall; - qemu_plugin_update_ns; - qemu_plugin_vcpu_for_each; -}; From patchwork Mon Nov 25 15:21:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885089 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 811B3D58D5A for ; Mon, 25 Nov 2024 15:22:55 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFatu-000422-BF; Mon, 25 Nov 2024 10:21:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFats-00040r-Fy for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:20 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFatq-0001nA-Bh for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:20 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-43497839b80so14602035e9.2 for ; Mon, 25 Nov 2024 07:21:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548077; x=1733152877; 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=DMELCxkOeEAQmSk+N63B9qvpt489uBLoYc1oFZtPpjQ=; b=pChjgK741wVwzfY7TnC/KMBlYHW7x6MktMDt4o39LYBILUSFMT1n8u6Bni1/FkIeR1 SbYDGmcT/qDxeLjG7RaHn5lQcH9l+GfxS0QieZhXgLCPNNkTWFBSfnRxJl6Pc9v6dsaJ A4ovCt9RhrsLdKYNMBMXaihw74FqWZaDE/tlED9XrCmer1WOBjHKlL1RjpSdyNipam9u tPJ79eg+/eCvideDudz0NOUf9GyhD6udUkBNdXg62Ibm1smvjihJgjVyJoMbi6+SxbGM aFSjcDKBFdg6rDMuXKLaqbYan3tK8nzreEfZY7c/QkY9Hd4kvlVYrj9dBlsLh5gREY1W ufrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548077; x=1733152877; 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=DMELCxkOeEAQmSk+N63B9qvpt489uBLoYc1oFZtPpjQ=; b=iGai/kxpwhMu+zsIBVgWFrN/92r1fhJbjM3xHeooU39oKPIxKbs0FNKLEeLVa8Ui7Z dFscRSlaaA1oSBeSosXlugM2VL9Tolw354+pOknI3MxYnAsiW0QNAivqbM5hXxxCL58W YPxFM9RWvu7Dh7urqLqMlXQXToUdH2fk+XKAnOubJijlk0CMfiD71C0DwNgXiVVUNV9O C/PqXsKSdHHtFWXUeHTdQInZ5eIS5qHtJR9HST5xExq+4B3QfoSqSmYRBlNFbqcm43+I 6TSNV9NJyfOcyFDkAjejkNuVMaAoS7uGzpEoGcRXZfoPMGjuFsIycceLVxhzGNDGF7vh USsg== X-Gm-Message-State: AOJu0YzCDjx7KcjZRETdu+70HkTpeRjqG69CsaoZTlYqi6DJLY0e1wZb kUT5gcWVHfgXUAHyHz58AdeDkHqJd9GcZRg7uxUMKYw8fWP6lN/1nLKmXWAFG/U= X-Gm-Gg: ASbGncukp/eIG4EJzvAtoTIPJl27bDNFwiHzcTlgclm7g8qFpmy7UGjZDSYOxwxC3yQ 71GnhZkhQKKLLD8TOTuPavyGd7FaWi8iuimCN1mPHKYmbwKN7xAyRz4zLoPqS+JsyomSBBb69OD 4tIMoy5oS5GfULslctRlmjyId50mxbOtWnCMLKs1olfpwKx7l9NaxtzcGcwpO0Aa2LolhKETIW3 gkkIRLIo7E+wOjyJ4rj/tPWtATZ2ODDQ9jZPN42w1MCpBRW X-Google-Smtp-Source: AGHT+IHpnTS6RQp+PRADd2JYlCHgAbWaolF6kyisKI/7HjbmaUXXA9ritrcshd9FtN1wv954DPWxlw== X-Received: by 2002:a05:600c:3aca:b0:431:680e:95ff with SMTP id 5b1f17b1804b1-433ce425617mr118928725e9.9.1732548076810; Mon, 25 Nov 2024 07:21:16 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4349fba472asm38343535e9.17.2024.11.25.07.21.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:21:15 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id F362D63331; Mon, 25 Nov 2024 15:21:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Junjie Mao , Peter Maydell , =?utf-8?q?Alex_Benn=C3=A9e?= , Manos Pitsidianakis , qemu-rust@nongnu.org (open list:Rust-related patc...) Subject: [PULL 24/28] rust/pl011: Fix range checks for device ID accesses Date: Mon, 25 Nov 2024 15:21:01 +0000 Message-Id: <20241125152105.2100395-25-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Junjie Mao The peripheral and PrimeCell identification registers of pl011 are located at offset 0xFE0 - 0xFFC. To check if a read falls to such registers, the C implementation checks if the offset-shifted-by-2 (not the offset itself) is in the range 0x3F8 - 0x3FF. Use the same check in the Rust implementation. This fixes the timeout of the following avocado tests: * tests/avocado/boot_linux_console.py:BootLinuxConsole.test_arm_virt * tests/avocado/replay_kernel.py:ReplayKernelNormal.test_arm_virt * tests/avocado/replay_kernel.py:ReplayKernelNormal.test_arm_vexpressa9 Reported-by: Peter Maydell Signed-off-by: Junjie Mao Tested-by: Alex Bennée Reviewed-by: Alex Bennée Message-Id: Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-39-alex.bennee@linaro.org> diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/device.rs index 2a85960b81..476cacc844 100644 --- a/rust/hw/char/pl011/src/device.rs +++ b/rust/hw/char/pl011/src/device.rs @@ -182,7 +182,7 @@ pub fn read(&mut self, offset: hwaddr, _size: c_uint) -> std::ops::ControlFlow { + Err(v) if (0x3f8..0x400).contains(&(v >> 2)) => { u64::from(self.device_id[(offset - 0xfe0) >> 2]) } Err(_) => { From patchwork Mon Nov 25 15:21:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885116 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 47BEBD58D5A for ; Mon, 25 Nov 2024 15:27:35 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFayq-0006zt-C5; Mon, 25 Nov 2024 10:26:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFaym-0006ws-Ef for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:24 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFayg-0002YE-GM for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:20 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-382442b7d9aso3508281f8f.1 for ; Mon, 25 Nov 2024 07:26:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548377; x=1733153177; 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=a2fXEZ40BYTZpxwqr81qDeJmktd3tot0XA64fsee8Sk=; b=m5RC1SLZacH0sCo5RcGZL4t/RqbD+GUJoub5tl3tOJ5US9Vg7AAPTTr6hApB8eQvVr WQIblMjl9R0hvUPIYBPSKPBu4uwGRNO7aa5OWSlOgHCW4nXDS1TsOGUmomB8p0KayHy9 06ZxBIxNszJcyIRcdRuFhhGcooQ4LHt+Kwh2Fe48fljww06F0ezRC+eNdm7VpOKNM9gR oyMgPiLxdgKBQ+JN9qRhnQbVtR3qYQNsmTiQJolLjIiQshQDSH5fOvgZemE1yx3h2+Aw ROhyDwvnYG62f7vL0DtkeNpb8HN87p7JXIslSEKy+7lJ4XfJrRLaGdmM5+SHRg6ztfAQ ZrbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548377; x=1733153177; 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=a2fXEZ40BYTZpxwqr81qDeJmktd3tot0XA64fsee8Sk=; b=qRL1eD8gvakYDIWl+B0TV58Fjlv1ceGj90Zj9860eJepzMxSr3rjl1Q0bCdRsuzD1Y rZpj+tNkthWe9xDtVcIw2L/kcuIe+bfjjqksuaagzifEYIldkE1v62KKxB6p7654wIZb aVYoEStZlxBq+UNNy6Gb1DZQ1uuaRlZpzC9+KPjPwKlcNJkmRmIUxv+7C3c+1MspiK9Y 9GIDX2b46UmRofuOMWr8+oAbPgydwaSr9n8jG5/sYk2UfEHy0naAHM/3HVwaLjPaVtD5 KWvMUCSk2IcP3NISpqyib7rLoDews69Huz2DDJBQCQ/nFsm+hP08FbxJ9uV4orkKxu2L Q4kQ== X-Gm-Message-State: AOJu0YylRdZS+nRi7ZSGCU+uvNxT2diK6RFMvcT8F17lBTl0E6o4ogRm Sd+pAHi4PF3lI2IIXVQ43W8kQvvYL70bPHP275qKibZpVGWDWXCj6FdytP4OT0g= X-Gm-Gg: ASbGncua8xsiTkF8/i5mTFEyBOGd9EShIJVZ6ueoZku3AcKc0uMAQO3gjbYCn1xerov q+Xswi7QOjZ9AqM9tSo+EgkbQMuPobdhXYZcCsPAwSBXSi2oJNNTpmsBxZqgnoGDE2Ng4lodqET OnvlL5IfNuIJgEBBlCRjaZGy+fg0wap0ePUfKaHxZRKVat6Lkme/vtC9iw5zM/YXzfvEI2wUxeo P2sMP8W7vL9BMV9NldLwXlPRkT2cu7UZbsty9/g/S2N089B X-Google-Smtp-Source: AGHT+IHLFKXVbfrWbEJ2k0TaxAtiGiJ5Zz01ioXL6R/DB3CMfOz6JI1ww3hZgY61mfYdL9p51Fs6aQ== X-Received: by 2002:a05:6000:401f:b0:382:2cbd:9a4b with SMTP id ffacd0b85a97d-38260b6df0amr10466459f8f.24.1732548376874; Mon, 25 Nov 2024 07:26:16 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fd04ef5sm10611647f8f.111.2024.11.25.07.26.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:26:14 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 14E675F8FE; Mon, 25 Nov 2024 15:21:08 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Stefan Hajnoczi , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , Thomas Huth , Wainer dos Santos Moschetta , Markus Armbruster Subject: [PULL 25/28] docs: explicitly permit a "commonly known identity" with SoB Date: Mon, 25 Nov 2024 15:21:02 +0000 Message-Id: <20241125152105.2100395-26-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Daniel P. Berrangé The docs for submitting a patch describe using your "Real Name" with the Signed-off-by line. Although somewhat ambiguous, this has often been interpreted to mean someone's legal name. In recent times, there's been a general push back[1] against the notion that use of Signed-off-by in a project automatically requires / implies the use of legal ("real") names and greater awareness of the downsides. Full discussion of the problems of such policies is beyond the scope of this commit message, but at a high level they are liable to marginalize, disadvantage, and potentially result in harm, to contributors. TL;DR: there are compelling reasons for a person to choose distinct identities in different contexts & a decision to override that choice should not be taken lightly. A number of key projects have responded to the issues raised by making it clear that a contributor is free to determine the identity used in SoB lines: * Linux has clarified[2] that they merely expect use of the contributor's "known identity", removing the previous explicit rejection of pseudonyms. * CNCF has clarified[3] that the real name is simply the identity the contributor chooses to use in the context of the community and does not have to be a legal name, nor birth name, nor appear on any government ID. Since we have no intention of ever routinely checking any form of ID documents for contributors[4], realistically we have no way of knowing anything about the name they are using, except through chance, or through the contributor volunteering the information. IOW, we almost certainly already have people using pseudonyms for contributions. This proposes to accept that reality and eliminate unnecessary friction, by following Linux & the CNCF in merely asking that a contributors' commonly known identity, of their choosing, be used with the SoB line. [1] Raised in many contexts at many times, but a decent overall summary can be read at https://drewdevault.com/2023/10/31/On-real-names.html [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d4563201f33a022fc0353033d9dfeb1606a88330 [3] https://github.com/cncf/foundation/blob/659fd32c86dc/dco-guidelines.md [4] Excluding the rare GPG key signing parties for regular maintainers Signed-off-by: Daniel P. Berrangé Acked-by: Stefan Hajnoczi Acked-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Acked-by: Richard Henderson Message-Id: <20241021190939.1482466-1-berrange@redhat.com> Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-40-alex.bennee@linaro.org> diff --git a/docs/devel/submitting-a-patch.rst b/docs/devel/submitting-a-patch.rst index 83e9092b8c..10b062eec2 100644 --- a/docs/devel/submitting-a-patch.rst +++ b/docs/devel/submitting-a-patch.rst @@ -18,7 +18,7 @@ one-shot fix, the bare minimum we ask is that: * - Check - Reason - * - Patches contain Signed-off-by: Real Name + * - Patches contain Signed-off-by: Your Name - States you are legally able to contribute the code. See :ref:`patch_emails_must_include_a_signed_off_by_line` * - Sent as patch emails to ``qemu-devel@nongnu.org`` - The project uses an email list based workflow. See :ref:`submitting_your_patches` @@ -335,6 +335,11 @@ include a "From:" line in the body of the email (different from your envelope From:) that will give credit to the correct author; but again, that author's Signed-off-by: line is mandatory, with the same spelling. +The name used with "Signed-off-by" does not need to be your legal name, +nor birth name, nor appear on any government ID. It is the identity you +choose to be known by in the community, but should not be anonymous, +nor misrepresent whom you are. + There are various tooling options for automatically adding these tags include using ``git commit -s`` or ``git format-patch -s``. For more information see `SubmittingPatches 1.12 diff --git a/.gitlab-ci.d/check-dco.py b/.gitlab-ci.d/check-dco.py index d221b16bd5..70dec7d6ee 100755 --- a/.gitlab-ci.d/check-dco.py +++ b/.gitlab-ci.d/check-dco.py @@ -78,7 +78,10 @@ To indicate acceptance of the DCO every commit must have a tag - Signed-off-by: REAL NAME + Signed-off-by: YOUR NAME + +where "YOUR NAME" is your commonly known identity in the context +of the community. This can be achieved by passing the "-s" flag to the "git commit" command. From patchwork Mon Nov 25 15:21:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885088 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A6792D58D5A for ; Mon, 25 Nov 2024 15:22:50 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFatw-00043B-A1; Mon, 25 Nov 2024 10:21:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFatt-00041d-Oz for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:21 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFatq-0001nT-W1 for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:21 -0500 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-3825c05cc90so2936901f8f.1 for ; Mon, 25 Nov 2024 07:21:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548077; x=1733152877; 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=+pOvKcIYLYjxSCH4Q48xgGtD5Zj0tOeOWXKJv+fQtdI=; b=F9lEJZh/OpF2jRsjN0n0mCsA8+qnriL4x0RZ8AmfN2B3aypt1KsIGepksWss6iJtn9 kc16f7/X9sjlThXfZCpiGdzJTjG84/eXniiEul3pSwe1kGFqCxXazrAukah6RvLB3YVg pxdVUr8B1/WWorqROvWtivQgC9P6DJkNXfgOAyocbuDvCr1414/vVscEqW02uZ6nfxq4 4UfZGL8ISJDdc11UoX/L9vZqu3cVFRtAQl1qTyJgWdS8SuqjyyghUgp8XAcSCojssBMl cuAUY0XJLokwZROqJzhDKsOgn1lT3V0LA16SqUbIiQAx1QzbwPcxLfxZbkbaluaoSrbE kIkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548077; x=1733152877; 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=+pOvKcIYLYjxSCH4Q48xgGtD5Zj0tOeOWXKJv+fQtdI=; b=nZGHDBehMKsr+TjDHb2zAOb7R7RXxnEHr3ePJBQZMcnBS/ua9cnsXjB1TeiKeb70bC bLZ33JSuQR0nGtnfQbgLJuiYJbeRuyrEJmFYAyPwFAVNOuF+8unGTvzA47DFYeVQZj1F 6hpa3SDDPK12Tz41pzcrrMoBg/ex4R0ru30gDydFx0O94B9DyJYpCm8V30XcgobuLoOu gcsFxRPMNa6LBraZIepQo+SXSX9mtaOoXBfnPTAk7FeVlmSRf4Z9XZKGOS+zRMgVTSgC Iq+d6g3Yfm4AYs53h6Am5AR3OKBv8D6jw72mMx/D0I5SDAPWHuA1UGSyrKH+w3GZh4Wg Nz5Q== X-Gm-Message-State: AOJu0YyFtKcNAtcoCzijUsLRth2q1pAmdyAFwR2ruF1oy7W2MoobL+ep f07E4I7QDKP/VCX9SpIwMKerx9awnfsrXREs3L5rw2zdo5xd8SZxCzDCct48iXs= X-Gm-Gg: ASbGncumVOM5+hu3cWBHBQCFFXq3LnCsJOg4OaOXuQsY+4sW79f52HfkTo46Hr6cZOK JUPYvydhdvCv4u+9OOUw7Knt1vyz6OA04pZKHNNSLdbOcn7UsCW60F7ebX34ir0Bcx6xIUC5ypA wxqrBqYmzxTb2fgeueF5uXSYGgDpwJwCWwXs1K8JjnROrwD9nWwEEqaXj1GIWE6v+AC0ASBImov lyfv6NcnbirxDIf+9hEsgjkZGULhZM+8IMkMcEXalC4Wc2h X-Google-Smtp-Source: AGHT+IH3vfZTAk1rY21ftHnQBkgC8g2Bv/YWU9EtMMaX9lpdRgPnTKLlgZ0SVLEK4LvETa16l131xw== X-Received: by 2002:a05:6000:1543:b0:37c:d12c:17e5 with SMTP id ffacd0b85a97d-38260b6bb95mr10721419f8f.23.1732548077505; Mon, 25 Nov 2024 07:21:17 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbedfb2sm10633531f8f.105.2024.11.25.07.21.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:21:15 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2DD7363937; Mon, 25 Nov 2024 15:21:08 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?C=C3=A9dric_Le_Goater?= , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?C=C3=A9dri?= =?utf-8?q?c_Le_Goater?= , Peter Maydell , Steven Lee , Troy Lee , Jamin Lin , Andrew Jeffery , Joel Stanley , Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , qemu-arm@nongnu.org (open list:ASPEED BMCs) Subject: [PULL 26/28] tests/functional: Convert Aspeed aarch64 SDK tests Date: Mon, 25 Nov 2024 15:21:03 +0000 Message-Id: <20241125152105.2100395-27-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Cédric Le Goater Drop the SSH connection which was introduced in the avocado tests to workaround read issues when interacting with console. Signed-off-by: Cédric Le Goater Reviewed-by: Thomas Huth Message-Id: <20241122090322.1934697-2-clg@redhat.com> Signed-off-by: Alex Bennée diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py index 241ef180af..2240c82abf 100644 --- a/tests/avocado/machine_aspeed.py +++ b/tests/avocado/machine_aspeed.py @@ -59,17 +59,6 @@ def do_test_arm_aspeed_sdk_start(self, image): self, 'boot', '## Loading kernel from FIT Image') self.wait_for_console_pattern('Starting kernel ...') - def do_test_aarch64_aspeed_sdk_start(self, image): - self.vm.set_console() - self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw', - '-net', 'nic', '-net', 'user,hostfwd=:127.0.0.1:0-:22') - - self.vm.launch() - - self.wait_for_console_pattern('U-Boot 2023.10') - self.wait_for_console_pattern('## Loading kernel from FIT Image') - self.wait_for_console_pattern('Starting kernel ...') - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') def test_arm_ast2500_evb_sdk(self): """ @@ -133,70 +122,3 @@ def test_arm_ast2600_evb_sdk(self): year = time.strftime("%Y") self.ssh_command_output_contains('/sbin/hwclock -f /dev/rtc1', year); - def test_aarch64_ast2700_evb_sdk_v09_02(self): - """ - :avocado: tags=arch:aarch64 - :avocado: tags=machine:ast2700-evb - """ - - image_url = ('https://github.com/AspeedTech-BMC/openbmc/releases/' - 'download/v09.02/ast2700-default-obmc.tar.gz') - image_hash = 'ac969c2602f4e6bdb69562ff466b89ae3fe1d86e1f6797bb7969d787f82116a7' - image_path = self.fetch_asset(image_url, asset_hash=image_hash, - algorithm='sha256') - archive.extract(image_path, self.workdir) - - num_cpu = 4 - image_dir = self.workdir + '/ast2700-default/' - uboot_size = os.path.getsize(image_dir + 'u-boot-nodtb.bin') - uboot_dtb_load_addr = hex(0x400000000 + uboot_size) - - load_images_list = [ - { - 'addr': '0x400000000', - 'file': image_dir + 'u-boot-nodtb.bin' - }, - { - 'addr': str(uboot_dtb_load_addr), - 'file': image_dir + 'u-boot.dtb' - }, - { - 'addr': '0x430000000', - 'file': image_dir + 'bl31.bin' - }, - { - 'addr': '0x430080000', - 'file': image_dir + 'optee/tee-raw.bin' - } - ] - - for load_image in load_images_list: - addr = load_image['addr'] - file = load_image['file'] - self.vm.add_args('-device', - f'loader,force-raw=on,addr={addr},file={file}') - - for i in range(num_cpu): - self.vm.add_args('-device', - f'loader,addr=0x430000000,cpu-num={i}') - - self.vm.add_args('-smp', str(num_cpu)) - self.vm.add_args('-device', - 'tmp105,bus=aspeed.i2c.bus.1,address=0x4d,id=tmp-test') - self.do_test_aarch64_aspeed_sdk_start(image_dir + 'image-bmc') - self.wait_for_console_pattern('nodistro.0 ast2700-default ttyS12') - - self.ssh_connect('root', '0penBmc', False) - self.ssh_command('dmesg -c > /dev/null') - - self.ssh_command_output_contains( - 'echo lm75 0x4d > /sys/class/i2c-dev/i2c-1/device/new_device ' - '&& dmesg -c', - 'i2c i2c-1: new_device: Instantiated device lm75 at 0x4d'); - - self.ssh_command_output_contains( - 'cat /sys/class/hwmon/hwmon20/temp1_input', '0') - self.vm.cmd('qom-set', path='/machine/peripheral/tmp-test', - property='temperature', value=18000) - self.ssh_command_output_contains( - 'cat /sys/class/hwmon/hwmon20/temp1_input', '18000') diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 923f9e7078..d6d2c0196c 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -11,6 +11,7 @@ endif # Timeouts for individual tests that can be slow e.g. with debugging enabled test_timeouts = { + 'aarch64_aspeed' : 600, 'aarch64_raspi4' : 480, 'aarch64_sbsaref_alpine' : 720, 'aarch64_sbsaref_freebsd' : 720, @@ -48,6 +49,7 @@ tests_generic_bsduser = [ ] tests_aarch64_system_thorough = [ + 'aarch64_aspeed', 'aarch64_raspi3', 'aarch64_raspi4', 'aarch64_sbsaref', diff --git a/tests/functional/test_aarch64_aspeed.py b/tests/functional/test_aarch64_aspeed.py new file mode 100644 index 0000000000..59916efd71 --- /dev/null +++ b/tests/functional/test_aarch64_aspeed.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python3 +# +# Functional test that boots the ASPEED SoCs with firmware +# +# Copyright (C) 2022 ASPEED Technology Inc +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import sys +import os + +from qemu_test import QemuSystemTest, Asset +from qemu_test import wait_for_console_pattern +from qemu_test import exec_command_and_wait_for_pattern +from qemu_test.utils import archive_extract + +class AST2x00MachineSDK(QemuSystemTest): + + def do_test_aarch64_aspeed_sdk_start(self, image): + self.require_netdev('user') + self.vm.set_console() + self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw', + '-net', 'nic', '-net', 'user', '-snapshot') + + self.vm.launch() + + wait_for_console_pattern(self, 'U-Boot 2023.10') + wait_for_console_pattern(self, '## Loading kernel from FIT Image') + wait_for_console_pattern(self, 'Starting kernel ...') + + ASSET_SDK_V902_AST2700 = Asset( + 'https://github.com/AspeedTech-BMC/openbmc/releases/download/v09.02/ast2700-default-obmc.tar.gz', + 'ac969c2602f4e6bdb69562ff466b89ae3fe1d86e1f6797bb7969d787f82116a7') + + def test_aarch64_ast2700_evb_sdk_v09_02(self): + self.set_machine('ast2700-evb') + + image_path = self.ASSET_SDK_V902_AST2700.fetch() + archive_extract(image_path, self.workdir) + + num_cpu = 4 + image_dir = self.workdir + '/ast2700-default/' + uboot_size = os.path.getsize(image_dir + 'u-boot-nodtb.bin') + uboot_dtb_load_addr = hex(0x400000000 + uboot_size) + + load_images_list = [ + { + 'addr': '0x400000000', + 'file': image_dir + 'u-boot-nodtb.bin' + }, + { + 'addr': str(uboot_dtb_load_addr), + 'file': image_dir + 'u-boot.dtb' + }, + { + 'addr': '0x430000000', + 'file': image_dir + 'bl31.bin' + }, + { + 'addr': '0x430080000', + 'file': image_dir + 'optee/tee-raw.bin' + } + ] + + for load_image in load_images_list: + addr = load_image['addr'] + file = load_image['file'] + self.vm.add_args('-device', + f'loader,force-raw=on,addr={addr},file={file}') + + for i in range(num_cpu): + self.vm.add_args('-device', + f'loader,addr=0x430000000,cpu-num={i}') + + self.vm.add_args('-smp', str(num_cpu)) + self.vm.add_args('-device', + 'tmp105,bus=aspeed.i2c.bus.1,address=0x4d,id=tmp-test') + self.do_test_aarch64_aspeed_sdk_start(image_dir + 'image-bmc') + + wait_for_console_pattern(self, 'ast2700-default login:') + + exec_command_and_wait_for_pattern(self, 'root', 'Password:') + exec_command_and_wait_for_pattern(self, + '0penBmc', 'root@ast2700-default:~#') + + exec_command_and_wait_for_pattern(self, + 'echo lm75 0x4d > /sys/class/i2c-dev/i2c-1/device/new_device ', + 'i2c i2c-1: new_device: Instantiated device lm75 at 0x4d'); + exec_command_and_wait_for_pattern(self, + 'cat /sys/class/hwmon/hwmon20/temp1_input', '0') + self.vm.cmd('qom-set', path='/machine/peripheral/tmp-test', + property='temperature', value=18000) + exec_command_and_wait_for_pattern(self, + 'cat /sys/class/hwmon/hwmon20/temp1_input', '18000') + + +if __name__ == '__main__': + QemuSystemTest.main() From patchwork Mon Nov 25 15:21:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885114 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 367D2D58D5A for ; Mon, 25 Nov 2024 15:27:25 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFaz9-0007jC-Iw; Mon, 25 Nov 2024 10:26:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFayo-0006zv-G2 for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:27 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFaym-0002Z8-3m for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:26 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-434a2f3bae4so3268185e9.3 for ; Mon, 25 Nov 2024 07:26:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548380; x=1733153180; 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=r7UAnsHqaDmxl6AZGGFsULH2SSaadxWmdCZAtd1JK2s=; b=gDN3/a28knBp5e1pPEGJTslUrF/3qJcXTHbXy12kKmYWaEnuMA44SWSfu13w1Y9gQU VMSuXaFDIjob4hJPRCUicsy5V7rw1FoV+n5b5ktHY5E3nRPdOlfjG2wVOzfPriKuFOlW ZoHq2/uXmqiEK4hfeWmWz3jL5RqKiJveJpScQnMOSHIlyJNgsHBvE1wbD76Dk8QUjl+6 iKrTISfCN2AuWB9BH2y0biSIWyjDelyzXCUrTMK6v4ZXpnST1vQbDpF1c+Ea/dv5dydr pfOcVWDCzVJ1VqzVbjohcaspUMixctptubGzXGGIuOpwmVNBEtDwFqOXex6O3jeG/MbF W+fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548380; x=1733153180; 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=r7UAnsHqaDmxl6AZGGFsULH2SSaadxWmdCZAtd1JK2s=; b=b2nbP0mOFEi5t9B5dwcYPoUj+SSixQLUYefWBtZ1scA7pccwfmwoMX76P7GwdQoE6c dFHrckvy+0kp4DcNhWeX3qcLyWkkUXWPOWp5qXEPWYj28ck+L5F/hPOBkquaZlAoME2r AV2KHIZWFprUnN3l/wBmn1fwVq1HdXf2yo4Dak1VzszwLCibwQ2BaOhwG4lbYmm1x5e7 bcrsxJIyjfqiMDMNlxHeuL9SVCRm5v5iH8stQK0Yb7xFwTSrhlN5NioECsaDcWNMXEMK kYwE5l/BBzpDCjj7Z8CdDCVNv6htIGy63Mx8aZAI+yE7T0l6HWcsNgFRuu1oNl9H5Z16 SZfg== X-Gm-Message-State: AOJu0YxYs5asffkBHYvVcNP3uCYUGUtwXr22QsohCltqmFSoBBPB4Wi+ DO0rWZd7t5CXgysyZX+z/fRfzNF2Ha3/4znhq4bgHRcpALZ+AqRTs9Q+xCivpG3ksS+iUwPJdPu Q X-Gm-Gg: ASbGncsqfq78schakQY/A/dnkQ78QEJEjg2TqoZx9KsWoj/yB0ynxK3GzYLAtuTiME5 m/UexpSk8rlg5YyG+YS8tzHxGYdg3+XY9SyOFPwcjrduAC+WSua0LmXvrpRRM7j1gveWxGaCazZ BcMUMyau6r6UApbq12pUSTbyP1Fav0QGwMqlVd5/4ldSE+wZ9eIULOMBI3NzRLVX5HfaK2llh/h 6kSWYWFbkvo1xFHEgZWTzW/qnHjJD3EGUZRWGQse49ReUpF X-Google-Smtp-Source: AGHT+IF34VEFuVBjw+i6ru2KJNRvIVH/JuRrs+foXlqeGcnQdPd5RYB8lQ9/i1krvX11GgeC4Ljgqg== X-Received: by 2002:a5d:5f4b:0:b0:382:1831:f7db with SMTP id ffacd0b85a97d-38260b59bc9mr10841842f8f.19.1732548380448; Mon, 25 Nov 2024 07:26:20 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fafe338sm10582103f8f.33.2024.11.25.07.26.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:26:16 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 467D863A55; Mon, 25 Nov 2024 15:21:08 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?C=C3=A9dric_Le_Goater?= , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?C=C3=A9dri?= =?utf-8?q?c_Le_Goater?= , Peter Maydell , Steven Lee , Troy Lee , Jamin Lin , Andrew Jeffery , Joel Stanley , qemu-arm@nongnu.org (open list:ASPEED BMCs) Subject: [PULL 27/28] tests/functional: Convert Aspeed arm SDK tests Date: Mon, 25 Nov 2024 15:21:04 +0000 Message-Id: <20241125152105.2100395-28-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Cédric Le Goater Drop the SSH connection which was introduced in the avocado tests to workaround read issues when interacting with console. EXTRA_BOOTARGS was introduced to reduce the console output at Linux boot time. This didn't have the desired effect as we still had issues when trying to match patterns on the console and we had to use the ssh connection as a workaround. While at it, remove the U-Boot EXTRA_BOOTARGS variable which has become useless. Signed-off-by: Cédric Le Goater Reviewed-by: Thomas Huth Message-Id: <20241122090322.1934697-3-clg@redhat.com> Signed-off-by: Alex Bennée diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py deleted file mode 100644 index 2240c82abf..0000000000 --- a/tests/avocado/machine_aspeed.py +++ /dev/null @@ -1,124 +0,0 @@ -# Functional test that boots the ASPEED SoCs with firmware -# -# Copyright (C) 2022 ASPEED Technology Inc -# -# 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 time -import os -import tempfile -import subprocess - -from avocado_qemu import LinuxSSHMixIn -from avocado_qemu import QemuSystemTest -from avocado_qemu import wait_for_console_pattern -from avocado_qemu import exec_command -from avocado_qemu import exec_command_and_wait_for_pattern -from avocado_qemu import interrupt_interactive_console_until_pattern -from avocado_qemu import has_cmd -from avocado.utils import archive -from avocado import skipUnless - -class AST2x00MachineSDK(QemuSystemTest, LinuxSSHMixIn): - - EXTRA_BOOTARGS = ( - 'quiet ' - 'systemd.mask=org.openbmc.HostIpmi.service ' - 'systemd.mask=xyz.openbmc_project.Chassis.Control.Power@0.service ' - 'systemd.mask=modprobe@fuse.service ' - 'systemd.mask=rngd.service ' - 'systemd.mask=obmc-console@ttyS2.service ' - ) - - # FIXME: Although these tests boot a whole distro they are still - # slower than comparable machine models. There may be some - # optimisations which bring down the runtime. In the meantime they - # have generous timeouts and are disable for CI which aims for all - # tests to run in less than 60 seconds. - timeout = 240 - - def wait_for_console_pattern(self, success_message, vm=None): - wait_for_console_pattern(self, success_message, - failure_message='Kernel panic - not syncing', - vm=vm) - - def do_test_arm_aspeed_sdk_start(self, image): - self.require_netdev('user') - self.vm.set_console() - self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw', - '-net', 'nic', '-net', 'user,hostfwd=:127.0.0.1:0-:22') - self.vm.launch() - - self.wait_for_console_pattern('U-Boot 2019.04') - interrupt_interactive_console_until_pattern( - self, 'Hit any key to stop autoboot:', 'ast#') - exec_command_and_wait_for_pattern( - self, 'setenv bootargs ${bootargs} ' + self.EXTRA_BOOTARGS, 'ast#') - exec_command_and_wait_for_pattern( - self, 'boot', '## Loading kernel from FIT Image') - self.wait_for_console_pattern('Starting kernel ...') - - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') - def test_arm_ast2500_evb_sdk(self): - """ - :avocado: tags=arch:arm - :avocado: tags=machine:ast2500-evb - :avocado: tags=flaky - """ - - image_url = ('https://github.com/AspeedTech-BMC/openbmc/releases/' - 'download/v08.06/ast2500-default-obmc.tar.gz') - image_hash = ('e1755f3cadff69190438c688d52dd0f0d399b70a1e14b1d3d5540fc4851d38ca') - image_path = self.fetch_asset(image_url, asset_hash=image_hash, - algorithm='sha256') - archive.extract(image_path, self.workdir) - - self.do_test_arm_aspeed_sdk_start( - self.workdir + '/ast2500-default/image-bmc') - self.wait_for_console_pattern('nodistro.0 ast2500-default ttyS4') - - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') - def test_arm_ast2600_evb_sdk(self): - """ - :avocado: tags=arch:arm - :avocado: tags=machine:ast2600-evb - :avocado: tags=flaky - """ - - image_url = ('https://github.com/AspeedTech-BMC/openbmc/releases/' - 'download/v08.06/ast2600-a2-obmc.tar.gz') - image_hash = ('9083506135f622d5e7351fcf7d4e1c7125cee5ba16141220c0ba88931f3681a4') - image_path = self.fetch_asset(image_url, asset_hash=image_hash, - algorithm='sha256') - archive.extract(image_path, self.workdir) - - self.vm.add_args('-device', - 'tmp105,bus=aspeed.i2c.bus.5,address=0x4d,id=tmp-test'); - self.vm.add_args('-device', - 'ds1338,bus=aspeed.i2c.bus.5,address=0x32'); - self.do_test_arm_aspeed_sdk_start( - self.workdir + '/ast2600-a2/image-bmc') - self.wait_for_console_pattern('nodistro.0 ast2600-a2 ttyS4') - - self.ssh_connect('root', '0penBmc', False) - self.ssh_command('dmesg -c > /dev/null') - - self.ssh_command_output_contains( - 'echo lm75 0x4d > /sys/class/i2c-dev/i2c-5/device/new_device ; ' - 'dmesg -c', - 'i2c i2c-5: new_device: Instantiated device lm75 at 0x4d'); - self.ssh_command_output_contains( - 'cat /sys/class/hwmon/hwmon19/temp1_input', '0') - self.vm.cmd('qom-set', path='/machine/peripheral/tmp-test', - property='temperature', value=18000); - self.ssh_command_output_contains( - 'cat /sys/class/hwmon/hwmon19/temp1_input', '18000') - - self.ssh_command_output_contains( - 'echo ds1307 0x32 > /sys/class/i2c-dev/i2c-5/device/new_device ; ' - 'dmesg -c', - 'i2c i2c-5: new_device: Instantiated device ds1307 at 0x32'); - year = time.strftime("%Y") - self.ssh_command_output_contains('/sbin/hwclock -f /dev/rtc1', year); - diff --git a/tests/functional/test_arm_aspeed.py b/tests/functional/test_arm_aspeed.py index 5fb1adf464..c2c152229b 100755 --- a/tests/functional/test_arm_aspeed.py +++ b/tests/functional/test_arm_aspeed.py @@ -252,6 +252,74 @@ def test_arm_ast2600_evb_buildroot_tpm(self): self.do_test_arm_aspeed_buildroot_poweroff() + def do_test_arm_aspeed_sdk_start(self, image): + self.require_netdev('user') + self.vm.set_console() + self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw', + '-net', 'nic', '-net', 'user', '-snapshot') + self.vm.launch() + + self.wait_for_console_pattern('U-Boot 2019.04') + self.wait_for_console_pattern('## Loading kernel from FIT Image') + self.wait_for_console_pattern('Starting kernel ...') + + ASSET_SDK_V806_AST2500 = Asset( + 'https://github.com/AspeedTech-BMC/openbmc/releases/download/v08.06/ast2500-default-obmc.tar.gz', + 'e1755f3cadff69190438c688d52dd0f0d399b70a1e14b1d3d5540fc4851d38ca') + + def test_arm_ast2500_evb_sdk(self): + self.set_machine('ast2500-evb') + + image_path = self.ASSET_SDK_V806_AST2500.fetch() + + archive_extract(image_path, self.workdir) + + self.do_test_arm_aspeed_sdk_start( + self.workdir + '/ast2500-default/image-bmc') + + self.wait_for_console_pattern('ast2500-default login:') + + ASSET_SDK_V806_AST2600_A2 = Asset( + 'https://github.com/AspeedTech-BMC/openbmc/releases/download/v08.06/ast2600-a2-obmc.tar.gz', + '9083506135f622d5e7351fcf7d4e1c7125cee5ba16141220c0ba88931f3681a4') + + def test_arm_ast2600_evb_sdk(self): + self.set_machine('ast2600-evb') + + image_path = self.ASSET_SDK_V806_AST2600_A2.fetch() + + archive_extract(image_path, self.workdir) + + self.vm.add_args('-device', + 'tmp105,bus=aspeed.i2c.bus.5,address=0x4d,id=tmp-test'); + self.vm.add_args('-device', + 'ds1338,bus=aspeed.i2c.bus.5,address=0x32'); + self.do_test_arm_aspeed_sdk_start( + self.workdir + '/ast2600-a2/image-bmc') + + self.wait_for_console_pattern('ast2600-a2 login:') + + exec_command_and_wait_for_pattern(self, 'root', 'Password:') + exec_command_and_wait_for_pattern(self, '0penBmc', 'root@ast2600-a2:~#') + + exec_command_and_wait_for_pattern(self, + 'echo lm75 0x4d > /sys/class/i2c-dev/i2c-5/device/new_device', + 'i2c i2c-5: new_device: Instantiated device lm75 at 0x4d'); + exec_command_and_wait_for_pattern(self, + 'cat /sys/class/hwmon/hwmon19/temp1_input', '0') + self.vm.cmd('qom-set', path='/machine/peripheral/tmp-test', + property='temperature', value=18000); + exec_command_and_wait_for_pattern(self, + 'cat /sys/class/hwmon/hwmon19/temp1_input', '18000') + + exec_command_and_wait_for_pattern(self, + 'echo ds1307 0x32 > /sys/class/i2c-dev/i2c-5/device/new_device', + 'i2c i2c-5: new_device: Instantiated device ds1307 at 0x32'); + year = time.strftime("%Y") + exec_command_and_wait_for_pattern(self, + '/sbin/hwclock -f /dev/rtc1', year); + + class AST2x00MachineMMC(LinuxKernelTest): ASSET_RAINIER_EMMC = Asset( From patchwork Mon Nov 25 15:21:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13885083 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9EEAFD58D5E for ; Mon, 25 Nov 2024 15:22:14 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFatw-00043x-Ta; Mon, 25 Nov 2024 10:21:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFatu-00041z-0O for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:22 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFats-0001nk-1L for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:21 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-38241435528so2978816f8f.2 for ; Mon, 25 Nov 2024 07:21:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548078; x=1733152878; 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=X0Jv+RuwZ4qU8JN4denFC5y9n9dFSvMC6CsXxTRmdVk=; b=epor75q1wX4WGtCVDHWWhae1sso0zGdxIXhDFE9qGdmDP5YKzOAtQZbGxBW5Z7Bsp9 ThttssYRTD3TeMGBrRS1sGol/9ru/fUajmA1s/C8mF7h7LP0MSNSVJNrc9lBbsLtPlJW 82xgwygn2NCxKld6JabRnpmbJQUBfDApQ9nkwV3qmH5jRZb7ESwo06fBQKR8qVZoQ0qH So/S/2VBlZ2ZCDGShuayvuUfFS9eT/UOKXi44qt2SEa4hpZ633twzCCqfEa/Nt58zeC+ nxs5qwqIIy65blZ0VZILU1skP2OA7DI4pkq8odd9tDqR/h0HwZKJWqNQPH9krsGAGZWS v9XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548078; x=1733152878; 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=X0Jv+RuwZ4qU8JN4denFC5y9n9dFSvMC6CsXxTRmdVk=; b=nogdauVf36/hzAirXFDW1scD5Es4P+MN0e8hCWy+5zw1g24LPz6idz6MucNVNxAf7p tzg4tD7KbK88m/jK1P6iQ+wieZ7YjA0FKWCw+FON7gAK5tihCMlEenwzSjvi0pQ6pxXm BNuzc3KEdDL3JndKBZN6djjiFSajbNhmHaSZ5YGeScHmruD3N8yH/SU4QkdPhkoTl51z yOu0ptYZ6/r01p8SxNwt4EYHmrg0+zy6aQA47L7ZKsVuuHM6Z+Z46DhZ43AprfYb0Fqj kes2FxX3+qUL3CDcvpo10i2NEJ9L76U8iPf1eKqP45FsdyetfFrJW2JtksCrxzJB22I7 R7BQ== X-Gm-Message-State: AOJu0YwxAWwZtW/l0sz7PNZbFlKWI+jBbouOcAzi9ACabGPPkU6L3WL6 KdJfO9npb0nVVTlilNe1ULRLGjQ/OUAZbUOfR51RIIMNHvTTMqU6H3Va3twAhqw0MO/Rg4AbEi5 4 X-Gm-Gg: ASbGncuJoUK5xAaVCK/3FSA/JvjH77X7NsOoETUc21y3AghV+Lxefdug+UPs564SiM3 u0WXko6lTSvYEESX/1d2iwF46zzRrprNDoxFu6bDyea8oxxYw3p20awdMku/EtHS6KuoYWpuiwD HI7kzjhOWiSB/whyXmOpGHTSq4dNNQ3Yurl8NuDlTM9VJ9taJ8HaSHKz+pWlZlHISM2hVOEAc0p 3C2cSK0O3tap/UN1aNZ+B7IXkGQhEsdWkP1aUnDyHkiDBtp X-Google-Smtp-Source: AGHT+IF8HNQBJFCwpfegBfbz3ISlIuQVCPRvhZ2vsBWTnn8MXg6hhvUrEjkbzSRUyNf5T3m7pO762A== X-Received: by 2002:a05:6000:1fab:b0:382:4aa0:e728 with SMTP id ffacd0b85a97d-38260b46dd6mr11847210f8f.1.1732548078384; Mon, 25 Nov 2024 07:21:18 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-433cde1107csm133489385e9.15.2024.11.25.07.21.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:21:15 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 5CBB863ACC; Mon, 25 Nov 2024 15:21:08 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?C=C3=A9dric_Le_Goater?= , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?C=C3=A9dri?= =?utf-8?q?c_Le_Goater?= , Peter Maydell , Steven Lee , Troy Lee , Jamin Lin , Andrew Jeffery , Joel Stanley , qemu-arm@nongnu.org (open list:ASPEED BMCs) Subject: [PULL 28/28] tests/functional: Remove sleep workarounds from Aspeed tests Date: Mon, 25 Nov 2024 15:21:05 +0000 Message-Id: <20241125152105.2100395-29-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Cédric Le Goater These were introduced in the avocado tests to workaround read issues when interacting with console. They are no longer necessary and we can use the expected "login:" string or the command prompt now. Drop the last use of exec_command. Signed-off-by: Cédric Le Goater Reviewed-by: Thomas Huth Message-Id: <20241122090322.1934697-4-clg@redhat.com> Signed-off-by: Alex Bennée diff --git a/tests/functional/test_arm_aspeed.py b/tests/functional/test_arm_aspeed.py index c2c152229b..d88170ac24 100755 --- a/tests/functional/test_arm_aspeed.py +++ b/tests/functional/test_arm_aspeed.py @@ -14,7 +14,6 @@ from qemu_test import LinuxKernelTest, Asset from qemu_test import exec_command_and_wait_for_pattern from qemu_test import interrupt_interactive_console_until_pattern -from qemu_test import exec_command from qemu_test import has_cmd from qemu_test.utils import archive_extract from zipfile import ZipFile @@ -136,10 +135,8 @@ def do_test_arm_aspeed_buildroot_start(self, image, cpu_id, pattern='Aspeed EVB' self.wait_for_console_pattern('lease of 10.0.2.15') # the line before login: self.wait_for_console_pattern(pattern) - time.sleep(0.1) - exec_command(self, 'root') - time.sleep(0.1) - exec_command(self, "passw0rd") + exec_command_and_wait_for_pattern(self, 'root', 'Password:') + exec_command_and_wait_for_pattern(self, 'passw0rd', '#') def do_test_arm_aspeed_buildroot_poweroff(self): exec_command_and_wait_for_pattern(self, 'poweroff', @@ -158,7 +155,7 @@ def test_arm_ast2500_evb_buildroot(self): self.vm.add_args('-device', 'tmp105,bus=aspeed.i2c.bus.3,address=0x4d,id=tmp-test'); self.do_test_arm_aspeed_buildroot_start(image_path, '0x0', - 'Aspeed AST2500 EVB') + 'ast2500-evb login:') exec_command_and_wait_for_pattern(self, 'echo lm75 0x4d > /sys/class/i2c-dev/i2c-3/device/new_device', @@ -188,7 +185,8 @@ def test_arm_ast2600_evb_buildroot(self): 'ds1338,bus=aspeed.i2c.bus.3,address=0x32'); self.vm.add_args('-device', 'i2c-echo,bus=aspeed.i2c.bus.3,address=0x42'); - self.do_test_arm_aspeed_buildroot_start(image_path, '0xf00', 'Aspeed AST2600 EVB') + self.do_test_arm_aspeed_buildroot_start(image_path, '0xf00', + 'ast2600-evb login:') exec_command_and_wait_for_pattern(self, 'echo lm75 0x4d > /sys/class/i2c-dev/i2c-3/device/new_device', @@ -209,8 +207,8 @@ def test_arm_ast2600_evb_buildroot(self): exec_command_and_wait_for_pattern(self, 'echo slave-24c02 0x1064 > /sys/bus/i2c/devices/i2c-3/new_device', 'i2c i2c-3: new_device: Instantiated device slave-24c02 at 0x64'); - exec_command(self, 'i2cset -y 3 0x42 0x64 0x00 0xaa i'); - time.sleep(0.1) + exec_command_and_wait_for_pattern(self, + 'i2cset -y 3 0x42 0x64 0x00 0xaa i', '#'); exec_command_and_wait_for_pattern(self, 'hexdump /sys/bus/i2c/devices/3-1064/slave-eeprom', '0000000 ffaa ffff ffff ffff ffff ffff ffff ffff');