[PATCH] app/test: invoke all telemetry commands
Bruce Richardson
bruce.richardson at intel.com
Fri Jul 29 12:20:11 CEST 2022
On Fri, Jul 29, 2022 at 11:54:00AM +0200, David Marchand wrote:
> Try and call all possible telemetry commands.
> Each commands is tested with no argument, 0 (for command that accepts
> a single integer like for a port identifier) and z (to catch commands
> not properly validating input).
> Fake cryptodev, dmadev, ethdev, eventdev and rawdev devices are created
> using dummy drivers.
>
> Output of the commands is not checked, the point of this test is mainly
> to catch simple issues and leaks (when coupled with ASan in the CI).
>
> Signed-off-by: David Marchand <david.marchand at redhat.com>
> Acked-by: Chengwen Feng <fengchengwen at huawei.com>
> ---
> .github/workflows/build.yml | 2 +-
> app/test/meson.build | 35 ++++++++++++++++++++++++++++++++++-
> app/test/test_telemetry.sh | 28 ++++++++++++++++++++++++++++
> 3 files changed, 63 insertions(+), 2 deletions(-)
> create mode 100755 app/test/test_telemetry.sh
>
> diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
> index 6f04e7071c..bf17d2b278 100644
> --- a/.github/workflows/build.yml
> +++ b/.github/workflows/build.yml
> @@ -140,7 +140,7 @@ jobs:
> run: sudo apt install -y crossbuild-essential-riscv64
> - name: Install test tools packages
> if: env.AARCH64 != 'true' || env.PPC64LE != 'true' || env.RISCV64 != 'true' || env.RUN_TESTS == 'true'
> - run: sudo apt install -y gdb
> + run: sudo apt install -y gdb jq
> - name: Install doc generation packages
> if: env.BUILD_DOCS == 'true'
> run: sudo apt install -y doxygen graphviz python3-sphinx
> diff --git a/app/test/meson.build b/app/test/meson.build
> index 431c5bd318..e60fc64a37 100644
> --- a/app/test/meson.build
> +++ b/app/test/meson.build
> @@ -473,12 +473,14 @@ message('hugepage availability: @0@'.format(has_hugepage))
> timeout_seconds = 600
> timeout_seconds_fast = 10
>
> +test_no_huge_args = ['--no-huge', '-m', '2048']
> +
> foreach arg : fast_tests
> test_args = []
> run_test = true
> if not has_hugepage
> if arg[1]
> - test_args += ['--no-huge', '-m', '2048']
> + test_args += test_no_huge_args
> else
> run_test = false
> endif
> @@ -520,6 +522,37 @@ foreach arg : fast_tests
> endif
> endforeach
>
> +if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
> + test_args = [dpdk_test]
> + test_args += test_no_huge_args
> + if get_option('default_library') == 'shared'
> + foreach drv:dpdk_drivers
> + test_args += ['-d', drv.full_path().split('.a')[0] + '.so']
> + endforeach
Rather than looping for each driver and building a huge cmdline, we should
just be able to pass in the path to the drivers directory, and have DPDK
auto-load all .so files there. Passing in "meson.project_build_root() +
'/drivers'" should probably work. If we want a more correct way to get the
drivers build directory, we can call meson.current_build_dir() when
processing the drivers and save off that value to be reused here.
/Bruce
More information about the dev
mailing list