1254 Commits

Author SHA1 Message Date
Paul Vinciguerra
48bdbcd8f9 tests: fix worker thread initialization
from threading.thread __init__:

    This constructor should always be called with keyword arguments.

    If a subclass overrides the constructor, it must make sure to invoke
    the base class constructor (Thread.__init__()) before doing anything
    else to the thread.

Type: test
Change-Id: Ifa89202e97053a4baf19e9a0ca0913430d5087a3
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-01-14 19:33:23 +00:00
Andrew Yourtchenko
f63bf6a7d7 tests: disable the tap test for the time being
TAP tests require root access, which breaks
the testing in unprivileged scenario.
Disable the test until we find consensus on how
to deal with it.

Type: test
Change-Id: I66ee2b130723233682d858cad0b6e424ab0b2383
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2020-01-13 14:55:07 +00:00
Neale Ranns
f3a6622c73 ipsec: AH copy destination and source address from template
Type: fix

Change-Id: I63d4df68eed6589763b5ce62bcd7f3fd867c60e1
Signed-off-by: Neale Ranns <nranns@cisco.com>
2020-01-04 04:51:05 +00:00
Neale Ranns
02950406c4 ipsec: Targeted unit testing
Type: fix

1 - big packets; chained buffers and those without enoguh space to add
ESP header
2 - IPv6 extension headers in packets that are encrypted/decrypted
3 - Interface protection with SAs that have null algorithms

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Ie330861fb06a9b248d9dcd5c730e21326ac8e973
2020-01-04 04:50:47 +00:00
Dave Barach
4ed2598562 tests: configure 32 mb physmem
Absolutely nothing good happens when we force the kernel to briefly
map and then unmap 16gb as vpp starts. Effect exacerbated when
TEST_JOBS = 20...40, and so forth.

Type: test

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Id8e3ce1763cad3a0891d5d6c8d2c1e3e610682d7
2020-01-02 16:29:19 +00:00
Paul Vinciguerra
7ade2f51ad tests: bfd - move test_poll_response to EXTENDED_TESTS
test_bfd.BFD4TestCase.test_poll_response providing
  inconsistent results is the per-patch tests.

Type: test

Change-Id: I8f1864511526fd330a7da1abfa19be3f565c683a
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-01-02 12:49:27 +00:00
Neale Ranns
fca3c6a3aa ip-neighbor: set link-type ARP on incomplete adjacencies
Type: fix

Change-Id: I05d74da311d6a86ec4eb3df50d53ecaa9c622f50
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-12-31 03:49:56 +00:00
Paul Vinciguerra
a42c6ee973 tests: test_mpls_v6_ebgp_pic - don't write to stdout
Type: test

Change-Id: I2cccc68b1b4b6c576580ae0eb5d4511ca2f4663d
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-12-27 00:17:01 -05:00
Paul Vinciguerra
3f7b0f4a7c tests: tls - don't print skip info to stdout
Type: test

Change-Id: Id1bffbfe698113d85c4c6bf432ddf4908ed2b788
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-12-26 19:13:02 -05:00
Dave Barach
29c6132108 classify: "classify filter ..." debug CLI cleanup
The pcap trace filter initial table index lives in
cm->filter_set_by_sw_if_index [0], which corresponds to the "local0"
interface. Debug cli makes sure that folks don't accidentally specify
the "local0" interface. At least it does now...

Fix the "vlib format.c code coverage" test in test/test_vlib.py.

Type: fix
Change-Id: I35320bc2c8f0c6f1f8c12e3529d1938548185151
Signed-off-by: Dave Barach <dave@barachs.net>
2019-12-25 13:01:48 +00:00
Paul Vinciguerra
de35cdb778 tests: fix skip logic on test_tap
log.txt message:
17:52:59,969 API call failed, expected 0 return value instead of -13 in tap_create_v2_reply(_0=58, context=77019, retval=-13, sw_if_index=4294967295)

Test was failing with log message:
  tap: tap0: tap_create_if: ioctl(TUNSETIFF): Operation not permitted

Type: test
Change-Id: I5bcd9d2b0c870ea5eef92b79314b97821399722f
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-12-24 12:49:55 +00:00
Neale Ranns
4a56f4e48f ipsec: Test and fix IPSec worker hand-off
Type: fix

