aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2015-12-29api: sync: removed odp_sync_storesPetri Savolainen
Removed odp_sync_stores() implementation and replaced usage with odp_mb_full(), to minimize functional changes. Added minimal validation test function for the new memory barriers. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29validation: classification: adds additional ASSERTS for stabilityBalasubramanian Manoharan
Adds additional ASSERTS for stability in validation suites during failure Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29validation: std_clib: added validation testsPetri Savolainen
Added validation tests for ODP std C library API. 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>
2015-12-29api: hash: Added crc32 and crc32c hash functionsPeng
Signed-off-by: Peng <hepeng@ict.ac.cn> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Conflicts: platform/linux-generic/Makefile.am test/validation/hash/hash.c test/validation/hash/hash.h
2015-12-29api/validation/linux-generic: classification: implement class of service ↵Balasubramanian Manoharan
create api Implements odp_cls_cos_create() and odp_cls_cos_param_init() functions and replace odp_cos_create() function with odp_cls_cos_create() in validation and examples. Class of service create function now takes pool, queue, drop policy and name as input parameters. Adds class of service parameter structure odp_cls_cos_param_t and initialization function odp_cls_cos_param_init() Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-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>
2015-12-29validation: sched: improve scheduler validation test to check sched time ↵Ivan Khoronzhuk
correctly Test checks scheduler time correctness using time API. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29validation: time: update to tes global time APIIvan Khoronzhuk
Mostly global time API is tested in the same way, so reuse existent functions. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29validation: time: add test for odp_time_wait_ns() and odp_time_wait_until()Ivan Khoronzhuk
This patch adds validation test for odp_time_wait_ns/until(). Also it visually demonstrates 5 second count. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29validation: time: add test for odp_time_local_res() and use resolutionIvan Khoronzhuk
This function is used to get resolution, test uses it to check other APIs. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29validation: time: add test convertsion on 0Ivan Khoronzhuk
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29validation: time: test time constants in nsIvan Khoronzhuk
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29performance: pktio_perf: use odp_time_wait_ns() function instead of loopingIvan Khoronzhuk
Now odp_time_wait_ns() can be used instead of own implementation. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29test/example: use local time API as wall timeIvan Khoronzhuk
The local time API is supposed to behave like wall time now, so correct it in examples and tests. Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29validation: time: align tests with current time APIIvan Khoronzhuk
Add test for odp_time_sum, odp_time_cmp, odp_time_to_u64 APIs. Sophisticate a little tests for odp_time_diff, odp_time_local_from_ns, odp_time_local_to_ns APIs. Check time on monotony. Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29performance: sched: use ODP time API instead of clock_gettimeIvan Khoronzhuk
The time API can be used instead of Posix clock_gettime as more accurate and OS independent. Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29test: performance: pktio: don't use direct arithmetic operations with odp_time_tIvan Khoronzhuk
It was missed while unbinding cycles from time API names. Correct is as it prevents for adding structure under odp_time_t. Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29validation: time: don't assign int directly to odp_time_tIvan Khoronzhuk
Under opaque type can be structure that cannot be used with direct values, So, use conversion functions to get time_t to avoid build issues. Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29validation: classification: add odp_cls_cos_pool_set() apiBalasubramanian Manoharan
Assigns a packet pool to CoS using odp_cls_cos_pool_set() api. Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-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> Conflicts: test/validation/classification/odp_classification_test_pmr.c Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29validation: synchronizers: add recursive lock testsBill Fischofer
Add tests for validating odp_spinlock_recursive and odp_rwlock_recursive lock types. Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29validation: synchronizers: add missing rwlock read lock functional testBill Fischofer
rwlock functional tests test for write locks, however they should also test for read locks. Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29validation: crypto: add test for AES128-GCMNicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29validation: crypto: allow custom auth/cipher rangeNicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29validation: crypto: support validating both cipher and auth at the same timeNicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-22validation: pktio: test odp_pktio_print()Matias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-22validation: hash: remove binary and add .gitignore fileBill Fischofer
The hash test erroneously checked in the compiled test binary and omitted the required .gitignore file. Correct this to bring it into conformity with the rest of the test suite. Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-22validation: pktio: refactor error handling during sequence checkZoltan Kiss
The callers of this function expect TEST_SEQ_INVALID or the sequence number. Although it is defined as (uint32_t)~0, which normally yields to -1, it's cleaner to use the same macro. Similar to that, it's unlikely that seq reaches UINT32_MAX, the function should check for it. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-22validation: export missing test functionsStuart Haslam
All test functions should be non-static and declared in the module's header file. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Reviewed-by: Christophe Milard <christophe.milard@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-16helper: linux: add thread type in pthread_createHemant Agrawal
The exisiting helper routine only create the worker threads. However there is a need to use the same for creating the control thread as well. e.g. CLI thread. Signed-off-by: Hemant Agrawal <Hemant@freescale.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-14validation: classification: check return value of pktio stopBalasubramanian Manoharan
Fixes https://bugs.linaro.org/show_bug.cgi?id=1937 Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-14validation: pktio: ability to wait for external networkIlya Maximets
'ODP_WAIT_FOR_NETWORK' environment variable may be used to wait some time right after pktio_open(). Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Reviewed-and-tested-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-14validation: pktio: initialize mac addresses for all packetsIlya Maximets
For the purpose of testing of real-world interfaces the packet's content should be valid or kernel will throw them away. Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Reviewed-and-tested-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-10test: performance: set a packet rate pass threshold for l2fwdStuart Haslam
Report a failure if the maximum achieved packet rate is less than a predefined threshold (currently set at 5000pps). Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-10validation/config/Makefile: change install locationAnders Roxell
All tests should be installed under testdir variable and not in the bin directory. Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-08validation: pktio: add test for start when started and stop when stopped()Nicolas Morey-Chaisemartin
Also checks that interface are stopped by default Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-08validation: classification: stronger checks to avoid SEGV on pktio failureNicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-08validation: classification: start pktio after setting inq and stop it before ↵Nicolas Morey-Chaisemartin
removing it Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-08validation: pktio: remove unneeded stop as interface is stopped after open()Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-08validation: pktio: stop interfaces before removing the default inqNicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-08validation: pktio: add tests for rrecv() on WONLY, and send on RONLY pktiosNicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-08validation: pktio: add customizable out mode for pktiosNicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-07validation: scheduler: use fail timeout when waiting on events in chaosIvan Khoronzhuk
In case if smth bad was happened and events are not received, it's better finish than looping forever. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-07validation:pktio : Fix UDP checksum computationGrigore Ion
The UDP checksum is computed in the CPU endianness. The returned result must be converted to the BE ordering when it is used to update the UDP checksum in a packet. Signed-off-by: Grigore Ion <ion.grigore@freescale.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-03validation: queue: refactor test to avoid coverity issuesBill Fischofer
Change CU_ASSERT order to avoid side effect issues identified by Coverity Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-11-27Merge branch 'master' into nextMaxim Uvarov
2015-11-25validation: ability to specify test install directoryStuart Haslam
Previously if a build had been configured with validation tests enabled (--enable-test-vald) a subsequent "make install" would install the test binaries and scripts into /usr/local/bin without any way of separating them from the rest of the installed artefacts. This patch changes the default behaviour to not install test binaries or scripts and adds a configure parameter (--with-testdir) to explicitly enable installation. These changes are required in order to be able to package the tests separately (e.g. in OpenEmbedded) and also to enable post-install testing. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-11-25validation: packet: add tests for packet alloc/free multi functionsNicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-11-25validation: buffer: add tests for buffer alloc/free multi functionsNicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-11-25validation: crypto: add test for AES128 CBCNicolas Morey-Chaisemartin
Test reference vectors from RFC3602 Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-11-25validation: crypto: add test for HMAC-SHA-256-128Nicolas Morey-Chaisemartin
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-11-25api: crypto: move enums from platform types to odp and rename to fit the API ↵Nicolas Morey-Chaisemartin
format Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>