From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 946CA4367C;
	Tue,  5 Dec 2023 19:40:07 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 2838442DA3;
	Tue,  5 Dec 2023 19:40:07 +0100 (CET)
Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com
 [209.85.215.172])
 by mails.dpdk.org (Postfix) with ESMTP id 6AC6A40297
 for <dev@dpdk.org>; Tue,  5 Dec 2023 19:40:05 +0100 (CET)
Received: by mail-pg1-f172.google.com with SMTP id
 41be03b00d2f7-5c68b5cf14bso1680888a12.0
 for <dev@dpdk.org>; Tue, 05 Dec 2023 10:40:05 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=iol.unh.edu; s=unh-iol; t=1701801604; x=1702406404; darn=dpdk.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=wUXK47JXe89vQUc1Unf+a5Xpl9/P/ECcyP2lFsBU9aE=;
 b=MtxPSNx8mevTVljTTWFrQtECx2eEDO03vBspLyIJ4pGQWX9QYsW+HMsKmfHp0A7fqz
 VLtmsA2esYY5SZhhHYWR3igh2OWk9uPQgvoW6QMhiZ9acmciRY/8lVjb6JfZelUFzGY+
 Z9KBGq8F3bO+eH0wrCzpZgx3UqP3KWw0WA3wo=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1701801604; x=1702406404;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=wUXK47JXe89vQUc1Unf+a5Xpl9/P/ECcyP2lFsBU9aE=;
 b=a+cGrrTWC2vLmgFPT6wVEts3jvyWmQpUubNAhdANTG/OVR2V/q3cTsmcz+3EQnj2rt
 VgZXJLzX8ZbtP4dJc+WcJ74hVjEo8StDlzDVhDSe3AdSzVAYucFfAoinhWvtpmnsPxTQ
 ydrIrGBbo+auvgIaFACzsuiVUTqnwklXHqoBpnbfO8w3Nst48AHlfZ9DMIt1cghOK+VJ
 IlFf2DNjhLIjRwD1FLnl98XKLHmvbsOjEmKiCITdrDxKag9AbjWAUPgAhhPIi+nZsnZG
 njY0tlP26Rl5EOm2MI+EOjbadJo8IVYsjQAleEdjldD3kYFmwAGWomA/6+d/0osKRj7Q
 kiKw==
X-Gm-Message-State: AOJu0Yz0yQDGFS/MCOMRoq1XEbCxqp3PFxn09p/uaij+oivXHovlJbW3
 EXpqx4q+/uXrWO9zCDfjAX4eFkk3E2zAifOM87vITw==
X-Google-Smtp-Source: AGHT+IFB8Y3DB362nMp7sw1e/TJ0AdTWp40rPVH+YuBWjY/zmD0iDTr+njhd3hiS6fgAkB+knt1x6Gl8D+DGiPudeL8=
X-Received: by 2002:a17:90a:43a4:b0:286:6cc1:5fb3 with SMTP id
 r33-20020a17090a43a400b002866cc15fb3mr1454787pjg.54.1701801604490; Tue, 05
 Dec 2023 10:40:04 -0800 (PST)
MIME-Version: 1.0
References: <20231123151344.162812-1-juraj.linkes@pantheon.tech>
 <20231204102429.106709-1-juraj.linkes@pantheon.tech>
 <20231204102429.106709-22-juraj.linkes@pantheon.tech>
In-Reply-To: <20231204102429.106709-22-juraj.linkes@pantheon.tech>
From: Jeremy Spewock <jspewock@iol.unh.edu>
Date: Tue, 5 Dec 2023 13:39:53 -0500
Message-ID: <CAAA20USgqbSBkgRr-TaUn8bX82Dzb1j0_p_=Ld4L-49mBrJ0Hg@mail.gmail.com>
Subject: Re: [PATCH v9 21/21] dts: test suites docstring update
To: =?UTF-8?Q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>
Cc: thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, probb@iol.unh.edu, 
 paul.szczepanek@arm.com, yoan.picchi@foss.arm.com, Luca.Vizzarro@arm.com, 
 dev@dpdk.org
Content-Type: multipart/alternative; boundary="0000000000001d47f3060bc7909f"
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

--0000000000001d47f3060bc7909f
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Reviewed-by: Jeremy Spewock <jspewock@iol.unh.edu>

