Commit Graph

3150 Commits

Author SHA1 Message Date
Donatas Abraitis
6d91d1c768
Merge pull request #14149 from donaldsharp/cleanup_bad_commands
Cleanup bad commands
2023-08-06 20:10:23 +03:00
Donald Sharp
d65249aa65
Merge pull request #14148 from opensourcerouting/fix/tests_bgp_addpath_failing_sometimes
tests: Use a correct syntax for defining keepalive/hold timers
2023-08-04 15:44:10 -04:00
Donald Sharp
d676e8c412 tests: isis_snmp, ldpd doesn't talk to snmp
isis_snmp.test_isis_snmp/r1/ldpd.log:2023/08/04 12:49:54 LDP: [SHWNK-NWT5S][EC 100663304] No such command on config line 8: agentx

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-08-04 13:06:56 -04:00
Donald Sharp
5eceb87d06 tests: babel_topo1 Another no such command
babel_topo1.test_babel_topo1/r3/babeld.log:2023/08/04 12:46:55 BABELD: [SHWNK-NWT5S][EC 100663304] No such command on config line 17:  redistirbute ipv6 connected

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-08-04 13:05:42 -04:00
Donald Sharp
27de57ec33 tests: config_timing calls non-existent command
./config_timing.test_config_timing/r1/zebra.log:2023/08/04 12:34:29 ZEBRA: [SHWNK-NWT5S][EC 100663304] No such command on config line 7: exit-route-map
./config_timing.test_config_timing/r1/zebra.log:2023/08/04 12:34:29 ZEBRA: [SHWNK-NWT5S][EC 100663304] No such command on config line 10: exit-route-map

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-08-04 13:04:48 -04:00
Donald Sharp
8487fd07d6 tests: bfd_ospf_topo1 there is no passive interface command
./bfd_ospf_topo1.test_bfd_ospf_topo1/rt3/ospfd.log:2023/08/04 12:46:58 OSPF: [SHWNK-NWT5S][EC 100663304] No such command on config line 28:  passive interface lo
./bfd_ospf_topo1.test_bfd_ospf_topo1/rt5/ospfd.log:2023/08/04 12:46:59 OSPF: [SHWNK-NWT5S][EC 100663304] No such command on config line 27:  passive interface lo
./bfd_ospf_topo1.test_bfd_ospf_topo1/rt1/ospfd.log:2023/08/04 12:46:56 OSPF: [SHWNK-NWT5S][EC 100663304] No such command on config line 30:  passive interface lo
./bfd_ospf_topo1.test_bfd_ospf_topo1/rt4/ospfd.log:2023/08/04 12:47:00 OSPF: [SHWNK-NWT5S][EC 100663304] No such command on config line 27:  passive interface lo
./bfd_ospf_topo1.test_bfd_ospf_topo1/rt2/ospfd.log:2023/08/04 12:46:57 OSPF: [SHWNK-NWT5S][EC 100663304] No such command on config line 28:  passive interface lo

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-08-04 13:03:44 -04:00
Donald Sharp
965405e25a tests: ospf6_gr_topo1 attempts, but fails to set the password
Irrelevant and let's just remove it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-08-04 13:01:54 -04:00
Donald Sharp
59f24a5b06 tests: cspf_topo1 has import-te in sharpd.conf
This will never work, let's remove

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-08-04 13:00:36 -04:00
Donald Sharp
a3dda89f45 tests: bgp_update_delay is not even using frr cli syntax
Let's just remove it.   Looks like iproute2 configuration

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-08-04 12:58:53 -04:00
Donald Sharp
dd02d8926c tests: bgp_vpnv4_noretain test turns on isis but never uses it
The test was reading in the bgp config for the isis config and
clearly the test is working without this.  So let's remove
from the test the usage of isisd

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-08-04 12:56:11 -04:00
Donatas Abraitis
40558baf47 tests: Use a correct syntax for defining keepalive/hold timers
BGP: [SHWNK-NWT5S][EC 100663304] No such command on config line 2:  timers 3 10

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-08-04 19:31:05 +03:00
Donatas Abraitis
8bf9ea0611 tests: Check if we can handle software version capability dynamicaly
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-08-03 17:08:32 +03:00
Donald Sharp
cbbbf64f9a tests: Remove unused file in isis_snmp test
The */show_ip_route.ref files are never used, let's remove them
to prevent any future issues.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-08-02 07:15:59 -04:00
Jafar Al-Gharaibeh
ec8ae8f093
Merge pull request #14125 from opensourcerouting/fix/drop_unused_lua_stuff
lib: Do not use time_t as a special Lua encoder/decoder
2023-08-01 23:52:56 -05:00
Donald Sharp
369bdcaa1e tests: Convert d1 and d2 to output and expected in gen_json_diff_report
The output of gen_json_diff_report is used all over the place and
it outputs d1 and d2.  Let's change this to output and expected
as that is how it is used.  Should help with debugging.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-08-01 07:57:16 -04:00
Donald Sharp
29848dbe98 tests: Run black over lib/topotest.py
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-08-01 07:57:16 -04:00
Donald Sharp
0099493f1e tests: Start using output and expected vs d1 and d2
Let us start using output and expected in lib/topotest.py
because when we see output it is confusing what d1 is
versus what d2 is.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-08-01 07:57:16 -04:00
Donatas Abraitis
27dbf81a73 lib: Do not use time_t as a special Lua encoder/decoder
This is purely an integer (long long/long), and causes issues for 32-bit systems.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-08-01 14:08:25 +03:00
Farid Mihoub
6e01399077 tests: test set extended-comm-list <> delete command
Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
2023-07-31 11:52:40 +02:00
Donatas Abraitis
27330655f3
Merge pull request #14112 from donaldsharp/test_sponging
Test sponging
2023-07-31 10:02:36 +03:00
Donald Sharp
15bf9baa98 tests: Convert isis to use 1 and 10 for hello/multiplier
Current isis tests use a variety of hello timers as well
as hello-multiplier, let's modify all of the isis test
cases to use 1 and 10.  This cleans up some spurious test
failures I was seeing locally.  As an example without
these changes running isis_tilfa_topo1 2r6 times I would
see 5-10 test failures now I am seeing ~2 test failures.

