summaryrefslogtreecommitdiffstats
path: root/test/test_l2_fib.py
AgeCommit message (Collapse)AuthorFilesLines
2023-11-03tests: refactor asf framework codeDave Wallace1-1/+2
- Make framework.py classes a subset of asfframework.py classes - Remove all packet related code from asfframework.py - Add test class and test case set up debug output to log - Repatriate packet tests from asf to test directory - Remove non-packet related code from framework.py and inherit them from asfframework.py classes - Clean up unused import variables - Re-enable BFD tests on Ubuntu 22.04 and fix intermittent test failures in echo_looped_back testcases (where # control packets verified but not guaranteed to be received during test) - Re-enable Wireguard tests on Ubuntu 22.04 and fix intermittent test failures in handshake ratelimiting testcases and event testcase - Run Wiregard testcase suites solo - Improve debug output in log.txt - Increase VCL/LDP post sleep timeout to allow iperf server to finish cleanly. - Fix pcap history files to be sorted by suite and testcase and ensure order/timestamp is correct based on creation in the testcase. - Decode pcap files for each suite and testcase for all errors or if configured via comandline option / env var - Improve vpp corefile detection to allow complete corefile generation - Disable vm vpp interfaces testcases on debian11 - Clean up failed unittest dir when retrying failed testcases and unify testname directory and failed linknames into framwork functions Type: test Change-Id: I0764f79ea5bb639d278bf635ed2408d4d5220e1e Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2022-10-11l2: Add bridge_domain_add_del_v2 to l2 apiLaszlo Kiraly1-1/+3
https://jira.fd.io/browse/VPP-2034 Type: fix Signed-off-by: Laszlo Kiraly <laszlo.kiraly@est.tech> Change-Id: Ieb6919f958f437fc603d5e1f48cab01de780951d
2022-05-10tests: replace pycodestyle with blackKlement Sekera1-72/+100
Drop pycodestyle for code style checking in favor of black. Black is much faster, stable PEP8 compliant code style checker offering also automatic formatting. It aims to be very stable and produce smallest diffs. It's used by many small and big projects. Running checkstyle with black takes a few seconds with a terse output. Thus, test-checkstyle-diff is no longer necessary. Expand scope of checkstyle to all python files in the repo, replacing test-checkstyle with checkstyle-python. Also, fixstyle-python is now available for automatic style formatting. Note: python virtualenv has been consolidated in test/Makefile, test/requirements*.txt which will eventually be moved to a central location. This is required to simply the automated generation of docker executor images in the CI. Type: improvement Change-Id: I022a326603485f58585e879ac0f697fceefbc9c8 Signed-off-by: Klement Sekera <klement.sekera@gmail.com> Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2021-11-22vlib: add virtual time supportBenoît Ganne1-4/+3
Type: feature Change-Id: Iabd76558e9c72ed8286cfeeb1fbaa4fde4832a90 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-11-02build: remove unnecessary executable bitsRay Kinsella1-0/+0
Run 'find src -executable -type f', remove unnecessary executable bits from the source tree. Type: refactor Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I070e22c8fb2ef8712bc3ea620727ee5ab3d9a9fb
2021-08-13tests docs: upgrade python packagesDave Wallace1-1/+1
- Upgrade python package requirements for test & docs - Clean up docs generation warnings - Consolidate python requirements for docs in test requirements specs. - Upgrade pip Type: make Change-Id: I74a3924b43ed93d15b32ec9f6fc41ed1ba95b69b Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2021-01-08l2: Separating scan-delay and learn-limit into a separate API from ↵Jerome Tollet1-0/+52
want_l2_macs_events Type: feature Signed-off-by: Jerome Tollet <jtollet@cisco.com> Change-Id: I6de6dae7da4ec1001e2811975a9b67acfc1a148c
2020-03-09l2: API cleanupJakub Grajciar1-11/+8
Use consistent API types. Type: fix Change-Id: I7ac7cd00606101864fa3422e7b9ea2f1143665dd Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-11-05misc: Fix python scripts shebang lineRenato Botelho do Couto1-1/+1
Type: fix Since CentOS 8, RPM build script doesn't accept '#!/usr/bin/env python' as a valid shebang line. It requires scripts to explicitly chose between python2 or python3. Change all to use python3 as suggested by Paul Vinciguerra. Depends-On: https://gerrit.fd.io/r/23170 Signed-off-by: Renato Botelho do Couto <renato@netgate.com> Change-Id: Ie72af9f60fd0609e07f05b70f8d96e738b2754d1
2019-04-11Tests: Refactor tearDown show command logging, add lifecycle markers.Paul Vinciguerra1-1/+3
This change adds a consistent interface for adding test-specific show commands to log.txt. It also adds log markers for the execution of setUp[Class], tearDown[Class] in the logs. Change-Id: I7d42e396e594a59e866a7d55dac0af25548e657a Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-04-10Tests Cleanup: Fix missing calls to setUpClass/tearDownClass.Paul Vinciguerra1-0/+4
Continuation/Part 2 of https://gerrit.fd.io/r/#/c/17092/ Change-Id: Id0122d84eaf2c05d29e5be63a594d5e528ee7c9a Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-11vpp_papi_provider: Remove more wrapper functions.Ole Troan1-7/+7
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-07Tests: Refactor payload_to_info()Paul Vinciguerra1-1/+1
All callers of payload_to_info were required to wrap payload with str(). Refactor to call scapy's payload.load for raw payloads or specify the specific fieldname. Change-Id: I1c80599d4df8dc129dbb8274733afaad406d5bcf Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-04test framework: Fix wrapper functions to match API message names.Ole Troan1-4/+4
In preparation to remove the wrappers in vpp_papi_provider.py, ensure names used in tests match the actual API message names. Change-Id: I230ca4eb75aa727ff68d702e085a2edbbc6b6d19 Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-18PAPI: Add MACAddress object wrapper for vl_api_mac_address_tOle Troan1-2/+3
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-11-23VPP-1476: L2fib failures in masterPavel Kotucek1-7/+8
Overlaping range of BDs. Change-Id: I96d2caf98b94206cd6b145961819720727f13c61 Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
2018-03-14Improve l2_macs_events API to provide MAC move informationJohn Lo1-2/+7
Change mac_entry layout in l2_macs_event API message so the MAC entry can be either add, delete or move where the sw_if_index of an existing MAC entry changed. Also added a 8-bit flags field in mac_entry for any future expansion. Change-Id: I3bf9e1cf2556f2938202025a5d0772c2ce2fc99f Signed-off-by: John Lo <loj@cisco.com>
2017-10-09TEST,L2-FIB:refactor test-removing shared stateEyal Bari1-179/+135
and remove dependencies between tests Change-Id: I6ceacfdeb65b2d3c64811309358c3bfd47b213ef Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-10-03L2FIB,TEST:add max macs in event testeyal bari1-0/+22
Change-Id: Ied72d44f8695af524751ffc54196cc3ac1addc85 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-10-02L2-FIB:add mac learn events testEyal Bari1-0/+18
fixes an issue where events were not sent if BD doesn't enable mac aging Change-Id: Iddc53cb5c45e560633e6c5cff2731dccfc70ad5b Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-06-19L2FWD:fix seq_num overwritten + validate l2fib entries when forwardingEyal Bari1-3/+0
l2_classify memeber table_index was overlaid over l2.l2fib_seq_num which over written when table_index gets initialized in l2_input_classify solved by overlaying both table_index and opaque_index as only one is used seperated l2fib seq num from l2_input configs for better handling of theoretical ABA issue where an entry for a deleted interface is considered valid by the ager because a different interface with same sw_if_index and seq_num was created before the ager got a chance to delete Change-Id: I7b0eeded971627406f1c80834d7e02c0ebe62136 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-06-12L2FIB:fix crash in show with deleted subif entriesEyal Bari1-0/+3
after deleting a sub interface it's l2fib entries are left with a dangling sw_if_index (while waiting for the ager to delete them). changed "show l2fib" to reflect that state with "Deleted" as the interface name. added sleep in test_l2_fib as a workaround for packets still passing after flush will investigate... Change-Id: Id998d7d3c6a073ef5005c5f3009e1cfb7febf7db Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-05-24TEST/L2BD:fix flush testsEyal Bari1-66/+107
flush tests will now enable learning on the bridge, and send broadcast packets to add dynamic entries to the l2_fib. it will then disable learning, flush, and will verify packets are not forwarded to flushed "hosts". Change-Id: Ie6f123e59f6c89af511bdc5a02dd199420c424e9 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-05-22Skip L2 FIB flush testsNeale Ranns1-0/+9
These tests attempt to flush static entries from a bridge-domain that has no aging configured. for both reasons it will fail. The fact thtat they occationally pass is due to the fact that the assert_nothing_cpatured does not actually capture packets, so it misses the fact that there are some. Change-Id: Ie5c98a42944e29a3d482156f7e9246511380372f Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-05-16L2FIB: add flush testEyal Bari1-103/+198
add tests for flush int/bd/all Change-Id: Ia589ec5925b9c8acbb2fc16dafbf4842aa1a6eff Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-01-11make test: improve documentation and PEP8 complianceKlement Sekera1-5/+6
Change-Id: Ib4f0353aab6112fcc3c3d8f0bcbed5bc4b567b9b Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-23make test: improve handling of packet capturesKlement Sekera1-7/+3
Perform accounting of expected packets based on created packet infos. Use this accounting info to automatically expect (and verify) the correct number of packets to be captured. Automatically retry the read of the capture file if scapy raises an exception while doing so to handle rare cases when capture file is read while only partially written during busy wait. Don't fail assert_nothing_captured if only junk packets arrived. Change-Id: I16ec2e9410ef510d313ec16b7e13c57d0b2a63f5 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-16make test: improve robustness and performanceKlement Sekera1-11/+3
Introduce an API which asserts empty capture for interface. Throw exception in old API if the capture does not exist, thus making it clear if the test expects packets to arrive or not. Improve performance by not doing sleeps after starting the packet generator, rather lazily deleting captures when needed. Fix wrong usage of packet.show() in various tests. Change-Id: I456cb23316eef99b3f35f80344fe595c4db9a21c Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-11-23CSIT-473: L2 FIB testsJan1-0/+390
- add/delete MAC entries and check the traffic Change-Id: I82b568fdd7796461b2df900c07a4bd9b87ab17c2 Signed-off-by: Jan <jgelety@cisco.com>