Commit Graph

1659 Commits

Author SHA1 Message Date
Donald Sharp
75691bb7c4
Merge pull request #7904 from volta-networks/fix_test_oid_walk
tests: update snmp test infastructure api test_oid_walk
2021-01-22 08:32:39 -05:00
Donald Sharp
ddbda04e87
Merge pull request #7909 from pjdruddy/snmp-skip-test
test: add snmp skip test
2021-01-22 08:23:56 -05:00
Donald Sharp
f95224c170
Merge pull request #7902 from opensourcerouting/topotest-marker
tests: Standardized Topotest PyTest Markers
2021-01-22 08:23:02 -05:00
Pat Ruddy
fd9f7cacf4 test: add snmp skip test
Since SNMP is a pain to install add a check which will be used
in all SNMP tests in future to silently skip SNMP tests if SNMP
has not been installed on the base system.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-01-22 10:12:47 +00:00
Martin Winter
82b844d8d3
Merge pull request #7765 from gpnaveen/ospf_chaos_test
tests : Adding 3 ospf chaos testcases.
2021-01-21 23:59:29 +01:00
Karen Schoener
6ea2bd40d8 tests: update snmp test infastructure api test_oid_walk
Update test_oid_walk to either validate specific oids or
to validate all rows walked.

Signed-off-by: Karen Schoener <karen@voltanet.io>
2021-01-21 11:43:03 -05:00
David Schweizer
6bd548aa49
tests: pytest markers in topotest templates
Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2021-01-21 17:06:58 +01:00
David Schweizer
309638adb5
tests: pytest marker registrations for all daemons
Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2021-01-21 16:24:02 +01:00
Donald Sharp
8cf7ab7539
Merge pull request #7782 from kuldeepkash/multicast_pim_sm_topo2
tests: Add new scenarios to test multicast-pim-sm
2021-01-21 09:45:38 -05:00
lynne
3db5abf2d0 tests: Adding test for ISIS Attached-bit
Adding test to verify default route is added when attached-bit
receive and send are enabled and not added when feature is disabled.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
2021-01-21 09:18:18 -05:00
Donatas Abraitis
3130cfd742 tests: Test if prefix is not re-advertised downstream with blackhole community
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-01-21 16:00:53 +02:00
nguggarigoud
a3276d2c76 tests: Adding 3 ospf chaos testcases.
This script involves Restart ospfd,
restart frr with ospf enabled,
staticd with redistribution inside ospf is enabled

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-01-21 04:55:58 +05:30
Donatas Abraitis
44ba9e779d
Merge pull request #7832 from pjdruddy/snmp-test-infra
Snmp test infra
2021-01-20 09:15:14 +02:00
Mark Stapp
bdbef5edc6
Merge pull request #7233 from donaldsharp/route_map_optimizations
Route map optimizations
2021-01-19 13:20:02 -05:00
GalaxyGorilla
94dd5670d0 ospfd: Fix P2MP handling when TI-LFA is enabled
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-01-19 15:32:13 +00:00
GalaxyGorilla
f026b24ed9 ospfd: Fix backup path RIB handling
* Inject backup paths with proper flags
  * Add outgoing label on top of the backup label stack
  * Ignore explicit/implicit outgoing labels
  * Adjust tests

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-01-19 15:32:13 +00:00
GalaxyGorilla
be4d276c89 tests: Add topotest for OSPF SR TI-LFA
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-01-19 15:32:13 +00:00
GalaxyGorilla
a4553b5bdb ospfd: Add 'debug ospf ti-lfa' command
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-01-19 15:32:13 +00:00
GalaxyGorilla
bdcfd34a41 ospfd: Add support for non-adjacent TI-LFA P/Q spaces
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-01-19 15:32:13 +00:00
GalaxyGorilla
66dc21bb23 tests: Integrate unit tests for TI-LFA
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-01-19 15:32:13 +00:00
GalaxyGorilla
184b834b6c tests: Add verbosity flag to OSPF TI-LFA unit tests
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-01-19 15:32:13 +00:00
GalaxyGorilla
385a1e07b1 ospfd: Add support for TI-LFA node protection
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-01-19 15:32:13 +00:00
GalaxyGorilla
cc1725bd34 ospfd: Make use of adjacency SIDs in TI-LFA
When P and Q spaces are adjacent then it makes sense to use adjacency SIDs to
from the P node to the Q node. There are some other corner cases where this
makes also sense like when a P/Q node adjacent to root node.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-01-19 15:32:13 +00:00
GalaxyGorilla
7fd0729f76 ospfd: TI-LFA basic infrastructure and algorithms
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-01-19 15:32:13 +00:00
Russ White
4c35f214b7
Merge pull request #6455 from GalaxyGorilla/bfd_ospf_topotest
tests: Introduce BFD OSPFv2/v3 topotests
2021-01-19 07:39:05 -05:00
kuldeepkash
693a44e183 tests: Add new scenarios to test multicast-pim-sm(different topology)
Add new scenarios to test multicast-pim-sm(different topology)