On Mon, Dec 4, 2023 at 5:24=E2=80=AFAM Juraj Linke=C5=A1 <juraj.linkes@pant=
heon.tech>
wrote:

> Format according to the Google format and PEP257, with slight
> deviations.
>
> Signed-off-by: Juraj Linke=C5=A1 <juraj.linkes@pantheon.tech>
> ---
>  dts/tests/TestSuite_hello_world.py | 16 +++++---
>  dts/tests/TestSuite_os_udp.py      | 20 ++++++----
>  dts/tests/TestSuite_smoke_tests.py | 61 ++++++++++++++++++++++++------
>  3 files changed, 72 insertions(+), 25 deletions(-)
>
> diff --git a/dts/tests/TestSuite_hello_world.py
> b/dts/tests/TestSuite_hello_world.py
> index 768ba1cfa8..fd7ff1534d 100644
> --- a/dts/tests/TestSuite_hello_world.py
> +++ b/dts/tests/TestSuite_hello_world.py
> @@ -1,7 +1,8 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2010-2014 Intel Corporation
>
> -"""
> +"""The DPDK hello world app 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.
>  """
> @@ -15,22 +16,25 @@
>
>
>  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 =3D
> self.sut_node.build_dpdk_app("helloworld")
>
>      def test_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 <core_id>"
>          """
> -
>          # get the first usable core
>          lcore_amount =3D LogicalCoreCount(1, 1, 1)
>          lcores =3D LogicalCoreCountFilter(self.sut_node.lcores,
> lcore_amount).filter()
> @@ -42,14 +46,14 @@ def test_hello_world_single_core(self) -> None:
>          )
>
>      def test_hello_world_all_cores(self) -> None:
> -        """
> +        """All cores test case.
> +
>          Steps:
>              Run the helloworld app on all usable logical cores.
>          Verify:
>              The app prints a message from all used cores:
>              "hello from core <core_id>"
>          """
> -
>          # get the maximum logical core number
>          eal_para =3D self.sut_node.create_eal_parameters(
>              lcore_filter_specifier=3DLogicalCoreList(self.sut_node.lcore=
s)
> diff --git a/dts/tests/TestSuite_os_udp.py b/dts/tests/TestSuite_os_udp.p=
y
> index bf6b93deb5..2cf29d37bb 100644
> --- a/dts/tests/TestSuite_os_udp.py
> +++ b/dts/tests/TestSuite_os_udp.py
> @@ -1,7 +1,8 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2023 PANTHEON.tech s.r.o.
>
> -"""
> +"""Basic IPv4 OS routing test suite.
> +
>  Configure SUT node to route traffic from if1 to if2.
>  Send a packet to the SUT node, verify it comes back on the second port o=
n
> the TG node.
>  """
> @@ -13,24 +14,26 @@
>
>
>  class TestOSUdp(TestSuite):
> +    """IPv4 UDP OS routing test suite."""
> +
>      def set_up_suite(self) -> None:
> -        """
> +        """Set up the test suite.
> +
>          Setup:
> -            Configure SUT ports and SUT to route traffic from if1 to if2=
.
> +            Bind the SUT ports to the OS driver, configure the ports and
> configure the SUT
> +            to route traffic from if1 to if2.
>          """
> -
> -        # This test uses kernel drivers
>          self.sut_node.bind_ports_to_driver(for_dpdk=3DFalse)
>          self.configure_testbed_ipv4()
>
>      def test_os_udp(self) -> None:
> -        """
> +        """Basic UDP IPv4 traffic test case.
> +
>          Steps:
>              Send a UDP packet.
>          Verify:
>              The packet with proper addresses arrives at the other TG por=
t.
>          """
> -
>          packet =3D Ether() / IP() / UDP()
>
>          received_packets =3D self.send_packet_and_capture(packet)
> @@ -40,7 +43,8 @@ def test_os_udp(self) -> None:
>          self.verify_packets(expected_packet, received_packets)
>
>      def tear_down_suite(self) -> None:
> -        """
> +        """Tear down the test suite.
> +
>          Teardown:
>              Remove the SUT port configuration configured in setup.
>          """
> diff --git a/dts/tests/TestSuite_smoke_tests.py
> b/dts/tests/TestSuite_smoke_tests.py
> index 8958f58dac..5e2bac14bd 100644
> --- a/dts/tests/TestSuite_smoke_tests.py
> +++ b/dts/tests/TestSuite_smoke_tests.py
> @@ -1,6 +1,17 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2023 University of New Hampshire
>
> +"""Smoke test suite.
> +
> +Smoke tests are a class of tests which are used for validating a minimal
> set of important features.
> +These are the most important features without which (or when they're
> faulty) the software wouldn't
> +work properly. Thus, if any failure occurs while testing these features,
> +there isn't that much of a reason to continue testing, as the software i=
s
> fundamentally broken.
> +
> +These tests don't have to include only DPDK tests, as the reason for
> failures could be
> +in the infrastructure (a faulty link between NICs or a misconfiguration)=
.
> +"""
> +
>  import re
>
>  from framework.config import PortConfig
> @@ -11,23 +22,39 @@
>
>
>  class SmokeTests(TestSuite):
> +    """DPDK and infrastructure smoke test suite.
> +
> +    The test cases validate the most basic DPDK functionality needed for
> all other test suites.
> +    The infrastructure also needs to be tested, as that is also used by
> all other test suites.
> +
> +    Attributes:
> +        is_blocking: This test suite will block the execution of all
> other test suites
> +            in the build target after it.
> +        nics_in_node: The NICs present on the SUT node.
> +    """
> +
>      is_blocking =3D True
>      # dicts in this list are expected to have two keys:
>      # "pci_address" and "current_driver"
>      nics_in_node: list[PortConfig] =3D []
>
>      def set_up_suite(self) -> None:
> -        """
> +        """Set up the test suite.
> +
>          Setup:
> -            Set the build directory path and generate a list of NICs in
> the SUT node.
> +            Set the build directory path and a list of NICs in the SUT
> node.
>          """
>          self.dpdk_build_dir_path =3D self.sut_node.remote_dpdk_build_dir
>          self.nics_in_node =3D self.sut_node.config.ports
>
>      def test_unit_tests(self) -> None:
> -        """
> +        """DPDK meson ``fast-tests`` unit tests.
> +
> +        Test that all unit test from the ``fast-tests`` suite pass.
> +        The suite is a subset with only the most basic tests.
> +
>          Test:
> -            Run the fast-test unit-test suite through meson.
> +            Run the ``fast-tests`` unit test suite through meson.
>          """
>          self.sut_node.main_session.send_command(
>              f"meson test -C {self.dpdk_build_dir_path} --suite fast-test=
s
> -t 60",
> @@ -37,9 +64,14 @@ def test_unit_tests(self) -> None:
>          )
>
>      def test_driver_tests(self) -> None:
> -        """
> +        """DPDK meson ``driver-tests`` unit tests.
> +
> +        Test that all unit test from the ``driver-tests`` suite pass.
> +        The suite is a subset with driver tests. This suite may be run
> with virtual devices
> +        configured in the test run configuration.
> +
>          Test:
> -            Run the driver-test unit-test suite through meson.
> +            Run the ``driver-tests`` unit test suite through meson.
>          """
>          vdev_args =3D ""
>          for dev in self.sut_node.virtual_devices:
> @@ -60,9 +92,12 @@ def test_driver_tests(self) -> None:
>          )
>
>      def test_devices_listed_in_testpmd(self) -> None:
> -        """
> +        """Testpmd device discovery.
> +
> +        Test that the devices configured in the test run configuration
> are found in testpmd.
> +
>          Test:
> -            Uses testpmd driver to verify that devices have been found b=
y
> testpmd.
> +            List all devices found in testpmd and verify the configured
> devices are among them.
>          """
>          testpmd_driver =3D
> self.sut_node.create_interactive_shell(TestPmdShell, privileged=3DTrue)
>          dev_list =3D [str(x) for x in testpmd_driver.get_devices()]
> @@ -74,10 +109,14 @@ def test_devices_listed_in_testpmd(self) -> None:
>              )
>
>      def test_device_bound_to_driver(self) -> None:
> -        """
> +        """Device driver in OS.
> +
> +        Test that the devices configured in the test run configuration
> are bound to
> +        the proper driver.
> +
>          Test:
> -            Ensure that all drivers listed in the config are bound to th=
e
> correct
> -            driver.
> +            List all devices with the ``dpdk-devbind.py`` script and
> verify that
> +            the configured devices are bound to the proper driver.
>          """
>          path_to_devbind =3D self.sut_node.path_to_devbind_script
>
> --
> 2.34.1
>
>

