From patchwork Fri May 30 12:49:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 893332 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e0d:0:b0:3a4:ee3f:8f15 with SMTP id p13csp1013845wrt; Fri, 30 May 2025 05:51:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU6D9WmKD9M5UKVvVMVIEIRRPaTqQ3xGaimObK/PTBuyUe/CdguVjBMVGQBxwlw7bN4RBwbeQ==@linaro.org X-Google-Smtp-Source: AGHT+IEoi0+qrLIAMk4lWQiouY6viFO5TqzE8znEvWI/O4L1E6/nmSSkupJxs4zoHXWbO7vkpgPz X-Received: by 2002:a05:622a:420a:b0:494:771c:7bca with SMTP id d75a77b69052e-4a43232e58cmr112500591cf.22.1748609497689; Fri, 30 May 2025 05:51:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1748609497; cv=none; d=google.com; s=arc-20240605; b=JchllfMTx0H63yM/r/0futKC0VyBmWoYkfskpYwkA6zvMr0T16KWR7hLO9KPLm2mxV islQgWWimJEIMFTMbbGWi8GzNsOLGjYS5Kii9iEAS9gbBp4GUMrHBuh8Esn6LZPHjPh7 vouKa1sv74ZfunBn9whf6lv1vqBtbjSRalwOnT5qySRTvFODUrED23jMT9NGVtKXqnUS /vCkb7P0sqiWOoZrqqxFWoTubqy+x6ZWAIsg0G0+A9t5kIMjTSdlBny13ZSOu7xsWBmu +8phozMUCdOsFxLrlm3Ndy2BC7gShO0y2D009VSv5j5iX3mzhQYDugaqeCOW77BHTi4J ueww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=/lzXjjmX1bay6vF6d/3ie7l2smbDsKYexDQ/VeVxRWo=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=KlVMz9kCE+dGMORzmychA0U/1FphmGZFpo0H9JwLUxKsSAahX/tOBWSGtxo7/z3Nyc Xg/RS16mDmfSAOfeu2lOerX5Cf2JJ88ugnrhQ5v6glOXwzgTuWGcPdPDk3e+VHPMEZIQ ysitbYwNjzBye1yPa0d9Iu2Axh5OuK30hzTUZla7zEfZ6Faf93lxJSxckeVhuV1TFZfu KWGwqCzJTf0CcHS7MwuAyYtFchAWsWI+nVpDARpAzJDQEBxA1EARDy6Lc4W6KdUiKAlo m4k0Pak/gbbWR9knLlQk4GauLnE/9quIBx7xgpD0fVh3XMaK0H7ZntrviWPE5krDXUYQ AF+Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uhUOMiSm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4a435880f58si37066071cf.49.2025.05.30.05.51.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 May 2025 05:51:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uhUOMiSm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKzBz-0002EH-He; Fri, 30 May 2025 08:50:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uKzBw-0002DV-46 for qemu-devel@nongnu.org; Fri, 30 May 2025 08:50:32 -0400 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uKzBu-0001ut-4G for qemu-devel@nongnu.org; Fri, 30 May 2025 08:50:31 -0400 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-ad891bb0957so353909366b.3 for ; Fri, 30 May 2025 05:50:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1748609427; x=1749214227; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/lzXjjmX1bay6vF6d/3ie7l2smbDsKYexDQ/VeVxRWo=; b=uhUOMiSm1wuSXWc/Gw0igRoVXpsHISYWxggy9ml3wNyNWinx6vh1s+boVIazE3FvR0 cglzdSpLUi4gucJ80UIBxm9RlZTnxjerzStwKSxPOxA1z9Z0mtjMcvMYxtB+wmR7M1nG VGlf62dAh/gbnwL7rn0TxZsIpQM5imd9ZZSIVExT2IwjSZaQzm6usPxGQFNJorxtdZb/ TY1Zksiy5UtESerrSaiWyTq8D98eTzJM+BEgeyn8ekgnt8P1zzWbmr9jbfK6jX19jkyr XjcZR7f4pF8KMNT1wMKvWXXpYJ103VTgc7AhSPArjAhoz9QDEsFe8E0BJeWEg31BMVly Wl0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748609427; x=1749214227; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/lzXjjmX1bay6vF6d/3ie7l2smbDsKYexDQ/VeVxRWo=; b=RUZsZ5CjgAkTyw2K0HYK0xKcBYW831ViFrGya5ug3CEXnyyW9FzXvV2UdIhUcFldsO 2qDLC97mgbeQ+ULIuNNn43bxd9XrMBWuaHhY93WIWeSOYnvKFsA5tZg/QhsAb5HPhQx2 1wg89WudMB8wMa8jA9TJHIS5c/eevsUvoht3DRutczi+5nzGx0EMs8OttfiDHHLgsxM7 7vDHjB5f+GuT6ZuYoxLooHqbM1qJMb4B+fcYDm209HYofgLq2mXXt8qYh1+bG3h3uUhl +LB3zhXwsfODCjOICnJLQhUM47TfMFan3nfmR6PNis3eE8b5zmve3diKc98y4AN9Jl4Z LU9A== X-Gm-Message-State: AOJu0Yyj/zJxnxWTOj+cagdvM/8LUQwtoph6hzyzaIIAfEHfSOrT3eWi ioJay2JgIuU1E6+BR/s7FBY+nouLgpYBCVAFyDMhjJ6jX0GsRO16u7Why8lBSiSbmw9jHT/suNL 7Jexk X-Gm-Gg: ASbGncuYWfMptDbfVUZ8cnyrP4NwBuZe2zgES1A72lKqF7jJNRqCy5eQaoK8pRiaq3r 4N1hfaZOkKn+6R6o6KI30fgAIyPO7GTttlos+V0XMQDlwUItVmEL1ez08YvkSvuSc9Hlk3IA13t 23GncZ0IAsckuhNxVoXoN3lKtPZmb+UVumwCPs2xkGBIkpkhSAq1ToZKq6clfSA4Sj7Zn0T9Xru RQbTvNqdm+mMqj2xo0sY2uUf5oz5lee6VeOTJI9WG9/F5nlJaeg76QLqiqfyetHx4tbBeu4Rr0/ LbPLaOg0q6w8J07NUfgHcJqXfm/+ylW4jotD2pvEmOn1ZUsdSjzT+a9HVjOJRRCDxZSk X-Received: by 2002:a05:600c:3b8e:b0:439:9b2a:1b2f with SMTP id 5b1f17b1804b1-450d64e2a97mr36477625e9.3.1748609416736; Fri, 30 May 2025 05:50:16 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-450d7fb7dafsm17235195e9.25.2025.05.30.05.50.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 May 2025 05:50:15 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 14/15] tests/functional: Add a test for the Stellaris arm machines Date: Fri, 30 May 2025 13:49:51 +0100 Message-ID: <20250530124953.383687-15-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250530124953.383687-1-peter.maydell@linaro.org> References: <20250530124953.383687-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=peter.maydell@linaro.org; helo=mail-ej1-x632.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Thomas Huth The 2023 edition of the QEMU advent calendar featured an image that we can use to test whether the lm3s6965evb machine is basically still working. And for the lm3s811evb there is a small test kernel on github which can be used to check its UART. Signed-off-by: Thomas Huth Message-id: 20250519170242.520805-1-thuth@redhat.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- MAINTAINERS | 1 + tests/functional/meson.build | 1 + tests/functional/test_arm_stellaris.py | 48 ++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100755 tests/functional/test_arm_stellaris.py diff --git a/MAINTAINERS b/MAINTAINERS index 973254fae79..16af37986a4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1004,6 +1004,7 @@ F: hw/display/ssd03* F: include/hw/input/gamepad.h F: include/hw/timer/stellaris-gptm.h F: docs/system/arm/stellaris.rst +F: tests/functional/test_arm_stellaris.py STM32L4x5 SoC Family M: Samuel Tardieu diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 52b4706cfe8..557d59ddf4d 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -137,6 +137,7 @@ tests_arm_system_thorough = [ 'arm_raspi2', 'arm_replay', 'arm_smdkc210', + 'arm_stellaris', 'arm_sx1', 'arm_vexpress', 'arm_virt', diff --git a/tests/functional/test_arm_stellaris.py b/tests/functional/test_arm_stellaris.py new file mode 100755 index 00000000000..cbd21cb1a0b --- /dev/null +++ b/tests/functional/test_arm_stellaris.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python3 +# +# Functional test that checks the serial console of the stellaris machines +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import QemuSystemTest, Asset, exec_command_and_wait_for_pattern +from qemu_test import wait_for_console_pattern + + +class StellarisMachine(QemuSystemTest): + + ASSET_DAY22 = Asset( + 'https://www.qemu-advent-calendar.org/2023/download/day22.tar.gz', + 'ae3a63ef4b7a22c21bfc7fc0d85e402fe95e223308ed23ac854405016431ff51') + + def test_lm3s6965evb(self): + self.set_machine('lm3s6965evb') + kernel_path = self.archive_extract(self.ASSET_DAY22, + member='day22/day22.bin') + self.vm.set_console() + self.vm.add_args('-kernel', kernel_path) + self.vm.launch() + + wait_for_console_pattern(self, 'In a one horse open') + + ASSET_NOTMAIN = Asset( + 'https://github.com/Ahelion/QemuArmM4FDemoSw/raw/master/build/notmain.bin', + '6ceda031aa081a420fca2fca9e137fa681d6e3820d820ad1917736cb265e611a') + + def test_lm3s811evb(self): + self.set_machine('lm3s811evb') + kernel_path = self.ASSET_NOTMAIN.fetch() + + self.vm.set_console() + self.vm.add_args('-cpu', 'cortex-m4') + self.vm.add_args('-kernel', kernel_path) + self.vm.launch() + + # The test kernel emits an initial '!' and then waits for input. + # For each character that we send it responds with a certain + # other ASCII character. + wait_for_console_pattern(self, '!') + exec_command_and_wait_for_pattern(self, '789', 'cdf') + + +if __name__ == '__main__': + QemuSystemTest.main()