Change-Id: I5cb9a3845ddbc5f4de4eb4e9c481f606fe5cec9a
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-12-23 21:39:23 +00:00
Paul Vinciguerra
548d5ee733 tests: TestL2bdMultiInst - break serial dependency on tests
enable the tests to run out of order/enable running an individual test.
  Before:
  [gw1] [ 20%] FAILED test/test_l2bd_multi_instance.py::TestL2bdMultiInst::test_l2bd_inst_02
  [gw0] [ 40%] PASSED test/test_l2bd_multi_instance.py::TestL2bdMultiInst::test_l2bd_inst_01
  [gw1] [ 60%] PASSED test/test_l2bd_multi_instance.py::TestL2bdMultiInst::test_l2bd_inst_04
  [gw0] [ 80%] FAILED test/test_l2bd_multi_instance.py::TestL2bdMultiInst::test_l2bd_inst_03
  [gw1] [100%] SKIPPED test/test_l2bd_multi_instance.py::TestL2bdMultiInst::test_l2bd_inst_05
  -------
  After:
  [gw1] [ 20%] PASSED test/test_l2bd_multi_instance.py::TestL2bdMultiInst::test_l2bd_inst_02
  [gw0] [ 40%] PASSED test/test_l2bd_multi_instance.py::TestL2bdMultiInst::test_l2bd_inst_01
  [gw1] [ 60%] PASSED test/test_l2bd_multi_instance.py::TestL2bdMultiInst::test_l2bd_inst_04
  [gw0] [ 80%] PASSED test/test_l2bd_multi_instance.py::TestL2bdMultiInst::test_l2bd_inst_03
  [gw1] [100%] PASSED test/test_l2bd_multi_instance.py::TestL2bdMultiInst::test_l2bd_inst_05

Type: test

Change-Id: Ie40eb310f5fccacf854c364aa017891bce9b9372
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-12-23 07:33:12 +00:00
Paul Vinciguerra
c701e57182 tests: don't prompt to launch gdb for sanity test case
Type: test

Change-Id: I4c54121b76b341381a819cee928c3c2455a83503
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-12-20 04:09:09 +00:00
Paul Vinciguerra
e090f4dbf5 papi: lazily initialize stats client
remove wait-loop on stats socket from test framework.

Type: refactor

Change-Id: I5bb95a7c597707a87f9d9a471215c4b4af1a2280
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-12-19 15:48:21 +00:00
Neale Ranns
4c16d80067 gre: multipoint ingress lookup fix
Type: fix

Change-Id: I170edd62220a63cb19efea3032e173fb87730b1b
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-12-19 15:17:40 +00:00
Paul Vinciguerra
64e9d28d37 build tests: fail test run if we can't patch scapy
Type: fix

Change-Id: I694e44f449863b3edbbc8b6095e94f770dc20330
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-12-18 23:10:19 +00:00
Paul Vinciguerra
53131d2a26 tests: fix cdp patch for scapy 2.4.3
Type: test
Fixes: 5d4b8912d2fe186b4fb920a72b3a2f7b556f4e7d

Change-Id: Ib64ae00eba41b2b6afc728142cbccc02d07f4997
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-12-18 20:42:36 +00:00
Neale Ranns
568acbb7c9 ipsec: Fix decap of IPSEC/GRE in transport mode
Type: fix

in transport mode the header sequence is:
  MAC - IP (tun) - ESP - GRE - L2
so popping the GRE header is done in the ESP decrypt node.

Change-Id: Ia125eb65b9300368617d2bffca09683851e43be0
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-12-18 05:54:40 +00:00
Paul Vinciguerra
6461b7a319 tests: fix import from change to scapy 2.4.3
Type: test
Fixes: 8d27fa73f22803d518993090804724f76350cfcc

Change-Id: I4656a9769011ed2399c1799f6f17520e44f375c7
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-12-17 23:46:48 +00:00
Benoît Ganne
8d27fa73f2 classify: add complex encap packet tracing test
Type: test

Change-Id: I392975c00d7dae86dacedf7559aafa431e71cb14
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-12-17 17:58:05 +00:00
Neale Ranns
e11dce20c9 nhrp: mGREv6
Type: test

Change-Id: I7d0496c37e06d3b6eee325a262e5398860282b63
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-12-17 17:52:28 +00:00
Neale Ranns
cbe25aab3b ip: Protocol Independent IP Neighbors
Type: feature

 - ip-neighbour: generic neighbour handling; APIs, DBs, event handling,
