summaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2019-04-06gbp: Add gbp bd flags unit testMohsin Kazmi1-1/+86
Change-Id: I5b18cb84bec88f5514cacd2df61b5ce3c70abd77 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-04-05IPSEC: punt reasons; SPI=0, no-tunnelNeale Ranns1-6/+6
Change-Id: If76992e283a27fa193a6865257ab3aa764066e48 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-04gbp: Add bd flagsMohsin Kazmi1-1/+5
Add flags for unknown unicast drop, multicast and broadcast drop and arp unicast. Change-Id: I1203137510b8bee0a20ecfe5f2efad8043d4bac6 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-04-03GBP: iVXLAN reflection checkNeale Ranns1-0/+15
packets should not egress on an iVXLAN tunnel if they arrived on one. Change-Id: I9adca30252364b4878f99e254aebc73b70a5d4d6 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-02IPSEC-GRE; testsNeale Ranns4-26/+203
failing test disabled on ARM Change-Id: I6b7535cd8f51fdaf9786ba77f9f61a7d8d049bbd Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-02vppinfra: fix sparse_vec_index() returning non-zero index for some ↵Andrew Yourtchenko1-0/+34
nonexistent elements If we are testing for an index whose membership bitmask happens to sit in LSB of uword, and there is nothing else set in that uword in the member bitmask, the shortcut path returning the valid index is taken even if the element with a given index doesn't exist in the sparse vector. This happens because the count of leading zeroes on the value of 0 is zero, which is equal to the value taken modulo bitsize uword. Take care of that case. Also add unittests showing the problem and verifying that sparse_vec_index2 does not have the same issue. Change-Id: I19117e13817c3e5de579b9250bb741de42491985 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-03-29tests: test/vpp_l2.py fix missing name.Paul Vinciguerra11-29/+24
test/vpp_l2.py:213:26: F821 undefined name 'L2_VTR_OP' self.itf.set_vtr(L2_VTR_OP.L2_DISABLED) Move L2_VTR_OP enum to vpp_sub_interface.py where the VTR code is found. Change-Id: I9eb9a3a2c679813c221ce1d0c4fa8aac6076c443 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-29tests: refactor vpp_object.pyPaul Vinciguerra18-153/+22
Move __str__ to super for all subclasses of VppObject Implement __repr__ in VppObject Implement __hash__ and __eq__ Change-Id: Ibd4ea37b84b17f499ab86630fb5b9ed9c8b4b1c2 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
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>