summaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2021-05-20tests: don't buffer worker stdin/stdoutDave Wallace1-2/+3
- Required to get VCLAppWorker stdin / stdout data into log.txt when a test fails. Type: test Change-Id: I4db467986940f701750aec6d842a4d9aee22b4e6 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2021-05-18tls: fix dtls with no workersFlorin Coras1-2/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iecc33fda7f28c037289775ffe0525a50f89a2b8c
2021-05-18nat: refactor multiple vrf testsKlement Sekera1-25/+120
Replace VRF test testing multiple scenarios into more simpler tests to improve readability and ease of debugging. Type: refactor Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: Ibaad5328c73b401f52c5fe513dc0ed68ff3e3374
2021-05-13tests: move test source to vpp/testDave Wallace92-38/+55932
- Generate copyright year and version instead of using hard-coded data Type: refactor Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I6058f5025323b3aa483f5df4a2c4371e27b5914e
2021-05-08tests: fix another race condition in punt testsDave Wallace1-5/+7
- Don't close the socket and don't stop receiving until after draining the existing data in the socket. Type: fix Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I38dfff4d6273eeddb5196f5cf2a60b580e1c93e6
2021-05-06vcl: add dtls testFlorin Coras1-0/+40
Type: test Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I726ab3a22399e970b0dd37a5b174062137265914
2021-05-06tests: fix race condition in punt testsDave Wallace1-1/+1
Type: fix Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I6cb13e044bbb966cbb61802094e96220d3a0c951
2021-05-06vcl: move tests to src/testsFlorin Coras1-0/+872
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: If622dfcc6f98d90cac0487e6bb9eb8c0bb01cf85
2021-05-04stats: adding symlinks for nodes and interfaces in the stat segmentArthur de Kerhor2-1/+99
A given interface counter (e.g rx) can be accessed via /interfaces/<interface_name>/<counter_name>. Same goes with nodes: /nodes/<node_name>/<counter_name> As interfaces may contain '/' in their names, these are replaced by '_' in symlinks Also added 2 tests for the stat segment Type: feature Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com> Change-Id: I27da252e7b3dc177815616ca46b5c200a456bf0f Signed-off-by: Ole Troan <ot@cisco.com>
2021-04-29crypto: fix chained buffer integrity supportBenoît Ganne1-1/+1
Type: fix Change-Id: I984a3e577a4209e41d046eaf3a8eef8986dc6147 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-04-28tests: add worker count to class descriptionKlement Sekera1-1/+9
While running test: ============================================================================== NAT44ED Test Case ============================================================================== ==> ============================================================================== NAT44ED Test Case [main thread only] ============================================================================== ============================================================================== NAT44ED Test Case [1 worker thread] ============================================================================== ============================================================================== NAT44ED Test Case [4 worker threads] ============================================================================== Type: improvement Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I61904b411ff1b58700564698079dc4c07cea5c5e
2021-04-26vapi: silence warningsDamjan Marion1-4/+4
Type: fix Change-Id: I91d7bfbfaafc7b780f91dec7c9e5ce07241e6394 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-26tests: clean up gbp calls from vpp_papi_providerPaul Vinciguerra1-138/+0
Move info from vpp_papi_provider to .api/vpp_objects Change-Id: Iaf46483fda2840dfec8d37e0b9262e1c9912be59 Type: test Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2021-04-22misc: add filter for specific error for pcap traceBenoît Ganne1-2/+34
Type: feature Change-Id: I325257454df1cc22833fa6a1dedd4739d4d5a558 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-04-17classify: honor pcap interface filter also when classify filter is usedBenoît Ganne1-11/+62
Type: fix Change-Id: Ic32550ee9c5d76d232d8b67a7810611f6c8b9177 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-04-16tests: cpus awarenessKlement Sekera7-159/+282
Introduce MAX_CPUS parameters to control maximum number of CPUs used by VPP(s) during testing, with default value 'auto' corresponding to all CPUs available. Calculate test CPU requirements by taking into account the number of workers, so a test requires 1 (main thread) + # of worker CPUs. When running tests, keep track of both running test jobs (controlled by TEST_JOBS parameter) and free CPUs. This then causes two limits in the system - to not exceed number of jobs in parallel but also to not exceed number of CPUs available. Skip tests which require more CPUs than are available in system (or more than MAX_CPUS) and print a warning message. Type: improvement Change-Id: Ib8fda54e4c6a36179d64160bb87fbd3a0011762d Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-04-12tests: support attaching to existing vppKlement Sekera8-64/+155
Introduce a new option DEBUG=attach to run a test against existing already running vpp. A new target 'make test-start-gdb' will spawn VPP in gdb for this purpose. Customization options explained in test-help. Type: improvement Change-Id: Ia160a85b33da3b2df292d44bb95729af9dd9da96 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-04-09tests: improve namingKlement Sekera2-17/+15
Change capture to pcap to remove confusion in framework.py Type: improvement Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: Idf8bd61f174b8b2df3bbd13908e54d597da4a83b
2021-04-05ip6-nd: Solicitation reply only if target is our link-localNeale Ranns1-0/+12
Type: fix The fib source IP6_ND is used for all link-local entries, hence solicitation responses were sent for a peer's address. Constrain the source check to also in clude the LOCAL flag, which indicates that the link-local address is ours. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Iba7e66049e4d89ee3f36d77aeb09310b978d70de
2021-04-01tests: support injecting multiple worker pcaps on one PGKlement Sekera2-39/+39
This change allows one to inject multiple streams for different workers on the same PG interface at the same time. Type: improvement Change-Id: I29d80369aabada261eda466e5a5d8d3518bb8bc8 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-03-31tests: call venv module directlyKlement Sekera1-1/+1
This avoids ModuleNotFoundError: No module named 'virtualenv.seed.embed.via_app_data' https://github.com/pypa/virtualenv/issues/1873 Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I860cc8c4ad2ba509815c5e7cf02fa5e01ee2ed63
2021-03-29tests: move vxlan tests to src/vnet/vxlan/testsDave Wallace6-1464/+0
- Refactor make test code to be co-located with the vpp feature source code Type: test Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I66379dfe671628e39dfc9685c4fd70fa0e566f6f
2021-03-26tests: move ping tests to src/plugin/ping/testDave Wallace1-176/+0
- Refactor make test code to be co-located with the vpp plugin source code Type: test Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I09d55301665449b3f183191537749435f806fb15
2021-03-25tests: move vppinfra tests to src/vppinfra/testDave Wallace1-40/+0
- Refactor make test code to be co-located with the vpp feature source code Type: test Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: Iceaeab769c08e541b31546663d0e402ced862e5b
2021-03-25tests: introduce test-checkstyle-diffKlement Sekera1-2/+17
Make test-checkstyle-diff is a new target which checks PEP8 compliance only for changed files. This makes it faster to execute and also more readable as most of the time, only changed files will fail. Type: improvement Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I71baca76ab3a21a7a3790617cbfb0d48aacbd9ec
2021-03-25stats: python vpp_stats rewrite to access stat segment directlyOle Troan6-106/+59
This module implement Python access to the VPP statistics segment. It accesses the data structures directly in shared memory. VPP uses optimistic locking, so data structures may change underneath us while we are reading. Data is copied out and it's important to spend as little time as possible "holding the lock". Counters are stored in VPP as a two dimensional array. Index by thread and index (typically sw_if_index). Simple counters count only packets, Combined counters count packets and octets. Counters can be accessed in either dimension. stat['/if/rx'] - returns 2D lists stat['/if/rx'][0] - returns counters for all interfaces for thread 0 stat['/if/rx'][0][1] - returns counter for interface 1 on thread 0 stat['/if/rx'][0][1]['packets'] - returns the packet counter for interface 1 on thread 0 stat['/if/rx'][:, 1] - returns the counters for interface 1 on all threads stat['/if/rx'][:, 1].packets() - returns the packet counters for interface 1 on all threads stat['/if/rx'][:, 1].sum_packets() - returns the sum of packet counters for interface 1 on all threads stat['/if/rx-miss'][:, 1].sum() - returns the sum of packet counters for interface 1 on all threads for simple counters Type: refactor Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I1fe7f7c7d11378d06be8276db5e1900ecdb8f515 Signed-off-by: Ole Troan <ot@cisco.com>
2021-03-24tests: add vpp test dirs to PYTHONPATHDave Wallace1-4/+10
- Required to relocate test infra modules to be co-located in feature test directory. - Remove/regenerate build-root/build-test/src/ soft links when running make test to allow re-running 'make test' after moving source files. - Suppress annoying 'ls' error message when gathering test source files caused by 'c' test application directory being named 'test'. - Use PYTHONPYCACHEPREFIX to generate all compiled source under build-root/build-test. This only works for python 3.8 or greater, but existing 'make test-wipe' target cleans up in-situ __pycache__ directories for older python versions. Type: fix Change-Id: If3c3ff0c58fb26a17395babc34783e06b1dd84e7 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2021-03-20tests: add support for worker awarenessKlement Sekera8-54/+59
VppTestCase now has vpp_worker_count property set to number of workers. This can be overriden by child classes. Also overriden by VPP_WORKER_CONFIG variable for legacy reasons. Type: improvement Change-Id: Ic328bacb9003ddf9e92815767653bd362aa7f086 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-03-18tests: remove shm files created by vpp on resetKlement Sekera1-0/+1
Even though we don't use shm transport anymore, vpp still populates shm. Add cleanup before running tests to avoid the nuisance of running out of space on /dev/shm. Type: fix Fixes: eb506becd038f081bc7ac340412d3685425bb8b4 Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I2ef87e991223ee60892d56af1482025d91e77d46
2021-03-17tests: remove shm handlingKlement Sekera3-49/+4
Not used anymore with socket transport. Type: improvement Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I7061048dee21ce02637e34f73fb9984bd241f7df
2021-03-16fib: Allow the creation of new source on the APINeale Ranns3-2/+217
Type: feature an client can dump the existing sources, examine their priorities, then define thier own source. Usefull if a client wants to distingusih between say, static, ospf, bgp, etc routes it has added over the API. Signed-off-by: Neale Ranns <nranns@cisco.com> Signed-off-by: Alexander Chernavin <achernavin@netgate.com> Change-Id: I5158b4fa1ebe87381ff8707bb173217f56ea274a
2021-03-15tests: use socket transport instead of shared memoryOle Troan4-51/+49
Type: improvement Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I9e65c94a5a05047a5104e9361ea36eac77b40442 Signed-off-by: Ole Troan <ot@cisco.com>
2021-03-15tests: fix NoneType printing if VPP died earlyKlement Sekera1-12/+15
Make error message more meaningful. Type: fix Change-Id: I3c49cb179c3ee7a59657b3ae9a06311f57dc52ac Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-03-05tests: improve the robustness of process cleanup on INT/TERM signalsAndrew Yourtchenko1-1/+17
Change-Id: I3049d3d7d1212236dcc63ebf5560f87561928520 Type: improvement Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2021-03-05ipsec: Support async mode per-SANeale Ranns1-39/+165
Type: feature This feautre only applies to ESP not AH SAs. As well as the gobal switch for ayncs mode, allow individual SAs to be async. If global async is on, all SAs are async. If global async mode is off, then if then an SA can be individually set to async. This preserves the global switch behaviour. the stratergy in the esp encrypt.decrypt nodes is to separate the frame into, 1) sync buffers, 2) async buffers and 3) no-op buffers. Sync buffer will undergo a cyrpto/ath operation, no-op will not, they are dropped or handed-off. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Ifc15b10b870b19413ad030ce7f92ed56275d6791
2021-03-05ipsec: Submit fuller async framesNeale Ranns2-0/+85
Type: improvement In the current scheme an async frame is submitted each time the crypto op changes. thus happens each time a different SA is used and thus potentially many times per-node. thi can lead to the submision of many partially filled frames. change the scheme to construct as many full frames as possible in the node and submit them all at the end. the frame owner ship is passed to the user so that there can be more than one open frame per-op at any given time. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Ic2305581d7b5aa26133f52115e0cd28ba956ed55
2021-03-04hsa: fix builtin echo apps with multiple workersFlorin Coras1-2/+0
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I9507b5a9755e938b4d1da657bed3a8681a056427
2021-03-02classify: fix multiple filters supportBenoît Ganne2-56/+56
This fix the classify filter if we attach several different filters. This also fix some issues with l3 and l4 parsing. Type: fix Change-Id: I9dc6c55049a3bbc0110d1097b40d9da27633626b Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-02-25tests: Add tests for IPSec async mode using the crypto SW schedulerNeale Ranns4-107/+189
Type: test Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Iabc8f2b09ee10a82aacebd36acfe8648cf69b7d7
2021-02-25ipsec: enable input features on tunnelsBrian Russell2-0/+242
Make the ipsec[46]-tun-input nodes siblings of device-input so that input features can be enabled on them. Register ipsec-tun for feature updates. When a feature is enabled on the device-input arc and the ifindex is an IPSec tunnel, change the end node of the arc for that ifindex to be the appropriate ESP decrypt node. Set a flag on the tunnel to indicate that the feature arc should be started for packets input on the tunnel. Test input policing on ESP IPSec tunnels. Type: improvement Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: I3b9f047e5e737f3ea4c58fc82cd3c15700b6f9f7
2021-02-24fib: fix sa selection for fib routed destinationsJúlius Milan1-1/+25
The move from ip4(6)_src_address_for_packet to fib_sas4(6)_get changed the behavior, so that the new looked only to adjacent gleans. This caused a problem for destinations routed according to FIB table. To reproduce: vpp# create tap vpp# set interface state tap0 up vpp# set interface ip address tap0 192.168.11.1/24 vpp# ip route add 192.168.20.0/24 via 192.168.11.2 linux$ sudo ip addr add 192.168.20.1/24 dev lo linux$ sudo ip link set tap0 up linux$ sudo ip addr add 192.168.11.2/24 dev tap0 vpp# ping 192.168.20.1 Failed: no source address for egress interface Type: fix Signed-off-by: Július Milan <julius.milan@pantheon.tech> Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I22899f4dbbf8c1c85ccce72f801b92c183195b5d
2021-02-23misc: run make test-refresh-deps to update the python dependenciesAndrew Yourtchenko2-138/+152
Also, remove the flake8 from requirements.txt as it looks like upstream package is not installable... Type: test Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Change-Id: I1a2132f30f7f9431d892e962a29c7d859e6a43db Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2021-02-23tests: delete test/requirements-2.txtAndrew Yourtchenko1-316/+0
Python2 has not been supported for a while now, time to spring clean... Change-Id: Iafb18bd730c69b5aeefa6ccbfadbaaf30c92c2c8 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Type: improvement
2021-02-19tests: test input policerBrian Russell1-0/+4
Apply a policer to an interface, check it's policing packets. Remove it and check it no longer polices packets. Type: test Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: I6f694c8a9804cadf010b5831770aaae81f42e027
2021-02-15vlib: refactor checksum offload supportMohsin Kazmi2-2/+4
Type: refactor This patch refactors the offload flags in vlib_buffer_t. There are two main reasons behind this refactoring. First, offload flags are insufficient to represent outer and inner headers offloads. Second, room for these flags in first cacheline of vlib_buffer_t is also limited. This patch introduces a generic offload flag in first cacheline. And detailed offload flags in 2nd cacheline of the structure for performance optimization. Change-Id: Icc363a142fb9208ec7113ab5bbfc8230181f6004 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2021-02-15tests: fix import in test/test_pcap.pyPaul Vinciguerra1-4/+5
Type: test Change-Id: Ib9192a12812b40090a0859cb73288aea27a3ca01 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2021-02-15ip: Path MTUNeale Ranns3-2/+449
Type: feature Support setting the MTU for a peer on an interface. The minimum value of the path and interface MTU is used at forwarding time. the path MTU is specified for a given peer, by address and table-ID. In the forwarding plane the MTU is enfored either: 1 - if the peer is attached, then the MTU is set on the peer's adjacency 2 - if the peer is not attached, it is remote, then a DPO is added to the peer's FIB entry to perform the necessary fragmentation. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I8b9ea6a07868b50e97e2561f18d9335407dea7ae
2021-02-15tests: test punt policer bound to worker threadBrian Russell3-2/+93
Add to the IP[46] punt policer handoff tests by binding the policer to a particular worker and checking all packets are policed on that thread. Type: test Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: I7fab28659ccb65f13f841cec65a3f808281b3f90
2021-02-15tests: explicitly close subprocess filesPaul Vinciguerra1-0/+2
Resolve the following error: /vpp/test/framework.py:657: ResourceWarning: unclosed file <_io.BufferedReader name=6> del cls.vpp Object allocated at (most recent call last): File "/usr/lib/python3.8/subprocess.py", lineno 844 self.stdout = io.open(c2pread, 'rb', bufsize) Type: test Change-Id: Ia2974da594f0582dcff1f4bdf40d25475769c46c Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2021-02-11tests: tag the tests that do not work with multi-worker configurationAndrew Yourtchenko10-0/+30
If the multi-worker default VPP configuration is triggered by setting VPP_WORKER_CONFIG="workers 2", some of the tests fail for various reasons. It's a substantial number, so this change marks all of the testsets that have this issue, such that they can be addressed later independently. Type: test Change-Id: I4f77196499edef3300afe7eabef9cbff91f794d3 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>