In any event part of the problem was that some tests were
not fully converged when looking at them under heavy
system load.  Changing this to 1/10 gives us 10 chances
to see the incoming packet.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-29 13:39:37 -04:00
Donald Sharp
940ac2a6fd tests: bfd_bgp_cbit_topo3 allow bgp to converge before testing
This test was failing upstream a bunch of times.  Upon examining
the log files as well as the test script it was noticed that
the bfd peers were checked to see that they had come up.  But
both the timers used for bgp as well as not checking that bgp
has actually come up would cause the test to fail in subsuquent
steps if bgp has not come up.  Test that bgp peering is actually
established before testing link down events.  It's possible
this test might need to be revisited to ensure that the routes
are actually installed and ready to go before as well, but I am
not seeing that right now.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-29 13:39:37 -04:00
Donald Sharp
e566e565c5 tests: Fix zebra_seg6_route to give more time for routes to be installed
This test is failing upstream regularly, when inspecting the log
files we see that the route being looked for is in a queued state
when the test fails.  Give this test more time for when the
system is under severe load.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-29 13:39:37 -04:00
Donald Sharp
3984301417 tests: isis_te_topo1 can fail occassionally
Upstream ( and locally ) this test fails.  The adj-sid value
being looked for in the testing is a dynamic value that is
assigned based upon how the network comes up.  The reality
is that there is no enforced order of what the adj-sid
can be.  As such this test looking for this value makes
no sense.  Let's remove that from the test.

Additionally bring the isis hello-interval to 1 down
from 3 to make things converge faster.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-29 13:39:37 -04:00
Donald Sharp
b0e3fcfe8c tests: zebra_netlink ensure the address is installed
Ran test under high load and system rejected the sharp
install of routes.  Only reason that that would happen
would be if the address had not been set by the kernel
yet.  The test log files had timestamp precision and the
addition of the sharp routes was under 1/10 of a second
after the address was attempted to be installed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-29 13:39:37 -04:00
Renato Westphal
2dd4cad60b tests: increase wait timer in TI-LFA topotest
Starting from step 11, this topotest focuses on validating the TI-LFA
switchover functionality, where the backup nexthops are activated
after an adjacency expires, either with or without BFD.

