summaryrefslogtreecommitdiff
path: root/test/test
AgeCommit message (Collapse)Author
2018-08-01test: remove CRC offload for bonding slaveReshma Pattan
Link bonding unit tests uses net_null vdev as slaves, and trying to configure DEV_RX_OFFLOAD_CRC_STRIP as offload flags to vdev is not correct as vdev doesn't support offloads. The unit test is reporting this as failure, so fix this by removing the offloads. Fixes: c6698a3e8f ("ethdev: convert remaining apps to new offload API") Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
2018-08-01test: fix uninitialized port configurationRadu Nicolau
test_pmd_ring_pair_create_attach() uses an uninitialized struct rte_eth_conf object Fixes: 51f567129c94 ("app/test: add pmd_ring") Cc: stable@dpdk.org Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2018-08-01test: add fbarray autotest to scriptAnatoly Burakov
Fbarray autotests were added, but the script command was missing. Add it, so that fbarray autotest can be executed as part of autotest script. Fixes: 7985860c18af ("test/fbarray: add autotests") Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-31test: update autotest listJananee Parthasarathy
Autotest is enhanced with additional test cases being added to autotest_data.py Removed non existing PCI autotest. Cc: stable@dpdk.org Signed-off-by: Reshma Pattan <reshma.pattan@intel.com> Signed-off-by: Jananee Parthasarathy <jananeex.m.parthasarathy@intel.com> Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-31test: parallelize unit testsAnatoly Burakov
Now that everything else is in place, we can run unit tests in a different fashion to what they were running as before. Previously, we had all autotests as part of groups (largely obtained through trial and error) to ensure parallel execution while still limiting amounts of memory used by those tests. This is no longer necessary, and as of previous commit, all tests are now in the same group (still broken into two categories). They still run one-by-one though. Fix this by initializing child processes in multiprocessing Pool initialization, and putting all tests on the queue, so that tests are executed by the first idle worker. Tests are also affinitized to different NUMA nodes using taskset in a round-robin fashion, to prevent over-exhausting memory on any given NUMA node. Non-parallel tests are executed in similar fashion, but on a separate queue which will have only one pool worker, ensuring non-parallel execution. Support for FreeBSD is also added to ensure that on FreeBSD, all tests are run sequentially even for the parallel section. Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-31test: remove autotest groupingAnatoly Burakov
Previously, all autotests were grouped into (seemingly arbitrary) groups. The goal was to run all tests in parallel (so that autotest finishes faster), but we couldn't just do it willy-nilly because DPDK couldn't allocate and free hugepages on-demand, so we had to find autotest groupings that could work memory-wise and still be fast enough to not hold up shorter tests. The inflexibility of memory subsystem has now been fixed for 18.05, so grouping autotests is no longer necessary. Thus, this commit moves all autotests into two groups - parallel(izable) autotests, and non-arallel(izable) autotests (typically performance tests). Note that this particular commit makes running autotests dog slow because while the tests are now in a single group, the test function itself hasn't changed much, so all autotests are now run one-by-one, starting and stopping the DPDK test application. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-31test: improve filteringAnatoly Burakov
Improve code for filtering test groups. Also, move reading binary symbols into filtering stage, so that tests that are meant to be skipped are never attempted to be executed in the first place. Before running tests, print out any tests that were skipped because they weren't compiled. Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-31test: print autotest categoriesAnatoly Burakov
Help visually identify parallel vs. non-parallel autotests. Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-31test: make autotest runner python 2/3 compliantAnatoly Burakov
Autotest runner was still using python 2-style print syntax. Fix it by importing print function from the future, and fix the calls to be python-3 style. Fixes: 54ca545dce4b ("make python scripts python2/3 compliant") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-31test: fix code on reportAnatoly Burakov
There are no reports defined for any test, so this codepath was never triggered, but it's still wrong because it's referencing variables that aren't there. Fix it by passing target into the test function, and reference correct log variable. Fixes: e2cc79b75d9f ("app: rework autotest.py") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-31test: fix result printingAnatoly Burakov
Previously, printing was done using tuple syntax, which caused output to appear as a tuple as opposed to being one string. Fix this by using addition operator instead. Fixes: 54ca545dce4b ("make python scripts python2/3 compliant") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-26test/hash: fix potential memory leakPablo de Lara
In the multiwriter test, if "found" array allocation failed, the memory of "keys" array, which was successfully allocated could not be freed, since by this time, tbl_multiwriter_test_params.keys was not set to this array, which is the pointer freed when finishing the test or when a failure happens. To solve this, tbl_multiwriter_test_params.keys is set to the "keys" address, just after allocating and filling the array. Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX") Cc: stable@dpdk.org Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-26test/hash: fix multiwriter with non consecutive coresPablo de Lara
When non consecutive cores are passed into the test application, the distribution of the keys that each thread needs to insert is not correct, since it assumes that there are no cores skipped between the master core and the worker core. Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX") Cc: stable@dpdk.org Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-26test/bonding: do not request CRC strip offloadFerruh Yigit
bonding PMD doesn't announce CRC STRIP offload support, don't request this offload in unit test otherwise unit test fails. Fixes: f52f1a65e461 ("ethdev: force offloading API rules") Cc: stable@dpdk.org Reported-by: Meijuan Zhao <meijuanx.zhao@intel.com> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-07-26test/flow_classify: fix return typesReshma Pattan
UTs should return either TEST_SUCCESS or TEST_FAILED only. They should not return 0, -1 and any other value. Fixes: 9c9befea4f ("test: add flow classify unit tests") CC: stable@dpdk.org Signed-off-by: Reshma Pattan <reshma.pattan@intel.com> Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-26test: fix file prefix discoveryAnatoly Burakov
Config file has moved, but the tests weren't updated to point to its new location. Update the code to find current prefix. Also, this function is duplicated across multiple tests, so move it into process.h and force compile failures for any attempts to use it on platforms other than Linux. Fixes: adf1d867361c ("eal: move runtime config file to new location") Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Reshma Pattan <reshma.pattan@intel.com>
2018-07-26test: fix EAL flags autotest on FreeBSDAnatoly Burakov
FreeBSD does not support running multiple primary processes concurrently, because all DPDK instances will allocate memory from the same place (memory provided by contigmem driver). While it is technically possible to launch a DPDK process using no-shconf switch, it will actually corrupt main process' for the above reason. Fix EAL flags autotest to not run primary processes unless both no-shconf and no-huge are specified. Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Tested-by: Changqing Wu <changqingx.wu@intel.com>
2018-07-24crypto/qat: support 8-byte 3DESFiona Trahe
Added extra case to support 8 byte key size for 3DES CBC. Also changed capabilities to reflect the change. Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com> Signed-off-by: Fiona Trahe <fiona.trahe@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-24crypto/openssl: support 8-byte 3DESMarko Kovacevic
Added extra case to support 8 byte key size for 3DES CBC. Also changed capabilities to reflect the change. Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-24crypto/aesni_mb: support 3DESMarko Kovacevic
Added support for 3DES cipher algorithm which will support 8, 16 and 24 byte keys, which also has been added in the v0.50 of the IPSec Multi-buffer lib. Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-24test/compress: limit segments in scatter-gatherFiona Trahe
Some PMDs may have a limitation on the number of segments in an SGL mbuf that they can process. Thefore, an upper limit is set to avoid having an indeterminate number of segments. Signed-off-by: Fiona Trahe <fiona.trahe@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-24test/compress: add scatter-gather testsPablo de Lara
Added Scatter-Gather test, which split input data into multi-segment mbufs and compresses/decompresses the data into also a multi-segment mbuf. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Lee Daly <lee.daly@intel.com>
2018-07-24test/compress: log device nameFiona Trahe
Print out name of device on which test is running at start of test suite. Signed-off-by: Fiona Trahe <fiona.trahe@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-24compress/qat: add empty driverFiona Trahe
Add Makefiles, meson files, and empty source files for compression PMD. Handle cases for building either symmetric crypto PMD or compression PMD or both and the common files both depend on. Signed-off-by: Fiona Trahe <fiona.trahe@intel.com> Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-07-13test/power: fix 32-bit buildPablo de Lara
Compilation issue: test/test/test_power_acpi_cpufreq.c:556:31: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘uint64_t {aka long long unsigned int}’ printf("ACPI: Capabilities %lx\n", caps.capabilities); ~~^ ~~~~~~~~~~~~~~~~~ %llx Fixes: 39e38d583075 ("test/power: add unit test for get capabilities API") Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Radu Nicolau <radu.nicolau@intel.com>
2018-07-13memzone: improve zero-length reserveAnatoly Burakov
Currently, reserving zero-length memzones is done by looking at malloc statistics, and reserving biggest sized element found in those statistics. This has two issues. First, there is a race condition. The heap is unlocked between the time we check stats, and the time we reserve malloc element for memzone. This may lead to inability to reserve the memzone we wanted to reserve, because another allocation might have taken place and biggest sized element may no longer be available. Second, the size returned by malloc statistics does not include any alignment information, which is worked around by being conservative and subtracting alignment length from the final result. This leads to fragmentation and reserving memzones that could have been bigger but aren't. Fix all of this by using earlier-introduced operation to reserve biggest possible malloc element. This, however, comes with a trade-off, because we can only lock one heap at a time. So, if we check the first available heap and find *any* element at all, that element will be considered "the biggest", even though other heaps might have bigger elements. We cannot know what other heaps have before we try and allocate it, and it is not a good idea to lock all of the heaps at the same time, so, we will just document this limitation and encourage users to reserve memzones with socket id properly set. Also, fixup unit tests to account for the new behavior. Fixes: fafcc11985a2 ("mem: rework memzone to be allocated by malloc") Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-13test/fbarray: add autotestsAnatoly Burakov
Introduce a suite of autotests to cover functionality of fbarray. This will check for invalid parameters, check API return values and errno codes, and will also do some basic functionality checks on the indexing code. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-07-12hash: add API to query the key countYipeng Wang
Add a new function, rte_hash_count, to return the number of keys that are currently stored in the hash table. Corresponding test functions are added into hash_test and hash_multiwriter test. Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-12test/hash: add test for read/write concurrencyYipeng Wang
This commits add a new test case for testing read/write concurrency. Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-12test/hash: update for read/write concurrency perfYipeng Wang
New code is added to support read-write concurrency for rte_hash. Due to the newly added code in critial path, the perf test is modified to show any performance impact. It is still a single-thread test. Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-12test/power: add unit test for get capabilities APIRadu Nicolau
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Acked-by: David Hunt <david.hunt@intel.com>
2018-07-12test/bpf: add test for external function callKonstantin Ananyev
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-07-12bpf: add extra information for external symbol definitionsKonstantin Ananyev
Extend struct rte_bpf_xsym with new fields to provide information about: - for variables - type and size - for functions - number of arguments and type/size of each argument and return value Such information would allow validate code to perform more extensive checking on input BPF program and catch misbehaving BPF code. That change would cause ABI/API breakage for librte_bpf. Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-07-06test/event: add Rx adapter tests for interrupt driven queuesNikhil Rao
Add test for queue add and delete, the add/delete calls also switch queues between poll and interrupt mode. Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
2018-07-06service: add mechanism for quiescingGage Eads
Existing service functions allow us to stop a service, but doing so doesn't guarantee that the service has finished running on a service core. This commit introduces rte_service_may_be_active(), which returns whether the service may be executing on one or more lcores currently, or definitely is not. The service core layer supports this function by setting a flag when a service core is going to execute a service, and unsetting the flag when the core is no longer able to run the service (its runstate becomes stopped or the lcore is no longer mapped). With this new function, applications can set a service's runstate to stopped, then poll rte_service_may_be_active() until it returns false. At that point, the service is quiesced. Signed-off-by: Gage Eads <gage.eads@intel.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-07-11service: add attribute APIErik Gabriel Carrillo
Add APIs that allow an application to query and reset the attributes of a service lcore. Add one such new attribute, "loops", which is a counter that tracks the number of times the service core has looped in the service runner function. This is useful to applications that desire a "liveness" check to make sure a service core is not stuck. Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-07-11build: fix for host clang and cross gccGavin Hu
The following error hits if host cc compiler is clang(default one in most linux distributions) and the cross compiler is gcc. The root cause is: the hybride compilers add the warning options to the meson project as project arguments, which apply for both host compiling and cross compiling. But some options such as '-Wno-format-truncation' are not supported nor recognized by clang, so they have to be removed from the project arguments for the host compiler to run smoothily and added back as cflags for the cross compiler to compile for cross source files. The fix is remove unrecognized warning options from the meson project arguments shared by gcc and clang, as add them specifically for gcc or clang as cflags. [265/893] Compiling C object 'buildtools/pmdinfogen/pmdinfogen@exe/pmdinfogen.c.o'. warning: unknown warning option '-Wno-format-truncation' [-Wunknown-warning-option] Fixes: a55277a788 ("devtools: add test script for meson builds") Cc: stable@dpdk.org Signed-off-by: Gavin Hu <gavin.hu@arm.com> Reviewed-by: Phil Yang <phil.yang@arm.com> Reviewed-by: Song Zhu <song.zhu@arm.com> Reviewed-by: Steve Capper <steve.capper@arm.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-07-11test/crypto: add DH and DSA testsSunila Sahu
Test application include test case for : - Diffie-Hellman key pair generation and shared secret compute - DSA sign and verify Test cases uses predefined test vectors. Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com> Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com> Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com> Signed-off-by: Umesh Kartha <umesh.kartha@caviumnetworks.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-11test/crypto: add RSA and Mod testsSunila Sahu
Test application include test case for : - RSA encrypt, decrypt, sign and verify - Modular Inversion and Exponentiation Test cases uses predefined test vectors. Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com> Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com> Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com> Signed-off-by: Umesh Kartha <umesh.kartha@caviumnetworks.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-11test/crypto: skip validation of head/tailroom used by PMDAnoob Joseph
Crypto PMDs would specify the head/tailroom it would use while processing the crypto requests. This need to be considered while verifying buffers processed by crypto PMDs. Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-11cryptodev: rename experimental private data APIsFiona Trahe
The name private_data is confusing in these APIs: rte_cryptodev_sym_session_set_private_data() rte_cryptodev_sym_session_get_private_data() It refers to data added at the end of the session hdr for use by the application. The session already contains sess_private_data[index] which is used to store private pmd data and most references to private data refer to that. e.g. external apis rte_cryptodev_sym_get_private_session_size() and internal set/get_session_private_data() refer to sess_private_data[]. So rename to user_data, i.e. rte_cryptodev_sym_session_set_user_data() rte_cryptodev_sym_session_get_user_data() Refers to changes introduced here: https://patches.dpdk.org/patch/38172/ Signed-off-by: Fiona Trahe <fiona.trahe@intel.com> Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
2018-07-11cryptodev: replace mbuf scatter gather flagPablo de Lara
The current mbuf scatter gatter feature flag is too ambiguous, as it is not clear if input and/or output buffers can be scatter gather mbufs or not, plus if in-place and/or out-of-place is supported. Therefore, five new flags will replace this flag: - RTE_CRYPTODEV_FF_IN_PLACE_SGL - RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT - RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT - RTE_CRYPTODEV_FF_OOP_LB_IN_SGL_OUT - RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-07-11cryptodev: define value for unlimited sessionsPablo de Lara
Currently, the info structure contains the maximum number of sessions that a device can manage. This field was useful when the session mempool was created inside each device, but now it is created at the application level. Most PMDs do not have a limitation on the sessions managed, but a few do, therefore this field must remain in the structure. However, a new value, 0, can be used to indicate that a device does not have an actual maximum of sessions. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-07-11test/crypto: limit number of sessionsPablo de Lara
Instead of using the maximum number of sessions allowed by the PMDs (which will change to unlimited most of the PMDs), limit the number to a small sufficient amount. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-07-11compressdev: add huffman encoding flagsPablo de Lara
Added Huffman fixed and dynamic encoding feature flags, so an application can query if a device supports these two types, when performing DEFLATE compression. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com> Acked-by: Shally Verma <shally.verma@caviumnetworks.com>
2018-07-11test/crypto: fix device id when stopping portHemant Agrawal
dev_id is valid, while ts_params->valid_devs[devid] may result a different value in case multiple devices are present and any of the device is being used. Fixes: 202d375c60bc ("app/test: add cryptodev unit and performance tests") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-04ethdev: convert remaining apps to new offload APIThomas Monjalon
Some test applications and examples were not converted to the new offload API introduced in 17.11. For reference, see "Hardware Offload" in doc/guides/prog_guide/poll_mode_drv.rst Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-07-04test: remove unused configuration for bondingThomas Monjalon
The global variables rx_mode and fdir_conf are not used in this test file. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-07-04test/virtual_pmd: report CRC strip capabilityPhil Yang
Add DEV_RX_OFFLOAD_CRC_STRIP to virtual drivers since they don't use CRC at all, when an application requires this offload virtual PMDs should not return error. Fixes: 3d12dceed2df ("ethdev: add new offload flag to keep CRC") Signed-off-by: Phil Yang <phil.yang@arm.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-06-19test/eventdev: add multi-ports testVipin Varghese
Add a new test to enhance the test suite, to allow multiple eth ports rx queue to be added to rx bridge adapter. Update the test function to reflect change of port index from 8 to 16 bit Signed-off-by: Vipin Varghese <vipin.varghese@intel.com> Acked-by: Nikhil Rao <nikhil.rao@intel.com> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>