Skip to contentSkip to conversation

Add eventdev tests to test suites

PATCH In review Bruce Richardson 4 participants 7 messages Sep 28, 2023 – Oct 3, 2023

lore
Share & tools
lore
#0 lore raw

cover Add eventdev tests to test suites

The eventdev library includes a selftest API which can be used by drivers for testing. Add the relevant automated self-test commands into meson test suites as appropriate.

Bruce Richardson (2):
event/sw: add self tests to fast tests event/*: add driver selftests to driver-tests suite

 app/test/test_eventdev.c             | 10 +++++-----
 drivers/event/sw/sw_evdev_selftest.c |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.39.2
#1 lore raw

PATCH 1/2 event/sw: add self tests to fast tests

By reducing the iterations for the final stage of the self-test, the SW eventdev tests can be fast enough for consideration in the fast-tests suite. This enables them to be run as part of the regular patch CI tests, and therefore increases the chances of catching any errors in patches that may affect this component.

---
 app/test/test_eventdev.c             | 2 +-
 drivers/event/sw/sw_evdev_selftest.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
app/test/test_eventdev.c +1 -1
index c51c93bdbd..c94c15bef1 100644
@@ -1259,7 +1259,7 @@ test_eventdev_selftest_cn10k(void)
 REGISTER_FAST_TEST(eventdev_common_autotest, true, true, test_eventdev_common);
 
 #ifndef RTE_EXEC_ENV_WINDOWS
-REGISTER_DRIVER_TEST(eventdev_selftest_sw, test_eventdev_selftest_sw);
+REGISTER_FAST_TEST(eventdev_selftest_sw, true, true, test_eventdev_selftest_sw);
 REGISTER_DRIVER_TEST(eventdev_selftest_octeontx, test_eventdev_selftest_octeontx);
 REGISTER_TEST_COMMAND(eventdev_selftest_dpaa2, test_eventdev_selftest_dpaa2);
 REGISTER_TEST_COMMAND(eventdev_selftest_dlb2, test_eventdev_selftest_dlb2);
drivers/event/sw/sw_evdev_selftest.c +1 -1
index 3aa8d76ca8..3f0d9806f2 100644
@@ -28,7 +28,7 @@
 
 #define MAX_PORTS 16
 #define MAX_QIDS 16
-#define NUM_PACKETS (1<<18)
+#define NUM_PACKETS (1 << 17)
 #define DEQUEUE_DEPTH 128
 
 static int evdev;
Signature · 1 line
2.39.2
#2 lore raw

Re: [PATCH 1/2] event/sw: add self tests to fast tests

Quoted 8 lines · Bruce Richardson

By reducing the iterations for the final stage of the self-test, the SW eventdev tests can be fast enough for consideration in the fast-tests suite. This enables them to be run as part of the regular patch CI tests, and therefore increases the chances of catching any errors in patches that may affect this component.

Looks like --to-cmd ./scripts/get_maintainer.pl not used in sending patches. @Van Haaren, Harry Could you review and Ack it to merge?

Quoted 34 lines
---
 app/test/test_eventdev.c             | 2 +-
 drivers/event/sw/sw_evdev_selftest.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
app/test/test_eventdev.c +1 -1
index c51c93bdbd..c94c15bef1 100644
@@ -1259,7 +1259,7 @@ test_eventdev_selftest_cn10k(void)
 REGISTER_FAST_TEST(eventdev_common_autotest, true, true, test_eventdev_common);
 
 #ifndef RTE_EXEC_ENV_WINDOWS
-REGISTER_DRIVER_TEST(eventdev_selftest_sw, test_eventdev_selftest_sw);
+REGISTER_FAST_TEST(eventdev_selftest_sw, true, true, test_eventdev_selftest_sw);
 REGISTER_DRIVER_TEST(eventdev_selftest_octeontx, test_eventdev_selftest_octeontx);
 REGISTER_TEST_COMMAND(eventdev_selftest_dpaa2, test_eventdev_selftest_dpaa2);
 REGISTER_TEST_COMMAND(eventdev_selftest_dlb2, test_eventdev_selftest_dlb2);
drivers/event/sw/sw_evdev_selftest.c +1 -2
index 3aa8d76ca8..3f0d9806f2 100644
@@ -28,7 +28,7 @@
 
 #define MAX_PORTS 16
 #define MAX_QIDS 16
-#define NUM_PACKETS (1<<18)
+#define NUM_PACKETS (1 << 17)
 #define DEQUEUE_DEPTH 128
 
 static int evdev;
--

2.39.2

#3 lore raw

RE: [PATCH 1/2] event/sw: add self tests to fast tests

Quoted 17 lines

-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Tuesday, October 3, 2023 7:23 AM
To: Richardson, Bruce <[email protected]>; Van Haaren, Harry <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH 1/2] event/sw: add self tests to fast tests

Quoted 7 lines · Bruce Richardson

By reducing the iterations for the final stage of the self-test, the SW eventdev tests can be fast enough for consideration in the fast-tests suite. This enables them to be run as part of the regular patch CI tests, and therefore increases the chances of catching any errors in patches that may affect this component.

Quoted 4 lines
Quoted 1 line

Looks like --to-cmd ./scripts/get_maintainer.pl not used in sending patches. @Van Haaren, Harry Could you review and Ack it to merge?

Thanks for the loop-in Jerin,

#4 lore raw

PATCH 2/2 event/*: add driver selftests to driver-tests suite

In reply to Bruce Richardson

The octeontx eventdev test was in the "driver-tests" suite, but none of the other HW eventdev selftests were in any test suite. Add them to the drivers suite for completeness.

---
 app/test/test_eventdev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
app/test/test_eventdev.c +4 -4
index c94c15bef1..af4d7b3288 100644
@@ -1261,9 +1261,9 @@ REGISTER_FAST_TEST(eventdev_common_autotest, true, true, test_eventdev_common);
 #ifndef RTE_EXEC_ENV_WINDOWS
 REGISTER_FAST_TEST(eventdev_selftest_sw, true, true, test_eventdev_selftest_sw);
 REGISTER_DRIVER_TEST(eventdev_selftest_octeontx, test_eventdev_selftest_octeontx);
-REGISTER_TEST_COMMAND(eventdev_selftest_dpaa2, test_eventdev_selftest_dpaa2);
-REGISTER_TEST_COMMAND(eventdev_selftest_dlb2, test_eventdev_selftest_dlb2);
-REGISTER_TEST_COMMAND(eventdev_selftest_cn9k, test_eventdev_selftest_cn9k);
-REGISTER_TEST_COMMAND(eventdev_selftest_cn10k, test_eventdev_selftest_cn10k);
+REGISTER_DRIVER_TEST(eventdev_selftest_dpaa2, test_eventdev_selftest_dpaa2);
+REGISTER_DRIVER_TEST(eventdev_selftest_dlb2, test_eventdev_selftest_dlb2);
+REGISTER_DRIVER_TEST(eventdev_selftest_cn9k, test_eventdev_selftest_cn9k);
+REGISTER_DRIVER_TEST(eventdev_selftest_cn10k, test_eventdev_selftest_cn10k);
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
Signature · 1 line
2.39.2
Acked-by on the v1 series
#5 lore raw
In reply to Bruce Richardson
Quoted 5 lines · Bruce Richardson

The eventdev library includes a selftest API which can be used by drivers for testing. Add the relevant automated self-test commands into meson test suites as appropriate.

Quoted 8 lines

Bruce Richardson (2):
event/sw: add self tests to fast tests event/*: add driver selftests to driver-tests suite

 app/test/test_eventdev.c             | 10 +++++-----
 drivers/event/sw/sw_evdev_selftest.c |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

On the principle, the series lgtm.

Signature · 1 line
David Marchand
#6 lore raw
Quoted 12 lines · David Marchand
Quoted 9 lines · Bruce Richardson

The eventdev library includes a selftest API which can be used by drivers for testing. Add the relevant automated self-test commands into meson test suites as appropriate.

Bruce Richardson (2):
event/sw: add self tests to fast tests event/*: add driver selftests to driver-tests suite

Quoted 7 lines
Quoted 4 lines
 app/test/test_eventdev.c             | 10 +++++-----
 drivers/event/sw/sw_evdev_selftest.c |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

On the principle, the series lgtm.

Changed second patch subject to test/event: add driver selftests to driver-tests suite

Series applied to dpdk-next-net-eventdev/for-main. Thanks

Quoted 5 lines

--
David Marchand