822 Commits

Author SHA1 Message Date
Paul Vinciguerra
48872780e8 VTL: Use latest version of syslog_rfc5424_parser (0.2.0) released: 190117
Upstream changes not compatable with: https://gerrit.fd.io/r/#/c/16797/

Running tests using custom test runner
Active filters: file=test_syslog.py, class=None, function=None
Adding tests from directory tree /vpp/test
1 out of 914 tests match specified filters
Not running extended tests (some tests will be skipped)
==============================================================================
Syslog Protocol Test Cases
==============================================================================
Syslog Protocol test                                                     OK

==============================================================================
TEST RESULTS:
     Scheduled tests: 1
      Executed tests: 1
        Passed tests: 1
==============================================================================

Test run was successful

Change-Id: I42f86ae3e7f062c0343025ba16bc6e8d2c34ed50
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit 5011c67058c3c37d344c5d83ab6046700327b7b4)
2019-01-18 17:29:57 +00:00
Klement Sekera
d91fa61e8d make test: raise packet tracing limit to 1000
Change-Id: I4309cefe13ee861342e7962c7652919a47748656
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-01-16 13:34:34 +00:00
Paul Vinciguerra
04575c5e47 VTL: vpp_papi_provider: Don't shortcircuit vpp_papi jasonfile detection.
The detection login in vpp_papi is significantly more advanced than
the implementation in vpp_papi_provider.

Let's take full advantage of it and ensure consistent behavior.

Change-Id: I786e6d5f4588a0d74e863cce1b0bc1a93fa0e614
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-01-14 13:24:38 +00:00
Paul Vinciguerra
dd3c5d250f VTL: Allow running simple unittest.TestCases.
It came to my attention that Ole added a simple test in:
https://gerrit.fd.io/r/#/c/16381/ and the framework forced him
to launch an instance of VPP to test the formatting of a mac address.

This change allows the test framework to run standard unittest.TestCases
without the need to spawn a VPP instance.

Change-Id: I56651ab27c4c6bf920081a526f168a743d643201
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-01-14 13:09:08 +00:00
Paul Vinciguerra
262e064bb6 VTL: New version of pyparsing breaks tests.
Specify use of version <2.3.1 released Jan 13, 2019

Change-Id: I23cfb802a677956b77897e0c2b690fac50e18541
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-01-14 12:56:37 +00:00
Alexander Chernavin
ad9d528314 bonding: support custom interface IDs
Change-Id: I78fe58144fa3ba2e1c7135897a13a2541f235c91
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2019-01-13 13:36:22 +00:00
juraj.linkes
46e8e91bca Fix interactive tests
When running tests interactively (i.e. not using child process) the
tests are split into small suites each containing tests from a
VPPTestCase, but only the first suite is run. Fix this by creatin a new
suite with all of these small suites in it and running that suite.

Change-Id: I0236f4a980d01765eb993f41d54d98640bb2cd39
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2019-01-11 18:18:48 +00:00
Neale Ranns
6ad7231c00 VOM: IP route ECMP support
Change-Id: Iede0c30aacfe7289f428062bb9540410097c40e2
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-10 21:01:43 +00:00
Neale Ranns
45db885a6a ARP/ND: copy opaque2 persistent fields to new packet
Change-Id: Ic65f686aaccaf8450732d88d7471b587faccaa9d
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-10 13:29:33 +00:00
juraj.linkes
e33cab3907 Enable random reassembly test for ARM
The underlying failure has been fixed and now the test can be
re-enabled.

Change-Id: I75251f6150ef1771dc23ea079799229690cf87d9
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2019-01-10 11:15:08 +00:00
juraj.linkes
23c9a2e5d1 Enable GBP tests for ARM
The underlying failure has been fixed.

Change-Id: If2ca92a17cfed1c2d7253e46ab161f301f847f29
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2019-01-10 09:02:26 +00:00
Paul Vinciguerra
f0769631f4 test/vpp_papi_provider.py: Fix simple copy/paste error.
Change-Id: I8993132bdd0931c96ba8bc879ec3b4ae938a46c5
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-01-09 06:12:24 +00:00
Paul Vinciguerra
8aeb2207f9 test framework. Remove unused code.
Change-Id: I1bd14d5aff4918b58aef18fa0a9264e033989f6e
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-01-09 06:10:59 +00:00
Neale Ranns
7c03ed47d5 VOM: mroutes
- fixes in ip.api for dumping mroute path flags