Currently, the test checks the RIB shortly after the switchover using
a tight 5 seconds interval to ensure that the RIB update is due to the
switchover and not an SPF update (which is configured with an initial
delay of 15 seconds). However, it was observed that the kernel might
take longer than 5 seconds to install routes when the system is under
heavy load. To account for that, double the wait interval so that
this topotest will succeed even in those conditions.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2023-07-29 14:18:39 -03:00
Renato Westphal
174a3d1b6e tests: ensure BFD session is up before proceeding to the next step
In this topotest, BFD is configured at the end of step 13. However,
in certain cases where the testing machine is exceptionally fast (e.g.,
Donald's quantum computer), there is a possibility that the interface
shutdown event from step 14 may occur before BFD has had sufficient
time to establish the session, which leads to a test failure. To fix
this problem, ensure the BFD session is up before proceeding to the
next step.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2023-07-29 14:18:39 -03:00
Renato Westphal
824b1d299a tests: increase hello multiplier in TI-LFA topotest
In this topotest, the IS-IS hello interval is set to 1 for fast
convergence. However, the current hello multiplier of 3 results in a
tight IS-IS adjacency holdtime of 3 seconds. This tight timeframe can
cause failures when the testing machine is running multiple tests at
full capacity. To improve stability under such conditions, this commit
raises the hello multiplier to 10, providing a more forgiving holdtime
and reducing the likelihood of failures.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2023-07-29 14:10:31 -03:00
Russ White
3f043d027f
Merge pull request #14050 from LabNConsulting/ziemba-pbr-zapi-common
pbrd: 2/3 zapi PBR common encode/decode
2023-07-25 10:55:50 -04:00
Russ White
6109c9a36b
Merge pull request #14086 from qlyoung/fix-strncpy-warning
tests: fix strncpy warning
2023-07-25 10:23:35 -04:00
Russ White
82d8e7d5fa
Merge pull request #13945 from pguibert6WIND/redistribute_isis_table
Redistribute isis table
2023-07-25 10:16:46 -04:00
Quentin Young
64c549e68c tests: fix strncpy warning
GCC/clang warns about using strncpy in such a way that it does not copy
the null byte of a string; as implemented it was fine, but to fix the
warning, just use strlcat which was purpose made for the task being
accomplished here.

Signed-off-by: Quentin Young <qlyoung@qlyoung.net>
2023-07-24 19:03:24 -04:00
Donatas Abraitis
3a58764e3a
Merge pull request #14034 from LabNConsulting/aceelindem/ospf_prefix_suppression
ospfd: Implement OSPF prefix-suppression as specified in RFC 6860
2023-07-21 10:14:22 +03:00
Acee
e2eea4fe8e ospfd: Implement OSPF prefix-suppression as specified in RFC 6860
Signed-off-by: Acee <aceelindem@gmail.com>
2023-07-20 14:56:43 -04:00
G. Paul Ziemba
580a98b798 lib: zapi PBR common encode/decode
bgpd, pbrd: use common pbr encoder
    zebra: use common pbr decoder
    tests: pbr_topo1: check more filter fields

    Purpose:
	1. Reduce likelihood of zapi format mismatches when adding
	   PBR fields due to multiple parallel encoder implementations
	2. Encourage common PBR structure usage among various daemons
	3. Reduce coding errors via explicit per-field enable flags

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2023-07-20 08:10:45 -07:00
Donald Sharp
1b1d256f03
Merge pull request #14026 from LabNConsulting/pbr-add-vlan-filters
pbrd: 1/3: add vty support for vlan filtering and send to zebra
2023-07-20 08:01:24 -04:00
G. Paul Ziemba
8b330fe8b7 pbrd: add vlan filters pcp/vlan-id/vlan-flags; ip-protocol any (doc, tests)
Subset: doc and tests

    doc
	PBR section updated with new fields and some copy-editing

    tests
	pbr_topo1: ensure new vlan fields arrive at zebra

    Changes by:
	Josh Werner <joshuawerner@mitre.org>
	Eli Baum <ebaum@mitre.org>
	G. Paul Ziemba <paulz@labn.net>

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2023-07-19 08:15:45 -07:00
Kuldeep Kashyap
3066746f5f tests: Update join state in verify_upstream_iif API
When JoinState is not passed to API it is expected to
be in Joined state, there was a minor bug in API, where
it was printng JoinState as None, which is default value
in API. Updated value to print Joined when verification
fails.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2023-07-19 19:21:01 +05:30
Francois Dumontet
291d334595 tests: add one test to bgp_exclude_aspath_exclude.py
add support of  set as-path exclude as-path-access-list

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
2023-07-19 10:58:15 +02:00
Donald Sharp
37940809ad
Merge pull request #14037 from opensourcerouting/feature/enable_software_capability_for_datacenter_profile_by_default
bgpd: Enable software version capability for datacenter profile
2023-07-18 09:19:19 -04:00
Russ White
8593341164
Merge pull request #13868 from zice312963205/zly_mapflag
bgpd:Fixing a conflict issue between rmap_in_change_flag and rmap_out…
2023-07-18 09:14:50 -04:00
Russ White
a510c23641
Merge pull request #12964 from FRIDM636/bmp-basic-test
Add basic bgp bmp test
2023-07-18 08:53:07 -04:00
Donatas Abraitis
83d6a6a6e8
Merge pull request #14009 from rgangam-PAN/master
test_grpc.cpp Fix Compilation Error and RuntimePath for finding grpc.so
2023-07-18 09:47:10 +03:00
Donatas Abraitis
30db544508 bgpd: Send software-version capability by default
Useful to have it for datacenter profile only, disabled for traditional.

If the peer is not established or established, but has no description set,
we will show the FRR version instead, which is kinda handy to have instead of
nothing.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-18 09:42:48 +03:00
Donatas Abraitis
612f32c834 tests: Add SPDX-License-Identifier for bgp_software_version topotest
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-18 09:42:09 +03:00
Jack.zhang
2b4b4aeb67 test: fix the topotest case for the bug fix
Signed-off-by: Jack.zhang <hanyu.zly@alibaba-inc.com>
2023-07-18 14:19:46 +08:00
G. Paul Ziemba
e4a3fe6610 tests: test_babel_topo1: tolerate slow results
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2023-07-16 14:35:25 -07:00
Donald Sharp
7b52fccc62
Merge pull request #14019 from LabNConsulting/chopps/fix-mgmtd-assert
fix double lock bug and cmd resume early bugs
2023-07-15 16:05:09 -04:00
Donald Sharp
c26aa79ad0
Merge pull request #14020 from LabNConsulting/chopps/check-bt-cores-per-test
check for bt and cores per test
2023-07-15 15:59:25 -04:00
Donald Sharp
b4dd2fd841
Merge pull request #14008 from LabNConsulting/chopps/fix-backtrace
tests: fix/improve the printing of backtrace from cores
2023-07-15 15:59:15 -04:00