aboutsummaryrefslogtreecommitdiff
path: root/helper/test
AgeCommit message (Collapse)Author
2021-11-12helper: cli: remove unused instance parameter from odph_cli_init()Jere Leppänen
Now that the CLI helper no longer creates a thread, the ODP instance is not needed by odph_cli_init(). Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-11-11helper: test: thread: rename odp_instance variableMatias Elo
Rename thread helper test's global variable 'odp_instance', which clashes with the new odp_instance() API. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-09-30helper: cli: don't create the server threadJere Leppänen
Add odph_cli_run() and remove odph_cli_start(). Don't create a thread in the CLI helper. Instead, the caller may create a thread and call odph_cli_run() to run the CLI. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Cc: Lifang Zhang <lifang.zhang@nokia.com>
2021-09-30helper: test: test new thread parametersJere Leppänen
Create threads also with non-default values for the new thread parameters stack_size and sync_timeout. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-09-30helper: test: test odph_thread_create() instead of odph_odpthreads_create()Jere Leppänen
Test the newer odph_thread_create() and odph_thread_join() functions instead of the deprecated odph_odpthreads_create() and odph_odpthreads_join(). Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-06-01helper: cli: add user command functionsJere Leppänen
Allow user to register CLI commands with a name, function, and an optional help text. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-05-05helper: test: linux: process: add missing odp_term_local() callsJere Leppänen
When created with odph_linux_process_fork*(), the child does not call odp_init_local(), but must remember to call odp_term_local(). Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-03-18build: don't run tests in parallelJere Leppänen
Explicitly prevent tests from being run in parallel when the -j option is used with make check. Using the .NOTPARALLEL special target is the only easy way to ensure that tests are run one by one. Unfortunately this also prevents parallel builds for the tests. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-02-23helper: test: implement CLI helper testJere Leppänen
Test CLI helper by starting and stopping the ODP CLI server. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-02-23helper: create autoheaderJere Leppänen
Create autoheader_external for helper and move there the ODPH_* defines from odp autoheader_external. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2020-10-14build: fix permission error during distcheckSunil Kumar Kori
During 'make distcheck' scripts are copied into distribution directory twice. In first iteration scripts are successfully copied into destination path with read/execute permission and in second iteration build system throws permission error because file already exist. Signed-off-by: Sunil Kumar Kori <skori@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2020-09-11build: simplify remote target testingStanislaw Kardach
It is often beneficial to run "make check" on a remote target platform. However in order to run it, a full build-system has to be present which may not be efficient or possible for embedded platforms. Alternatively autotools offer a mechanism which may be used: LOG_COMPILER environment variable. If specified, all test invocations are prepended with its contents. This allows injecting a wrapper script which will ensure the test is run remotely (i.e. through ssh). Prior to that the binaries have to be transported to the remote system. This cannot be done in the script itself as it has no knowledge on the dependencies of the test program, only its path. Test could be relying on some files stored in srcdir or builddir. An issue exists that if ODP is built in out-of-tree method (builddir != srcdir), only the compiled test programs are copied to the builddir. scripts and script data files remain in srcdir and wrapper script is called with an absolute path to the script located in srcdir. This would require to copy the srcdir to exactly the same path on the target as on build host. This may alias with some paths already there. To prevent this from happening add make target wrappers which copy scripts and script data to build directory which allows the autotools test harness to produce a proper wrapper script invocation with a relative path and allows to only copy the builddir to the target to a strictly controlled location. Signed-off-by: Stanislaw Kardach <skardach@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2019-10-07linux-gen: include only ODP defines in autogenerated header filesMatias Elo
The config.h file has been split into three parts: autoheader_build.h: should NOT be included by ANY source file autoheader_external.h: can be included by any source file, including public headers autoheader_internal.h: can be included by any internal source file, but NOT by public headers autoheader_external.h and autoheader_internal.h are generated based on matching template files (*.in) and include only ODP defines. autoheader_build.h includes all build defines and should not be included by any source file. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2019-09-27linux-gen: include config.h header in install directoryMatias Elo
Previously, config.h header was not included in install dir. This caused a compilation failure when an application tried to include ODP helper headers. config.h has been moved to include/odp subdirectory to avoid naming conflicts and unnecessary includes have been removed. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reported-by: Mikko Parpala <mikko.parpala@nokia.com>
2019-09-19helper: debug: remove duplicate ODPH_UNUSED macroMatias Elo
ODP API already has ODP_UNUSED macro. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2019-08-20helper: debug: add test application for helper debugPetri Savolainen
Test that macros are defined and use assert. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2019-08-20helper: debug: move odph_debug.h into helper APIPetri Savolainen
Moved the debug header to be part of the helper API. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2019-05-09helper: add helper version definesPetri Savolainen
Added helper library version defines, so that application can track helper version independent of ODP API version. Added also function for easy print out of the versions number. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Stanislaw Kardach <skardach@marvell.com>
2018-11-28helper: test: add test for new odph_options() functionMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-05-14helper: thread: don't use getopt libraryPetri Savolainen
Don't use getopt library calls for helper options. Getopt library reset is not portable in practice. Library interface includes global variables and different internal state variables depending on POSIX version. There's no need for helper to use getopt calls or set getopt global variables at all. It's much more simple (and portable) to remove helper options from argv[] and return new value for argc. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-02-28helper: cuckoo: check pool and queue limitsPetri Savolainen
Use capability to check if pool and queue can hold enough events. Also lower test case resource requirement. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-02-26update Linaro Copyrights to 2018 yearMaxim Uvarov
Using simple commands: find . -not -path .git -type f -exec \ sed -i -E 's/ (201[0-9]), Linaro/ \1-2018, Linaro/g' {} + find . -not -path .git -type f -exec \ sed -i -E 's/ (201[0-9])(-201[0-9]), Linaro/ \1-2018, Linaro/g' {} + Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
2018-01-18linux-gen, include: switch std_clib.h to api+abiDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-01-15helper/tests: use common Makefile.inc for testsDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-10-19helper: add ${EXEEXT} when calling compiled programsDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-10-16helper: simplify Makefile.amsDmitry Eremin-Solenikov
- Drop unused $(srcdir) - Drop unused $(EXEEXT) Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-09-08helper: test: rework build systemDmitry Eremin-Solenikov
- Stop using extra libraries just to create a test executable - Stop using EXTRA_DIST to distribute headers, include them into _SOURCES - Stop using unnecessary dist_ prefixes, sources are distributed automatically Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-09-08configure: stop setting AM_* variablesDmitry Eremin-Solenikov
AM_* variables by design should be set by Makefile.am, not by configure.ac. Use CFLAGS/CXXFLAGS instead. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-09-08build: use AM_CPPFLAGS to set include paths, rather than AM_CFLAGSDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-09-08build: drop platorm/linux-generic/Makefile.incDmitry Eremin-Solenikov
Mandate that platform provides platform/$(with_platform)/arch/$(ARCH_DIR) directory and reference it directly from all Makefile.am/.inc files. Main reason for this change is to allow automake to process all includes at the time of Makefile.am -> Makefile.in conversion. Currently it can not determine path for platform/@with_platform@/Makefile.inc, thus inclusion is left for main make invocation. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-08-29helper: chksum: verify odph_ipv4_chksum_x() functionsDmitry Eremin-Solenikov
Fixes: https://bugs.linaro.org/show_bug.cgi?id=2976 Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-08-25helper: use config.h headerDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-08-23helper: test: fix running process/thread tests on single core systemsMatias Elo
This patch enables running process and thread validation tests on single core systems. Fixes bug: https://bugs.linaro.org/show_bug.cgi?id=2812 Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-02-16helper: linux: renamed threads_extn to linux helpersPetri Savolainen
There's no platform specific helpers. Helpers may depend on Linux and make it easier to do common series of Linux system calls. These kind of helpers are grouped into helper/linux directory. Use --enable-helper-linux configuration option to enable support for Linux helpers. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-02-10helper: cuckootable: avoid storage leaks on error pathsBill Fischofer
Ensure that malloced storage areas are freed on error paths. This resolves Bug https://bugs.linaro.org/show_bug.cgi?id=2830 Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-02-03abi: event: added the first ABI spec filePetri Savolainen
Used event API as the first example of an ABI spec file. Used the same default architecture file initially for all architectures. Default ABI files avoid multiple copies of the same definition. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-01-25helper: use odph_api.h for test include for unexported filesMike Holmes
Adding the previously missing table functions to the public helper api allows the tests to use just odph_api.h Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Christophe Milard <christophe.milard@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-01-25helper: add odph_api.h for existing exported headersMike Holmes
Rather than have all applications include a variable number of helper api files, consolidate them into one include odph_api.h Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Christophe Milard <christophe.milard@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-01-22helper: remove dependence on test dirMike Holmes
There is no reason that the helpers need to depend on the test directory so remove the offending links Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Christophe Milard <christophe.milard@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-01-22helper: move thread implementation under platformMike Holmes
Only the portable api is built by default, use --enable-helper-extn to enable non portable APIs for a helper platform Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Christophe Milard <christophe.milard@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-01-22helper: cleanup Linux rename to threadMike Holmes
Remove the OS specific Linux filename and use the name of the generic apis it contains which is for odp_threads Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Christophe Milard <christophe.milard@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-01-12helper: test: gitignore add iplookuptableChristophe Milard
Obviously a miss from commit: c4aefb88d31452b3add8cf16f9eef152525c3e93 Signed-off-by: Christophe Milard <christophe.milard@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-01-12helper: test: add validation test of ip lookup tableRu Jia
Signed-off-by: Ru Jia <jiaru@ict.ac.cn> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-01-12helper: test: add test of cuckoo hash tableRu Jia
This test program consists of basic validation tests and performance tests. Signed-off-by: Ru Jia <jiaru@ict.ac.cn> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-07-15helper/test/Makefile: don't install testsAnders Roxell
Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-06-15helper: linux: correct pthread join retval checkPetri Savolainen
Helper defines that pthread exit status is NULL on error, but checks for != NULL. Both NULL and !NULL were returned on failure. Defined that both process and pthread return !0 (!NULL) on failure. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-05-27helper: linux: odp thread cpu affinity APIsYi He
Provide helper APIs to set and get cpu affinity in ODP threads, and set cpu affinity to the 1st available control cpu for all odp test/validation programs in odp_cunit_common library. Signed-off-by: Yi He <yi.he@linaro.org> Reviewed-by: Christophe Milard <christophe.milard@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-05-23helper/test: add missing scripts to EXTRA_DISTAnders Roxell
Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-05-23helper: test: adding odpthread functions testsChristophe Milard
Simple tests testing odph_odpthreads_create() and odph_odpthreads_join() are added. A single test binary, odpthreads, is added. This program creates odp threads as pthreads or linux processes, dependng on its calling args. Two calling scripts are added to create ODP threads as either processes, or threads. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Brian Brooks <brian.brooks@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-05-03helper: chksum add ipv3 and udp fieldsMaxim Uvarov
Chksum routines updated to serarch l4 and udp flags set in the packets. Because there is syntetic allocated packet we need also set required bits. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>