Signed-off-by: kuldeepkash <kashyapk@vmware.com>
2021-01-18 20:09:07 +00:00
kuldeepkash
eab72dc8e0 tests: Add/enhance framework for multicast-pim-sm automation
1. Add/enhance framework for multicast-pim-sm automation

Signed-off-by: kuldeepkash <kashyapk@vmware.com>
2021-01-18 20:09:07 +00:00
kuldeepkash
c9b5d52c65 tests: Add new scenarios to test multicast-pim-sm
1, Added new scenarios to test multicast-pim-sm

Signed-off-by: kuldeepkash <kashyapk@vmware.com>
2021-01-18 20:08:53 +00:00
Kuldeep Kashyap
6f86321528 tests: Add multicast-pim-bsm-topo2 suite
1. Added 7 testcases to verify PIM BSM functionality. Here we have used Scapy
   to send raw packet, generated using Cisco and FRR. Raw packets are kept in

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-01-18 18:17:13 +00:00
Kuldeep Kashyap
df94c7e840 tests: Add multicast-pim-bsm-topo1 suite
1. Added 8 testcases to verify PIM BSM functionality. Here we have used Scapy
   to send raw packet, generated using Cisco and FRR. Raw packets are kept in
   JSON file and sent tests on-demand in script.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-01-18 18:17:13 +00:00
Kuldeep Kashyap
f40b18e8bb tests: Add framework support for multicast-pim-bsm-topo1
1. Added framework support for multicast-pim-bsm-topo1 suite automation

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-01-18 18:17:06 +00:00
Donatas Abraitis
fba9c8d2fd
Merge pull request #7874 from donaldsharp/more_pytest_mark
More pytest mark
2021-01-18 10:12:24 +02:00
Vijay Gupta
d25f322e5a tests: Add multicast-pim-static-rp-topo1 test suits
Signed-off-by: Vijay Gupta <vijayg@vmware.com>

1 Added 17 testcases to verify multicast static RP functionality
2 Execution time ~12min
2021-01-17 21:41:20 -08:00
Donald Sharp
e1713aa16d tests: Set default timers to 3/10 for bgp using create_router_bgp
Tests were timing out in our test system due to lost packets and
flakiness of the lower end systems.  Just set the timers to 3/10
and give them plenty of time to converge.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-16 08:29:49 -05:00
Donald Sharp
fed1681178 tests: Modify zebra_rib tests to include some basic route-map tests
New test does this:
a) Ensures that we run the correct number of times given two
`ip protocol X` commands( ie we do not run the route-map application
against all routes, only those affected )
b) Ensure that when we modify the route-map the state ends up sane
this includes making a static route depend on a sharp route that
gets removed from the change of the sharp route-map
c) Ensure that the kernel routes are correct.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-15 19:34:33 -05:00
Donald Sharp
3771ded194 tests: Add pytest.mark.pbr
Add a mark to topotests that mark pbr tests

`pytest -k pbr`

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-15 09:18:59 -05:00
Donald Sharp
3914e57591 tests: Add pytest.mark.isis
Add a mark to topotests that mark isis tests

`pytest -k isis`

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-15 09:17:53 -05:00
Donald Sharp
1d0c76b74d tests: Add pytest.mark.bfd
Add a mark to topotests that mark bfd tests.

`pytest -k bfd`

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-15 08:58:24 -05:00
Mark Stapp
ea8885d54e
Merge pull request #7870 from donaldsharp/pytest_marking
tests: Start the ability to mark tests
2021-01-15 08:44:51 -05:00
Donatas Abraitis
2f8e365008 tests: Check if peer-group is working in topotests
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-01-15 11:35:57 +02:00
Donald Sharp
b9f3e47f3a tests: Start the ability to mark tests
Add the ability for our topotests to take advantage of pytest `mark`ing.
This effectively allows you to tell pytest to run against certain sets
of tests.  For a demonstration purpose I've added in marks for:
babel
eigrp
ldp
ospf
pim
rip

And setup tests to run against those tests that only test those protocols.

