Unit tests framework
F: app/test/commands.c
-F: app/test/get-coremask.sh
F: app/test/has-hugepage.sh
F: app/test/packet_burst_generator.c
F: app/test/packet_burst_generator.h
+++ /dev/null
-#! /bin/sh -e
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2019 Intel Corporation
-
-if [ "$(uname)" = "Linux" ] ; then
- cat /sys/devices/system/cpu/present
-elif [ "$(uname)" = "FreeBSD" ] ; then
- ncpus=$(/sbin/sysctl -n hw.ncpu)
- echo 0-$(expr $ncpus - 1)
-else
-# fallback
- echo 0-3
-fi
timeout_seconds = 600
timeout_seconds_fast = 10
-get_coremask = find_program('get-coremask.sh')
-num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip()
-
-default_test_args = [num_cores_arg]
-
foreach arg : fast_tests
- test_args = default_test_args
+ test_args = []
run_test = true
if not has_hugepage
if arg[1]
foreach arg : perf_test_names
test(arg, dpdk_test,
env : ['DPDK_TEST=' + arg],
- args : default_test_args,
timeout : timeout_seconds,
is_parallel : false,
suite : 'perf-tests')
foreach arg : driver_test_names
test(arg, dpdk_test,
env : ['DPDK_TEST=' + arg],
- args : default_test_args,
timeout : timeout_seconds,
is_parallel : false,
suite : 'driver-tests')
foreach arg : dump_test_names
test(arg, dpdk_test,
env : ['DPDK_TEST=' + arg],
- args : default_test_args,
timeout : timeout_seconds,
is_parallel : false,
suite : 'debug-tests')
$ meson test --suite fast-tests
+If desired, additional arguments can be passed to the test run via the meson
+``--test-args`` option.
+For example, tests will by default run on as many available cores as is needed
+for the test, starting with the lowest number core - generally core 0.
+To run the fast-tests suite using only cores 8 through 16, one can use::
+
+ $ meson test --suite fast-tests --test-args="-l 8-16"
+
The meson command to list all available tests::
$ meson test --list
* ``is_parallel`` is used to run test case either in parallel or non-parallel mode.
* ``timeout`` is used to specify the timeout of test case.
-* ``args`` is used to specify test specific parameters.
+* ``args`` is used to specify test specific parameters (see note below).
* ``env`` is used to specify test specific environment parameters.
+Note: the content of meson ``--test-args`` option and the content of ``args``
+are appended when invoking the DPDK test binary.
+Because of this, it is recommended not to set any default coremask or memory
+configuration in per test ``args`` and rather let users select what best fits
+their environment. If a test can't run, then it should be skipped, as described
+below.
+
Dealing with skipped test cases
-------------------------------