From patchwork Tue Jun 10 12:56:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 895208 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ecd:b0:3a4:ee3f:8f15 with SMTP id ea13csp2254204wrb; Tue, 10 Jun 2025 06:07:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWJjcCMSGbvko59kXPUcK2q7g1h4X8fN0ImqrcXD1UgRtSPXqOqRlRxm4nvw6r1jczMgCrf0A==@linaro.org X-Google-Smtp-Source: AGHT+IFRninYb7A+qP8Bh19z5bgjycxIO57eSrN20+uzuBk9VHBZtnj5nzpBx7N4IwSKXBt9JpSI X-Received: by 2002:a05:600c:6995:b0:43b:c6a7:ac60 with SMTP id 5b1f17b1804b1-4531cfebb25mr32379105e9.10.1749560845460; Tue, 10 Jun 2025 06:07:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1749560845; cv=none; d=google.com; s=arc-20240605; b=Qs+C3/9SMSpgNcUMyiAOnogC4UhWhzcQnLYzn3eOUubHWQB9sRMimkh6yNnbvPwxmL 2JhMUqXnnPuwEORJeE0U4UifUJRalgnwvM+jBr6m2Z+fYyZpFO8TIzCjxVsWO03S3MC+ E3/IN8Rk0ciJjbqXTQNWlPpJZHorqftSln/o59OtuaAuM8OUTn7X7yyyxoJol3jT/5G0 +b0SzaWL+9AXn++qdNQnMKMO+pSRfXYru7sgz4QvNKVBUgHqgZiHSNNB+Uf9KKxe4kAl gS5WHbFnRgIVCLkRjIvChaHjvbXptzdVLtojQ8Ocj/xf8gBdBbDoKgSxZhXKqJZO1O04 XM5A== 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:cc:to :from:dkim-signature; bh=MnthyjpLQDqIlW5Rsj/+WcVAlzOijs/T5Gp1lZVZxOc=; fh=9ZxJW+G2ygeNSkqka7L8Nm8+fzOgYTDqwM9I09+d3OY=; b=SJz7bCE+QcCCe4OQzakOCH0Ekc7Pdc50fvNtujbR1LZZykj2tildQaRMqIoYeWl69d Kzs1IdqHOoY659AITQmtuggZGOIrJw7Am2V4GCCyL5jLONzWMKjJpZLA00pMf1jPCrCu olkVqrAMEOoZtIshY3keBumbq4CHJ3EDyx3OA92jZYOWjGdllMSslwO1f/oi+LTd9x0b e8af/ovYZ2TEAgGuHGw1uJB2cTtc7updcbTi7Qbce0MMOOSACfvkqqdviKPgw7etu7kH OJDMlcCO9Fyt4vzQ9cpHjTKbOre3s/EEQ7xMCjK8Hwlxu5g05gsuY0B3WHVVEk9xmECz kNlA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q0wkKOuM; 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 ffacd0b85a97d-3a5324b1f4fsi6989021f8f.894.2025.06.10.06.07.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Jun 2025 06:07:25 -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=q0wkKOuM; 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 1uOyYM-0007Wf-FZ; Tue, 10 Jun 2025 08:58:12 -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 1uOyXn-0006qA-Au for qemu-devel@nongnu.org; Tue, 10 Jun 2025 08:57:36 -0400 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 1uOyXk-0002e5-TR for qemu-devel@nongnu.org; Tue, 10 Jun 2025 08:57:34 -0400 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-3a4e742dc97so4142225f8f.0 for ; Tue, 10 Jun 2025 05:57:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749560250; x=1750165050; 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=MnthyjpLQDqIlW5Rsj/+WcVAlzOijs/T5Gp1lZVZxOc=; b=q0wkKOuMsO76pEcIzDuIdzeHZcQkY4Jf+JNGYpTtIjnLamEXlORzH1cIcnivb5ezLh UagSe46Xo58CFLwqRPYao1kp3Jh2c7zDGJJxRxR5O6hCOGiCPBnkVaKWl/2Bg1cL0w/o sevh2qkRgZT7W4nFQfhf8xhkKlGsuwqihGY2n4lNsMiHO6K1NqnDlhu1yXXpZXTkZ4BD qoqlgSUzofNO/bhlopLQ/3Yznq26YVs6rPOMwf6juzqAy1L7NqnEfWbMTCjKsnkIceru JHgD66kMOHOae8fPbOB4gXA6/MfeP3juDtJXy6y7tgTDRCOHdYwNYYw4miSj7Uo4kobg OH4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749560250; x=1750165050; 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=MnthyjpLQDqIlW5Rsj/+WcVAlzOijs/T5Gp1lZVZxOc=; b=uMlusNvyxxjSewgeSw0WrnHY40amWmq1B61bcrJPLneAEgoGu3m8gqgQesziNimICS niF5Z4TspUpGKTHXXppJLtn3Q+bTIaM6xhRWyHVp/pTgzkYXfcUUEyYSqrAnDB6KSu+H NNZZQTBOEt8usWROc0Jvbf/WyhccM7QmhVlyMhIOCqGmYPrdiTk44wAEZB0RAu/jJzcT uQ7yOoc4jyAVxPsVPB80o6MRrCMr7q4y+9VuGD7I4kcOaSjV3TszT3i6jm+y2yxVYbvl iptBat4Qc0oKak74Et0zB05VS5hmosVENvTMtUM/5wQIy9W1I9oOGi1O23Y+UZyjFOzs OTWA== X-Gm-Message-State: AOJu0YxSU4bIX51FGqXYiZOzd4V9WCgs8AY75ntP0CmekJ2r2aPxYK/3 oqzkytjhLgL2/osoKJU1XflKtH+3+3Z1+O65+mlTQSPpKi2rOadKcc4cMuUaHHO+s/CWgdnbJmV P7Cg62Zo= X-Gm-Gg: ASbGncvU9mmgzdki4h61xvrEaMmxbWyD+hnmD8wT4Bw/YeQpliiBOUF7ibdw5Ozs9WT ATYlMXN+EQS7sEREfovEV+Oi5NZUvzGkJDwZPY9lbqv9WS3nQcCjFHSwnOH0wIgiSdck4XG4F4B uYI+iSb+3hkYY4aCbUPNW4fXqHumRXAJ/Xstv8nez7TvKfg3fnr38aUI0L/2SgDpsfxvjNqk+yy VSd+Lkgbzg7Esqnmu/WuDzlbrl+N3tsAZx4zBSkVr0u8o4ha2iHU/cd0zqzHF8UryOQ0l89h39g +GKF1V2AnE8L0DjYYnT9g381l8ZMJ+u6SWGpx1+Acik8Zu6TVB9urcAFy5j67GSBBVNUkxbGZHX hzrY/1e7NfF8dZ5PH3VNUB6Xyh+Q3eo+0SLtXUa7gWA== X-Received: by 2002:a05:6000:178f:b0:3a4:f73e:abb1 with SMTP id ffacd0b85a97d-3a5513e3554mr3592555f8f.4.1749560250456; Tue, 10 Jun 2025 05:57:30 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a5323b59d0sm12374996f8f.38.2025.06.10.05.57.29 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 10 Jun 2025 05:57:30 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Mark Cave-Ayland , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= Subject: [PULL 12/24] tests/functional: Add a test for the Arduino UNO machine Date: Tue, 10 Jun 2025 14:56:21 +0200 Message-ID: <20250610125633.24411-13-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250610125633.24411-1-philmd@linaro.org> References: <20250610125633.24411-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Thomas Huth Check whether we can run a kernel that prints something to the serial console. Signed-off-by: Thomas Huth Reviewed-by: Mark Cave-Ayland Message-ID: <20250603184007.24521-1-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 3 ++- tests/functional/meson.build | 1 + tests/functional/test_avr_uno.py | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100755 tests/functional/test_avr_uno.py diff --git a/MAINTAINERS b/MAINTAINERS index 76399ad1e0e..a6f210dba5a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -219,7 +219,7 @@ S: Maintained F: docs/system/target-avr.rst F: gdb-xml/avr-cpu.xml F: target/avr/ -F: tests/functional/test_avr_mega2560.py +F: tests/functional/test_avr_*.py Hexagon TCG CPUs M: Brian Cain @@ -1236,6 +1236,7 @@ Arduino M: Philippe Mathieu-Daudé S: Maintained F: hw/avr/arduino.c +F: tests/functional/test_avr_uno.py HP-PARISC Machines ------------------ diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 557d59ddf4d..e406451cd3c 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -150,6 +150,7 @@ tests_arm_linuxuser_thorough = [ tests_avr_system_thorough = [ 'avr_mega2560', + 'avr_uno', ] tests_hppa_system_quick = [ diff --git a/tests/functional/test_avr_uno.py b/tests/functional/test_avr_uno.py new file mode 100755 index 00000000000..adb3b73da4f --- /dev/null +++ b/tests/functional/test_avr_uno.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python3 +# +# QEMU AVR Arduino UNO functional test +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import QemuSystemTest, Asset, wait_for_console_pattern + + +class UnoMachine(QemuSystemTest): + + ASSET_UNO = Asset( + ('https://github.com/RahulRNandan/LED_Blink_AVR/raw/' + 'c6d602cbb974a193/build/main.elf'), + '3009a4e2cf5c5b65142f538abdf66d4dc6bc6beab7e552fff9ae314583761b72') + + def test_uno(self): + """ + The binary constantly prints out 'LED Blink' + """ + self.set_machine('arduino-uno') + rom_path = self.ASSET_UNO.fetch() + + self.vm.add_args('-bios', rom_path) + self.vm.set_console() + self.vm.launch() + + wait_for_console_pattern(self, 'LED Blink') + + +if __name__ == '__main__': + QemuSystemTest.main()