You can run against eigrp tests by running `pytest -k eigrp`
Other combinations are also available based upon simple boolean logic.
Just read the pytest.mark documentation.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-14 20:29:14 -05:00
Donald Sharp
f2aee6967c
Merge pull request #7837 from ckishimo/tests_ospf
tests: fix redistribute key in ospf tests
2021-01-13 13:31:32 -05:00
Donatas Abraitis
26542c7138
Merge pull request #7849 from gpnaveen/static_rte_test
tests: Static route cases with admin dist and tag.
2021-01-13 09:09:38 +02:00
Donatas Abraitis
6f860c4618
Merge pull request #7748 from adrianomarto/bgp-listen-on-multiple-addresses
BGP daemon listen for connections on multiple addresses
2021-01-13 08:57:38 +02:00
Pat Ruddy
b300ed94b1 tests: sample snmp test to check infra
Simple test which creates a router running snmp and bgpd and
checks we can read the correct bgpVersion using snmp.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-01-12 19:59:56 +00:00
Olivier Dugeon
4683138cda
Merge pull request #7707 from opensourcerouting/isisd-rlfa
isisd, ldpd: add Remote LFA support
2021-01-12 19:25:15 +01:00
Donald Sharp
484eabb1d7
Merge pull request #7439 from opensourcerouting/bgp-damp-profile2
bgpd: BGP route-flap dampening profiles for peers and peer groups
2021-01-12 11:45:41 -05:00
Russ White
bc560f64d9
Merge pull request #7687 from gpnaveen/ospf_p2mp
tests: Adding ospf p2mp basic test.
2021-01-12 08:03:33 -05:00
nguggarigoud
26bbe9af5e tests: Static route cases with admin dist and tag.
1. Adding api to verify ip nht command.
2. 5 cases of static routes with admin dist and tag
3. Run time = 89Secs

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-01-12 17:13:26 +05:30
ckishimo
88b7d3e726 tests: move redistribute function into lib
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-01-12 11:18:22 +01:00
ckishimo
9458be1aec tests: fix ospf cosmetic output
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-01-12 11:18:22 +01:00
ckishimo
65980a0224 tests: remove old def for redistribution in ospf
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-01-12 11:18:22 +01:00
ckishimo
c6b59ef48c tests: use new def for redistribution in ospf
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-01-12 11:18:22 +01:00
ckishimo
881fa68f05 tests: add new def for redistribution in ospf
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-01-12 11:18:22 +01:00
nguggarigoud
dc5298d741 tests: Adding ospf p2mp basic test.
This test verifies basic p2mp test

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-01-12 09:28:50 +05:30
Babis Chalios
daee3312bf tests: add machinery to test SNMP
Add initial 'walk' and 'get' test APIs for SNMP

Signed-off-by: Babis Chalios <babis@voltanet.io>
Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-01-11 14:36:41 +00:00
Babis Chalios
92be50e63e tests: API to launch snmpd in a topotest scenario
Prepare the infrastructure to allow configuring and launching an SNMP
daemon as part of testing scenario.

Signed-off-by: Babis Chalios <babis@voltanet.io>
Signed-off-by: Pat Ruddy Chalios <pat@voltanet.io>
2021-01-11 14:36:40 +00:00
Sebastien Merle
f7f6a796e8 pathd: Skip SR-TE topotests if pathd has been disabled
* If pathd binary is not found, skip the SR-TE topotests.
 * Fix some compilation warnings when pathd is not built.

Signed-off-by: Sebastien Merle <sebastien@netdef.org>
2021-01-11 12:52:15 +01:00
Adriano Marto Reis
733367c04e tests: tests for bgpd listing on multiple addresses
* Added a new topotest to test bgpd listening on multiple addresses.
* Updated the existing bgpd tests according to the parameter added to
bgp_master_init.

Signed-off-by: "Adriano Marto Reis" <adrianomarto@gmail.com>
2021-01-11 08:33:52 +00:00
Donald Sharp
7df0e6bb3b
Merge pull request #7756 from pjdruddy/bgplu-fixes
Bgplu fixes
2021-01-09 15:48:22 -05:00
Donald Sharp
537e7e9241 tests: Wait for bgp convergence *after* we re-add the interfaces
In test_bgp_mutli_vrf_topo2.py it's clear that we remove then
re-add the vrf interfaces.  Then the test was immediately
checking to ensure that the routes were available.

BGP needs time to reconverge.  Let's ensure that first.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-08 20:58:04 -05:00
Renato Westphal
ef8e91d4a2 tests: add IS-IS RLFA topotest
Add new RLFA topotest that tests all RLFA configuration knobs and
how isisd and ldpd react to various configuration changes that can
occur in the network.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2021-01-08 22:22:11 -03:00
Renato Westphal
c40de29448 tests: add remote LFA unit tests
Extend the existing SPF unit testing infrastructure so that it can
test RLFA as well.

These new unit tests are useful to test the RLFA PQ node
computation on several different network topologies in a timely
manner. Artificial LDP labels (starting from 50000) are used to
activate the computed RLFAs.

It's worth mentioning that the computed backup routing tables
contain both local LFAs and remote LFAs, as running RLFA separately
isn't possible.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2021-01-08 22:22:11 -03:00
Renato Westphal
dc70c83afa
Merge pull request #7816 from pjdruddy/revert_labelmanager_statics
Revert labelmanager statics
2021-01-08 20:57:25 -03:00
Donald Sharp
662aa246aa tests: Fix gr_tests
The bgp_gr_functionality_topo1 test was shutting down an
interface on r2 and then trying to bring it up on r1.
Hijinx ensued.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-07 17:30:04 -05:00
Donatas Abraitis
acb92e3524
Merge pull request #7749 from wesleycoakley/bgpd-large-community-format-fix
bgpd: reject malformed large-communities
2021-01-07 10:33:59 +02:00
Donald Sharp
fe035acc87
Merge pull request #7820 from kuldeepkash/topojson_framework
tests: [topojson]Add/Enhance framework to support PIM automation
2021-01-06 08:59:34 -05:00
Wesley Coakley
c850908b9d bgpd: separate lcommunity validation from tokenizer
`lcommunity_gettoken` expects a space-delimeted list of 0 or more large
communities. `lcommunity_list_valid` can perform this check.
`lcommunity_list_valid` now validates large community lists more
accurately based on the following condition: Each quantity in a standard bgp
large community must:

1. Contain at least one digit
2. Fit within 4 octets
3. Contain only digits unless the lcommunity is "expanded"
4. Contain a valid regex if the lcommunity is "expanded"

Moreover we validate that each large community list contains exactly 3
such values separated by a single colon each.

One quirk of our validation which is worth documenting is:

```
bgp large-community-list standard test2 permit 1:c:3
bgp large-community-list expanded test1 permit 1:c:3
```

The first line will throw an error complaining about a "malformed community-list
value". The second line will be accepted because the each value is each treated as
a regex when matching large communities, it simply will never match anything so
it's rather useless.

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
2021-01-06 07:18:20 -05:00
Donatas Abraitis
f32fc99078
Merge pull request #7815 from ckishimo/pytests
tests: fix typos and remove duplicate output
2021-01-06 09:08:35 +02:00
kuldeepkash
e58fdb55d6 tests: [topojson]Enhance lib/topojson.py to support PIM automation
1. Enhanced lib/topojson.py for creating topologies with switches and routers
2. Ran it through (black) for expected formatting

Signed-off-by: kuldeepkash <kashyapk@vmware.com>
2021-01-06 05:13:05 +00:00
kuldeepkash
aafca66993 tests: [topojson]Enhance lib/common_config.py to support PIM automation
1. Enhanced lib/common_config.py for common configuration/verification needed
   for PIM automation
2. Ran it through (black) for expected formatting

Signed-off-by: kuldeepkash <kashyapk@vmware.com>
2021-01-06 05:08:31 +00:00
kuldeepkash
e8cd26fdc5 tests: [topojson]Add lib/pim.py to support PIM automation
1. Added lib/pim.py for PIM configuration/verification
2. Ran it through (black) for expected formatting

Signed-off-by: kuldeepkash <kashyapk@vmware.com>
2021-01-06 05:05:30 +00:00
ckishimo
90340b2b82 tests: fix typos
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-01-05 20:00:19 +01:00
Pat Ruddy
cdb2af427a tests: add test for labelmanager plugin
An external label manager plugin may want to use the following
functions:
    - create_label_chunk
    - assign_label_chunk
    - delete_label_chunk
    - release_label_chunk
