Skip to contentSkip to conversation

test: add graph tests

PATCH In review David Marchand 5 participants 13 messages Jun 19, 2023 – Jun 22, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 test: add graph tests

We forgot to add graph unit tests to the CI testsuites.

---
 app/test/meson.build | 3 +++
 1 file changed, 3 insertions(+)
app/test/meson.build +3 -0
index d0fabcbb8b..35d6baeb22 100644
@@ -250,6 +250,8 @@ fast_tests = [
         ['thash_autotest', true, true],
         ['threads_autotest', true, true],
         ['trace_autotest', true, true],
+        ['graph_autotest', true, true],
+        ['node_list_dump', true, true],
 ]
 
 # Tests known to have issues or which don't belong in other tests lists.
@@ -298,6 +300,7 @@ perf_test_names = [
         'trace_perf_autotest',
         'ipsec_perf_autotest',
         'thash_perf_autotest',
+        'graph_perf_autotest',
 ]
 
 driver_test_names = [
Signature · 1 line
2.40.1
#1 lore raw

PATCH 2/2 lib: make graph optional

Allow disabling of the graph library in builds.

---
 app/test/meson.build | 12 +++++++-----
 lib/meson.build      |  1 +
 2 files changed, 8 insertions(+), 5 deletions(-)
app/test/meson.build +7 -5
index 35d6baeb22..c96488126f 100644
@@ -61,8 +61,6 @@ test_sources = files(
         'test_fib6.c',
         'test_fib6_perf.c',
         'test_func_reentrancy.c',
-        'test_graph.c',
-        'test_graph_perf.c',
         'test_hash.c',
         'test_hash_functions.c',
         'test_hash_multiwriter.c',
@@ -250,8 +248,6 @@ fast_tests = [
         ['thash_autotest', true, true],
         ['threads_autotest', true, true],
         ['trace_autotest', true, true],
-        ['graph_autotest', true, true],
-        ['node_list_dump', true, true],
 ]
 
 # Tests known to have issues or which don't belong in other tests lists.
@@ -300,7 +296,6 @@ perf_test_names = [
         'trace_perf_autotest',
         'ipsec_perf_autotest',
         'thash_perf_autotest',
-        'graph_perf_autotest',
 ]
 
 driver_test_names = [
@@ -366,6 +361,13 @@ if dpdk_conf.has('RTE_LIB_FLOW_CLASSIFY')
     test_sources += 'test_flow_classify.c'
     fast_tests += [['flow_classify_autotest', false, true]]
 endif
+if dpdk_conf.has('RTE_LIB_GRAPH')
+    test_sources += 'test_graph.c'
+    fast_tests += [['graph_autotest', true, true]]
+    fast_tests += [['node_list_dump', true, true]]
+    test_sources += 'test_graph_perf.c'
+    perf_test_names += 'graph_perf_autotest'
+endif
 if dpdk_conf.has('RTE_LIB_METRICS')
     test_sources += ['test_metrics.c']
     fast_tests += [['metrics_autotest', true, true]]
lib/meson.build +1 -0
index 9677239236..7310021833 100644
@@ -72,6 +72,7 @@ optional_libs = [
         'cfgfile',
         'flow_classify',
         'gpudev',
+        'graph',
         'gro',
         'gso',
         'kni',
Signature · 1 line
2.40.1
#2 lore raw

Re: [PATCH 2/2] lib: make graph optional

Quoted 2 lines · David Marchand

Allow disabling of the graph library in builds.

Good to make graph as optional.
I did not check the build, will examples/l3fwd-graph/ skip automatically ?

Quoted 4 lines

---
+if dpdk_conf.has('RTE_LIB_GRAPH')

Can devtools/test-meson-builds.sh updated to check build with disabling all optional libs?

Quoted 5 lines
app/test/meson.build +5 -0
+    test_sources += 'test_graph.c'
+    fast_tests += [['graph_autotest', true, true]]
+    fast_tests += [['node_list_dump', true, true]]
+    test_sources += 'test_graph_perf.c'
+    perf_test_names += 'graph_perf_autotest'
#3 lore raw

Re: [PATCH 2/2] lib: make graph optional

Quoted 8 lines · Jerin Jacob
Quoted 2 lines · David Marchand

Allow disabling of the graph library in builds.

Good to make graph as optional.
I did not check the build, will examples/l3fwd-graph/ skip automatically ?

Yes.
Each example exposes its required dependencies. examples/meson.build will skip any example with unmet requirements unless the example was explicitly set in the -Dexamples= list of examples to build.

See:
https://git.dpdk.org/dpdk/tree/examples/meson.build#n105

https://git.dpdk.org/dpdk/tree/examples/meson.build#n79
https://git.dpdk.org/dpdk/tree/examples/meson.build#n117

Quoted 8 lines
Quoted 5 lines

---
+if dpdk_conf.has('RTE_LIB_GRAPH')

Can devtools/test-meson-builds.sh updated to check build with disabling all optional libs?

I already tested this series with our script: we already have a "mini" target.

build build-mini cc skipABI $use_shared -Ddisable_libs=* \
-Denable_drivers=net/null

...
Message: Skipping example "l2fwd-jobstats"
Library rt found: YES
Message: Missing dependency "graph" for example "l3fwd-graph"
Message: Skipping example "l3fwd-graph"
Message: Missing dependency "power" for example "l3fwd-power"
Message: Skipping example "l3fwd-power"
...

Signature · 1 line
David Marchand
#6 lore raw

Re: [PATCH 2/2] lib: make graph optional

20/06/2023 10:20, Jerin Jacob:

Quoted 12 lines
Quoted 10 lines · Bruce Richardson
Quoted 8 lines · David Marchand

Allow disabling of the graph library in builds.

---
 app/test/meson.build | 12 +++++++-----
 lib/meson.build      |  1 +
 2 files changed, 8 insertions(+), 5 deletions(-)
Quoted 3 lines
Quoted 1 line

Series applied, thanks.

Acked-by on v1 1/2
#8 lore raw
In reply to David Marchand
Quoted 4 lines · David Marchand

We forgot to add graph unit tests to the CI testsuites.

Could we add Fixes: ?
Either way,

Quoted 28 lines
---
 app/test/meson.build | 3 +++
 1 file changed, 3 insertions(+)
app/test/meson.build +3 -1
index d0fabcbb8b..35d6baeb22 100644
@@ -250,6 +250,8 @@ fast_tests = [
         ['thash_autotest', true, true],
         ['threads_autotest', true, true],
         ['trace_autotest', true, true],
+        ['graph_autotest', true, true],
+        ['node_list_dump', true, true],
 ]
 
 # Tests known to have issues or which don't belong in other tests lists.
@@ -298,6 +300,7 @@ perf_test_names = [
         'trace_perf_autotest',
         'ipsec_perf_autotest',
         'thash_perf_autotest',
+        'graph_perf_autotest',
 ]
 
 driver_test_names = [
--

2.40.1

#9 lore raw
Quoted 11 lines · Jerin Jacob
Quoted 4 lines · David Marchand

We forgot to add graph unit tests to the CI testsuites.

Could we add Fixes: ?
Either way,

Indeed.
I don't think the graph unit tests and code changed much, so it should be ok to backport down to 20.11 and enable these ut in the CI.

Signature · 1 line
David Marchand
#10 lore raw
Quoted 9 lines · David Marchand
Quoted 8 lines · Jerin Jacob
Quoted 4 lines · David Marchand

We forgot to add graph unit tests to the CI testsuites.

Quoted 9 lines
Quoted 3 lines

Could we add Fixes: ?
Either way,

Indeed.
I don't think the graph unit tests and code changed much, so it should be ok to backport down to 20.11 and enable these ut in the CI.

Sounds ok to me to add "Fixes:" tag and backport. If they pass, great - if they don't, the graph maintainers would need to spend time updating the tests etc or we could just drop the patch.

#11 lore raw
Quoted 21 lines · Kevin Traynor
Quoted 9 lines · David Marchand
Quoted 8 lines · Jerin Jacob
Quoted 4 lines · David Marchand

We forgot to add graph unit tests to the CI testsuites.

Quoted 9 lines
Quoted 3 lines

Could we add Fixes: ?
Either way,

Indeed.
I don't think the graph unit tests and code changed much, so it should be ok to backport down to 20.11 and enable these ut in the CI.

Quoted 3 lines

Sounds ok to me to add "Fixes:" tag and backport. If they pass, great - if they don't, the graph maintainers would need to spend time updating the tests etc or we could just drop the patch.

Modulo some easy to fix conflict when backporting, the graph tests pass fine:
- 20.11:

2023-06-20T11:30:44.7171265Z 87/96 DPDK:fast-tests / graph_autotest
    OK       0.13 s
2023-06-20T11:30:44.7171724Z 88/96 DPDK:fast-tests / node_list_dump
    OK       0.13 s

- 21.11:

2023-06-20T11:32:37.2132951Z  90/101 DPDK:fast-tests / graph_autotest
      OK       0.17 s
2023-06-20T11:32:37.2133397Z  91/101 DPDK:fast-tests / node_list_dump
      OK       0.17 s

- 22.11:

2023-06-20T11:50:48.2519983Z  92/106 DPDK:fast-tests / graph_autotest
      OK       0.17 s
2023-06-20T11:50:48.2520344Z  93/106 DPDK:fast-tests / node_list_dump
      OK       0.17 s
Signature · 1 line
David Marchand
#12 lore raw
Quoted 39 lines · David Marchand
Quoted 21 lines · Kevin Traynor
Quoted 9 lines · David Marchand
Quoted 8 lines · Jerin Jacob
Quoted 4 lines · David Marchand

We forgot to add graph unit tests to the CI testsuites.

Quoted 9 lines
Quoted 3 lines

Could we add Fixes: ?
Either way,

Indeed.
I don't think the graph unit tests and code changed much, so it should be ok to backport down to 20.11 and enable these ut in the CI.

Quoted 3 lines

Sounds ok to me to add "Fixes:" tag and backport. If they pass, great - if they don't, the graph maintainers would need to spend time updating the tests etc or we could just drop the patch.

Modulo some easy to fix conflict when backporting, the graph tests pass fine:
- 20.11:

2023-06-20T11:30:44.7171265Z 87/96 DPDK:fast-tests / graph_autotest
     OK       0.13 s
2023-06-20T11:30:44.7171724Z 88/96 DPDK:fast-tests / node_list_dump
     OK       0.13 s

- 21.11:

2023-06-20T11:32:37.2132951Z  90/101 DPDK:fast-tests / graph_autotest
       OK       0.17 s
2023-06-20T11:32:37.2133397Z  91/101 DPDK:fast-tests / node_list_dump
       OK       0.17 s
Quoted 7 lines

- 22.11:

2023-06-20T11:50:48.2519983Z  92/106 DPDK:fast-tests / graph_autotest
       OK       0.17 s
2023-06-20T11:50:48.2520344Z  93/106 DPDK:fast-tests / node_list_dump
       OK       0.17 s

Thanks David. In that case lgtm.