--0000000000001d47f3060bc7909f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div style=3D"font-family:arial,sans-serif" class=3D"gmail=
_default">Reviewed-by: Jeremy Spewock &lt;<a href=3D"mailto:jspewock@iol.un=
h.edu">jspewock@iol.unh.edu</a>&gt;</div></div><br><div class=3D"gmail_quot=
e"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, Dec 4, 2023 at 5:24=E2=80=
=AFAM Juraj Linke=C5=A1 &lt;juraj.linkes@pantheon.tech&gt; wrote:<br></div>=
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex">Format according to the G=
oogle format and PEP257, with slight<br>
deviations.<br>
<br>
Signed-off-by: Juraj Linke=C5=A1 &lt;juraj.linkes@pantheon.tech&gt;<br>
---<br>
=C2=A0dts/tests/TestSuite_hello_world.py | 16 +++++---<br>
=C2=A0dts/tests/TestSuite_os_udp.py=C2=A0 =C2=A0 =C2=A0 | 20 ++++++----<br>
=C2=A0dts/tests/TestSuite_smoke_tests.py | 61 ++++++++++++++++++++++++-----=
-<br>
=C2=A03 files changed, 72 insertions(+), 25 deletions(-)<br>
<br>
diff --git a/dts/tests/TestSuite_hello_world.py b/dts/tests/TestSuite_hello=
_world.py<br>
index 768ba1cfa8..fd7ff1534d 100644<br>
--- a/dts/tests/TestSuite_hello_world.py<br>
+++ b/dts/tests/TestSuite_hello_world.py<br>
@@ -1,7 +1,8 @@<br>
=C2=A0# SPDX-License-Identifier: BSD-3-Clause<br>
=C2=A0# Copyright(c) 2010-2014 Intel Corporation<br>
<br>
-&quot;&quot;&quot;<br>
+&quot;&quot;&quot;The DPDK hello world app test suite.<br>
+<br>
=C2=A0Run the helloworld example app and verify it prints a message for eac=
h used core.<br>
=C2=A0No other EAL parameters apart from cores are used.<br>
=C2=A0&quot;&quot;&quot;<br>
@@ -15,22 +16,25 @@<br>
<br>
<br>
=C2=A0class TestHelloWorld(TestSuite):<br>
+=C2=A0 =C2=A0 &quot;&quot;&quot;DPDK hello world app test suite.&quot;&quo=
t;&quot;<br>
+<br>
=C2=A0 =C2=A0 =C2=A0def set_up_suite(self) -&gt; None:<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;Set up the test suite.<br>
+<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Setup:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Build the app we&#39;re abo=
ut to test - helloworld.<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;&quot;&quot;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.app_helloworld_path =3D self.sut_nod=
e.build_dpdk_app(&quot;helloworld&quot;)<br>
<br>
=C2=A0 =C2=A0 =C2=A0def test_hello_world_single_core(self) -&gt; None:<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;Single core test case.<br>
+<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Steps:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Run the helloworld app on t=
he first usable logical core.<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Verify:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0The app prints a message fr=
om the used core:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;hello from core &lt;c=
ore_id&gt;&quot;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;&quot;&quot;<br>
-<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# get the first usable core<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0lcore_amount =3D LogicalCoreCount(1, 1, 1=
)<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0lcores =3D LogicalCoreCountFilter(self.su=
t_node.lcores, lcore_amount).filter()<br>
@@ -42,14 +46,14 @@ def test_hello_world_single_core(self) -&gt; None:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0)<br>
<br>
=C2=A0 =C2=A0 =C2=A0def test_hello_world_all_cores(self) -&gt; None:<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;All cores test case.<br>
+<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Steps:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Run the helloworld app on a=
ll usable logical cores.<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Verify:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0The app prints a message fr=
om all used cores:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;hello from core &lt;c=
ore_id&gt;&quot;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;&quot;&quot;<br>
-<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# get the maximum logical core number<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0eal_para =3D self.sut_node.create_eal_par=
ameters(<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0lcore_filter_specifier=3DLo=
gicalCoreList(self.sut_node.lcores)<br>
diff --git a/dts/tests/TestSuite_os_udp.py b/dts/tests/TestSuite_os_udp.py<=
br>
index bf6b93deb5..2cf29d37bb 100644<br>
--- a/dts/tests/TestSuite_os_udp.py<br>
+++ b/dts/tests/TestSuite_os_udp.py<br>
@@ -1,7 +1,8 @@<br>
=C2=A0# SPDX-License-Identifier: BSD-3-Clause<br>
=C2=A0# Copyright(c) 2023 PANTHEON.tech s.r.o.<br>
<br>
-&quot;&quot;&quot;<br>
+&quot;&quot;&quot;Basic IPv4 OS routing test suite.<br>
+<br>
=C2=A0Configure SUT node to route traffic from if1 to if2.<br>
=C2=A0Send a packet to the SUT node, verify it comes back on the second por=
t on the TG node.<br>
=C2=A0&quot;&quot;&quot;<br>
@@ -13,24 +14,26 @@<br>
<br>
<br>
=C2=A0class TestOSUdp(TestSuite):<br>
+=C2=A0 =C2=A0 &quot;&quot;&quot;IPv4 UDP OS routing test suite.&quot;&quot=
;&quot;<br>
+<br>
=C2=A0 =C2=A0 =C2=A0def set_up_suite(self) -&gt; None:<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;Set up the test suite.<br>
+<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Setup:<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Configure SUT ports and SUT to r=
oute traffic from if1 to if2.<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Bind the SUT ports to the OS dri=
ver, configure the ports and configure the SUT<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 to route traffic from if1 to if2=
.<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;&quot;&quot;<br>
-<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 # This test uses kernel drivers<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.sut_node.bind_ports_to_driver(for_dp=
dk=3DFalse)<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.configure_testbed_ipv4()<br>
<br>
=C2=A0 =C2=A0 =C2=A0def test_os_udp(self) -&gt; None:<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;Basic UDP IPv4 traffic test =
case.<br>
+<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Steps:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Send a UDP packet.<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Verify:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0The packet with proper addr=
esses arrives at the other TG port.<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;&quot;&quot;<br>
-<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0packet =3D Ether() / IP() / UDP()<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0received_packets =3D self.send_packet_and=
_capture(packet)<br>
@@ -40,7 +43,8 @@ def test_os_udp(self) -&gt; None:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.verify_packets(expected_packet, rece=
ived_packets)<br>
<br>
=C2=A0 =C2=A0 =C2=A0def tear_down_suite(self) -&gt; None:<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;Tear down the test suite.<br=
>
+<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Teardown:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Remove the SUT port configu=
ration configured in setup.<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;&quot;&quot;<br>
diff --git a/dts/tests/TestSuite_smoke_tests.py b/dts/tests/TestSuite_smoke=
_tests.py<br>
index 8958f58dac..5e2bac14bd 100644<br>
--- a/dts/tests/TestSuite_smoke_tests.py<br>
+++ b/dts/tests/TestSuite_smoke_tests.py<br>
@@ -1,6 +1,17 @@<br>
=C2=A0# SPDX-License-Identifier: BSD-3-Clause<br>
=C2=A0# Copyright(c) 2023 University of New Hampshire<br>
<br>
+&quot;&quot;&quot;Smoke test suite.<br>
+<br>
+Smoke tests are a class of tests which are used for validating a minimal s=
et of important features.<br>
+These are the most important features without which (or when they&#39;re f=
aulty) the software wouldn&#39;t<br>
+work properly. Thus, if any failure occurs while testing these features,<b=
r>
+there isn&#39;t that much of a reason to continue testing, as the software=
 is fundamentally broken.<br>