This test ensures that they are externally visible.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-01-05 18:20:50 +00:00
Mark Stapp
b04932df02
Merge pull request #7772 from LabNConsulting/ziemba/tests-lutil-timestamp
tests: topotests/lib/lutil.py: add timestamp to log of test start
2021-01-05 11:29:49 -05:00
ckishimo
19185dbac2 tests: remove duplicate output
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-01-05 17:26:01 +01:00
Russ White
ee117a8bd6
Merge pull request #7507 from ton31337/fix/bgpd_do_not_send_update_if_path_really_did_not_change
bgpd: Do not send BGP UPDATE if the route actually not changed
2021-01-05 10:26:18 -05:00
Pat Ruddy
160ad964e7 tests: add BGPLU label sanity test
This test checks the interactions between the BGP label requesting
code and the labelpool code to ensure the correct number of labels
and label chunks are requested and those labels are freed back into
the pool when the corresponding prefix is removed.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2021-01-04 14:29:44 +00:00
G. Paul Ziemba
2f17f52a02 tests: topotests/lib/lutil.py: add timestamp to log of test start
Timestamps in test logs are needed for correlation with messages in
    routing protocol log files. Vox populi indicates preference for
    timestamp at beginning of line.

    OLD:
    (#55) scripts/rip-show.py:61 COMMAND:r1:vtysh -c "show ip rip status": 00:0.* 00:0:wait:RIP Peers:

    NEW:
    Sat Dec 19 08:26:45 2020 (#55) scripts/rip-show.py:61 COMMAND:r1:vtysh -c "show ip rip status": 00:0.* 00:0:wait:RIP Peers:

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2020-12-29 05:34:46 -08:00
Mark Stapp
d4473065f4
Merge pull request #7759 from qlyoung/reformat-tests-again
Reformat tests again
2020-12-23 08:11:00 -05:00
Martin Winter
90cd28e91a
Merge pull request #6212 from gpnaveen/static_routes
tests: Adding static routing topojson automation suites.
2020-12-22 14:11:37 -08:00
Donald Sharp
29c0ce20ef tests: dict_values are not lists in version 3
While accidently running the topotests with version 3
I keep getting:

TypeError: `dict_values` object does not support indexing..

version 2 of python dict.values() returns a list.
version 3 does not

Write some code to allow both to be handled.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-12-18 19:12:30 -05:00
Olivier Dugeon
065f7c7cc0
Merge pull request #7351 from opensourcerouting/feature/pathd
Add a new SR-TE policy management daemon and an optional PCEP module
2020-12-18 20:28:22 +01:00
Sebastien Merle
4d7b695d3a pathd: New SR-TE policy management daemon
This new daemon manages Segment-Routing Traffic-Engineering
(SR-TE) Policies and installs them into zebra. It provides
the usual yang support and vtysh commands to define or change
SR-TE Policies.

In a nutshell SR-TE Policies provide the possibility to steer
traffic through a (possibly dynamic) list of Segment Routing
segments to the endpoint of the policy. This list of segments
is part of a Candidate Path which again belongs to the SR-TE
Policy. SR-TE Policies are uniquely identified by their color
and endpoint. The color can be used to e.g. match BGP
communities on incoming traffic.

There can be multiple Candidate Paths for a single
policy, the active Candidate Path is chosen according to
certain conditions of which the most important is its
preference. Candidate Paths can be explicit (fixed list of
segments) or dynamic (list of segment comes from e.g. PCEP, see
below).

Configuration example:

segment-routing
 traffic-eng
  segment-list SL
   index 10 mpls label 1111
   index 20 mpls label 2222
  !
  policy color 4 endpoint 10.10.10.4
   name POL4
   binding-sid 104
   candidate-path preference 100 name exp explicit segment-list SL
   candidate-path preference 200 name dyn dynamic
  !
 !
!

There is an important connection between dynamic Candidate
Paths and the overall topic of Path Computation. Later on for
pathd a dynamic module will be introduced that is capable
of communicating via the PCEP protocol with a PCE (Path
Computation Element) which again is capable of calculating
paths according to its local TED (Traffic Engineering Database).
This dynamic module will be able to inject the mentioned
dynamic Candidate Paths into pathd based on calculated paths
from a PCE.

https://tools.ietf.org/html/draft-ietf-spring-segment-routing-policy-06

Co-authored-by: Sebastien Merle <sebastien@netdef.org>
Co-authored-by: Renato Westphal <renato@opensourcerouting.org>
Co-authored-by: GalaxyGorilla <sascha@netdef.org>
Co-authored-by: Emanuele Di Pascale <emanuele@voltanet.io>
Signed-off-by: Sebastien Merle <sebastien@netdef.org>
2020-12-18 16:34:02 +01:00
whitespace
9fa6ec1473 tests: please follow the style guide
thanks

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-12-17 15:32:55 -05:00
Donald Sharp
9fd80543fe tests: unicode to frr_unicode
Let's standardize on the internal to frr unicode function.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-12-17 13:19:52 -05:00
Donatas Abraitis
2beb3d3967 tests: Check if we are not sending duplicate BGP UPDATEs
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-12-11 14:51:07 +02:00
nguggarigoud
938d5980d1 tests: Optimised static routing testsuits
1. Removed bgp specific triggers.
2. Removed repeatativ steps.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2020-12-10 16:44:48 -08:00
naveen
d33a0fcf6f tests : Enhanced scripts to handle support bundle behaviour
1. Added Expected False to not true cases.

Signed-off-by: naveen <nguggarigoud@vmware.com>
2020-12-10 16:44:48 -08:00
naveen
88fedaaa7b tests: Adding static routing topojson automation suites.
Adding API's required for EVPN suite.

Signed-off-by: naveen <nguggarigoud@vmware.com>
2020-12-10 16:44:48 -08:00
naveen
72babe7cf3 tests: Incorporated new static route del behaviour
Updated 2 testcases with static  route deletion with
admin distance as a key.

Signed-off-by: naveen <nguggarigoud@vmware.com>
2020-12-10 16:44:48 -08:00
naveen
93792f5dd0 tests: Updated verify_bgp_rib api for multipaths.
verify_bgp_rib is updated in bgp.py file to
handle multi paths.

Signed-off-by: naveen <nguggarigoud@vmware.com>
2020-12-10 16:44:48 -08:00
Naveen
03cb898f46 tests: Updated doctstring for start & stop router
Actual path for configs is /tmp/topotest/<suite>/<router>
common_config.py is updated.

Signed-off-by: naveen <nguggarigoud@vmware.com>
2020-12-10 16:44:48 -08:00
Naveen Guggarigoudar
f8f6dbe9f7 tests: Enhanced the lib bgp.py for nexthop check
1. Enhanced the lib bgp.py for nexthop check

Signed-off-by: naveen <nguggarigoud@vmware.com>
2020-12-10 16:44:48 -08:00
naveen
eee0457da7 tests: Enhanced lib by removing unnecessary sleep
1. libs modified are bgp.py and common_config.py

Signed-off-by: naveen <nguggarigoud@vmware.com>
2020-12-10 16:44:48 -08:00
naveen
ee51a3d9ec tests: Enchanced static routing testsuits
1. BGP timers are modified to reduce the run time.
2. Static sleeps are removed from the scripts.

Signed-off-by: naveen <nguggarigoud@vmware.com>
2020-12-10 16:44:48 -08:00
naveen
0705f3120d tests: Adding static routing topojson automation suites.
1. Enhanced framework to
a. Verify fib active routes(lib/common_config.py).
b. Verify bgp multi path routes(lib/bgp.py).
c. Create mininet nodes with different names(lib/topojson.py).

4. 12 Test cases of static routing with ibgp.
Test suite execution time is ~30 minutes.

5. 12 Test cases of static routing with ebgp.
Test suite execution time is ~30 minutes.

Signed-off-by: naveen <nguggarigoud@vmware.com>
2020-12-10 16:44:48 -08:00
Mark Stapp
e386d2b154
Merge pull request #7690 from donaldsharp/nht_show_is_not_not_not
zebra, tests: Fix `show ip nht`
2020-12-09 07:58:37 -05:00
Donald Sharp
dda33b6e0c zebra, tests: Fix show ip nht
The `show ip nht` and `show ipv6 nht` commands were broken.
This is because recent code commit: 0154d8ce45

assumed that p must not be NULL and this is not the case.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-12-08 15:50:46 -05:00
kuldeepkash
3732ea226a tests: Enhanced auto-rd verification as per changes done in #7652
1. As per recent changes done in PR #7652, we have modified the auto-rd verification logic
2. Dev PR link: https://github.com/FRRouting/frr/pull/7652

Signed-off-by: kuldeepkash <kashyapk@vmware.com>
2020-12-08 15:53:20 +00:00
Donald Sharp
46a0656f7a tests: Close some open handles
I accidently installed something that is telling me about
unlosed handles in the tests.  Let's clean them up.

<and yes I have no idea wtf I did>

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-12-05 20:05:52 -05:00
Mark Stapp
e0ea4d0349
Merge pull request #7656 from donaldsharp/bgp_convergence
tests: Wait for convergence first
2020-12-03 14:17:09 -05:00
Donatas Abraitis
3cc92134a3
Merge pull request #7349 from opensourcerouting/bgp-delayopen
bgpd: RFC 4271 optional session attribute DelayOpenTimer
2020-12-03 08:26:44 +02:00
Donald Sharp
cb5a294642
Merge pull request #7590 from opensourcerouting/isisd-lfa
isisd: add support for classic LFA
2020-12-02 20:43:51 -05:00
Donald Sharp
dd2a6ddb3e
Merge pull request #7657 from mjstapp/fix_topo_asan_noise
tests: Cleanup topo asan noise
2020-12-02 20:07:53 -05:00
Donald Sharp
187a74a2c6
Merge pull request #7596 from gpnaveen/ospf_basic
tests : Adding 3 base ospf testcases.
2020-12-02 12:35:43 -05:00
Donald Sharp
d0bd9877b8
Merge pull request #7589 from pguibert6WIND/show_bgp_summary_desc
Show bgp summary desc
2020-12-02 12:18:07 -05:00
Mark Stapp
c46de798de tests: quiet noisy error log about asan files
Turn a noisy error log into a debug - it's just reporting
that we're _looking_ for asan output.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-12-02 11:08:38 -05:00
Mark Stapp
6ee4440e66 tests: fix typo in asan variable names
Use AddressSanitizer consistently

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-12-02 11:08:03 -05:00
Donald Sharp
bd842270fe
Merge pull request #7615 from gromit1811/feature_topotest_module_noload
tests: Add TOPOTEST_NOLOAD to skip module loading question
2020-12-02 09:23:30 -05:00
Donald Sharp
16845ff4b0 tests: Wait for convergence first
The test_bgp_multi_vrf_topo2.py script had a bunch
of places where it would change an interface status
or add delete routes that would affect bgp convergence
but it was never ensuring that convergence had happened
before the test verified the bgp rib.  I believe this
was leading to many intermittant ci failures in
testing for other PR's to be accepted.  Modify
the code to wait for bgp convergence if we just
made a change to the topology

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-12-02 07:26:33 -05:00
Philippe Guibert
aa72bd7e7f bgpd: add peer description for each afi/safi line in show summary
For each afi/safi of 'show bgp summary', display the peer description
each time needed. This information is useful, for instance in the case
of a device connected with multiple peers.
The topotest all_protocol_startup is changed accordingly.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-12-01 08:06:37 +00:00
Martin Winter
960c3f25f5
tests: Ignore YANG stderr messages in test_all_protocol_startup test
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2020-11-27 19:45:15 +01:00
Martin Winter
8972e2710c
tests: Fix logging output directory for older tests
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2020-11-27 19:45:15 +01:00
Martin Winter
1a31ada871
tests: Fix FRR process shutdown in failed topotest teardown phase
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2020-11-27 19:45:14 +01:00
Martin Winter
be2656eda2
tests: Fix Topotest runs with newerversion of Address Sanitizer
Fix Address Sanitizer Issue detection with newer ASAN versions

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2020-11-27 19:45:07 +01:00
Donald Sharp
8fd47beb8b
Merge pull request #7593 from opensourcerouting/bgp_features_ospf_fix
tests: Make ospf in bgp_features testsuite predictable
2020-11-26 18:36:54 -05:00
Donald Sharp
903bd636ca
Merge pull request #7611 from opensourcerouting/docker_key_update
tests: Update topotest Dockerfile to pick up keys from deb repo
2020-11-26 18:33:12 -05:00
Martin Winter
57d89808bc
tests: Update topotest Dockerfile to pick up keys from deb repo
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2020-11-26 18:08:53 +01:00
Martin Buck
d9ee35587c tests: Add TOPOTEST_NOLOAD to skip module loading question
This is the opposite of TOPOTEST_AUTOLOAD: Instead of automatically loading
missing modules, TOPOTEST_NOLOAD prevents module loading and supresses
questions about it.

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
2020-11-26 16:12:21 +01:00
Donatas Abraitis
3200009046
Merge pull request #7586 from kuldeepkash/bgp_multi_vrf
tests: Add tests to bgp_multi_vrf_topo2
2020-11-26 09:48:54 +02:00
Martin Winter
3636b6c158
tests: Make ospf convergence predictable by setting if priority
Added OSPF priorities to force a predictable DR/Backup router selection

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2020-11-26 04:10:05 +01:00
Mark Stapp
3abf06b722
Merge pull request #7607 from pguibert6WIND/topo_python3_preparation
Topo python3 preparation
2020-11-25 14:22:10 -05:00
Philippe Guibert
10870bbc20 topotests: precise importation folder
the topolog importation folder must be precised. otherwise following
error message appears:

root@dut-vm:~/topotests/bgp_flowspec# python3 test_bgp_flowspec_topo.py
Traceback (most recent call last):
  File "test_bgp_flowspec_topo.py", line 96, in <module>
    from lib.lutil import lUtil
  File "/root/topotests/bgp_flowspec/../lib/lutil.py", line 25, in <module>
    from topolog import logger
ImportError: No module named 'topolog'
root@dut-vm:~/topotests/bgp_flowspec#

The same error occurs with lutil and bgprib which are 2 libraries
located under lib/ folder. Some precisions are added too.

PR=71290
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-11-25 16:31:45 +00:00
Philippe Guibert
ecff3c7a0c topotests: python3, replace iteritems with items
replace iteritems() calls with items()

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-11-25 16:31:45 +00:00
Philippe Guibert
e7294b3200 topotests: python3, rename iterkey() with key() for dictionary usage
dictionary method iterkey() is not used in python3 and is replaced with
key() method.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-11-25 16:31:45 +00:00
Philippe Guibert
0e232bb883 topotests: python3, fix error ValueError: can't have unbuffered text I/O
This error occurs when passing some 0 values to open() extra argument.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-11-25 16:31:42 +00:00
Philippe Guibert
6cb6c403f1 topotests: python3, replace execfile with exec
python3 does not support execfile implementation.
replace it with open and exec api that are available in both python 2
and 3 implementations.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-11-25 16:19:33 +00:00
Kuldeep Kashyap
2f4455fc4c tests: Add tests to bgp_multi_vrf_topo2
1. Added 4 test cases for frr/daemon restart(chaos testing)

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-11-25 08:57:08 +00:00
Donald Sharp
5a6947e530
Merge pull request #7591 from opensourcerouting/isisd-bug-fixes
isisd: assorted bug fixes
2020-11-24 20:59:50 -05:00
nguggarigoud
816fdbbf53 tests : Adding 3 base ospf testcases.
Test suite execution time is 90 Secs.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2020-11-25 05:34:06 +05:30
Renato Westphal
66e5fbe08f tests: add IS-IS classic LFA topotest
This new topotest comprises of 13 testing steps and tests essentially
all implemented LFA knobs.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-11-24 20:15:52 -03:00
Renato Westphal
c8a4f33195 tests: add IS-IS classic LFA unit tests
These unit tests check the basic LFA loop-free condition on a
variety of different network topologies. None of the implemented
LFA tie-breakers are tested here.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-11-24 20:15:52 -03:00
GalaxyGorilla
da78f4fe92 tests: Introduce BFD OSPFv2/v3 topotests
The tests work with the default settings of BFD meaning that bfdd
is able to recognize a 'down' link after ~900ms so a route
recovery should be visible in the RIB after 1 second.

The following topology is used:

                        +---------+
                        |         |
           eth-rt2 (.1) |   RT1   | eth-rt3 (.1)
             +----------+ 1.1.1.1 +----------+
             |          |         |          |
             |          +---------+          |
             |                               |
             |                   10.0.2.0/24 |
             |                               |
             |                       eth-rt1 | (.2)
             | 10.0.1.0/24              +----+----+
             |                          |         |
             |                          |   RT3   |
             |                          | 3.3.3.3 |
             |                          |         |
        (.2) | eth-rt1                  +----+----+
        +----+----+                  eth-rt4 | (.1)
        |         |                          |
        |   RT2   |                          |
        | 2.2.2.2 |              10.0.4.0/24 |
        |         |                          |
        +----+----+                          |
        (.1) | eth-rt5               eth-rt3 | (.2)
             |                          +----+----+
             |                          |         |
             |                          |   RT4   |
             |                          | 4.4.4.4 |
             |                          |         |
             |                          +----+----+
             | 10.0.3.0/24           eth-rt5 | (.1)
             |                               |
             |                               |
             |                   10.0.5.0/24 |
             |                               |
             |          +---------+          |
             |          |         |          |
             +----------+   RT5   +----------+
           eth-rt2 (.2) | 5.5.5.5 | eth-rt4 (.2)
                        |         |
                        +---------+

Route recovery is tested on RT1. The focus here lies on the two
different routes to RT5. Link failures are generated by taking
down interfaces via the mininet Python interface on RT2 and RT3.
Hence routes are supposed to be adjusted to use RT3 when a link
failure happens on RT2 or vice versa.

Note that only failure recognition and recovery is "fast". BFD
does not monitor a link becoming available again.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2020-11-24 19:14:21 +00:00
Donald Sharp
7b1d13bb1f
Merge pull request #7560 from opensourcerouting/fix_topotest_logs
topotests: Fix logging by redirecting it to correct file
2020-11-24 11:30:14 -05:00
Mark Stapp
d13964a914 tests: restore route scale test to 1M routes
Restore the scale topotest config to use 1M routes.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-11-23 16:53:43 -05:00
Renato Westphal
50ec21859f isisd, tests: fix bug when sending TI-LFA repair paths to zebra
Commit 4c75f7c773 fixed a bug in which the TI-LFA repair paths
weren't preserving the original Prefix-SID of the routes. That
commit, however, didn't update the zebra interface code to account
for backup nexthops that don't have a repair list but do have a
SR label. As a consequence, backup nexthops that didn't have any
repair label were not preserving the original Prefix-SID of the
corresponding routes. Fix this and update the TI-LFA topotest
accordingly.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-11-23 15:22:36 -03:00
Renato Westphal
e33b95b4bb isisd: uninstall local routes that don't have any valid nexthop
Once the remote end of a connected link is shut down (or lose
its address), isisd will remove the corresponding route from its
RIB after SPF runs. A new route for the same destination should
be computed based on the local LSP, and that route by definition
doesn't have any nexthop.  The problem is that, when isisd tries
to replace the old route by the new one, it fails because routes
without nexthops can't be installed.  That causes the old invalid
route to remain in the RIB when it shouldn't. To fix this problem,
change the zebra interface code to uninstall a route whenever it
can't be installed (because it lacks nexthops) instead of doing
nothing in that case.

This change should fix occasional failures of the test_isis_sr_topo1
topotest.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-11-23 14:50:32 -03:00
Martin Winter
ed827751d3
topotests: Fix logging by redirecting it to correct file
Fix lib to start loggin to correct daemon file on startup
Fix bgp-auth tests for the logging changes
Fixes Issue # 7545

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2020-11-20 17:48:49 +01:00
Donatas Abraitis
a1477006f9
Merge pull request #7562 from donaldsharp/python_fixes
tests: Fix common_config.py issues
2020-11-20 09:37:58 +02:00
Donatas Abraitis
e9ac289675 tests: Add more descriptive error messages and increase timeouts
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-11-19 16:49:44 +02:00
Donald Sharp
a28055a478 tests: Fix common_config.py issues
1) in generate_ips if start_ipaddr does not have a `/` in it
there exists a code path where both mask and step are
null values.  Write a bit of code to ensure this pre-req
is found early and often

2) in verify_rib there exists a code path where static_route
is null when we get to the non static route section.  Change
the code to operate on the advertise_network_dict that
we are iterating over.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-11-19 07:40:03 -05:00
Donald Sharp
4abdbea978
Merge pull request #7543 from GalaxyGorilla/fix_refcmp_newline
tests: ignore Windows vs Unix style newlines
2020-11-17 15:30:07 -05:00
Donald Sharp
b83bb9aa62
Merge pull request #6851 from kuldeepkash/bgp_graceful_restart
tests: Fix for bgp_gr_functionality_topo1/topo2 failures
2020-11-17 11:57:29 -05:00
GalaxyGorilla
6fc170c5af tests: ignore Windows vs Unix style newlines
Within unit tests the output of vtysh commands is compared to hand
made reference files. For some reason the output of those vtysh
commands contains Windows Style newlines which results in error
outputs which make it hard to identify this problem.

