From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B557446012; Tue, 7 Jan 2025 22:34:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40FBF40150; Tue, 7 Jan 2025 22:34:41 +0100 (CET) Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) by mails.dpdk.org (Postfix) with ESMTP id 0816D4014F for ; Tue, 7 Jan 2025 22:34:40 +0100 (CET) Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-6d8f65ef5abso135700656d6.3 for ; Tue, 07 Jan 2025 13:34:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1736285679; x=1736890479; darn=dpdk.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=+2Do5kxeGnqW0or2u4DC4E7AgAdEFsDcmoANLJs//IA=; b=g+vJIh1w4Cz5XtWaQcUDQatNKN3KE01m/Ig/G2QU9RbtT6VgnIsCVf8xnu9Xr7UzZC 6bhqe9IIqrWkynKFggEI1lmEa0JOp1x00JrA8qZv4EQ33/NjipIMjdBaDfX8eKD6VlE+ YE/vJIJIFz0gEphCGs+pf0nOeNBNb8UXDGjG4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736285679; x=1736890479; 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=+2Do5kxeGnqW0or2u4DC4E7AgAdEFsDcmoANLJs//IA=; b=GLCGg87NBcHzF+5XDZ8pNQ3Udj2s5IeFrUD+0vEJfgKCQsdhbnanj4Qi+uiiTBtbVt qa8aUeJa29M288DIUtx6cXwqKR+E63Dwk5j7nti/D8/4OsEOG5dM2OZfjDFeo7DSEGIX y4m4OxRthbsEQGdHlGQBSJrvE2iZy9mdTqJPkS7X8J1PVRlgQ0DGTS4/inoIqtwT/ACj /csB+d2O3emd7yd0xN2HPiDq9Sl/XCHXs0MZ0ijr6CNMR4tUwzXO0HhTPfML3O9pw88c 1TW93A7yAxcuPY8qoLjCciPJ+hdROjnXaIGtKbhb+xpeYL75rDqnF2GT4xz2l5VGL5PJ tFow== X-Gm-Message-State: AOJu0YwB/9zs2XnH3fCC/q8z5KyKDa8dozkC2llsAI3LqjgZcY3U1q0k 4EXIU7dAIUh1CntV8gmRxzcWo4oeTLCTGyhVQr/LKvKIo+pVK5NJBNT8++FM2bs= X-Gm-Gg: ASbGncvd6uZ/lMzE1vSRyjT+SA4LeCw3cARdVTwDgkKRPOH6yj6qjsOKip1PgylTjjs Ei/LA7o02Sgtt2am8mkoQA54s0o32K3kYgMrmMvs0bLrCjjA6+jrOnj3WlaTZUgoBckQdBZ+tZj AeR4NYnOdvewsbi/xXtE+dn/P5JNeVUZBhMPx2vLoZ/1eLwopNKiileVJOs0Nrvk0xJOshAKhnO aZ3f+K0qQVyI6Nx9mHazDAqNpBoELwt+xg7S1ajxfPDlpFTv9oR/Dn/w5m204twZisR8kQjIknU hFRYdAioLGZtSUw= X-Google-Smtp-Source: AGHT+IFp6ejbt7Mo7zkgz13IAt+gBnUSvlsR6hc1QwebcOpOgSRtG495ydUo0NdDOMCgZ5Z7db7Aig== X-Received: by 2002:ad4:5d67:0:b0:6d8:99cf:d2db with SMTP id 6a1803df08f44-6df9b2ddc47mr12453236d6.38.1736285679296; Tue, 07 Jan 2025 13:34:39 -0800 (PST) Received: from dean-laptop.iol.unh.edu ([2606:4100:3880:1271:f9bd:24da:464d:6294]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6dd181bb4b1sm185100656d6.78.2025.01.07.13.34.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2025 13:34:38 -0800 (PST) From: Dean Marx To: probb@iol.unh.edu, npratte@iol.unh.edu, luca.vizzarro@arm.com, yoan.picchi@foss.arm.com, Honnappa.Nagarahalli@arm.com, paul.szczepanek@arm.com Cc: dev@dpdk.org, Dean Marx Subject: [PATCH v4] dts: reform hello world test suite Date: Tue, 7 Jan 2025 16:34:34 -0500 Message-ID: <20250107213434.31595-1-dmarx@iol.unh.edu> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20250106175847.27547-1-dmarx@iol.unh.edu> References: <20250106175847.27547-1-dmarx@iol.unh.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Add a test suite to replace hello_world which simply starts and stops a testpmd session. The user can use this as a confidence check to verify their configuration. Signed-off-by: Dean Marx Reviewed-by: Paul Szczepanek Reviewed-by: Luca Vizzarro --- dts/tests/TestSuite_hello_world.py | 70 ++++++------------------------ 1 file changed, 14 insertions(+), 56 deletions(-) diff --git a/dts/tests/TestSuite_hello_world.py b/dts/tests/TestSuite_hello_world.py index 734f006026..bad35f3267 100644 --- a/dts/tests/TestSuite_hello_world.py +++ b/dts/tests/TestSuite_hello_world.py @@ -1,71 +1,29 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2010-2014 Intel Corporation +# Copyright(c) 2024 University of New Hampshire -"""The DPDK hello world app test suite. +"""DPDK Hello World test suite. -Run the helloworld example app and verify it prints a message for each used core. -No other EAL parameters apart from cores are used. +Starts and stops a testpmd session to verify EAL parameters +are properly configured. """ -from framework.remote_session.dpdk_shell import compute_eal_params +from framework.remote_session.testpmd_shell import TestPmdShell +from framework import logger from framework.test_suite import TestSuite, func_test -from framework.testbed_model.capability import TopologyType, requires -from framework.testbed_model.cpu import ( - LogicalCoreCount, - LogicalCoreCountFilter, - LogicalCoreList, -) -@requires(topology_type=TopologyType.no_link) class TestHelloWorld(TestSuite): - """DPDK hello world app test suite.""" - - def set_up_suite(self) -> None: - """Set up the test suite. - - Setup: - Build the app we're about to test - helloworld. - """ - self.app_helloworld_path = self.sut_node.build_dpdk_app("helloworld") - - @func_test - def hello_world_single_core(self) -> None: - """Single core test case. - - Steps: - Run the helloworld app on the first usable logical core. - Verify: - The app prints a message from the used core: - "hello from core " - """ - # get the first usable core - lcore_amount = LogicalCoreCount(1, 1, 1) - lcores = LogicalCoreCountFilter(self.sut_node.lcores, lcore_amount).filter() - eal_para = compute_eal_params(self.sut_node, lcore_filter_specifier=lcore_amount) - result = self.sut_node.run_dpdk_app(self.app_helloworld_path, eal_para) - self.verify( - f"hello from core {int(lcores[0])}" in result.stdout, - f"helloworld didn't start on lcore{lcores[0]}", - ) + """Hello World test suite. One test case, which starts and stops a testpmd session.""" @func_test - def hello_world_all_cores(self) -> None: - """All cores test case. + def test_hello_world(self) -> None: + """EAL confidence test. Steps: - Run the helloworld app on all usable logical cores. + Start testpmd session and check status. Verify: - The app prints a message from all used cores: - "hello from core " + The testpmd session throws no errors. """ - # get the maximum logical core number - eal_para = compute_eal_params( - self.sut_node, lcore_filter_specifier=LogicalCoreList(self.sut_node.lcores) - ) - result = self.sut_node.run_dpdk_app(self.app_helloworld_path, eal_para, 50) - for lcore in self.sut_node.lcores: - self.verify( - f"hello from core {int(lcore)}" in result.stdout, - f"helloworld didn't start on lcore{lcore}", - ) + with TestPmdShell(node=self.sut_node) as testpmd: + testpmd.start() + self._logger.log(1, "Hello World!") -- 2.44.0