aging
 - arp: ARP protocol implementation
 - ip6-nd; IPv6 neighbor discovery implementation; separate ND,
MLD, RA
 - ip6-link; manage link-local addresses
 - l2-arp-term; events separated from IP neighbours, since they are not
the same.

vnet retains just enough education to perform ND/ARP packet
construction.
arp and ip6-nd to be moved to plugins soon.

Change-Id: I88dedd0006b299344f4c7024a0aa5baa6b9a8bbe
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-12-17 10:56:20 +00:00
Neale Ranns
3fd9904743 fib: Glean on NBMA interface points to drop
Type: fix

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Iaae7a9e120bbf8168c581b06d3ac0e124b32e0e7
2019-12-17 00:17:19 +00:00
snaramre
5d4b8912d2 tests: changes for scapy 2.4.3 migration
Type: fix
Change-Id: I7e041b666dabd90df23a920a1f1d99db4c10ddfe
Signed-off-by: snaramre <snaramre@cisco.com>
2019-12-14 22:14:12 +00:00
Jakub Grajciar
5d4c99f27e devices: vhost API cleanup
Use consistent API types.

Type: fix

Change-Id: I2dec594cb834a45004edc9ca58ad7c7b4bd7ff06
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-12-11 15:23:55 +00:00
Jakub Grajciar
5de4fb7076 devices: tap API cleanup
Use consistent API types.

Type: fix

Change-Id: I11cc7f6347b7a60e5fd41e54f0c7994e2d81199f
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-12-11 09:39:42 +00:00
Dave Barach
6b3f25caff vlib: improve test coverage
Add tests.
Remove unused rule-based parser code.

Type: test

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I3ca3a9dd9da8ee8f3a47004c98f2f5644db10057
2019-12-09 21:19:47 +00:00
Ole Troan
55636cb623 gtpu: use explicit types in api
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I16fcbd5e63526dbf062a3032701479324fe2a4f5
2019-12-09 12:43:47 +00:00
Ole Troan
04338e85ae pppoe: use explicit types in api
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ifd1e1907740e55420dc040eb2afbbbf9887aea3c
2019-12-07 11:18:58 +00:00
Paul Vinciguerra
61e3ade843 tests: move bfd over gre to extended tests
This test should be fixed or removed.
EXTENDED_TESTS should not become "BROKEN_TESTS"

Type: test

Change-Id: Id998f0d3b7bd31100f917d076fbd7ddb46d99ed2
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-12-05 21:20:15 +00:00
Dave Barach
87d24db65f classify: vpp packet tracer support
Configure n-tuple classifier filters which apply to the vpp packet
tracer.

Update the documentation to reflect the new feature.

Add a test vector.

Type: feature

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Iefa911716c670fc12e4825b937b62044433fec36
2019-12-05 15:31:57 +00:00
Klement Sekera
66cea092c7 tests: fix wrong checksum error message
This change fixes the error message, which would previously report
mismatch on IPv6 layer instead of TCP layer.

Type: fix

Change-Id: Ie78779685362a420d155f928b3cdb341bc3fb8bc
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-12-05 14:57:20 +00:00
Ole Troan
fd574087e4 papi: add call stats
Type: feature
Change-Id: Ic6d44122d3e62e09402e3f1946f7e57e9b5e7c5f
Signed-off-by: Ole Troan <ot@cisco.com>
2019-12-05 14:56:23 +00:00
Paul Vinciguerra
8b2fffd93f tests: Revert "Python Tests: Make VppTestCase unit testable."
Type: test
This reverts commit 087c811b63aa6b0575149749e188bb37e7fb0513.

Change-Id: Ica12597f27d5a75c33c12c2d27a227dc4866adcb
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-12-05 14:55:55 +00:00
Ole Troan
0c6293230d tests: add test run time.
Type: feature
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Id7b30b5fe63e68ae88f3a42aa77d2614ccda724d
2019-12-05 13:26:01 +00:00
Dave Wallace
e89bfe33ab build: fix vom_test dependency on EXTENDED_TESTS
- Note: This was not caught by CI because the VPP 'make verify'
  target always build libvom.so

Type: fix
Fixes: f0797d130

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I8663e317e4e793c386b09d1cb887133de1e43faf
2019-12-05 01:23:54 +00:00
Paul Vinciguerra
1043fd38d8 tests: fix exception handling around vapi.connect()/.disconnect()
vapi.connect() only raises subclasses of vpp_papi.VPPIOError.
vapi.disconnect() doesn't raise any exceptions, removed uneeded try block.