Since there seems to be no benefit in checking those newlines
anyway this commit just normalizes them.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2020-11-17 13:19:44 +00:00
Donatas Abraitis
7c98d487b8 *: Replace typo (supress => suppress)
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-11-17 12:13:38 +02:00
Donald Sharp
f18ba3cd18 bgpd, lib, staticd, tests: Convert to using FOREACH_AFI_SAFI
Move the FOREACH_AFI_SAFI macro from bgpd.h to zebra.h( GLOBAL's YOUALL )

Then convert all the places that have the two level for loop to
iterate over all afi/safis

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-11-14 18:53:03 -05:00
Santosh P K
9b936c5c36
Merge pull request #4770 from kssoman/fib
Advertise FIB installed routes to bgp peers
2020-11-12 18:59:24 +05:30
Kuldeep Kashyap
abb229fde3 tests: Enhance libraries to optimize test execution
1. Enhance libraries to optimize test execution as per Donald's suggestion

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-11-12 11:45:12 +00:00
Kuldeep Kashyap
eb41fbd556 tests: Fix bgp_gr_functionality_topo2 issue
1. Added convergence step just after BGP-GR capablities are exchanged and clear bgp
is performed , reason for this is, in few machine bgp sessions are taking more time
to come up.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-11-12 05:28:46 +00:00