+<br>
+These tests don&#39;t have to include only DPDK tests, as the reason for f=
ailures could be<br>
+in the infrastructure (a faulty link between NICs or a misconfiguration).<=
br>
+&quot;&quot;&quot;<br>
+<br>
=C2=A0import re<br>
<br>
=C2=A0from framework.config import PortConfig<br>
@@ -11,23 +22,39 @@<br>
<br>
<br>
=C2=A0class SmokeTests(TestSuite):<br>
+=C2=A0 =C2=A0 &quot;&quot;&quot;DPDK and infrastructure smoke test suite.<=
br>
+<br>
+=C2=A0 =C2=A0 The test cases validate the most basic DPDK functionality ne=
eded for all other test suites.<br>
+=C2=A0 =C2=A0 The infrastructure also needs to be tested, as that is also =
used by all other test suites.<br>
+<br>
+=C2=A0 =C2=A0 Attributes:<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 is_blocking: This test suite will block the ex=
ecution of all other test suites<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 in the build target after it.<br=
>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 nics_in_node: The NICs present on the SUT node=
.<br>
+=C2=A0 =C2=A0 &quot;&quot;&quot;<br>
+<br>
=C2=A0 =C2=A0 =C2=A0is_blocking =3D True<br>
=C2=A0 =C2=A0 =C2=A0# dicts in this list are expected to have two keys:<br>
=C2=A0 =C2=A0 =C2=A0# &quot;pci_address&quot; and &quot;current_driver&quot=
;<br>
=C2=A0 =C2=A0 =C2=A0nics_in_node: list[PortConfig] =3D []<br>
<br>
=C2=A0 =C2=A0 =C2=A0def set_up_suite(self) -&gt; None:<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;Set up the test suite.<br>
+<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Setup:<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Set the build directory path and=
 generate a list of NICs in the SUT node.<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Set the build directory path and=
 a list of NICs in the SUT node.<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;&quot;&quot;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.dpdk_build_dir_path =3D self.sut_nod=