Type: test

Change-Id: Ide6e6db298b205f14382065862e358757619a5ba
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-12-04 23:17:37 +00:00
Paul Vinciguerra
207083f595 tests: add interface function chaining
Type: test

Change-Id: I24e740aa87a8a4061fa98740f2d636997e18f08d
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-12-04 23:16:44 +00:00
Neale Ranns
3bab8f9c53 fib: Decouple source from priority and behaviour
Type: feature

the fib_source_t enum alone no longer defines the priority and
behaviour, instead each source must be allocated these attributes.
This allows the creation of other sources by the plugins (and
soon over the API).

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I890ee820fbc16079ee417ea1fbc163192806e853
2019-12-04 22:47:12 +00:00
Neale Ranns
5f8f617332 gre: Multi-point interfaces
Type: feature

Change-Id: I0129ad6ace44a50a8a3b26db8e445cd06b2b49e8
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-12-04 22:45:11 +00:00
Dave Wallace
f0797d130f build: fix make test with distributed src
This patch addresses the functionality that is
missing for distributed make test source files.
In addition it extends the concept of colocating
test source code with functional source code
(eg. src/vcl/test). It also cleans up deficiencies
in the make test makefiles.

NOTE: Due to the way sphinx document tools work,
all test, all of the make test python code is
gathered using soft links into the directory:
.../build-root/build-test/src

Change summary:
- Remove 'make test' help details from
  main makefile help output to reduce clutter
  and redundant help output
- Move all generated build output to
  .../build-root/build-test
- Move test_vcl.py as first usecase for
  distributed core feature make test code
- Add test-wipe-all target and fix wipe targets
  to remove all generated files
- Fix 'make test-doc' to generate module
  documentation for all source files
- Remove unused targets in test/doc/Makefile
- Fix 'make test-shell'
- Fix test/ext Makefile to not generate
  bogus output

Type: fix
Fixes: a43c93f8554ad7418e31be3791b3fb71232f60ac

Change-Id: Icc2ddb81d474081c3ede4548ecd7a0624651f62d
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-12-04 20:20:13 +00:00
Neale Ranns
9534696b46 ipip: Tunnel flags controlling copying data to/from payload/encap
Type: feature

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I9467f11775936754406892b8e9e275f989ac9b30
2019-12-03 19:36:26 +00:00
Jakub Grajciar
692bfc85f2 classify: API cleanup
Use consistent API types.

Type: fix

Change-Id: Ib5b1efa76f0a9cecc0bc146f8f8a47c2442fc1db
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-12-03 14:53:47 +00:00
Paul Vinciguerra
e2ccdf0316 papi: add a per-call _timeout option
add the ability to override the default timeout value on a per-call
 basis.
 Use:
   rv = self.vapi.papi.cli_inband(cmd='wait 10', _timeout=15)

Type: feature

Change-Id: Ia90a58586a1f63e02118599a2a4b7141e5a0b90d
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-12-03 09:28:18 +00:00
Paul Vinciguerra
5d440d9cb6 tests: vpp_interface fix ip6 setter
Type: fix
Fixes: efd7bc2b1c8db160933ed3e9ab3cde0d07aaf863

Change-Id: I254f9fe44189f88621b9b0ff3f869efb9966ada5
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-12-03 06:51:16 +00:00
Neale Ranns
abde62fb83 tests: GRE over IPSec unit tests
Type: test

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I4ae1b56f273026aca86775fb61feabcdeb62c62e
2019-12-02 23:33:42 +00:00
Paul Vinciguerra
5ef9ca6c0d tests: raise exception in vpp_interface for invalid sw_if_index
Type: test

Change-Id: I34058f2bd20f61a8f8355299a8df95f2948c25eb
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-12-02 21:40:31 +00:00
snaramre
73aff479bd tests: BFD python3 changes
Type: fix
Change-Id: Ie441e81fe3971d70f96196c79d74658f910b4875
Signed-off-by: snaramre <snaramre@cisco.com>
2019-12-02 17:38:23 +00:00
Paul Vinciguerra
bfd7d294d0 vlib: add 'wait' cli command
When running exec scripts, there can be a need to wait between statements.

Type: feature

Change-Id: I2a45b390697e09fc222358c9354f28e3368a06ba
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-11-27 17:00:12 +00:00