[v3,4/4] test: introduce trace-autotest with traces enabled

Message ID 20220617022913.47564-5-fengchengwen@huawei.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series bugfix for trace |

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/intel-Testing fail Testing issues
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

fengchengwen June 17, 2022, 2:29 a.m. UTC
  Currently trace_autotest unit test is executed with traces disabled.
This patch introduces trace_autotest unit test with traces enabled,
and the traces file is written to the directory where dpdk-test is
located.

Note: this patch depends on following:
[1] eal: fix segment fault when exit trace
[2] eal: fix trace init fail with long file-prefix

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 app/test/meson.build | 10 ++++++++++
 1 file changed, 10 insertions(+)
  

Comments

David Marchand June 21, 2022, 9:07 a.m. UTC | #1
On Fri, Jun 17, 2022 at 4:35 AM Chengwen Feng <fengchengwen@huawei.com> wrote:
>
> Currently trace_autotest unit test is executed with traces disabled.
> This patch introduces trace_autotest unit test with traces enabled,
> and the traces file is written to the directory where dpdk-test is
> located.
>
>
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>

> ---
>  app/test/meson.build | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/app/test/meson.build b/app/test/meson.build
> index 7fe261cae8..e56fb997bd 100644
> --- a/app/test/meson.build
> +++ b/app/test/meson.build
> @@ -508,6 +508,16 @@ foreach arg : fast_tests
>                  timeout : timeout_seconds_fast,
>                  is_parallel : false,
>                  suite : 'fast-tests')
> +        if arg[0] == 'trace_autotest' and (not is_windows)

Parenthesis are unneeded here, I updated this when applying.
  

Patch

diff --git a/app/test/meson.build b/app/test/meson.build
index 7fe261cae8..e56fb997bd 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -508,6 +508,16 @@  foreach arg : fast_tests
                 timeout : timeout_seconds_fast,
                 is_parallel : false,
                 suite : 'fast-tests')
+        if arg[0] == 'trace_autotest' and (not is_windows)
+            test_args += ['--trace=.*']
+            test_args += ['--trace-dir=@0@'.format(meson.current_build_dir())]
+            test(arg[0] + '_with_traces', dpdk_test,
+                    env : ['DPDK_TEST=' + arg[0]],
+                    args : test_args,
+                    timeout : timeout_seconds_fast,
+                    is_parallel : false,
+                    suite : 'fast-tests')
+        endif
     endif
 endforeach