Change-Id: I13b0cfb15d374250ed71bd4e13dda9b798c18204
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-07 21:56:08 +00:00
Paul Vinciguerra
3c6f1045e2 VPP-1508: Python3: Support simultaneous p2/p3 venvs.
Change-Id: I24cf3e390f6f0b98be939ef717048742d3f183d6
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-01-05 10:33:33 +00:00
Florin Coras
4a7cbcd06b Revert "add ipsecmb plugin"
This reverts commit be16020c5034bc69df25a8ecd7081aec9898d93c.

The arm verify job actually failed but the result was overwritten by an x86 ubuntu retry. 

Change-Id: Idcae7691fc575053563b8ff8bcad661c15891668
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-02 18:50:37 +00:00
Klement Sekera
be16020c50 add ipsecmb plugin
Change-Id: I99c0737dfeeec2db267773625ddc9b55324fd237
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-01-02 12:21:02 +00:00
Florin Coras
b0f662fe93 vcl/ldp: add write msg function and fine tuning
Allows app to push data. Additionally, ensure reset/close replies are
not sent unless vcl closes the session.

Change-Id: Icbbf933cf57b55cfbcc7b802af0f83919a066f65
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-01-01 14:55:53 +00:00
Neale Ranns
1c17e2ecac GBP: add allowed ethertypes to contracts
Change-Id: I74782d3b9b71a071bb500c34866a017b8ee15767
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-21 18:12:25 +00:00
Jon Loeliger
fc7344f9be MAP: Convert from DPO to input feature.
Change-Id: I25c86aea23dff19656449b23133db27b1f062ac0
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-21 17:06:40 +00:00
Ole Troan
a45dc07c15 Revert "tests: Rework vpp config generation."
This reverts commit 919efad2671993d4c6d5a0dba8eeb99d5c60edf1.

Change-Id: I5ec4fa08a03f508dac684dc1ddbd7e6b85c49b97
Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-21 16:14:15 +00:00
Paul Vinciguerra
087c811b63 Python Tests: Make VppTestCase unit testable.
* This allows for VppTestCase to instantiated with an empty constructor.

Change-Id: Ib71d3bfb4529e113f9b73c39de9b95f12ee9cfb4
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-12-21 07:50:30 +00:00
Paul Vinciguerra
919efad267 tests: Rework vpp config generation.
* Allows test cases to configure the VPP runtime config
  during fixture setup.

* Sample use in a TestCase:
    @classmethod
    def setUpConstants(cls):
        tempdir = cls.tempdir
        cls.config.add('punt', 'socket', '%s/socket_punt' % cls.tempdir)
        super(TestPuntSocket, cls).setUpConstants()
        # enable/disabe a plugin via:
        #cls.config.add_plugin('dpdk_plugin.so', 'disable')

* Supports the following config stanzas:
	'unix',
        'acl-plugin'
        'api-queue'
        'api-trace'
        'api-segment'
        'cj'
        'cpu'
        'dns'
        'dpdk
        # currently don't support dynamic keys
        # 'heapsize'
        'l2learn'
        'l2tp'
        'mactime'
        'mc'
        'nat'
        'oam'
        'plugins'
        'punt'
        'session'
        'socksvr'
        'statseg'
        'tapcli'
        'tcp'
        'tuntap'
        'vhost-user'

