aboutsummaryrefslogtreecommitdiff
path: root/test/validation/api
AgeCommit message (Collapse)Author
2021-06-01validation: ipsec: fix uninitialized use warningMatias Elo
Fix GCC (with LTO enabled) warning about potential uninitialized use. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-06-01validation: timer: use new timer set return codesPetri Savolainen
Use the new timer set return codes: ODP_TIMER_TOO_NEAR, ODP_TIMER_TOO_FAR and ODP_TIMER_FAIL. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-05-31validation: timer: use default clock source enumPetri Savolainen
Replace ODP_CLOCK_CPU with ODP_CLOCK_DEFAULT. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-31validation: timer: test all clock sources minimallyPetri Savolainen
Previously validation test did not refer to ODP_CLOCK_EXT at all. Test timer capability with all clock source enumeration values. This ensures that enumeration values are defined and capability call accepts those. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-31validation: time: add strict time stamp test casesPetri Savolainen
Added test cases for the new strict time stamp functions. Arranged time consuming tests to be executed towards the end of the suite. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-05-31validation: ipsec: check if success_bytes is updatedAakash Sasidharan
Check if stats.succes_bytes is updated for stats success tests. Also remove rundundant check for inbound SA stats from the current code. Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-31validation: tm: use tm start and stop APINithin Dabilpuram
Add tm start API after creating a TM system and TM stop API before destroying it. Also stop TM system before shaper/scheduler/threshold or wred profile updates if dynamic update is not supported by the TM system. Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-31validation: tm: use commit_rate and peak_rate in shaper paramsNithin Dabilpuram
Use commit_rate and peak_rate in odp_tm_shaper_params_t instead of commit_bps and peak_bps. Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-31validation: pktio: send event to scheduled pktin event queuePetri Savolainen
Check that both packet input and application can send events to scheduled packet input event queues. Test case can be skipped by setting CI_SKIP environment variable. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-05-27validation: ipsec: fix check function for ah testsVidya Sagar Velumuri
For some AH tests, esp check function is used which does not check the AH capability. Use the ah check function which checks for AH capability. Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com> Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-25validation: ipsec: reduce code duplication in reassembly test casesJanne Peltonen
Move the repeating code of fragment reassembly tests to a common function. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2021-05-25validation: traffic_mngr: use pktout mode as TM for TxNithin Dabilpuram
Use ODP_PKTOUT_MODE_TM for pktio that is used for Tx. This is as per TM spec. Also change suite init/term to handle cases where TM is not supported by platform which can only be known when odp_pktio_open() with out mode as TM fails. Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-20validation: scheduler: add new atomicity testMatias Elo
Add a new atomicity validation test, which checks that only a single thread is able to process events from an atomic queue at the same time. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-05-20validation: packet: fix verification for trunc/extend testsAshwin Sekhar T K
In packet test cases for headroom/tailroom, extend head/tail APIs are always called with extend length greater than headroom/tailroom. Also trunc head/tail APIs are always called with truncate length greater than or equal to segment length. In these cases, the spec allows the implementation to change the layout of the packet completely if required. So properties of the output packet like segment lengths, headroom, tailroom etc. can be entirely different from those of the input packet and should not be compared with each other. Also, comparison of older pointers from input packet with new pointers from output packet should be done only if the return value of these APIs is 0 as otherwise the older pointers are to be considered invalid. Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-14validation: scheduler: add check for max_flow_id default valueMatias Elo
The default value for odp_schedule_config_t.max_flow_id should be zero. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-05-05validation: pktio: test new statistics countersMatias Elo
Refactored existing statistics counters test code and added tests for the new odp_pktio_stats_t.in_packets/out_packets fields. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-05-05api: pktio: statistics: deprecate odp_pktio_stats_t.in_unknown_protos fieldMatias Elo
Deprecate odp_pktio_stats_t.in_unknown_protos statistics counter. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com> Reviewed-by: Yuri Tolstov <ytolstov@marvell.com>
2021-05-05validation: packet: fix packet head/tail pull lengthsAshwin Sekhar T K
According to the spec packet pull head/tail may pull up to segment length minus 1 bytes. Fix the tests to align to the spec. Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-05-05validation: init: test thread specific log functionJere Leppänen
Test that a thread specific log function is called if and only if it is set. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-05-05validation: ipsec: add test cases for reassembly of IPv6 pktsAnoob Joseph
Add test cases to handle reassembly of IPv6 packets. Signed-off-by: Anoob Joseph <anoobj@marvell.com> Signed-off-by: Subrahmanyam Nilla <snilla@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-05validation: ipsec: add test cases for reassembly of IPv4 pktsAnoob Joseph
Add test cases to verify IPsec reassembly. The tests cases would work on large packets which are fragmented. Signed-off-by: Anoob Joseph <anoobj@marvell.com> Signed-off-by: Sachin Yaligar <syaligar@marvell.com> Signed-off-by: Subrahmanyam Nilla <snilla@marvell.com> Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-05validation: ipsec: handle parts without pkts to receiveAnoob Joseph
Update ipsec_check_in_one path to handle test parts without pkts to receive. Signed-off-by: Anoob Joseph <anoobj@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-05validation: ipsec: add reassembly handling in recv_pkts_inlineAnoob Joseph
Update internal function such that it would handle reassembled packets as well. Signed-off-by: Anoob Joseph <anoobj@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-05validation: ipsec: add test vectors for reassemblyAnoob Joseph
The header file contains a collection of plain and fragmented test vectors based on IPv6 and IPv4. These vectors can be used to test the reassembly functionality Signed-off-by: Anoob Joseph <anoobj@marvell.com> Signed-off-by: Sachin Yaligar <syaligar@marvell.com> Signed-off-by: Subrahmanyam Nilla <snilla@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-05validation: ipsec: move several code fragments to separate functionsAnoob Joseph
Clean up the code and improve reusability by moving several code fragments to their own functions. This commit does not make any functional changes. Signed-off-by: Anoob Joseph <anoobj@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-04-23validation: ipsec: fix event-to-packet conversion of non-IPsec eventsJanne Peltonen
Use odp_packet_from_event() instead of odp_ipsec_packet_from_event() when converting plain packet events to packets. odp_ipsec_packet_from_event() may be called only for events of IPsec subtype. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-04-19validation: hash: add Ethernet frame CRC testsPetri Savolainen
Test odp_hash_crc32() correctness with Ethernet test packets that include a correct Ethernet FCS at the end of the packet (last 4 bytes). When CRC32 calculation includes FCS, the result (0xdebb20e3) is common for all packets. Verify CRC32 calculation also in odd data alignment. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-04-19validation: common: split test packet header filePetri Savolainen
Split test_packet_parser.h file into protocol specific header files. It's easier find and maintain test packets when those are sorted per protocol. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-04-16validation: system: modify cache line size testMatias Elo
On some systems the value of ODP_CACHE_LINE_SIZE may be different than what is returned at runtime by odp_sys_cache_line_size() (in ABI compat mode). Remove a test that checked that the values are equal and print a warning instead. Also, check that cache line size is a power of two. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-04-01validation: ipsec: separate test case flags from framework codeJanne Peltonen
Move test case specific flags from ipsec_test_param to their own structure so that the generic framework code for input and output IPsec operations does not have to see them. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2021-04-01validation: ipsec: remove the now redundant UDP encaps checksJanne Peltonen
Remove the UDP encapsulation specific L4 protocol checks. They are now redundant since the generic code checks the L4 protocol of processed packets. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2021-04-01validation: ipsec: always check packet type after ipsec outputJanne Peltonen
The L3 and L4 type of an outbound IPsec processed packet is not checked if the packet cannot be compared with an expected result packet (there are no expected result packets in combined output+input tests nor in TFC dummy tests). Improve testing by checking outbound processed packet against expected L3 and L4 types when there is no expected result packet. Set correct expected L3 and L4 types in output test parameters of various tests that did not have them. Fix the ethertype of the ethernet header of outbound inline processed packets so that parsing the packet for the L3 and L4 types works. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2021-04-01validation: ipsec: check for invalid packet handles early enoughJanne Peltonen
Some assertions for valid packet handles are made after the packet handles have already been used. Move the assertions up in the call chain so that they are done early enough. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2021-04-01validation: ipsec: clean up user pointer checking logicJanne Peltonen
User pointer of the result packet is null after outbound inline IPsec operation only if the operation is successful in which case the result packet goes through the loop interface before getting checked. In case the operation fails (as it does for some negative tests), the result packet is the original packet that gets delivered directly as an event, without the loop interface being involved. In this case the user pointer has the original non-NULL value. The current code does not take this into account, although the check is not currently done in cases where it would incorrectly fail. Fix the user pointer checking logic and move the checking up in the chain so that it is done for all packets. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2021-04-01validation: ipsec: use ipsec_test_part for one operation onlyJanne Peltonen
Clean up the code by using ipsec_test_part for one IPsec operation only so that the outbound and inbound phases of combined out+in tests become separate. One ipsec_test_part will contain single input packet to an (outbound or inbound) IPsec operation and the expected output. This makes the code clearer and brings it closer to the original design. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2021-04-01validation: ipsec: move combined out+in test code away from the infraJanne Peltonen
Move ipsec_check_out_in_one() from the generic framework file to a test case file where it better belongs. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2021-04-01validation: ipsec: verify outbound result packets betterJanne Peltonen
Make the combined out+in test code reuse the packet checking code of the regular outbound tests. This improves the verification of outbound processed packets in the combined tests and cleans up the code a bit. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2021-04-01validation: ipsec: do not pass bogus expected result packetJanne Peltonen
Many test functions pass the original input packet (e.g. ICMP) as the expected result packet when the expected result is not known in detail (like in the middle of combined output+input tests). In reality the result packet is an IPsec-transformed packet (e.g. ESP), but that is not currently always checked. Clean up the code by not passing any expected result packet to the test routines when the expected result packet is not known beforehand. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2021-04-01validation: ipsec: reduce code duplication in TFC testsJanne Peltonen
Combine the common part of the two dummy TFC packet tunneling tests. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2021-04-01validation: ipsec: do not assume that l4 offset is always setJanne Peltonen
Fix the incorrect assumption that l4 offset is set in the output packets of odp_ipsec_out() and odp_ipsec_out_enq(). Parse the output packets to set the l4 offset. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2021-03-31validation: system: detect new ARMv8 and v9 ISAsPetri Savolainen
Added support for ARMv8.7, ARMv9.0, ARMv9.1 and ARMv9.2 enumeration. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-03-31validation: pktio: add test case for pktout tx completionNithin Dabilpuram
Add test case for testing pktout tx completion event feature. Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-03-31validation: classification: test odp_cls_print_allJere Leppänen
Call the new classifier debug print function from validation test. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-03-31validation: pktio: add pktout aging timeout testNithin Dabilpuram
Add test to validation pktout aging timeout feature. Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-03-31validation: crypto: check compl queue capabilityAakash Sasidharan
Create completion queue based on the queue type supported. Add separate suites for plain and schedule type queues. Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-03-30validation: pktio: add test for odp_pktio_config_t.enable_loopMatias Elo
Add missing test for odp_pktio_config_t.enable_loop. Loop interface should always support loopback mode. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-03-22validation: traffic_mngr: skip shaper test on arm64 systemsMalvika Gupta
The traffic_mngr_shaper_test intermittenly fails on arm64 systems. For enabling the CI, this test has been skipped until the issue is resolved and the shaper test no longer fails on arm64 platforms. Signed-off-by: Malvika Gupta <Malvika.Gupta@arm.com> Reviewed-by: Govindarajan Mohandoss <govindarajan.mohandoss@arm.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@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-03-12validation: pktio: correct tolerance in odp_pktio_ts_from_ns() testMalvika Gupta
odp_pktio_ts_from_ns() test uses PKTIO_TS_CMP_RES to check the arithmetic tolerance which is incorrect. The time, in nanoseconds, reported from the clock resolution API should be used instead. The resolution API accurately represents the granularity in which packet IO timestamp is able to measure the time. Signed-off-by: Malvika Gupta <Malvika.Gupta@arm.com> Reviewed-by: Govindarajan Mohandoss <govindarajan.mohandoss@arm.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-03-11validation: ipsec: enable antireplay service and lifetimesJanne Peltonen
Enable SA lifetimes and antireplay service by default for all tests to improve test coverage. In real life typical SAs are dynamically negotiated and use the features. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>