From f102fb7aef6cf7b8b8aa3c47e4514a1a130207ed Mon Sep 17 00:00:00 2001 From: Louis Scalbert Date: Tue, 10 Sep 2024 15:10:26 +0200 Subject: [PATCH] tests: bgp_set_aspath_exclude check rule modif crash Check that the following does not cause a crash: > route-map r2 permit 6 > set as-path exclude 65555 > set as-path exclude as-path-access-list NON-EXISTING Signed-off-by: Louis Scalbert --- .../test_bgp_set_aspath_exclude.py | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/tests/topotests/bgp_set_aspath_exclude/test_bgp_set_aspath_exclude.py b/tests/topotests/bgp_set_aspath_exclude/test_bgp_set_aspath_exclude.py index 63f1719e1d07..f77840a7c409 100644 --- a/tests/topotests/bgp_set_aspath_exclude/test_bgp_set_aspath_exclude.py +++ b/tests/topotests/bgp_set_aspath_exclude/test_bgp_set_aspath_exclude.py @@ -208,7 +208,26 @@ def test_no_bgp_set_aspath_exclude_access_list(): """ conf route-map r2 permit 6 - no set as-path exclude as-path-access-list SECOND + set as-path exclude 65555 + """ + ) + + r1.vtysh_cmd( + """ +clear bgp * + """ + ) + + test_func = functools.partial(bgp_converge, tgen.gears["r1"], expected_3) + _, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5) + + assert result is None, "Failed to renegotiate with peers 2" + + r1.vtysh_cmd( + """ +conf + route-map r2 permit 6 + set as-path exclude as-path-access-list NON-EXISTING """ )