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 4AABC45FE9; Mon, 6 Jan 2025 17:57:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D6FDC40A6B; Mon, 6 Jan 2025 17:57:12 +0100 (CET) Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) by mails.dpdk.org (Postfix) with ESMTP id 4902140687 for ; Mon, 6 Jan 2025 17:57:11 +0100 (CET) Received: by mail-qt1-f181.google.com with SMTP id d75a77b69052e-467a0a6c9fcso39652531cf.3 for ; Mon, 06 Jan 2025 08:57:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1736182630; x=1736787430; 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=0UZ3V4gdyVESXTPnf0V8bYQhovyrooMEGXPwhhBdxIk=; b=EZzY0PNPeYqyUYiJxa79bzdiv84KYw2L4S4VFICrLa4aFUrSZi6L9aszMDAIH6ZKQL fGVFk2WAVqL08IyVP4Tf90a2zmPcQOyK6wJijm9GUH9lvcZoyotGRzpnG8mlZTbsyi0M 70voPCKwvz08VKD4MeJDUi24EtPzlk45M31hQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736182630; x=1736787430; 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=0UZ3V4gdyVESXTPnf0V8bYQhovyrooMEGXPwhhBdxIk=; b=H+pDdsU8NZTzAMlS9evHj4y7c1Ly1PvJ1m+sZuLZeFe0OHIycL1c5nd7nEAe6w2seV oxvU55DLUcax0RPAj7SUZCdJ+rBTdfr6bubIuTB5FTmedj8fNG6BZ15py5LWy7/81TBN MMl3Bgos+tP+ISThb7Zmrli8vjxveQYmu8sh/41ucFydHXHMX8Q3Jhpqlnl8IFu3YGoN z/6+Q4bR+pz7vy/HfocBc7g9hV7L7/YwO+h8zauAingxCufH2eydelYf3YFMaSHQCOxy +L6xyhYNspOhn7csdrU9wf1C5oNsXfWjCyXq+T5S/j+j6mzma/G8WbrhTGLkQe8Ym71w g2pQ== X-Gm-Message-State: AOJu0Ywbxp3t511EyTTBxV+F5lmRtKmVli6gJyCKWnzIaN7pcy9xymSK YnAZuxy1qkAlCXOe3EuKHz408KfTAGUN9QvCH3m1Jadp10JgDD7VoTY+MEldzIk= X-Gm-Gg: ASbGnct6wRt7EzMvWvrqZk5McwtgBwqcfR38IBd7C9yKCIxSF0miX6n61XSt3MFtHBD 3F/mNC4JXzjAxR8tmlhfY+Ug4ciPBMKh/d2duYu9+5NHV35daoCdZ5Bnkl1Hg4gWOdQrGa1GJjl e/pK+SeU+/xA0rKpWGIkyQ+xdgVkdhhrikoet6YmL/R06zVyOLvLDY6yqLmuh5JzDFTMUh2KcbR uFlyz1OLNNyNCyZZ8S5/vvF1Difb4uph9/6rOoyDpMUtkKUOuF9FWFGz7X33nIXootMGA9vKhgD R/EOF2vlbRroFd0= X-Google-Smtp-Source: AGHT+IF2q2ZF0kjocxdxByqfHKWThcn6mw+yE3CwhD4Ala4Q2gAEOwRgbgZy0OfzNETK4C1rxB8r1g== X-Received: by 2002:ac8:5751:0:b0:465:3a62:a8f9 with SMTP id d75a77b69052e-46a4a9a436dmr1166459901cf.50.1736182630604; Mon, 06 Jan 2025 08:57:10 -0800 (PST) Received: from dean-laptop.iol.unh.edu ([2606:4100:3880:1271:f9bd:24da:464d:6294]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-46a3e67e245sm177379871cf.23.2025.01.06.08.57.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2025 08:57:10 -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 v3] dts: reform hello world test suite Date: Mon, 6 Jan 2025 12:58:47 -0500 Message-ID: <20250106175847.27547-1-dmarx@iol.unh.edu> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20241223185739.29621-1-dmarx@iol.unh.edu> References: <20241223185739.29621-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 --- dts/tests/TestSuite_hello_world.py | 68 ++++++------------------------ 1 file changed, 12 insertions(+), 56 deletions(-) diff --git a/dts/tests/TestSuite_hello_world.py b/dts/tests/TestSuite_hello_world.py index 734f006026..75f168bc9f 100644 --- a/dts/tests/TestSuite_hello_world.py +++ b/dts/tests/TestSuite_hello_world.py @@ -1,71 +1,27 @@ # 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.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() -- 2.44.0