Change-Id: I44f276487267d26eaa46f87e730bdd861003b234
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-12-21 07:49:37 +00:00
Neale Ranns
00a469d969 GBP: test case hardening against timing races
Change-Id: I3b5d369a37233c7bb2113ce31479371c610977ef
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-20 22:47:05 +00:00
Matus Fabian
fd0d50879f NAT: total users and sessions gauges (VPP-1484)
Change-Id: I41a82e21571d5c64d01af72cd88c3983afac26ed
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-12-20 15:12:11 +00:00
Neale Ranns
775f73c6ba FIB: encode the label stack in the FIB path during table dump
Change-Id: I28e8a99b980ad343a4209e673201791b91ceab4e
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-20 15:00:30 +00:00
Paul Vinciguerra
a3aaa61e2f test/vpp_ip.py: Correct usage of 'is'
* Correct 'is' (identity) usage where equality is needed '=='.
  * Change raise 'Exception' to log message and return NotImplemented.
    (see: https://docs.python.org/3/library/constants.html#NotImplemented)
  * Remove duplicate property: bytes.
  * Remove duplicate method: __eq__.

Change-Id: Id3ae4f92f985eb7cef334e2679f19ecc971007c1
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-12-20 12:44:59 +00:00
Paul Vinciguerra
852f5ef9cf VPP-1508 python3 tests: raw_input
'raw_input' does not exist in python3.

Change-Id: I95d916db2834fab83e5e791f35103a4513e610b8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-12-20 12:44:26 +00:00
Paul Vinciguerra
defde0f870 Tests: Cleanup @skip decorator.
The runnning environment is static as of module load time,
so only evalute the conditions once at module load time.

Track-by: VPP-1518

Change-Id: I73b0d17ae1ff90789e70307f168d43921829aec8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-12-20 12:43:38 +00:00
Klement Sekera
d0f70a346d reassembly: replace asserts with error counters
Change-Id: Iaa39aea990bc04147f6a049215e990a567d30106
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-12-20 09:22:55 +00:00
Paul Vinciguerra
65eb77231c VPP-1508: Have test/Makefile honor PYTHON= envvar.
Change-Id: Iff71a5982b73c97e3f546beb1cf52935a267f5f5
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-12-18 20:33:14 +00:00
Matus Fabian
b686508c4e NAT44: nat44_add_del_lb_static_mapping enhancements (VPP-1514)
Change-Id: I5419e06592b0402e911e132796368800321f355a
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-12-18 13:36:39 +00:00
Ole Troan
003d5da298 VAPI/VOM: Removing legacy stats tests, add string type.
Fix misc VAPI/VOM generation and test cases.

Change-Id: I1abf9ecdb6f8a2129f11e0a9ed1c0fe04cdf5c47
Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-18 13:30:40 +00:00
Ole Troan
8006c6aa42 PAPI: Add MACAddress object wrapper for vl_api_mac_address_t
Change the definition of vl_api_mac_address_t to an aliased type.

Change-Id: I1434f316d0fad6a099592f39bceeb8faeaf1d134
Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-18 11:54:24 +00:00
Pavel Kotucek
9edb83a37c punt: additional tests for multi clients
Change-Id: I0e25c23fc7b44b465f1b0d05a881fbe9816a0264
Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
2018-12-18 08:52:52 +00:00
Klement Sekera
b6d92d811c make test: add option for adding extra vpp config
Change-Id: Ief316756635794dadf2f0f4190aa20745df5e53c
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-12-17 14:31:00 +01:00
Paul Vinciguerra
4eed7474f4 Fix TestIPv4FibCrud interdependencies.
The tests fail if run independently or out of order.
This change breaks the dependency between the tests.

ERROR: Add 1k routes
------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/vpp/test/test_ip4.py", line 514, in test_3_add_new_routes
    self.deleted_routes.remove(x)
ValueError: list.remove(x): x not in list

Change-Id: I344ceba6bd8b86556f92e50080be6c43092b9faf
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-12-17 10:14:12 +00:00
Klement Sekera
4ee633e84a VPP-1523: harden reassembly
Change-Id: I00d7b38bd99e81e3921ce08cce50d613f11de36e
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-12-16 01:01:12 +00:00
Neale Ranns
ae8098350c IP6-MFIB: replace the radix tree with bihash (VPP-1526)
Change-Id: I7a48890c075826fbd8c75436dfdc5ffff230a693
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-16 01:00:32 +00:00
Matus Fabian
a5e73762d5 NAT: counters (VPP-1484)
Change-Id: I5d1852a09712adfe7547c200d161539736aca6f5
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-12-14 19:47:37 +00:00
juraj.linkes
2eca70db95 Fix test results
In a rare case a failure can occur in a VppTestCase which hasn't been
part of the original TestSuite, such as in memif testcases. Fix the
reporting after test run in these cases.

Change-Id: Ib2a34fc195179605c22b95bd0e2c7cebca17012f
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-12-14 19:46:42 +00:00
Klement Sekera
400f6d8c1b reassembly: fix internal buffer count accounting
Change-Id: I6af2c8552aeafe0abc8b8c3e5af1a05640e95919
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-12-13 14:42:50 +00:00
Klement Sekera
14d7e90788 VPP-1522: harden reassembly code
Change-Id: Ib5a20bff7d8a340ecf50bcd4a023d6bf36382ba3
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-12-13 14:42:50 +00:00
Paul Vinciguerra
1314ec6170 test/hook.py. Add human-friendly annotations to log msgs.
*  Add human-friendly annotations to packed data values in
   the logs.

Examples:
vpp-unittest-TestNAT66-_JdbMS/log.txt:22:31:29,152 API: ip_neighbor_add_del (is_static=0, is_no_adj_fib=0, is_add=1, sw_if_index=2, dst_address='\xfd\x01\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02 (fd01:2::2)', mac_address='\x02\x02\x00\x00\xff\x02 (02:02:00:00:ff:02)', is_ipv6=1)

vpp-unittest-TestACL_dot1ad_bridged-xEdhrj/log.txt:22:31:17,130 API: ip_neighbor_add_del (is_static=0, is_no_adj_fib=0, is_add=1, sw_if_index=5, dst_address='\xfd\x01\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc9 (fd01:5::c9)', mac_address='\x02\x05\xc9\x00\xff\xc9 (02:05:c9:00:ff:c9)', is_ipv6=1)
vpp-unittest-TestACL_dot1ad_bridged-xEdhrj/log.txt:22:31:17,240 API: sw_interface_add_del_address (address_length=24, del_all=0, is_add=1, sw_if_index=6, address='\xac\x10\x06\x01 (172.16.6.1)', is_ipv6=0)
vpp-unittest-TestACL_dot1ad_bridged-xEdhrj/log.txt:22:31:17,314 API: sw_interface_add_del_address (address_length=64, del_all=0, is_add=1, sw_if_index=6, address='\xfd\x01\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01 (fd01:6::1)', is_ipv6=1)

Change-Id: Id6991569ee0ff853f76fae8fac941e8a26468a19
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-12-13 14:32:10 +00:00
Ole Troan
413f4a5b21 API: Use string type instead of u8.
The new string type is modelled after string in proto3.
It is always variable length.

Change-Id: I64884067e28a80072c8dac31b7c7c82d6e306051
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-13 12:11:50 +00:00
Mohsin Kazmi
51edc3ab01 vom: Add support for new stats
This patch deprecates old stats and adds support for
new stats.

This implements the PULL design where client will enable
stats on objects (i.e. interfaces, etc), register a call
back function which will run once stats will be ready for
enabled object and call HW::read_stats() periodically to
read stats for enabled objects from VPP.

Change-Id: I32525a417427be87408d01f8bc93a731602ff690
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-12-13 07:46:02 +00:00
Neale Ranns
cf3ecb1a42 VOM: vxlan-tunnel takes egress interface for multicast
Change-Id: I23b44d883fbd7919bf55b96b180f97837fd6dae9
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-12 12:05:49 +00:00
Lijian.Zhang
ca7f53a171 Fix CDP failure in make test
Once the hostname is longer than 15 bytes,
the name of device in the output of show cdp command will be truncated,
and CDP test case will fail with below message.

==============================================================================
FAIL: test_send_cdp_packet (test_cdp.TestCDP)
------------------------------------------------------------------------------
Traceback (most recent call last):
File "vpp/test/test_cdp.py", line 92, in test_send_cdp_packet
    "CDP received invalid device id")
File "vpp/test/framework.py", line 804, in assert_equal
    self.assertEqual(real_value, expected_value, msg)
AssertionError: Invalid CDP received invalid device id: net-x86-supermi does not match expected value net-x86-supermicro-02

Change-Id: Ia32b92c6cd1bb6070adcee3ec45e38399ec382a7
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
2018-12-12 00:35:27 +00:00
Ole Troan
0bcad32b38 PAPI: Allow ipaddress object as argument and return values from API calls
The API calls that use any of vl_api_address_t, vl_api_ip4_address,
vl_api_ip6_address_t, vl_api_prefix_t, vl_api_ip4_prefix_t,
vl_api_ip6_prefix_t now accepts either the old style dictionary,
a text string (2001:db8::/32) or an ipaddress ojbect.

Unless it is called with '_no_type_conversion':True, it will
also return an appropriate ipaddress object.

Change-Id: I84e4a1577bd57f6b5ae725f316a523988b6a955b
Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-12 00:34:43 +00:00
juraj.linkes
185e6490ee Fix typo in sanity test description
Change-Id: Icd575b8ed62c340c57857ff6576f65557434f3e0
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-12-11 12:55:41 +00:00