From patchwork Sat Mar 1 17:20:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Cain X-Patchwork-Id: 13997635 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 4A143C021B8 for ; Sat, 1 Mar 2025 17:22:40 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1toQWg-0003Db-4t; Sat, 01 Mar 2025 12: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 1toQWY-0003BM-BE for qemu-devel@nongnu.org; Sat, 01 Mar 2025 12:21:14 -0500 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1toQWR-0008SV-WA for qemu-devel@nongnu.org; Sat, 01 Mar 2025 12:21:13 -0500 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5213J6v1015653 for ; Sat, 1 Mar 2025 17:21:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= pSwTbZf0rhHgEbo8zKq7Sa8B/wzbDH7ANNE+bmuVwT0=; b=DPJDlc43HnP/EH1F DRTb9C2a7sA+NT31iY1u2geFfxHTwfq+1RLF6+kisCyaFoX9rLReQlhftpC3B8EI 2mESQXKgZzXyyZut3Ls8TbQ6ypka1pYv7zzR5g6aK8lkun9Tzq4zt8MLr2o5RwL3 0STtjrRTeqjdnY5Y9XFrcwtez1Adb4N96TMUPHxSZyBObTZ38gJjNPVVjbpYtYBF 2RSHYO2IgYK7CjIDjiLu4tjG1kGi485Ex/8mCj53Bhtkt3TDoUdAfcwEUqU1zUvG bOoi7cHeQqMqCUJW7wrykqhjREXXJ4mx/xDD2OT9mIvjhAa13ZDkmU3m7UyuweL+ FoKslQ== Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 453t7hs4nc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Sat, 01 Mar 2025 17:21:05 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-22368a8979cso30697065ad.2 for ; Sat, 01 Mar 2025 09:21:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740849663; x=1741454463; 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=pSwTbZf0rhHgEbo8zKq7Sa8B/wzbDH7ANNE+bmuVwT0=; b=M4lq3wLtEPH/VemcCCghC1fOwqVJ1LZSyFLZ3Q86k2Z6ZbbsVNLF1r1IgbFmVul4VH 0dpz8q/SfqIaPajp9TdnSp0MF6f+ucJFteXkqKh7yQtjFSQZLFADzCbqAUCAFJb+pqJO MHtDsPrgogR6pGVsreH8ZCINmZJmmtXkRd+j3wzH/7DdIX53m058SQdpexmq36pOHfW0 rgJJAL8a51L9R2VTCZZ0Ax4pYLCVZ957MwfweoMyxkinxEVfR6xv84t81g6eYKph5XWj svWiShisYzlfVi3WPkr5mvvMyOOIahl0RJVDQV7qBOxE3pRthfyCalZqw+0sChkWKY4M 2SWg== X-Gm-Message-State: AOJu0YzId/3ggcJp9fplnICgItX+vYncThLHiKaTZrzUORB/qwFhFh6i iXpgy3p/E9O3VmU3nZ6HNr9ddz3uEaVCClQnMXDVaOPqyOfZ51WdvZHcGE+VTBSGAgiXif2WsY5 e2nUBLLMSeQhgxJaWQoLulU3weMJcNCDon5O0Av0gZOFJTv2U0VMUDh4hqNbXiw== X-Gm-Gg: ASbGnctQkNwTYeGz1f9vfQCOzfSWHKi35bdwNmSWSeRCAjPCdp6jTCi39uytP9EEp3P bqLobsSiovHfofcOBkFCI6j6uCpZhBnuhOXNxq5DwDqeEZWwd47iEkUbAPffV/gb5yk/9gONv7d +RpP5fZG8WsGoeMpwMoyCRXlYiUdAdIyoVJOTOVRoZ8A3kiwre/gd/P2P2sZxbWVHq6qzWywOV2 xc0NSGMZ814OIKGbrMF+T2kgPvVsAo4bTSNummVUqxkpcxVRz/LKIi7LUu4qkE1hjdEiTeLkzpu 0M1hpWCsAkfOIGaMQZqRYSbcIm9ySW4Sg4l9xf5L1ocO37zS/Jg5eiOrwyhfeclX X-Received: by 2002:a17:902:e54a:b0:220:bdf2:e51e with SMTP id d9443c01a7336-22368fa90cbmr126264955ad.26.1740849663532; Sat, 01 Mar 2025 09:21:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IHaxTMHsMYf/wfY47PfNo/kkqGKEmg+qYppWt1opTxXmd3cePcWkq0gHHw/apXqLTQvTdPEyA== X-Received: by 2002:a17:902:e54a:b0:220:bdf2:e51e with SMTP id d9443c01a7336-22368fa90cbmr126264715ad.26.1740849663155; Sat, 01 Mar 2025 09:21:03 -0800 (PST) Received: from hu-bcain-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-223501f9dacsm51308275ad.83.2025.03.01.09.21.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Mar 2025 09:21:02 -0800 (PST) From: Brian Cain To: qemu-devel@nongnu.org Cc: brian.cain@oss.qualcomm.com, richard.henderson@linaro.org, philmd@linaro.org, quic_mathbern@quicinc.com, ale@rev.ng, anjo@rev.ng, quic_mliebel@quicinc.com, ltaylorsimpson@gmail.com, alex.bennee@linaro.org, quic_mburton@quicinc.com, sidneym@quicinc.com, Brian Cain Subject: [PATCH 8/8] tests/functional: Add a hexagon minivm test Date: Sat, 1 Mar 2025 09:20:45 -0800 Message-Id: <20250301172045.1295412-9-brian.cain@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250301172045.1295412-1-brian.cain@oss.qualcomm.com> References: <20250301172045.1295412-1-brian.cain@oss.qualcomm.com> MIME-Version: 1.0 X-Proofpoint-GUID: GeYj8E_07dvagkenMnPljsxNv7brsZtP X-Proofpoint-ORIG-GUID: GeYj8E_07dvagkenMnPljsxNv7brsZtP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-03-01_07,2025-02-28_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 impostorscore=0 phishscore=0 spamscore=0 malwarescore=0 adultscore=0 suspectscore=0 mlxlogscore=999 clxscore=1015 mlxscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2502100000 definitions=main-2503010140 Received-SPF: pass client-ip=205.220.180.131; envelope-from=brian.cain@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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: Brian Cain Signed-off-by: Brian Cain --- MAINTAINERS | 1 + tests/functional/meson.build | 8 +++++ tests/functional/test_hexagon_minivm.py | 42 +++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100755 tests/functional/test_hexagon_minivm.py diff --git a/MAINTAINERS b/MAINTAINERS index deeb7878c8..48a5e7c005 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -247,6 +247,7 @@ F: gdb-xml/hexagon*.xml F: docs/system/target-hexagon.rst F: docs/devel/hexagon-sys.rst F: docs/devel/hexagon-l2vic.rst +F: tests/functional/test_hexagon_minivm.py T: git https://github.com/quic/qemu.git hex-next Hexagon idef-parser diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 111d8bab26..78b42e58f9 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -135,6 +135,14 @@ tests_i386_system_quick = [ 'migration', ] +test_timeouts += { + 'hexagon_minivm': 180, +} + +tests_hexagon_system_quick = [ + 'hexagon_minivm', +] + tests_i386_system_thorough = [ 'i386_tuxrun', ] diff --git a/tests/functional/test_hexagon_minivm.py b/tests/functional/test_hexagon_minivm.py new file mode 100755 index 0000000000..2ba92bcce3 --- /dev/null +++ b/tests/functional/test_hexagon_minivm.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python3 +# +# Copyright(c) 2024-2025 Qualcomm Innovation Center, Inc. All Rights Reserved. +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os +from glob import glob +from qemu_test import QemuSystemTest, Asset +from qemu_test import wait_for_console_pattern + +class MiniVMTest(QemuSystemTest): + + timeout = 180 + GUEST_ENTRY = 0xc0000000 + + REPO = 'https://artifacts.codelinaro.org/artifactory' + ASSET_TARBALL = \ + Asset(f'{REPO}/codelinaro-toolchain-for-hexagon/' + '19.1.5/hexagon_minivm_2024_Dec_15.tar.gz', + 'd7920b5ff14bed5a10b23ada7d4eb927ede08635281f25067e0d5711feee2c2a') + + def test_minivm(self): + self.set_machine('virt') + self.archive_extract(self.ASSET_TARBALL) + rootfs_path = f'{self.workdir}/hexagon-unknown-linux-musl-rootfs' + kernel_path = f'{rootfs_path}/boot/minivm' + + assert(os.path.exists(kernel_path)) + for test_bin_path in glob(f'{rootfs_path}/boot/test_*'): + print(f'# Testing "{os.path.basename(test_bin_path)}"') + + vm = self.get_vm() + vm.add_args('-kernel', kernel_path, + '-device', + f'loader,addr={hex(self.GUEST_ENTRY)},file={test_bin_path}') + vm.launch() + vm.wait() + self.assertEqual(vm.exitcode(), 0) + +if __name__ == '__main__': + QemuSystemTest.main()