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 <jspewock@iol.unh.edu>
Subject: [PATCH v2 3/3] dts: add vf_smoke tests suite
Date: Thu, 26 Sep 2024 16:39:28 -0400 [thread overview]
Message-ID: <20240926203928.19881-4-jspewock@iol.unh.edu> (raw)
In-Reply-To: <20240926203928.19881-1-jspewock@iol.unh.edu>
From: Jeremy Spewock <jspewock@iol.unh.edu>
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 <jspewock@iol.unh.edu>
---
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
prev parent reply other threads:[~2024-09-26 20:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-06 17:37 [PATCH v1 0/3] dts: port vf_smoke to new DTS jspewock
2024-09-06 17:37 ` [PATCH v1 1/3] dts: allow specifying ingress port in send_packets jspewock
2024-09-06 17:37 ` [PATCH v1 2/3] dts: parameterize ports used in pf_smoke suite jspewock
2024-09-06 17:37 ` [PATCH v1 3/3] dts: add vf_smoke tests suite jspewock
2024-09-26 20:39 ` [PATCH v2 0/3] dts: port vf_smoke to new DTS jspewock
2024-09-26 20:39 ` [PATCH v2 1/3] dts: allow specifying ingress port in send_packets jspewock
2024-09-26 20:39 ` [PATCH v2 2/3] dts: parameterize ports used in pf_smoke suite jspewock
2024-09-26 20:39 ` jspewock [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240926203928.19881-4-jspewock@iol.unh.edu \
--to=jspewock@iol.unh.edu \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=Luca.Vizzarro@arm.com \
--cc=alex.chapman@arm.com \
--cc=dev@dpdk.org \
--cc=juraj.linkes@pantheon.tech \
--cc=npratte@iol.unh.edu \
--cc=paul.szczepanek@arm.com \
--cc=probb@iol.unh.edu \
--cc=thomas@monjalon.net \
--cc=wathsala.vithanage@arm.com \
--cc=yoan.picchi@foss.arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).