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 AD37645A3C; Thu, 26 Sep 2024 22:40:10 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 31C484060B; Thu, 26 Sep 2024 22:39:55 +0200 (CEST) Received: from mail-oa1-f100.google.com (mail-oa1-f100.google.com [209.85.160.100]) by mails.dpdk.org (Postfix) with ESMTP id CF8214003C for ; Thu, 26 Sep 2024 22:39:51 +0200 (CEST) Received: by mail-oa1-f100.google.com with SMTP id 586e51a60fabf-2870bd5e1f7so292508fac.3 for ; Thu, 26 Sep 2024 13:39:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1727383191; x=1727987991; 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=+8vRTunW/BD2l8R4uZ/tjYEi1/fbDkhu865wbGMW9cU=; b=gxfkcx1P5Uy0TAxGNMrYNFBkmznXQgB9vw3K8nktEYe2uJr4F6Kt561WcdsSz2ZW+w 2UGdWReT445doKUWgqMl1NSNOVJ90q9ts5OZ9p/ArlnPkpQ80/jrwx9+jQ13qxDix7Mk ZgK2k/CbI3sHUJV8/KaiCY/igbO9jPyBM8ITU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727383191; x=1727987991; 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=+8vRTunW/BD2l8R4uZ/tjYEi1/fbDkhu865wbGMW9cU=; b=bH3O4tFNwxzMTvZ/W+V88XuInM87ZI/3HukaZKsV1XHIofZh2J1yOfsNR+8fhsCZRe nyJPcmhElymG2R38l1FrsW+1c2G96JucH35jC+46NrVy3heorz4Ej0yF5VhGqI+PdtKO 8ijaQL+ilrmPY49haPETe5bvkG3GoS+CgYWjLns8qkGG43utkd0Q7yzOhsuI3pZiCCmE my9BpR4E1l2TVboy2geDekkXJo38kI/4qrNkqqQJsNAUUhCjv2/ta2BXRAqtf2gax0bC l9HkdkbdQg/ML5xua6qrHQYCYuBZyb7oQfGCRNZODmqwfJzKGYsTfJorg+3RQrAN0zO+ 73Cw== X-Gm-Message-State: AOJu0Yyrma0rMTZ9KVCXmlxjRHLHGZKyT0auVlUeErQpfu7AXbhI8K5c 1G4GwKc82FOdlKhT9EMZrF3RSRSqxKBNzUHLdddud1P9eWzDoOMIYaBd/3Bkn15nOQXgWma6AaD SP6zpDa5H3u/qAIVyMLzVcVW3LtKZtXlUhT3rD/5hqB8M5vra X-Google-Smtp-Source: AGHT+IFf6bo53yOPvd+uLqv8pqucpNVYU14MYsy4ZXgWgrfZaxiXk7hb0IyYX4HvoOmA6ISzBfVR+9vd2Hi3 X-Received: by 2002:a05:6870:2246:b0:278:14b6:a8f7 with SMTP id 586e51a60fabf-28710c25ba3mr1278324fac.42.1727383191006; Thu, 26 Sep 2024 13:39:51 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [2606:4100:3880:1234::84]) by smtp-relay.gmail.com with ESMTPS id 586e51a60fabf-2870f7e8065sm39791fac.11.2024.09.26.13.39.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Sep 2024 13:39:50 -0700 (PDT) X-Relaying-Domain: iol.unh.edu Received: from iol.unh.edu (unknown [IPv6:2606:4100:3880:1257::1083]) by postal.iol.unh.edu (Postfix) with ESMTP id 972AC605C351; Thu, 26 Sep 2024 16:39:49 -0400 (EDT) From: jspewock@iol.unh.edu To: npratte@iol.unh.edu, paul.szczepanek@arm.com, wathsala.vithanage@arm.com, thomas@monjalon.net, probb@iol.unh.edu, Luca.Vizzarro@arm.com, yoan.picchi@foss.arm.com, alex.chapman@arm.com, Honnappa.Nagarahalli@arm.com, juraj.linkes@pantheon.tech Cc: dev@dpdk.org, Jeremy Spewock Subject: [PATCH v2 3/3] dts: add vf_smoke tests suite Date: Thu, 26 Sep 2024 16:39:28 -0400 Message-ID: <20240926203928.19881-4-jspewock@iol.unh.edu> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240926203928.19881-1-jspewock@iol.unh.edu> References: <20240906173709.17487-1-jspewock@iol.unh.edu> <20240926203928.19881-1-jspewock@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 From: Jeremy Spewock VFs should be tested against the same criteria as PFs, therefore the smoke testing suite for VFs inherits the same test cases and testing coverage from the PF smoke testing suite. The primary difference between the two suites is that VF smoke initially creates virtual functions to use for testing, and then tears them down at the end of testing and resets the state of the PFs. Signed-off-by: Jeremy Spewock --- dts/framework/config/conf_yaml_schema.json | 3 ++- dts/tests/TestSuite_vf_smoke_tests.py | 28 ++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 dts/tests/TestSuite_vf_smoke_tests.py diff --git a/dts/framework/config/conf_yaml_schema.json b/dts/framework/config/conf_yaml_schema.json index c15f960318..847d3ea598 100644 --- a/dts/framework/config/conf_yaml_schema.json +++ b/dts/framework/config/conf_yaml_schema.json @@ -188,7 +188,8 @@ "hello_world", "os_udp", "pmd_buffer_scatter", - "pf_smoke_tests" + "pf_smoke_tests", + "vf_smoke_tests" ] }, "test_target": { diff --git a/dts/tests/TestSuite_vf_smoke_tests.py b/dts/tests/TestSuite_vf_smoke_tests.py new file mode 100644 index 0000000000..f9b6098111 --- /dev/null +++ b/dts/tests/TestSuite_vf_smoke_tests.py @@ -0,0 +1,28 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2024 University of New Hampshire +"""Virtual Function (VF) smoke testing suite. + +The same common DPDK functionality that is tested on physical functions (PFs) in +:class:`.TestSuite_pf_smoke_tests.TestPfSmokeTests` should be tested on VFs. Therefore, this test +suite inherits its test cases from the PF smoke testing suite. The primary difference in this +testing suite is that it creates virtual functions prior to running its test cases and then removes +them and resets the state of the PFs after it is finished. +""" +from .TestSuite_pf_smoke_tests import TestPfSmokeTests # type: ignore[import-untyped] + + +class TestVfSmokeTests(TestPfSmokeTests): + """VF smoke testing suite.""" + + def set_up_suite(self) -> None: + """Extends :meth:`TestPfSmokeTests.set_up_suite` with methods to create Rx/Tx VFs.""" + super().set_up_suite() + self.sut_egress_port = self.sut_node.create_virtual_functions(1, self._sut_port_egress)[0] + self.sut_ingress_port = self.sut_node.create_virtual_functions(1, self._sut_port_ingress)[0] + + def tear_down_suite(self) -> None: + """Extends :meth:`TestPfSmokeTests.tear_down_suite` with VF cleanup and PF rebinding.""" + super().tear_down_suite() + self.sut_node.remove_virtual_functions(self._sut_port_egress) + self.sut_node.remove_virtual_functions(self._sut_port_ingress) + self.sut_node.bind_all_ports_to_driver() -- 2.46.0