aboutsummaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2019-07-12tests: remove invalid arguments passed to papiPaul Vinciguerra1-5/+1
This changeset removes keys that are invalid in papi kwargs. Type: test Change-Id: I6568f91cd240dc1927540396210b429f6ce82c0a Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-12ip ipsec: Remove IPSec SPI-0 punt reasonNeale Ranns1-26/+32
Type: fix There's no call for an SPI-0 punt reason with UDP encap, since it's only with UDP encap that the ambiguity between IKE or IPSEC occurs (and SPI=0 determines IKE). Enhance the punt API to dum ponly the reason requested, so a client can use this as a get-ID API Change-Id: I5c6d72b03885e88c489117677e72f1ef5da90dfc Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-11gbp: An Endpoint can change sclassNeale Ranns1-1/+65
Type: feature Change-Id: I9d3a73a6a6048fa0189f7fa6306a638279977fcd Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-10tests: Re-enable ipsec tests on ARMjuraj.linkes2-6/+4
Type: fix * test_ipsec_tun_if_esp.TestIpsecGreTebIfEsp * test_ipsec_esp.TestIpsecEspAll add keepalive messages before each algo/engine to prevent test timeout Change-Id: I726f3f9613bab02a65e65542cee494c68176ded7 Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2019-07-09tests: remove unused class attribute in VppTestCasePaul Vinciguerra1-1/+0
Identified in post-merge review. Type: test Change-Id: I46e19285479437561a43975ba9b5cb68f478736c Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-09gbp: Ownership of dynamically created vxlan-gbp tunnels managed via gbp_itfNeale Ranns1-19/+66
Type: fix This solves the ownership of vxlan-gbp tunnels. When the last reference of these goes away they need to be deleted. Currently there are two owners; gbp_itf via gef_itf and the lock held by the gbp_endpoint_location_t. The problem is that the loc removes its reference whilst the fwd still holds the gbp_itf, and things go wrong. This change moves the lifecycle management of the vxlan-gbp tunnel to the gbp_itf. When the last lock of the gbp_itf goes, so does the tunnel. now both the EP's loc and fwd can hold a lock on the gbp_itf and it's only removed when required. The other change is the management of the 'user' of the gbp_itf. Since each user can enable and disable different features, it's the job of the gbp_itf to apply the combined set. determining a unique 'uesr' from the caller was near impossible, so I moved that to the gbp_itf, and return the allocated user, hence the 'handle' that encodes both user and interface. The hash table maps from sw_if_index to pool index. Change-Id: I4c7bf4c0e5dcf33d1c545f262365e69151febcf4 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-09quic: add back missing test timeoutNathan Skrzypczak1-2/+2
Type: fix Change-Id: Ic153b2bc754ee69949f6e5fd412c474f9ed722f0 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-07-09tests: treat all truthy env vars the same wayPaul Vinciguerra2-13/+31
Introduce a new class, that returns the truthiness of a env var. Since an environment variable is just a string, it would normally be true if not unset. The new class returns true when the env var is set to a string that would be considered true. Type: test Depends-on: https://gerrit.fd.io/r/20484 Change-Id: I90ef010156f6fec246bde5c0e208ced1869b180f Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-09vppinfra: allocate bihash virtual space on demandDave Barach1-0/+1
Reduces the vpp image virtual size by multiple gigabytes Add a "show bihash" command which displays configured and current virtual space in use by bihash tables. Modify the .py test framework to call "show bihash" on test tear-down Type: refactor Change-Id: Ifc1b7e2c43d29bbef645f6802fa29ff8ef09940c Signed-off-by: Dave Barach <dave@barachs.net>
2019-07-08map gbp papi: match endianess of f64Paul Vinciguerra1-0/+38
clib_net_to_host_f64, clib_host_to_net_f64 are now implemented as '=', https://gerrit.fd.io/r/#/c/20406/ set papi to match. - all f64 api references are now wrapped with clib_net_to_host_f64 or clib_host_to_net_f64. IEEE f64 endianess is not defined. If clib_net_to_host_f64 and clib_host_to_net_f64 are later defined in VPP as big-endian, it is a single character change in the papi vpp_serializer. Note: This breaks the api in a manner that would not be detected by the flag day initiative. The scope is small. This only impacts map.api, which applied the u64 transformation, while the gbp api uses '='. The implementation of "=" raises issues for the papi socket implementation if used between systems of differing endianess. See Vratko's comments. - Added get_f64_endian_value() to api to allow client to verify endianess of f64's. Type: fix Depends-on: https://gerrit.fd.io/r/#/c/20484/ Change-Id: I00fc64a6557ba0190398df211aa0ea5c7eb101df Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-08gbp: More unit testsNeale Ranns1-55/+449
Type: test Change-Id: I0a58cc19bdfb73eabadbf6eb49b57e8db96959b5 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-08api: Implement log_dump/log_detailsPaul Vinciguerra1-0/+46
- Replaces the need to screen scrape "show log". - Adds an api to return the system time. When running over a socket, the api client may have different time than the vpp host. expected use: vpp_time_before_command = self.vapi.show_vpe_system_time_ticks().vpe_system_time_ticks <run some commands> log_output = self.vapi.log_dump(start_timestamp=vpp_time_before_command) Depends-on: https://gerrit.fd.io/r/20484 Depends-on: https://gerrit.fd.io/r/#/c/19581/ ============================================================================== TestVpeApi ============================================================================== log_details(_0=838, context=3, timestamp_ticks=2.4954863503546518e+48, level=<vl_api_log_level_t.VPE_API_LOG_LEVEL_WARNING: 4>, timestamp=u'2019/07/04 20:35:41:281', msg_class=u'buffer', message=u'vlib_physmem_shared_map_create: clib_mem_create_hugetlb_fd: open: No such file or directory\n\n') log_details(_0=838, context=3, timestamp_ticks=1.6101902879480125e+159, level=<vl_api_log_level_t.VPE_API_LOG_LEVEL_WARNING: 4>, timestamp=u'2019/07/04 20:35:41:281', msg_class=u'buffer', message=u'falling back to non-hugepage backed buffer pool') test_log_dump_default (test_vpe_api.TestVpeApi) OK log_details(_0=838, context=13, timestamp_ticks=2.4954863503546518e+48, level=<vl_api_log_level_t.VPE_API_LOG_LEVEL_WARNING: 4>, timestamp=u'2019/07/04 20:35:41:281', msg_class=u'buffer', message=u'vlib_physmem_shared_map_create: clib_mem_create_hugetlb_fd: open: No such file or directory\n\n') log_details(_0=838, context=13, timestamp_ticks=1.6101902879480125e+159, level=<vl_api_log_level_t.VPE_API_LOG_LEVEL_WARNING: 4>, timestamp=u'2019/07/04 20:35:41:281', msg_class=u'buffer', message=u'falling back to non-hugepage backed buffer pool') test_log_dump_timestamp_0 (test_vpe_api.TestVpeApi) OK test_log_dump_timestamp_future (test_vpe_api.TestVpeApi) SKIP test_show_vpe_system_time_ticks (test_vpe_api.TestVpeApi) SKIP ============================================================================== TEST RESULTS: Scheduled tests: 4 Executed tests: 4 Passed tests: 2 Skipped tests: 2 ============================================================================== Test run was successful Type: feature Change-Id: I893fc0a65f39749d2091093c2c604659aadd8447 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-05vxlan-gbp: Decap ignores reserved bitsNeale Ranns1-4/+7
Type: fix from the draft: 3. Backward Compatibility VXLAN [RFC7348] requires reserved fields to be set to zero on transmit and ignored on receive. Change-Id: I98544907894f1a6eba9595a37c3c88322905630e Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-05sctp: move to plugins, disabled by defaultFlorin Coras1-0/+1
Removed sctp buffer metadata from vnet/buffer.h, added it to the plugin. Add registration APIs for plugin-based vlib_buffer_opaque / opaque2 decoders, used by "pcap dispatch trace ..." for display in the wireshark dissector. Type:refactor Not actively maintained. Change-Id: Ie4cb6ba66f68b3b3a7d7d2c63c917fdccf994371 Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2019-07-05gbp: add unit-tests for anonymous l3outBenoît Ganne2-28/+498
Type: test Change-Id: Ib32c87b7f07c0552a6801a895332a0156c3c37f0 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-03vcl: disable ldp bidirectional multiple socket testsFlorin Coras1-5/+2
Type: fix Change-Id: I83778d897b6aa37a37ffdfa1d0932bb5e95225e2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-03gbp: Consider data-plane learnt source better than control-planeNeale Ranns1-5/+71
Type: feature Change-Id: Ice8fc0da6450d2aa8ba63ca1277393ac3605aa2c Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-03fib: allow route delete with no paths and multipath=0 to remove theNeale Ranns1-8/+22
whole route Type: fix Fixes: 097fa66b Change-Id: I017ab5797670eb278c27c6e306cd8cadaacddf9d Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-03tests: fix FORCE_FOREGROUNDjuraj.linkes1-1/+7
Type: fix Change-Id: I145f9984c1d944d5b7de0487e8b41ae4fdb95b6d Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2019-07-03tests: Have worker return immediately on bad executablePaul Vinciguerra2-52/+42
No reason to waste CI cycles if we know the test will not run. See: 17:55:11 ============================================================================== 17:55:11 VPP Object Model Test 17:55:11 ============================================================================== 17:55:11 Exception in thread Thread-4: 17:55:11 Traceback (most recent call last): 17:55:11 File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner 17:55:11 self.run() 17:55:11 File "/w/workspace/vpp-beta-verify-master-ubuntu1804/test/framework.py", line 1475, in run 17:55:11 stdout=subprocess.PIPE, stderr=subprocess.PIPE) 17:55:11 File "/w/workspace/vpp-beta-verify-master-ubuntu1804/test/run/venv/local/lib/python2.7/site-packages/subprocess32.py", line 617, in __init__ 17:55:11 restore_signals, start_new_session) 17:55:11 File "/w/workspace/vpp-beta-verify-master-ubuntu1804/test/run/venv/local/lib/python2.7/site-packages/subprocess32.py", line 1415, in _execute_child 17:55:11 raise child_exception_type(errno_num, err_msg) 17:55:11 OSError: [Errno 2] No such file or directory: '/w/workspace/vpp-beta-verify-master-ubuntu1804/test/build/vom_test/vom_test' 17:55:11 17:55:11 17:55:11,328 Timeout! Worker did not finish in 120s 17:55:11 run C++ VOM tests ERROR [ temp dir used by test case: /tmp/vpp-unittest-VOMTestCase-vpMcWF ] 17:55:11 Type: fix Change-Id: I3d8252807e98a09a8abd70de8a22517151f9d786 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-01gbp: VRF scoped contractsNeale Ranns2-84/+113
Type: feature Change-Id: I01772cfc3a0118a5c49bf346339788824e6931b2 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-30igmp: accept packets that have more on the wire data than IGMP reports.Neale Ranns1-3/+19
IGMPv3 sends a variable length of sources in a query. Today if the amount of data on the wire does not exactly match that required for the number of sources the packet is dropped. Relax this check and instead accept the packet is the amount of wire data is equal or greater than the number of sources. Some devices on the wild internet pad small packets. Type: feature Change-Id: I102682814b38c0a0614d71816c9a286d90b834df Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-28quic : Use TX event for app read notificationNathan Skrzypczak1-16/+10
Type: feature Change-Id: I1846cdeb35f079249f66a0351aa244c540923a43 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-06-28tests: handle TypeErrors in calls to VppDiedErrorPaul Vinciguerra1-5/+4
Type: test Change-Id: I869768ed25efa3350f025fba329466db69805803 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-27sctp: add option to enable/disableFlorin Coras1-0/+1
Type: feature By default sctp is disabled to avoid wasting cycles. Change-Id: I1e2f764c7168b5c15062efbe5895de93dcc2614e Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-27tests: pin python dependenciesAloys Augustin4-17/+348
This commit ensures that the tests always run with the exact same version for all the Python dependencies. It uses pip-tools to achieve that. Our top-level dependencies are specified in the requirements.txt file. From this file, pip-tools generates the requirements-{2,3}.txt file, which pins all the versions of all the recursive dependencies, and is used to install the packages in the test virtualenv. To change or add a top-level dependency, update requirements.txt and run make test as usual with python2 and python3. The requirements-{2,3}.txt file will be updated and you can verify that nothing breaks. Then add all requirements* files in your commit. To refresh the python packages (i.e. get new versions of the recursive dependencies, or of the dependencies that are not pinned in requirements.txt), just run: PYTHON=python2.7 make test-refresh-deps PYTHON=python3.6 make test-refresh-deps and this will update the requirements-{2,3}.txt files. Ideally we should run this after each release. Type: make Change-Id: Ic533de3d06ec4019ff38f5231208da6f1025bfc7 Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2019-06-27quic: fix testsAloys Augustin1-6/+6
Reduce the amount of data sent to avoid a hang in the QUIC stack when the fifos get full. This fixes the QUIC tests in debug mode while https://gerrit.fd.io/r/c/19823/ is not merged. Change-Id: I1ed4c5dc3d41c09bc674de808f3778a074b15454 Type: test Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2019-06-27tests: rename stream name in testsPaul Vinciguerra1-1/+2
PacketGenerator streams were named based on their sw_if_index but without knowing that, it looked like it was paired with the interface instance value. Reencode the name to encode the data in a clearer way. 20:48:12,859 CLI: packet-generator new pcap /tmp/vpp-unittest-TestClassifierPBR-6DVQW2/pg0_in.pcap source pg0 name pcap0-sw_if_index-1 Change-Id: I5b82193943fee0cf060900d73aaaaecca1247105 Type: style Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-27vom: get the tests working againNeale Ranns1-0/+5
Type: fix Fixes: 097fa66b Change-Id: Ib73714665e3325c7e1e8f939275933a4d219f96b Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-26tests: fix test-checkstyle failure in test_memif.pyPaul Vinciguerra1-2/+2
Type: style Change-Id: Ifea1fed5a6943605a6111afb33c54a8ff852d087 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-26gbp: enforce same endpoint mac and ip srcBenoît Ganne1-3/+13
During packet classification, make sure packets coming from an EP also matches this specific EP IP address and vice-versa. This prevents and EP to send a packet on behalf of another EP. Type: fix Change-Id: I30287644ec73b90d9b6913952a82b2baedf6a5ff Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-06-26api: refactor format_vl_api_prefix_t return keysPaul Vinciguerra3-28/+32
format_vl_api_prefix_t returns a dict with keys 'address' and 'address_length', but other format_vl_api_prefix functions return a dict with 'prefix', and 'len'. Refactor all format_vl_api_prefix_t to return consistent keys 'address' and 'len'. Type: refactor Change-Id: I5f9558fc2da8742a303266e011102f5b2db80aad Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-26tests: set object_id for routes.Paul Vinciguerra1-5/+8
Object id's are used as keys in the object repository. They need to be unique. Also useful for debugging in log.txt. Type: test Change-Id: I69b5f3a7508918a5780ff8f20d27d4a3c34a5699 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-26vom: fix test build failureNeale Ranns1-17/+20
Type: fix Fixes: 097fa66b Change-Id: Id5ae4029f27af6cba76d6527c0d3d7212ab84f3e Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-26tests: fix memif testsJakub Grajciar2-12/+12
remote_test.py - Remove 'ret' arg from _remote_exec(), so that the function always reads the reply from the pipe. (fix unmatched request/reply) memif_test.py - Don't register VppIpRoute to VppObjectRegistry. Type: fix Change-Id: I8a51e7ffd68df5f379534f5ddd5ec9367a89be32 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-06-25tests: one more ipfix flush cli to api replacementVratko Polak1-1/+1
Type: fix Fixes: 21b83e96d6076cda01ee80343840bc1166557150 Change-Id: I8216127ddbbf3301d2602bab54dbc433233387a2 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-06-25tests: fix test_gbp.py.Paul Vinciguerra4-85/+107
A number of VppGbpContractRules were missing the hash_mode_t and were being replaced by an optional kwarg. Type: fix Change-Id: I6ca03c93b69e4355c237a6c9402e1e178b701b21 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-25quic: test_quic.py style is fixed.Chore1-15/+49
Type: test Change-Id: I943f95ef740a0646b2da363c6a16dff1f4a2bb83 Signed-off-by: Chore <s3m2e1.6star@gmail.com>
2019-06-25tests: if vpp is dead, specify the test name in the outputPaul Vinciguerra1-3/+15
'Exception: VPP is dead when setting up the test' is more helpful with the test info. Type: test Change-Id: I6a262fdcf2ecb33aae17bef3d19745053a0bade8 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-24quic: server create streams test caseDave Wallace1-201/+116
Type: test * Refactor quic_echo test app * Add timinig capabilities * Add multiple quic tests Change-Id: I3302c66539b12c1375d1a0c6d46f9ff4c6f2b27c Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-06-24api: implement ipfix_flushPaul Vinciguerra2-37/+37
-Migrate tests to api and cleanup: '# FIXME this should be an API call' in tests. Type: feature Change-Id: I715f9f8acc0f2af9c974ea221b2aea46692a6218 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-24tests: refactor VppDiedError.Paul Vinciguerra3-29/+32
- Move Exception into same module as TestCase. - Move the error reporting logic inside the error. - Allows testing of the returncode and signal_name for tests to consume. - Fix the signal reporting code: VppDiedError: VPP subprocess died unexpectedly with returncode -6 [unknown]. displays as: VppDiedError: VPP subprocess died unexpectedly with return code: -6 [SIGABRT]. Type: test Change-Id: I8488ab318a596c9b737308829cedfb7e96e57302 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-20tests: move output from CI results and put in logPaul Vinciguerra1-1/+1
NAT session details are output to the test results. Twice NAT44 OK Acquire twice NAT44 addresses from interface OK 21:10:42,661 NAT44 sessions: -------- thread 0 vpp_main: 1 sessions -------- 172.16.1.2: 0 dynamic translations, 1 static translations i2o 172.16.1.2 proto tcp port 8080 fib 0 o2i 10.0.0.3 proto tcp port 80 fib 0 external host o2i 172.16.2.2:4567 i2o 10.0.1.3:42296 index 1869 last heard 97.99 total pkts 2, total bytes 80 static translation load-balancing twice-nat Twice NAT44 local service load balancing OK NAT44 translate packet with unknown protocol OK Type: test Change-Id: I932a4a1133d597bb82da6e04f2ea833094a481da Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-20tests: add sudo to gdb commandsPaul Vinciguerra1-2/+3
Prepend sudo to the gdb command line. Type: test Change-Id: I09013c3ca512e26de0c46c02f643b21064ba499c Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-20buffers: fix crashKlement Sekera1-0/+29
this change is being made to fix a crash when current_data < 0 in buffer linearization function Ticket: N/A Type: fix Fixes: f883f6a1132ad4bb7aa9d9a79d420274fbcf3b64 Change-Id: Ia4ede823f673780e0c30d075b091db42e183650d Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-06-19l2: BD ARP termination entry API updateNeale Ranns3-27/+31
Type: refactor Change-Id: I492b6e88acadf0ab0e4d7b1c0c5d1cab84c1726f Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-19tests: send packet output to log - test_punt.pyPaul Vinciguerra1-1/+0
Move output to log.txt. 11:51:58,111 Verifying against 3 packets in verify_udp_pkts. 11:51:58,111 ###[ Ethernet ]### dst = 02:fe:4c:62:06:e5 src = 02:01:00:00:ff:02 type = 0x800 \###[ IP ]### version = 4 ihl = 5 tos = 0x0 len = 128 ... Type: test Change-Id: Iebaf34c2ac16e7fa8dffbdeadf18ab6c5f4c7494 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-18tests: fix checkstyle failure in test_stats_client.pySteven Luong1-1/+4
New job submitted to Jenkins reported checkstyle failure in test_stats_client.py. It needs a blank line in one place and line is too long in another place. Type: fix Change-Id: I9b18df1df449a287570d614d6c5b514ceb88480c Signed-off-by: Steven Luong <sluong@cisco.com>
2019-06-18ipsec: fix ipv6 tunnel protect testsFlorin Coras1-2/+1
Type: fix Change-Id: I1f8007ae659097152046aa1396cc23f126e29018 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-18ipsec: ipsec-tun protectNeale Ranns7-129/+792
please consult the new tunnel proposal at: https://wiki.fd.io/view/VPP/IPSec Type: feature Change-Id: I52857fc92ae068b85f59be08bdbea1bd5932e291 Signed-off-by: Neale Ranns <nranns@cisco.com>