aboutsummaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2019-01-21VTL: Add **kwargs to VppTestRunner constructor.Paul Vinciguerra1-2/+2
Subclasses should accept **kwargs to ensure compatibility as the interface changes. https://github.com/python/cpython/blob/master/Lib/unittest/runner.py#L133 Change-Id: Ia64ffd88899d207a5422f066700d2f7f9c77622e Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-01-18VTL: Fix sphinx doc generation.Paul Vinciguerra3-18/+8
Remove unnecessary envvar magic for sphinx builds. Just provide the proper mock objects. Change-Id: I151513eb47d2f71cf221651145dbcdc153448772 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-01-18VTL: Use latest version of syslog_rfc5424_parser (0.2.0) released: 190117Paul Vinciguerra1-3/+1
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>
2019-01-18VTL: Don't swallow exceptions from syslog_rfc5424_parserPaul Vinciguerra2-11/+18
Change-Id: I4e93073ceb7b75476e847ae8d56301770c8b264f Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-01-17VTL: Move doc generation and linting to python3.Paul Vinciguerra1-5/+6
* running linting/pycodestyle under python3 provides the additional benefit of access to the python3 AST. Change-Id: I659dbd2733471285867be95eec078f7415aa0bcd Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-01-16make test: raise packet tracing limit to 1000Klement Sekera1-2/+2
Change-Id: I4309cefe13ee861342e7962c7652919a47748656 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-01-14VTL: vpp_papi_provider: Don't shortcircuit vpp_papi jasonfile detection.Paul Vinciguerra1-5/+5
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-14VTL: Allow running simple unittest.TestCases.Paul Vinciguerra3-14/+18
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-14VTL: New version of pyparsing breaks tests.Paul Vinciguerra1-0/+2
Specify use of version <2.3.1 released Jan 13, 2019 Change-Id: I23cfb802a677956b77897e0c2b690fac50e18541 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-01-13bonding: support custom interface IDsAlexander Chernavin1-2/+5
Change-Id: I78fe58144fa3ba2e1c7135897a13a2541f235c91 Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2019-01-11Fix interactive testsjuraj.linkes1-2/+4
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-10VOM: IP route ECMP supportNeale Ranns1-9/+29
Change-Id: Iede0c30aacfe7289f428062bb9540410097c40e2 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-10ARP/ND: copy opaque2 persistent fields to new packetNeale Ranns1-2/+3
Change-Id: Ic65f686aaccaf8450732d88d7471b587faccaa9d Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-10Enable random reassembly test for ARMjuraj.linkes1-4/+1
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-10Enable GBP tests for ARMjuraj.linkes1-6/+1
The underlying failure has been fixed. Change-Id: If2ca92a17cfed1c2d7253e46ab161f301f847f29 Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2019-01-09test/vpp_papi_provider.py: Fix simple copy/paste error.Paul Vinciguerra1-1/+0
Change-Id: I8993132bdd0931c96ba8bc879ec3b4ae938a46c5 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-01-09test framework. Remove unused code.Paul Vinciguerra1-14/+3
Change-Id: I1bd14d5aff4918b58aef18fa0a9264e033989f6e Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-01-07VOM: mroutesNeale Ranns1-0/+41
- fixes in ip.api for dumping mroute path flags Change-Id: I13b0cfb15d374250ed71bd4e13dda9b798c18204 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-05VPP-1508: Python3: Support simultaneous p2/p3 venvs.Paul Vinciguerra1-1/+1
Change-Id: I24cf3e390f6f0b98be939ef717048742d3f183d6 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-01-02Revert "add ipsecmb plugin"Florin Coras4-81/+2
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-02add ipsecmb pluginKlement Sekera4-2/+81
Change-Id: I99c0737dfeeec2db267773625ddc9b55324fd237 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-01-01vcl/ldp: add write msg function and fine tuningFlorin Coras1-3/+3
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>
2018-12-21GBP: add allowed ethertypes to contractsNeale Ranns2-36/+61
Change-Id: I74782d3b9b71a071bb500c34866a017b8ee15767 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-21MAP: Convert from DPO to input feature.Jon Loeliger3-13/+109
Change-Id: I25c86aea23dff19656449b23133db27b1f062ac0 Signed-off-by: Jon Loeliger <jdl@netgate.com> Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-21Revert "tests: Rework vpp config generation."Ole Troan3-258/+29
This reverts commit 919efad2671993d4c6d5a0dba8eeb99d5c60edf1. Change-Id: I5ec4fa08a03f508dac684dc1ddbd7e6b85c49b97 Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-21Python Tests: Make VppTestCase unit testable.Paul Vinciguerra1-0/+5
* This allows for VppTestCase to instantiated with an empty constructor. Change-Id: Ib71d3bfb4529e113f9b73c39de9b95f12ee9cfb4 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-12-21tests: Rework vpp config generation.Paul Vinciguerra3-29/+258
* 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-20GBP: test case hardening against timing racesNeale Ranns1-13/+12
Change-Id: I3b5d369a37233c7bb2113ce31479371c610977ef Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-20NAT: total users and sessions gauges (VPP-1484)Matus Fabian1-0/+33
Change-Id: I41a82e21571d5c64d01af72cd88c3983afac26ed Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-12-20FIB: encode the label stack in the FIB path during table dumpNeale Ranns2-9/+59
Change-Id: I28e8a99b980ad343a4209e673201791b91ceab4e Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-20test/vpp_ip.py: Correct usage of 'is'Paul Vinciguerra1-32/+28
* 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-20VPP-1508 python3 tests: raw_inputPaul Vinciguerra1-3/+9
'raw_input' does not exist in python3. Change-Id: I95d916db2834fab83e5e791f35103a4513e610b8 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-12-20Tests: Cleanup @skip decorator.Paul Vinciguerra16-81/+89
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-20reassembly: replace asserts with error countersKlement Sekera1-2/+3
Change-Id: Iaa39aea990bc04147f6a049215e990a567d30106 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-12-18VPP-1508: Have test/Makefile honor PYTHON= envvar.Paul Vinciguerra1-8/+8
Change-Id: Iff71a5982b73c97e3f546beb1cf52935a267f5f5 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-12-18NAT44: nat44_add_del_lb_static_mapping enhancements (VPP-1514)Matus Fabian2-0/+93
Change-Id: I5419e06592b0402e911e132796368800321f355a Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-12-18VAPI/VOM: Removing legacy stats tests, add string type.Ole Troan3-349/+17
Fix misc VAPI/VOM generation and test cases. Change-Id: I1abf9ecdb6f8a2129f11e0a9ed1c0fe04cdf5c47 Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-18PAPI: Add MACAddress object wrapper for vl_api_mac_address_tOle Troan17-168/+108
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-18punt: additional tests for multi clientsPavel Kotucek1-91/+408
Change-Id: I0e25c23fc7b44b465f1b0d05a881fbe9816a0264 Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
2018-12-17make test: add option for adding extra vpp configKlement Sekera1-1/+2
Change-Id: Ief316756635794dadf2f0f4190aa20745df5e53c Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-12-17Fix TestIPv4FibCrud interdependencies.Paul Vinciguerra1-0/+14
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-16VPP-1523: harden reassemblyKlement Sekera1-2/+42
Change-Id: I00d7b38bd99e81e3921ce08cce50d613f11de36e Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-12-16IP6-MFIB: replace the radix tree with bihash (VPP-1526)Neale Ranns2-21/+44
Change-Id: I7a48890c075826fbd8c75436dfdc5ffff230a693 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-14NAT: counters (VPP-1484)Matus Fabian1-1/+115
Change-Id: I5d1852a09712adfe7547c200d161539736aca6f5 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-12-14Fix test resultsjuraj.linkes1-19/+23
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-13reassembly: fix internal buffer count accountingKlement Sekera1-0/+31
Change-Id: I6af2c8552aeafe0abc8b8c3e5af1a05640e95919 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-12-13VPP-1522: harden reassembly codeKlement Sekera3-19/+45
Change-Id: Ib5a20bff7d8a340ecf50bcd4a023d6bf36382ba3 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-12-13test/hook.py. Add human-friendly annotations to log msgs.Paul Vinciguerra1-3/+19
* 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-13API: Use string type instead of u8.Ole Troan2-3/+3
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-13vom: Add support for new statsMohsin Kazmi1-1/+1
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>