aboutsummaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2019-03-29IPSEC: tunnel fragmentationNeale Ranns3-28/+52
Change-Id: I63741a22bc82f5f861e1c0f26a93b5569cc52061 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-28ipsec: USE_EXTENDED_SEQ_NUM -> USE_ESNDamjan Marion2-3/+3
Change-Id: Ib828ea5106f3ae280e4ce233f2462dee363580b7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-03-28Punt InfraNeale Ranns1-0/+176
A punt/exception path that provides: 1) clients that use the infra 2) clients can create punt reasons 3) clients can register to recieve packets that are punted for a given reason to be sent to the desired node. 4) nodes which punt packets fill in the {reason,protocol} of the buffere (in the meta-data) and send to the new node "punt-dispatch" 5) punt-dispatch sends packets to the registered nodes or drops Change-Id: Ia4f144337f1387cbe585b4f375d0842aefffcde5 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-28IPSEC: 4o6 and 6o4 for tunnel interfacesNeale Ranns2-45/+137
Change-Id: I4d3ba18ab5205317219989de55b6e50d3b1d8a79 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-28IPSEC: run encrpyt as a feautre on the tunnelNeale Ranns1-2/+2
Change-Id: I6527e3fd8bbbca2d5f728621fc66b3856b39d505 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-28Typos. A bunch of typos I've been collecting.Paul Vinciguerra32-142/+145
Change-Id: I53ab8d17914e6563110354e4052109ac02bf8f3b Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-27make-test: fix ValueError raised by hook in python3Naveen Joy1-1/+1
Without this patch, the hook module raises a ValueError when tests are run using python3. This patch updates the exception being caught by ipaddress to ValueError. Change-Id: I5e11e292a05ddf350fc04ebaf19cfd7dad2bd9d0 Signed-off-by: Naveen Joy <najoy@cisco.com>
2019-03-27GBP: fixes for l3-out routingNeale Ranns3-54/+268
Change-Id: I4d73b712da911588d511a8401b73cdc3c66346fe Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-26VPP-1508: Tests: Update version of syslog_rfc5424_parser.Paul Vinciguerra1-1/+1
Bump to version v0.3.1. Fixes an issue with stdlib enum imports under python3.5. Change-Id: I7d8cb9e8ae9321beb4cb2ba052b08e776590c75d Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-25VCL: add TLS opt to socket_test.shDave Wallace2-5/+5
- add TLS transport opt to socket_test.sh - resolve clash in vcl_test* args with socket_test.sh opts Change-Id: I952d5b64942664bc3af1098f67445e0f4b93ab32 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-03-25IPSEC tests fnd fix or Extended Sequence NumbersNeale Ranns3-29/+264
Change-Id: Iad6c4b867961ec8036110a4e15a829ddb93193ed Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-22IPSEC: test for packet drop on sequence number wrapNeale Ranns1-0/+16
Change-Id: Id546c56a4904d13d4278055f3c5a5e4548e2efd0 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-22tests: update test_lb.py to use api call lb_conf.Paul Vinciguerra2-4/+6
Change-Id: I96a1d4b2b3ae22cf164c0acd6db9b323cd70f51a Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-21BVI InterfaceNeale Ranns4-32/+69
a new dedicated BVI interface as opposed to [re]using a loopback. benefits: - removes ambiguity over the purpose of a loopback interface - TX node dedicated to BVI only functions. Change-Id: I749d6b38440d450ac5b909a28053c75ec9df946a Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-21IPSEC: Mutli-tunnel testsNeale Ranns5-56/+215
Change-Id: I46f1db6579835c6613fdbb2b726246cc62b135fe Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-21ipsec: add ipv6 support for ipsec tunnel interfaceKingwel Xie4-38/+92
Change-Id: I6a76907dc7bed2a81282b63669bea2219d6903c9 Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com> Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2019-03-20tests: cdp plugin. Replace cdp enable cli command with API call.Paul Vinciguerra1-3/+3
Change-Id: Ic2d21b535a58c1c618ec9e652d30858ad45a7d43 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-20tests: replace CLI command with API for flowprobe params.Paul Vinciguerra1-3/+5
Change-Id: If446a0d111b89f0a761db41696e0d6ca912312f0 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-19Revert "tests: Deprecate the use of CLI commands in tests."Neale Ranns2-6/+1
This reverts commit e2e8f02165f27ae04e6d20ce0c628e29271a8db6. Change-Id: Ie23dcb8a5b3e96f77e0d117a6887c43064c79669 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-18tests: Speedup tests by 30%.Paul Vinciguerra1-0/+1
Baseline: 2598325153 function calls (2598296959 primitive calls) in 2257.698 seconds Post-changeset: 1495427 function calls (1467233 primitive calls) in 1572.080 seconds Change-Id: I191b68b29c9e0f19964bf0b8879ddf357c9cbd5c Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-18Tests: Trivial. Define constants once.Paul Vinciguerra1-4/+1
Change-Id: Iaf106962598d04708e8740e016d5c55ff35432c9 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-18tests: Deprecate the use of CLI commands in tests.Paul Vinciguerra2-1/+6
Since the stated policy regarding CLI commands is: "Note that the debug CLI is a developer's tool - no warranty express or implied - and that we may choose not to fix debug CLI bugs.", this change emits a deprecation warning whenever a test case calls a CLI command. Change-Id: I91b30e86ae1b2fca36732837f36cdda762cdf458 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-15Revert "API: Cleanup APIs interface.api"Ole Trøan13-139/+125
This reverts commit e63325e3ca03c847963863446345e6c80a2c0cfd. Allow time for CSIT to accommodate. Change-Id: I59435e4ab5e05e36a2796c3bf44889b5d4823cc2 Signed-off-by: ot@cisco.com
2019-03-15API: Cleanup APIs interface.apiJakub Grajciar13-125/+139
Use of consistent API types for interface.api Change-Id: Ieb54cebb4ac96b432a3f0b41596718aa2f34885b Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-03-15Add @deprecated decorator.Paul Vinciguerra1-0/+1
import deprecation @deprecation.deprecated(deprecated_in="1.0", removed_in="2.0", current_version=__version__, details="Use the bar function instead") def foo(): """Do some stuff""" return 1 Change-Id: Ib2ec5dd90445c9967eb39dbf6543cafd48b7f866 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-14Tests: test/test_flowprobe.py Fix TypeError.Paul Vinciguerra1-1/+1
TypeError: not all arguments converted during string formatting Change-Id: I0b4b27e37ba47e737aeb639c9787f8bc08a92dce Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-14acl-plugin: fix the l2l3 unittest to actually verify the pcapAndrew Yourtchenko1-4/+3
Thanks to Paul Vinciguerra for spotting it. Change-Id: I1f776c3c21865dbc52c4d659c62cbfa4967e15e9 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-03-14TEST: link-state up/down notifications on FIB forwardingNeale Ranns2-1/+90
Change-Id: I478c4e5feb9603b7443efdf2967f98f9bde7ea0f Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-14GBP: get source address from ARP packets for LPM classificationNeale Ranns1-0/+10
Change-Id: I1370c1882f8ba9b709e54e62356d2c57d47d20fc Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-13Tests: post-merge review comments for https://gerrit.fd.io/r/#/c/18081/Paul Vinciguerra1-2/+3
Change-Id: I2195b3264b5db34d869facf669f3e71a04fe3ff9 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-12Tests: Raise exception, don't raise string.Paul Vinciguerra4-4/+4
This was deprecated ~ python 2.4, and causes a TypeError as sideEffect. >>> raise "foo" Traceback (most recent call last): File "<input>", line 1, in <module> TypeError: exceptions must derive from BaseException Change-Id: I4117b6d60ae896eaa1ef2a73a323d8d241f8c3a7 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-12GBP: L3 out fixesNeale Ranns2-34/+131
Change-Id: I0562d597fd45c7ddcb6db42cf17d3ffb569eb140 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-12FIB: path parsing, table-id not fib-index (VPP-1586)Neale Ranns2-7/+33
Change-Id: Ib27952935393163eaabf005c69b1cbc2feca2b98 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-12GBP: contracts API fixed length of allowed ethertypesNeale Ranns1-1/+4
VAPI does not handle two VLAs in one struct. Change-Id: I259c998bef4398ead2bbb9e788350d50c2f05694 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-12VPP-1486: Unittest for stat segment file descriptor leak.Paul Vinciguerra1-0/+41
Verifies: https://gerrit.fd.io/r/#/c/18167/ Before patch: ============================================================================== Test Stats Client ============================================================================== Test file descriptor count - VPP-1486 FAIL [ temp dir used by test case: /tmp/vpp-unittest-StatsClientTestCase-EAp0e7 ] ============================================================================== FAIL: Test file descriptor count - VPP-1486 ------------------------------------------------------------------------------ Traceback (most recent call last): File "/vpp/test/test_stats_client.py", line 39, in test_client_fd_leak initial_fds, ending_fds)) AssertionError: initial client side file descriptor count: 20 is not equal to ending client side file descriptor count: 120 04:55:38,038 Symlink to failed testcase directory: /tmp/vpp-failed-unittests/vpp-unittest-StatsClientTestCase-EAp0e7-FAILED -> vpp-unittest-StatsClientTestCase-EAp0e7 ============================================================================== TEST RESULTS: Scheduled tests: 1 Executed tests: 1 Passed tests: 0 Failures: 1 FAILURES AND ERRORS IN TESTS: Testcase name: Test Stats Client FAILURE: Test file descriptor count - VPP-1486 [test_stats_client.StatsClientTestCase.test_client_fd_leak] ============================================================================= After patch: ============================================================================== Test Stats Client ============================================================================== Test file descriptor count - VPP-1486 OK ============================================================================== TEST RESULTS: Scheduled tests: 1 Executed tests: 1 Passed tests: 1 ============================================================================== Test run was successful Change-Id: I055e473ecf0566ebfbfbadd58ec6eaf11fc77d68 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-11vpp_papi_provider: Remove more wrapper functions.Ole Troan36-783/+409
Split this work up into pieces. Please don't add new wrappers to vpp_papi_provider.py. Change-Id: I0f8f2afc4cd2bba07ea70ddecea2d7319f7b2e10 Signed-off-by: Ole Troan <ot@cisco.com>
2019-03-11VPP-1508: Tests: Fix vpp_api struct.error under py3.Paul Vinciguerra15-87/+122
Fix struct.error: expected bytes object got <class 'str'> Change-Id: I837ae6e97e44c789a9372677151b157956525334 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-11VPP-1508: Use scapy.compat to manage packet level library differences.Paul Vinciguerra27-193/+261
Change-Id: Icdf6abc9e53d33b26fd1d531c7dda6be0bb9cb55 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-11Tests: fix time.sleep(0) # yield. Reduce sleep related log messages.Paul Vinciguerra4-8/+21
Reduce the incidence of: 20:04:23,606 unexpected time.sleep() result - slept for 2.187967e-03s instead of ~6.837845e-04s! Change-Id: Ic576fda7f75e571c9019111588a6a936ee2cf5c2 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-11Tests: remote_test.py. Private member test catching dunder names.Paul Vinciguerra1-9/+14
Private member check also catches __iter__, since it starts with '_'. Fixes: Captured traceback: ~~~~~~~~~~~~~~~~~~ b'Traceback (most recent call last):' b' File "/vpp/test/test_memif.py", line 47, in tearDown' b' remove_all_memif_vpp_config(self.remote_test)' b' File "/vpp/test/vpp_memif.py", line 36, in remove_all_memif_vpp_config' b' for d in dump:' b"TypeError: 'SerializableClassCopy' object is not iterable" b'' Change-Id: I6a3f3e0f2b1b2d0a2b97faa23bf542ff8f92de43 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-11Tests: use self.assertNotIn().Paul Vinciguerra13-35/+35
Many tests use self.assertEqual(error.find("failed"), -1) Use self.assertNotIn("failed", error) to provide more meaningful errors such as AssertionError: 'Failed' not found in '' instead of 0 != -1. Change-Id: I670acdc977b788b2cedf94cfeafc12097781463f Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-11Tests: 'Fix' __del__ in test/remote_test.py.Paul Vinciguerra1-4/+6
This is not a fix as much as supressing a warning. __del__ is not a destructor. test/remote_test.py:385:13: F821 undefined name 'cls' cls.vpp.poll() ^ test/remote_test.py:386:16: F821 undefined name 'cls' if cls.vpp.returncode is None: ^ test/remote_test.py:387:17: F821 undefined name 'cls' cls.vpp.terminate() ^ test/remote_test.py:388:17: F821 undefined name 'cls' cls.vpp.communicate() Change-Id: I6f0ecf3ae5dee7f279a4e25994cc1c49470bca26 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-11Test: Fix hook.py: AttributeErrorPaul Vinciguerra1-1/+1
File "/vpp/test/hook.py", line 84, in on_crash self.testcase.vpp_bin, core_path) AttributeError: 'PollHook' object has no attribute 'testcase' Change-Id: I84d9d86a5c6a5769a43a91cf23ce8a1141f7cd12 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-07Tests: Refactor payload_to_info()Paul Vinciguerra22-32/+34
All callers of payload_to_info were required to wrap payload with str(). Refactor to call scapy's payload.load for raw payloads or specify the specific fieldname. Change-Id: I1c80599d4df8dc129dbb8274733afaad406d5bcf Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-07VPP-1508: Python3 tests. Explicitly specify string formatting.Paul Vinciguerra11-27/+29
.format() doesn't understand what to do with binary values by default. Specify that we expect coersion to string. Change-Id: Ic4b697f70852124dc85ab231f76b7934d0d71f4d Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-07VPP-1508: test_acl_plugin vapi changes for Python3.Paul Vinciguerra2-51/+51
Change-Id: I0863cefa523a6d7c11e48649b03f058130e5a4ee Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-07vpp_papi: Adjust aenum import for python3.Paul Vinciguerra1-0/+1
The stdlib introduced IntEnum in python 3.4 and IntFlag in python 3.6. Change-Id: I3ac278a9d5a97eefa9fc4f1491f0cd030e40c3b2 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-07make-test: Python pep8 compliance for sequencesNaveen Joy1-13/+13
For sequences, (strings, lists, tuples), use the fact that empty sequences are false. A tiny change towards getting full pep8 compliance, which will look good. Yes: if not seq: if seq: No: if len(seq): if not len(seq): (https://www.python.org/dev/peps/pep-0008/) Change-Id: I6b565bef424f81afc66aba3b0041a5029a9f8954 Signed-off-by: Naveen Joy <najoy@cisco.com>
2019-03-06test framework: vpp_papi_provider.py - further cleanupOle Troan15-1272/+416
Part of further cleanups of this file. Removed most wrappers that don't have conflicting signature with message API. Change-Id: I6acd93d20291feb7731eb35ab2eb8c9f22f4632c Signed-off-by: Ole Troan <ot@cisco.com>
2019-03-06session: use session index instead of fifo for evtFlorin Coras1-31/+2
Avoids derefrencing fifo pointers whose segments could have been unmapped. Change-Id: Ifb0b7399e424f145f3f94b769391a6f4e31bb4e6 Signed-off-by: Florin Coras <fcoras@cisco.com>