Commit Graph

6 Commits

Author SHA1 Message Date
Konstantin Ananyev
b66412f24f test: fix ring PMD initialisation
(bitratestats_autotest|latencystats_autotest|pdump_autotest) tests
generate a log of error messages like that:

test_packet_forward() line 104: Error sending packet to port 0
Send pkts Failed

These tests use of app/test/sample_packet_forward.* code.
This code creates a portid from a ring, but doesn't properly
configure/start it.
The fix adds code to configure/start given port before usage.

Fixes: 7a0935239b ("ethdev: make fast-path functions to use new flat array")
Fixes: a52966cd48 ("test: add helpers using ring PMD Rx/Tx")
Cc: stable@dpdk.org

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: David Marchand <david.marchand@redhat.com>
2021-10-26 19:59:26 +02:00
Hemant Agrawal
f030bff72f bitrate: add free function
This patch adds support for free function.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2020-10-19 16:08:36 +02:00
Andrew Rybchenko
f6c763fbed ethdev: unify error code if port ID is invalid
Use ENODEV as the error code if specified port ID is invalid.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-10-17 01:14:50 +02:00
Hemant Agrawal
d3f7095baf test: cleanup when leaving bitrate and latency tests
Both bitratestats_autotest latency test initializes the metrics library.
It should be cleaned during exit.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2020-05-19 14:13:19 +02:00
Ferruh Yigit
d170527643 test: fix global variable multiple definitions
Multiple global variable are defined in multiple unit test files with
same name, but all unit test files are linked into single executable,
which means those variables share same storage which is not the
intention, fixed by making global variables 'static'.

Issue has been detected by '-fno-common' gcc flag.

Fixes: fdeb30fa71 ("test/bitrate: add unit tests for bitrate library")
Fixes: c3eabff124 ("distributor: add unit tests")
Fixes: 0e925aef27 ("app/test: add EFD functional and perf tests")
Fixes: 359e17bf08 ("app/test: improve hash unit tests")
Fixes: c7eb0972e7 ("test/hash: add lock-free r/w concurrency")
Fixes: 1e3676a06e ("test/latency: add unit tests for latencystats library")
Fixes: 0cc67a96e4 ("test/member: add functional and perf tests")
Fixes: e6a14121f4 ("test/rcu: remove arbitrary limit on max core count")
Fixes: 104dbec208 ("test/rcu: increase size of core numbers")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-10-25 23:16:23 +02:00
Bruce Richardson
a9de470cc7 test: move to app directory
Since all other apps have been moved to the "app" folder, the autotest app
remains alone in the test folder. Rather than having an entire top-level
folder for this, we can move it back to where it all started in early
versions of DPDK - the "app/" folder.

This move has a couple of advantages:
* This reduces clutter at the top level of the project, due to one less
  folder.
* It eliminates the separate build task necessary for building the
  autotests using make "make test-build" which means that developers are
  less likely to miss something in their own compilation tests
* It re-aligns the final location of the test binary in the app folder when
  building with make with it's location in the source tree.

For meson builds, the autotest app is different from the other apps in that
it needs a series of different test cases defined for it for use by "meson
test". Therefore, it does not get built as part of the main loop in the
app folder, but gets built separately at the end.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-26 15:29:27 +01:00