aboutsummaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2020-08-12ip: fix ip-local errorsFlorin Coras1-2/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie8bc5c9a03e858487cf565b4e9b520e6b496337a (cherry picked from commit fa2a316663e622a2feeecf8ad7d32b242370a70a)
2020-08-12stats: fix state counter removalVladimir Isaev1-40/+41
Avoid using vec_del1() for directory vector to keep indexes valid all the time. There are state counters for each slave in LACP bond mode which can be dynamically created and removed. Vector index is used to access these counters. But also vec_del1() is used to remove counter from vector. This function changes the index of the last element, so after this we are unable to access ex-last element using old index. As a result it is not possible to add-del-add two interfaces to the LACP bond: DBGvpp# create bond mode lacp BondEthernet0 DBGvpp# create packet-generator interface pg1 DBGvpp# create packet-generator interface pg2 DBGvpp# bond add BondEthernet0 pg1 DBGvpp# bond add BondEthernet0 pg2 DBGvpp# bond del pg1 DBGvpp# bond del pg2 DBGvpp# bond add BondEthernet0 pg1 DBGvpp# bond add BondEthernet0 pg2 bond add: /if/lacp/1/3/partner-state is already register Type: fix Signed-off-by: Vladimir Isaev <visaev@netgate.com> Change-Id: I2c86e13905eefdef6233369cd4ab5c1b53d123bd (cherry picked from commit 72e31bc2d9b910147c09e1c329713fccc873a018)
2020-08-12docs: fix vpp-make-test-docs-merge-1908 doc uploadDave Wallace1-0/+1
Type: fix Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I77929b7067b11015e66ee3e24f63a377b1f788e2
2020-08-12tests: fix wrong checksum error messageKlement Sekera1-1/+3
This change fixes the error message, which would previously report mismatch on IPv6 layer instead of TCP layer. Type: fix Change-Id: Ie78779685362a420d155f928b3cdb341bc3fb8bc Signed-off-by: Klement Sekera <ksekera@cisco.com> (cherry picked from commit 66cea092c7a584bb7b82000fbfad349e6f0af7e1)
2020-08-12tests: display stdout and stderr when output caching is disabledBenoît Ganne1-2/+2
Type: fix Change-Id: I4286ba58bb15dd67c1199f76166bedf3b4e0344c Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit 1a7ed5e3e62dfe77832022a46ee32d744a347ac5)
2020-08-07tests: fix deps pinning / patchingAloys Augustin1-4/+2
This ensures we don't recompute the requirements-{2,3}.txt on each make test run, and skips patching scapy if it is already patched instead of failing. Change-Id: I3da57182ae49f3dd04db139d96734a5d145fedff Type: fix Signed-off-by: Aloys Augustin <aloaugus@cisco.com> (cherry picked from commit 8eca60df745b7656b96db16e75b0deda66bfc515)
2020-07-03interface: shmemioerror while getting name_filter argAleksander Djuric1-1/+6
Type: fix Signed-off-by: Aleksander Djuric <aleksander.djuric@gmail.com> Change-Id: I5e0eb7024d208040d79e9d6db863f41e2ecf4ee6 Signed-off-by: Ole Troan <ot@cisco.com> (cherry picked from commit c12eae73f925169597e20a8f8139c462e317404d)
2020-04-13dhcp: fix unicast pkts, clean up state machineDave Barach1-0/+1
Nominally a bug-fix cherry-pick, but completely manual. Closer to a full feature backport minus binary api changes. Send dhcp unicast packets to ip4-lookup. Otherwise, these packets won't reach a dhcp server on a different subnet. Do an immediate client scan after processing wakeup events. Calculate the next process wakeup time by scanning all clients. Increase maximum (idle, no-clients-configured) timeout to 1000 seconds. Reduce log spew. Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I3d10cd4c353298ed0b19e7e30887dc1d8d07b19e (cherry picked from commit c54162981cdd41d65ed283df36955007552ddffe)
2020-04-07docs: pin down sphinx to avoid crash with Sphinx 3.0.0Andrew Yourtchenko1-1/+1
Using requirements.txt did not work, just specify the version in the pip install within the makefile. For the master and stable/2001, see change Id98c0f94104e455ea819aacec62f605e53db13ce Change-Id: I1f6ff53d8d52dc8bad42041932421fc12d7ddebf Type: fix Signed-off-by: Aloys Augustin <aloaugus@cisco.com> Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2020-02-12classify: "classify filter ..." debug CLI cleanupDave Barach1-0/+187
The pcap trace filter initial table index lives in cm->filter_set_by_sw_if_index [0], which corresponds to the "local0" interface. Debug cli makes sure that folks don't accidentally specify the "local0" interface. At least it does now... Fix the "vlib format.c code coverage" test in test/test_vlib.py. Type: fix Change-Id: I35320bc2c8f0c6f1f8c12e3529d1938548185151 Signed-off-by: Dave Barach <dave@barachs.net> (cherry picked from commit 29c6132108be68feb11c8d9bfaaf674cba86ee33)
2020-02-12classify: vpp packet tracer supportDave Barach1-0/+64
Configure n-tuple classifier filters which apply to the vpp packet tracer. Update the documentation to reflect the new feature. Add a test vector. Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Iefa911716c670fc12e4825b937b62044433fec36 (cherry picked from commit 87d24db65facb89ca524c951b8379ca2ec4dbc7a)
2020-01-29bfd: reset peer discriminator on timeoutKlement Sekera1-0/+11
More RFC compliance. Ticket: VPP-1816 BFD: peer discriminator not reset on timeout Type: fix Change-Id: I68063c18097d282b3527e3fb485c1d0d1fd1b0c8 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-12-02ip: IP address and prefix types (moved from LISP)Neale Ranns1-0/+20
Type: refactor Change-Id: I2c6b59013bfd21136a2955442c779685f951932b Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit ea93e48cf6e918937422638cb574964b88a146b6)
2019-11-28tests: Add UT to test incomplete MPLS adjacencies send ARP requestsNeale Ranns1-3/+42
Type: test Change-Id: I81e07233aec54c786e4e9beb8c4f06d0a3dca90f Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 1976f36b09ead86874feb630277dfaeceed9c0fe)
2019-11-28tests: test tls casehaiyanx1.zhang1-0/+145
Type: feature Signed-off-by: haiyanx1.zhang <haiyanx1.zhang@intel.com> Change-Id: I071f5face0d489dc967cce1edcffbc1f8fac5c7e Signed-off-by: haiyanx1.zhang <haiyanx1.zhang@intel.com> (cherry picked from commit 419d31f817af0436c699c0b565e2d6a058c487db)
2019-11-28tests: add cli_return_response to vpp_papi_providerDave Barach1-2/+13
To improve gcov/lcov code coverage stats, it's necessary to send incorrect debug CLI commands; to force vpp into debug CLI error paths. cli_return_response() sends commands and returns the response object, so test vectors can handle failures. Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I4fab591c9d2e30c996f016e18e4fd69b9c5bed06 (cherry picked from commit 5932ce17e128c096fcc56eb04b27e780da3cf255)
2019-11-18tests: make threads in punt tests join when finishedAndrew Yourtchenko1-8/+23
The 42693521f6046997133c8f63bcfc9d615d96f69d added the timeout to the child process join + print the name of the offending child process. Upon testing the issue furher, appeared the offenders were always the same - punt tests. The processes running them were stuck trying to acquire lock, even if all the user-accessible execution has finished. Some searching revealed that one needs to tread carefully when dealing with Thread and Multiprocessing at the same time. punt tests used threads but did not call thread.join. Somehow it worked in some cases but not the others. This fix makes the threads exit cleanly - which also makes the timeouts waiting for the process to join disappear. Type: test Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Change-Id: I05d99bb48a9987544bbfe45118755c09d7867aa0 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> (cherry picked from commit 3f8c87132d63c14f1ba90d7db6cf2a2aba0f8cb9)
2019-11-18tests: support setting random seedKlement Sekera4-1/+13
Log the random seed used when running tests and provide means to re-use it in a later run. Type: feature Change-Id: I18d2a36ee802b901d4cca5577df41cec07f09cc0 Signed-off-by: Klement Sekera <ksekera@cisco.com> (cherry picked from commit 45a95dd782b91e9ae5665b5f95be4b6d7f99b879)
2019-11-18tests: avoid test runner hanging on child test process joinAndrew Yourtchenko1-1/+13
In parallel test, the single process is spawning a bunch of child processes running the tests, and communicates to them. When the child process signals that it has finished, the parent calls child.join(). Sometimes this join never returns. The result is a lot of defunct python processes, and the test run just hangs. I have seen this failure intermittently a fair bit in a busy containerized environment, and by chance, consistently reproduced it on a Thinkpad X280 with 8G of RAM and Ubuntu 19.04, which allowed to diagnose it. Type: test Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Change-Id: If0a3110fc2d23e73d77c310d61c3ea90a2b53610 (cherry picked from commit 42693521f6046997133c8f63bcfc9d615d96f69d)
2019-11-18tests: decode worker stdout/stderr outputDave Wallace1-2/+2
Type: fix Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I309254e9e99920fbeaa50eea503c1c2a9470abfe (cherry picked from commit 97ea2f4ec0ec337a4d391f5225e89d12ba2ddb38)
2019-11-15tests: DEBUG=gdb[server]-all to debug worker(s)Dave Wallace2-13/+74
Type: test Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I0264451632c1ce780b38a2c15a7e34350fc6d521 (cherry picked from commit 2456433df46ae99dfbcec6260d14e592b5823c83)
2019-11-05tests: make RA tests run on VPP timeAndrew Yourtchenko2-7/+21
the IPv6 RA tests take timing into the account, but the time inside VPP may go slightly differently compared to the time inside the driving python thread, if the machine running the tests is heavily loaded. Make a sleep function which sleeps "on VPP time" and use it. Change-Id: I3b34b0164f6e0ec7a619b92ee308089a4a8935e3 Type: test Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> (cherry picked from commit 63cb8827e586f02f53512d23a8e7596fe9c19aa8)
2019-10-29l2: l2bd nd termination test instabilityOle Troan1-1/+1
The test for ND event suppression reused the previous test run ipv6 address, and would sometimes consider that a duplicate, and therefore suppressing that one too. Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I1b115aa4eba9d57770fa03fcf38b7a1c251cfe88 (cherry picked from commit df0191ead2cf39611714b6603cdc5bdddc445b57)
2019-10-29tests: add PID of VPP under test to API dump filename for the testAndrew Yourtchenko1-1/+2
Some testclasses (e.g. IPSec) have methods with the same names, this causes a race when running in parallel to save the API and move it into the test's directory - the name of the file has only the test method name as a discriminator. Saving two traces from two VPP instances "succeeds", in that it silently overwrites the file. But only one mv operation works - the other gives an error "file not found" and fails the test. Solution: add the PID of VPP under test to the API dump filename, this way the filenames become guaranteed unique and the race is avoided. Change-Id: I1bb47ed73369fea0f1bfbf907588a51e2cabfb7f Type: test Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> (cherry picked from commit 586d3edf49f5dd8cd3e4f836afd562e21766914d)
2019-10-27tests: make pg_start() wait until pg completesAndrew Yourtchenko1-19/+13
A sizable number of tests call pg_start() to get the packets flowing and then immediately expect to have the entirety of the packets gone through. This works on powerful and unstressed hardware, but fails in beautifully random ways under load. This also necessitates the complicated logic of remembering the "zombie captures", then sleeping for some time before cleaning them up.... The solution is simple: in pg_start(), start the generators, wait till they all finish, clean up, done. Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Change-Id: I930e51b7aae39c9841d22dd905a4d13a465a672b Type: test (cherry picked from commit 8d829f6c480cdd6536537fc49356baa1878b9570)
2019-10-27tests: log error which happens during connect and wait longer for stats socketAndrew Yourtchenko1-2/+3
Intermittently, a test would start VPP, but no testcases would execute. This would be more probable apparent during the high load or if there is another testcase dumping the core at that moment. Adding the logging to the connection revealed it was the stats socket connection erroring with error -2. Increasing the deadline from 3 seconds to 5 minutes has eliminated this error. Change-Id: I40bd7e642abb9e2aef0238c612e4c34781de5db2 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Type: test (cherry picked from commit 4f05a8e408cba09057841d97cd5e7da3058836d1)
2019-10-27tests: explicitly wait for the PG to finish before looking for capture fileAndrew Yourtchenko1-0/+15
Rather than only using time-based method of periodically checking whether the pcap file appeared, first check that the packet generator has stopped. To make this change fail-safe, have a 5-minute timeout on this activity, just in case the things go terribly wrong. Type: test Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Change-Id: Id16b2802b2de8a4cafb5d9f0a8c9ba62ec89dc32 (cherry picked from commit 3d36f19a0febaed532bd255a150504f7af8f18c2)
2019-10-27build: clean up make help outputDave Wallace1-3/+3
This change is designed to help the uninformed find the right way to run extended tests by using the test-all[-debug] targets. 'make test EXTENDED_TESTS=y' fails to build as it has a dependency on 'vom-install' which is conveniently included in test-all[-debug]. - clarify test-all[-debug] description and make test-help description - Also align indentation of make help output Type: style Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: Ief54cc8a5af68c052aacb0d660237c5eb63451b5 (cherry picked from commit 2777ec761514fc0838ad11e6232ad97897663356)
2019-10-22mpls: support fragmentation of mpls output packetRajesh Goel1-0/+56
Type: fix Signed-off-by: Rajesh Goel <rajegoel@cisco.com> Change-Id: Ie4372c5cf58ab215cdec5ce56f8a994daaba2844 (cherry picked from commit d6f1c9c5141c177a14d011a514e392a9357398fb)
2019-10-22tests: handle unicode charactes in cli outputKlement Sekera1-1/+2
Type: fix Change-Id: Ic4fb53e6d10a1de155a3088be81d53d9efeb0c0f Signed-off-by: Klement Sekera <ksekera@cisco.com> (cherry picked from commit 6be55648334308d4eaa4a02143b968720bb62078)
2019-10-18ip: Fix IP unnumbered dump of one interfaceNeale Ranns1-0/+9
Type: fix Change-Id: I35fb6fdfba50c4a59cf1ffb94cb51487bcf5afc9 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit ac3e72cb9765f78f1cf03ff5d5ccd9ff944668b6)
2019-10-04ipsec: support 4o6 and 6o4 for tunnel protectNeale Ranns1-2/+40
Type: feature Change-Id: Ib2352ca4c7abf4645f21fa16aaaf27408890a2bf Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit b325983a4461dd806e86a31abc47533b09482157)
2019-10-03ip: respect buffer boundary when searching for ipv6 headersKlement Sekera1-2/+19
Type: fix Change-Id: I5a5461652f8115fa1270e20f748178fb5f5450f2 Signed-off-by: Klement Sekera <ksekera@cisco.com> (cherry picked from commit 769145cdbc28324bd0b6304951199ec3d6e0e883)
2019-10-03ip: refactor reassemblyKlement Sekera1-14/+16
this is a preparation step for introducing other reassembly types Type: refactor Change-Id: I197e299dbd729b00eead31667913b8ceff915d63 Signed-off-by: Klement Sekera <ksekera@cisco.com> (cherry picked from commit 896c896a3c4ed563a270281ff8b50fd253f4833f)
2019-09-30tests: split up the long running IPSec tests into separate classesAndrew Yourtchenko1-82/+398
Type: test Change-Id: Ieeae7f1653f5f2e8e49f258871b389ef8954c90b Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> (cherry picked from commit fbc388986e3f38aaedff87b843137be81b7d4f91)
2019-09-30tests: run vapi tests by defaultKlement Sekera5-14/+14
Type: fix Change-Id: I7b190507446fca745fc4bc6abbdeed48f55abdb9 Signed-off-by: Klement Sekera <ksekera@cisco.com> Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-09-28tests: fix centos detectionKlement Sekera1-1/+1
Type: fix Fixes: defde0f870 Change-Id: Ib81e3610bd0fc22901a902dc76692f1951ead2b8 Signed-off-by: Klement Sekera <ksekera@cisco.com> (cherry picked from commit 3a350702ec24d1bde0483da1e946015c2b81e0c4)
2019-09-25ipsec: Fix NULL encryption algorithmNeale Ranns3-1/+17
Type: fix Ticket: VPP-1756 the block-size was set to 0 resulting in incorrect placement of the ESP footer. add tests for NULL encrypt + integ. Change-Id: I8ab3afda8e68f9ff649540cba3f2cac68f12bbba Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 2cdcd0cf4004b2c0d1d3b891e381aac5735c21f1)
2019-09-25ip: reassembly: send packet out on correct workerKlement Sekera2-4/+355
Note which worker received fragment with offset zero and use this worker to send out the reassembled packet. Type: fix Change-Id: I1d3cee16788db3b230682525239c0100d51dc380 Signed-off-by: Klement Sekera <ksekera@cisco.com> (cherry picked from commit 630ab5846bceddf8d663e9f488a2dc0378949827)
2019-09-25tests: support worker threadsKlement Sekera1-1/+4
Add support for specifying the worker thread when adding packet stream. Type: feature Change-Id: I8a98b91c211e60cd53e1166f9f51365394ecacfd Signed-off-by: Klement Sekera <ksekera@cisco.com> (cherry picked from commit 4ecbf105a4290de9917b1ded14b0854c68cbd655)
2019-09-23tests: Revert "Tests: Example duplicate code refactoring."Klement Sekera1-243/+277
This reverts commit 6955595a577e1b7d316b5b69267bf1d1d951a4ab. The result is that test filtering for reassembly tests works again. Type: fix Change-Id: I4acb094b5b4aa264745986afa0bb0528789807b3 Signed-off-by: Klement Sekera <ksekera@cisco.com> (cherry picked from commit 947a85c7792b14d4cc84b0d25c953102435069e5)
2019-09-21tests: fix test-checkstyle to check plugin testsDave Wallace1-1/+1
Type: fix Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I93eb0ae4338247fa2479f8e419483d1593436dc7
2019-09-19ipsec: fix missed IPSEC_INTEG_ALG_MD5_96Dmitry Vakhrushev1-3/+3
This algorithm was missed in last improvements. Type:fix Signed-off-by: Dmitry Vakhrushev <dmitry@netgate.com> Change-Id: Ib818cbdcdd1a6f298e8b0086dac4189cc201baa3 (cherry picked from commit 77cc14a2b29a65073539e6e3f4683a380875b3dc)
2019-09-18ip: allow addrs from the same prefix on intfMatthew Smith2-8/+136
Type: feature Adding a prefix to an interface was not permitted if it overlapped with another prefix on an interface which used the same FIB. Loosen the restriction. Allow 2 or more addresses from the same prefix on a single interface. Reference count the prefix to figure out when a glean/connected route for the prefix needs to be added or removed. Added unit tests to check that the route is only removed when all addresses in the prefix are removed from the interface. Change-Id: I1a962ecb5e1ee65fc6d41f98a4cc097a51a55321 Signed-off-by: Matthew Smith <mgsmith@netgate.com> (cherry picked from commit 6c92f5babdc3c52cf343509fc9cf9d8a9a3df390)
2019-09-12api: split vl_api_prefix into twoOle Troan1-1/+1
One type for address with prefix and one type for prefix. Ticket: VPP-1769 Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Icfec51d9b7d5cde1d69fbecdd97498688ab7b295 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-09-09api: enforce vla is last and fixed string typeOle Troan2-14/+6
Enforce that variable length fields are the last element of API messages. Add a 'fixed' version of string type, since dealing with multiple variable length strings turned out too painful for the C language bindings. The string type is now: { string name[64]; // NUL terminated C-string. Essentially decays to u8 name[64] string name[]; // Variable length string with embedded len field (vl_api_string_t) }; The latter notation could be made available to other types as well. e.g. { vl_api_address_t addresses[]; } instead of { u32 n_addr; vl_api_address_t addresses[n_addr]; }; Type: fix Change-Id: I18fa17ef47227633752ab50453e8d20a652a9f9b Signed-off-by: Ole Troan <ot@cisco.com> (cherry picked from commit e5ff5a36dd126ee57dca4e0b03da2f7704e0a4f5) Signed-off-by: Ole Troan <ot@cisco.com>
2019-09-02gso: fix segmentation when gso_size greater than vlib buffer sizeMohsin Kazmi1-0/+32
Type: fix Ticket: VPP-1751 Change-Id: I5ffb078492adc97374290de404f2ec0102b75184 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> (cherry picked from commit 3f1964d2d2847c5307694fe8daea0a7eef1e2733)
2019-08-23tests: move plugin tests to src/plugins/*/testDave Wallace32-30015/+8
- Relocate plugin tests for 'make test' into src/plugins/*/test so that plugin test cases are co-located with the plugin source code. Type: refactor Ticket: VPP-1754 Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I503e6a43528e14981799b735fa65674155713f67 (cherry picked from commit a43c93f8554ad7418e31be3791b3fb71232f60ac)
2019-08-15acl: fix stats-segment counters validation on acl updateAndrew Yourtchenko1-18/+36
The stats-segment validation/clear logic for acl counters was wrong, fix it. Also add the code to the unittests to cover that case, add a vat command to enable/disable counters, clean up the unnecessary endian conversion and remove the stray clib_warning() Change-Id: I421297a92e4aeb885c468c72a97cec25981df615 Type: fix Ticket: VPP-1744 Fixes: f995c7122ba0d024b17bc3232e8edd18d5e25088 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-08-07gbp: add l3out redirect to remote SEP unit testBenoît Ganne1-0/+172
Type: test Change-Id: I0fafaebbb1f70488e0bc7d21da778d55fe15c3f5 Signed-off-by: Benoît Ganne <bganne@cisco.com>