summaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2019-06-05IPSEC: some CLI fixesNeale Ranns1-0/+28
Change-Id: I45618347e37440263270baf07b2f82f653f754a5 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-04Tests: simple refactor in vpp_pg_interface.Paul Vinciguerra1-25/+23
Pull common code into a single method. Type: refactor Change-Id: Ic540d23eebbd17f838ed7a1a9dee80815a27847c Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-04punt: fix the set_punt API/CLI which was rejecting valid portsNeale Ranns1-1/+20
add a UT for the API Change-Id: I93fb6ec2c5f74b991bf7f229250a30c0395b8e24 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-04Punt: specify packets by IP protocol TypeNeale Ranns1-3/+160
Change-Id: I0c2d6fccd95146e52bb88ca4a6e84554d5d6b2ed Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-05-30ipip: refactor ipip.api with explicit typesOle Troan1-37/+67
Use explicit types vl_api_address/prefix in ipip.api. Change-Id: Ib3133cebdbe4437742924efd49cde4009c4cc31b Type: refactor Signed-off-by: Ole Troan <ot@cisco.com>
2019-05-29gtpu: unit-test check udp portsJakub Grajciar1-0/+87
Change-Id: I3efbbb1aefb43ecdf7016541b97343f9ca41f842 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-05-29Tests: vpp_pg_interface. Don't rewrite Dot1AD ethertype.Paul Vinciguerra1-11/+0
Type: Refactor Change-Id: I42f65bcc76e4b0fcfbfe051c1c382a940bff1b3a Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-29make test: fix packet counter assertKlement Sekera3-27/+33
Change-Id: Ic6e6ac0629bbf07f7dad1803a85aabfdccbc2035 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-05-29map: Use vl_api_string macros.Paul Vinciguerra1-4/+44
* Add optional tag to api call in tests * Add test for map_domain_dump() for api code coverage. Type: fix Change-Id: I2f7784aecdca4bf9e94de3319f959786e3d2c607 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-28l2tp: l2tp-decap-local don't accept packets unless configuredJakub Grajciar1-0/+48
Change-Id: I2e48eb772dc44912192d0684b8ee631d8d975e9e Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-05-28make test: add option in pg interfaces for duplicating packetsAlexandre Poirrier1-2/+12
Change-Id: Ia6d6de5de0414291d5637fb4b8c1480925f646d3 Signed-off-by: Alexandre Poirrier <apoirrie@cisco.com>
2019-05-28Punt: socket register for exception dispatched/punted packets based on reasonNeale Ranns2-326/+505
- add to the Punt API to allow different descriptions of the desired packets: UDP or exceptions - move the punt nodes into punt_node.c - improve tests (test that the correct packets are punted to the registered socket) Change-Id: I1a133dec88106874993cba1f5a439cd26b2fef72 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-05-28Add an ip6 local hop-by-hop protocol demux tableDave Barach1-1/+14
Add a minimal ip6 hbh header processing test. ioam plugin: use ip6_local_hop_by_hop_register_protocol() in udp_ping_init(). Please test the ioam plugin udp_ping path AYEC, so I can publish the patch. Change-Id: I74e35276d6c38c31022026cfd238fad5e4a54485 Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-28gre: don't register gre input nodes unless a gre tunnel is createdJakub Grajciar1-0/+46
Change-Id: Id5c0f420e32e0504cea660fed2013f3ad28088aa Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-05-27IPIP tunnel: use address types on APINeale Ranns2-22/+25
Change-Id: Ida6a8f96bd858246e993250087bed45e7084ede1 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-05-22make test: fix bug due to concurrent commitsKlement Sekera1-4/+4
Change-Id: I912745950fe6e3f1688ef66b430ef86cdddd04cd Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-05-22make test: Fix QUIC External apps transfer testDave Wallace1-3/+9
Change-Id: Idc4cd1d3b29d4656f2df998162e6f99116518a58 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-05-22stats: support multiple works for error countersOle Troan6-64/+84
The current code only allowed access to the main thread error counters. That is not so useful for a multi worker instance. No return a vector indexed by thread of counter_t values. Type: fix Change-Id: Ie322c8889c0c8175e1116e71de04a2cf453b9ed7 Signed-off-by: Ole Troan <ot@cisco.com>
2019-05-20openssl plugin 3des routine iv_len fixVladimir Ratnikov1-2/+10
Since 3DES has 8 bytes of initialization vector and code contains hardcode for 16 bytes, check added to determine if crypto algorythm is 3DES_CBC and set corresponding iv_len param Change-Id: Iac50c8a8241e321e3b4d576c88f2496852bd905c Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com>
2019-05-20reassembly: prevent long chain attackKlement Sekera3-0/+95
limit max # of fragments to 3 per packet by default add API option to configure the limit at runtime Change-Id: Ie4b9507bf5c6095b9a5925972b37fe0032f4f9e8 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-05-17Tests: Refactor. Remove copies of enums.Paul Vinciguerra4-62/+69
Use the enums provided from the api definitions instead. Change-Id: I43b7591df920c984e439efc4b3ec3c4121c539d8 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-17make test: Add QUIC serial transfer testDave Wallace1-2/+38
Change-Id: I7ed68dd199daa31269d45d67e0a4fa632e1a08d1 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-05-17Tests: Raise exception if API cli_inband command fails.Paul Vinciguerra7-18/+29
* Configure tests to raise exception if cli_inband fails. * Fix failing tests. * Add filename detail to pcap.stat clib_error_return for debugging. Note: this change identifies spurious issues with packet-generator such as: CliFailedCommandError: packet-generator capture: pcap file '/tmp/vpp-unittest-Test6RD-v09RPA/pg0_out.pcap' does not exist. These issues resolve themselves on remaining test passes. Change-Id: Iecbd09daee954d892306d11baff3864a43c5b603 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-17gbp: Add unit tests for contractsMohsin Kazmi1-1/+224
Change-Id: Ib6615739b1db44b7788f462196cd477b6e23d67e Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-05-16tests: refactor. Replace literal constant w/ named constant.Paul Vinciguerra14-216/+257
* change literal packet count vlaues from 65 to a named constant of 67. (This value was recommended to exercise single, dual, and quad loops) Change-Id: Ieb1738dddacb8b6ea7fa25883032ac01a98399e1 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-15vpp_papi: remove dependency on environment var. VPP_API_DIR.Paul Vinciguerra1-10/+9
Change-Id: I9e3af8674e8aae27079fd03f6286f165d777814f Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-14tests: test_pipe.py. Fix missing import.Paul Vinciguerra1-4/+5
* Fix missing import (does not impact 'make test', fixes issue running under 'make test-shell') Change-Id: I634378a8809df5c5b9671555932e797d04a2abbb Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-14tests: fix TestMPLSPIC tests in test_mpls.py.Paul Vinciguerra1-28/+82
* Corrected stray ARP/ND packets in captures interfering with test results. * Added tests to match counts of recv'd pkts against sent. * Changes the number of packets to 67 for exercising single, dual, and quad-loops. Change-Id: I9147b8578988607ea4444741d10854e4d8683191 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-14make test: vcl fix OSError exception handlingDave Wallace1-1/+1
Change-Id: I4bf7da6752d85e384a8e8f3110964c4b142edcb5 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-05-14make test: Add QUIC external echo transfer testDave Wallace1-8/+104
- Add namespace configuration to echo_client - Add external echo transfer testcase - Refactor quic test class to reduce unnecessary method args - Increase default fifo size to 64 and data transfer to 10 mbytes - Remove sleep() between starting internal server & client apps Change-Id: Ia9de46a314d58e7809f005f6a5211760e63789bf Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-05-10cli: Add return value in cli_inbandOle Troan1-0/+36
Even when a CLI command called through the cli_inband API failed the API would return 0 (SUCCESS). This patch fixes that, but since most CLI handlers return error->code == 0, in most failure cases it will return -1 (UNSPECIFIED ERROR). Type: fix Change-Id: Ic83f3b23e8e8954bb8aa211301baba24e8c20ef6 Signed-off-by: Ole Troan <ot@cisco.com>
2019-05-10tests: test/vpp_papi_provider.py Specify exception to catch.Paul Vinciguerra1-1/+1
Change-Id: If936b198bcac7a317d52f958561c3e19d158450a Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-09add mactime plugin unit / code coverage testsDave Barach3-0/+160
The unit and code coverage tests are boring. The rest of the patch involves test and packet-generator infra cleanups. Teach the "make test-xxx" family of targets to set the api test plugin path correctly, to make "binary-api <api-message-name> <args>" debug CLI commands work correctly in the "make test" environment. Unfortunately involves both the top-level and test Makefiles. Add a minor pg cli feature, a CLI to manually set s->sw_if_index[VLIB_TX]. Consider the case where one configures an interface with both a device-input and an output feature. To test the output feature using the pg, it's necessary to inject packets into the interface output node with both b->sw_if_index[VLIB_TX] and b->sw_if_index[VLIB_RX] set correctly. For example: packet-generator new { name tx limit 15 size 128-128 interface local0 # rx: device input feature not configured on local0 tx-interface loop0 # tx: output node requires b->sw_if_index[VLIB_TX] node loop0-output data { hex 0x01005e7ffffa000dead0000008000102030405060708090a0b0c0d0e0f0102030405 } } Fix a longstanding bug in the packet generator stream setup. Remove kludges which set b->sw_if_index[VLIB_TX] to ~0 [in multiple places] instead of using the stream value s->sw_if_index[VLIB_TX], and setting THAT datum correctly. Change-Id: I1097a18e8db73661ded6b822c1d718f7e5cf36ed Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-09make test: add quic multistream test caseDave Wallace1-40/+118
- Also refactor test_quic.py to prepare for external echo tests & ipv6 tests Change-Id: I7dff60b375ed67d920e73294e0bf491cd3206d56 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-05-08make test: introduce COREDUMP_COMPRESS optionKlement Sekera2-13/+17
setting COREDUMP_COMPRESS=y (or =1) indicates that any core file is to be compressed by the test framework unless DEBUG=core is set. Change-Id: Ib0d6d30a7398dbeb6ab5e5dbb411bf5c641b5206 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-05-08VPP-1508: Fix zip() under python3.Paul Vinciguerra1-4/+4
Under py3, zip() returns an iterator. Fix so no longer needed in a list contex. Change-Id: I64b4560d990686cc87fd26d703030f9fb2494f12 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-07Improve lcov reported code coverage statsDave Barach1-2/+23
Remove unused code from the vppinfra build Add a bihash test case Change-Id: Ia930309efa28620dd1c0d69aaec432e2d8bd962c Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-07make test: add python3 compatibility in extend_packetAlexandre Poirrier1-2/+2
Change-Id: I342ff8e44e0d1ebd9f2c8cc386372b2f5a731080 Signed-off-by: Alexandre Poirrier <apoirrie@cisco.com>
2019-05-06make test: Fix truncated core fileDave Wallace1-0/+23
- Wait for coredump to complete before killing VPP. Change-Id: Ib7b96b339f796f9ef7e0eadff81d181464b8a03a Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-05-06gcov / test framework: sigterm not sigkillDave Barach2-2/+2
Otherwise, gcov data vanishes without a trace. Add a __gcov_flush() call to the unix signal handler, under #ifdef CLIB_GCOV. Add -DCLIB_GCOV to vpp_gcov_TAG_CFLAGS. Change-Id: I2726e671b26dfbe7fae88f46a8207bb2b5106884 Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-06NAT: VPP-1646 test case assertsFilip Varga1-0/+1
Change-Id: I466cea5cbe82a34d4b0b20a76bf5df4d529670e4 Signed-off-by: Filip Varga <fivarga@cisco.com>
2019-05-02NAT: VPP-1661 - test case cleanup and refactoringFilip Varga3-1333/+1304
Change-Id: I0eb85252d4b489ba25dcf59252e2bcf3b0cd5c6a Signed-off-by: Filip Varga <fivarga@cisco.com>
2019-05-02vpp_papi_provider.py: update defautmapping.Paul Vinciguerra1-0/+2
Add missing create_bvi/delete_bvi to defaultmapping. Correct typo in interface.api documentation. Change-Id: I8aa187f3b33c21fb2fcd55311ef79777c81d94d4 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-04-25crypto_ipsecmb: use pre-expanded keysDamjan Marion1-1/+1
Change-Id: Ie1d34b7e71554516595e0cd228e2cd54a3b8d629 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-04-25ipsec: drop runts in esp-decryptDamjan Marion1-2/+22
Change-Id: Id7fcaf8590f9f2dcccdebea0ad31c7ecd1cbc8af Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-04-24l2: Add support for arp unicast forwardingMohsin Kazmi1-2/+6
Change-Id: I79fc55f36a9b83957f84619bdf8cef08acc8ec24 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-04-24NAT: VPP-1531 api cleanup & updateFilip Varga3-777/+787
Change-Id: I2492400a67b39a3adbc24ab7cf1ba17a409e95a8 Signed-off-by: Filip Varga <fivarga@cisco.com>
2019-04-23API: Python and Unix domain socket improvementOle Troan3-3/+16
Handle the case where buffer overflows. Then SOCK_SEQPACKET assumption that multiple API messages are not returned by recv() is broken. Use SOCK_STREAM for API exchanges instead. Add support for running tests over sockets. make test SOCKET=1 Change-Id: Ibe5fd69b1bf617de4c7ba6cce0a7c2b3f97a2821 Signed-off-by: Ole Troan <ot@cisco.com>
2019-04-23Revert "NAT: VPP-1531 api cleanup & update"Ole Trøan3-787/+777
This reverts commit bed1421b9f1b3643d93384084972337b596aec73. /vpp/master3/src/plugins/nat/nat_api.c: In function ‘send_nat_worker_details’: /vpp/master3/src/vppinfra/clib.h:62:33: error: division ‘sizeof (u8 * {aka unsigned char *}) / sizeof (u8 {aka unsigned char})’ does not compute the number of array elements [-Werror=sizeof-pointer-div] #define ARRAY_LEN(x) (sizeof (x)/sizeof (x[0])) ^ /vpp/master3/src/plugins/nat/nat_api.c:205:43: note: in expansion of macro ‘ARRAY_LEN’ rmp = vl_msg_api_alloc (sizeof (*rmp) + ARRAY_LEN (w->name) - 1); ^~~~~~~~~ Change-Id: Ie82672c145fb2f6580827f95e535435307bc7a23 Signed-off-by: Ole Troan <ot@cisco.com>
2019-04-23NAT: VPP-1531 api cleanup & updateFilip Varga3-777/+787
Change-Id: I519d7efc8ee3c86381d96be2e2a46017cd948895 Signed-off-by: Filip Varga <fivarga@cisco.com>