e.remote_dpdk_build_dir<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.nics_in_node =3D self.sut_node.confi=
g.ports<br>
<br>
=C2=A0 =C2=A0 =C2=A0def test_unit_tests(self) -&gt; None:<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;DPDK meson ``fast-tests`` un=
it tests.<br>
+<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 Test that all unit test from the ``fast-tests`=
` suite pass.<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 The suite is a subset with only the most basic=
 tests.<br>
+<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Test:<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Run the fast-test unit-test suit=
e through meson.<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Run the ``fast-tests`` unit test=
 suite through meson.<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;&quot;&quot;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.sut_node.main_session.send_command(<=
br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0f&quot;meson test -C {self.=
dpdk_build_dir_path} --suite fast-tests -t 60&quot;,<br>
@@ -37,9 +64,14 @@ def test_unit_tests(self) -&gt; None:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0)<br>
<br>
=C2=A0 =C2=A0 =C2=A0def test_driver_tests(self) -&gt; None:<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;DPDK meson ``driver-tests`` =
unit tests.<br>
+<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 Test that all unit test from the ``driver-test=
s`` suite pass.<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 The suite is a subset with driver tests. This =
suite may be run with virtual devices<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 configured in the test run configuration.<br>
+<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Test:<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Run the driver-test unit-test su=
ite through meson.<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Run the ``driver-tests`` unit te=
st suite through meson.<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;&quot;&quot;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0vdev_args =3D &quot;&quot;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0for dev in self.sut_node.virtual_devices:=
<br>
@@ -60,9 +92,12 @@ def test_driver_tests(self) -&gt; None:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0)<br>
<br>
=C2=A0 =C2=A0 =C2=A0def test_devices_listed_in_testpmd(self) -&gt; None:<br=
>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;Testpmd device discovery.<br=
>
+<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 Test that the devices configured in the test r=
un configuration are found in testpmd.<br>
+<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Test:<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Uses testpmd driver to verify th=
at devices have been found by testpmd.<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 List all devices found in testpm=
d and verify the configured devices are among them.<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;&quot;&quot;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0testpmd_driver =3D self.sut_node.create_i=
nteractive_shell(TestPmdShell, privileged=3DTrue)<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0dev_list =3D [str(x) for x in testpmd_dri=
ver.get_devices()]<br>
@@ -74,10 +109,14 @@ def test_devices_listed_in_testpmd(self) -&gt; None:<b=
r>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0)<br>
<br>
=C2=A0 =C2=A0 =C2=A0def test_device_bound_to_driver(self) -&gt; None:<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;&quot;&quot;Device driver in OS.<br>
+<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 Test that the devices configured in the test r=
un configuration are bound to<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 the proper driver.<br>
+<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Test:<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Ensure that all drivers listed i=
n the config are bound to the correct<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 driver.<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 List all devices with the ``dpdk=
-devbind.py`` script and verify that<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 the configured devices are bound=
 to the proper driver.<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;&quot;&quot;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0path_to_devbind =3D self.sut_node.path_to=
_devbind_script<br>
<br>
-- <br>
2.34.1<br>
<br>
</blockquote></div>

--0000000000001d47f3060bc7909f--