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 D804845920; Fri, 6 Sep 2024 19:37:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EE13842FE7; Fri, 6 Sep 2024 19:37:44 +0200 (CEST) Received: from mail-io1-f100.google.com (mail-io1-f100.google.com [209.85.166.100]) by mails.dpdk.org (Postfix) with ESMTP id 64DC0400D5 for ; Fri, 6 Sep 2024 19:37:43 +0200 (CEST) Received: by mail-io1-f100.google.com with SMTP id ca18e2360f4ac-82a2a035b59so113898839f.0 for ; Fri, 06 Sep 2024 10:37:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1725644263; x=1726249063; 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=TP0pzFr5Kn4ney9WJlMdcdSW8qL3WBfKX+UMZji0wA4=; b=eWeLHVvTihYsbSkDPJ/UhrVw4/DHZ3BCoHCxC23unCtcS3qFgh7re82PmaY90/3Gmv zNYwa0LNtSQ56DlOYvp8EtuDh9te/i3Fpty54jZHDp5RB8TF4qlJfmT0r3435u9YmcUc 2mwmUKPfaIBoU07wIGl8kwu0EfJljb/qOkPmE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725644263; x=1726249063; 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=TP0pzFr5Kn4ney9WJlMdcdSW8qL3WBfKX+UMZji0wA4=; b=LLYxKOXM9v3kbzQoOlBkYK/tr8nI3G+L+6+dwDJqWRSTUQLC88M7txFJfdMFLPP+N+ 3Bd61021LbPezwm7ZsQNbErJoJMn1527pDKGVbGsJRTwpizEsVlUasnndhj3jPurc+xh HHYHsfomKZOYdXBC/hp1Mx0szkGkFYpjl8VTsxYkjqjlqvKqLYHsp33qqClakVKnicsB IA83IL5EGeu6iH7xiyGIgqFsVbUDFN5QxSqOj1j52eAa3o/efoXPYSeDEFArn2e5LA9J MXwhP61tGbctSUG5RxXb8PUK2V/1tkwbQ7jHOJx4qMB55jj2HyJMq/59uWuComb5ZNYX LoIQ== X-Gm-Message-State: AOJu0YwwPCAu+kYzz5cOE3cbwdZGm2IT0ZPFLqoygO6lUCr/d5mRkSPh w/9N5b97gZ88hC53UpLvRcs14TPwPyN/OzIGGAiqkSnd307Lm75Vq3DFjQ2VxJQ2PRlhfDfkW+w NkWEGlBk/xKdb3FM4S36S5CB0ceeIMOfWzbXKhKqTkHgoCl6b X-Google-Smtp-Source: AGHT+IH+j5dA4KXuy3HrTjPdYr03TgZWn93+Fx/GyJkvIsPeNdxhFtz2B5IbPuPogygz9ENH8LepW6gxyvBr X-Received: by 2002:a05:6e02:1e06:b0:39f:6180:afca with SMTP id e9e14a558f8ab-3a056879d4amr3811125ab.13.1725644262676; Fri, 06 Sep 2024 10:37:42 -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 e9e14a558f8ab-39f5f2a6a36sm4029475ab.8.2024.09.06.10.37.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Sep 2024 10:37:42 -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 A923D6050A6D; Fri, 6 Sep 2024 13:37:41 -0400 (EDT) From: jspewock@iol.unh.edu To: npratte@iol.unh.edu, thomas@monjalon.net, alex.chapman@arm.com, probb@iol.unh.edu, wathsala.vithanage@arm.com, Luca.Vizzarro@arm.com, Honnappa.Nagarahalli@arm.com, yoan.picchi@foss.arm.com, paul.szczepanek@arm.com, juraj.linkes@pantheon.tech Cc: dev@dpdk.org, Jeremy Spewock Subject: [PATCH v1 3/3] dts: add vf_smoke tests suite Date: Fri, 6 Sep 2024 13:37:09 -0400 Message-ID: <20240906173709.17487-4-jspewock@iol.unh.edu> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240906173709.17487-1-jspewock@iol.unh.edu> References: <20240906173709.17487-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 910134f9e4..1a9d497fbf 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