mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 09:17:42 +00:00
tests/topotests: add bgp_instance_del_test to test for crashes seen during bgp instance deletes
Signed-off-by: Lou Berger <lberger@labn.net>
This commit is contained in:
parent
f4c713ae04
commit
90d5fc83c0
0
tests/topotests/bgp_instance_del_test/__init__.py
Normal file
0
tests/topotests/bgp_instance_del_test/__init__.py
Normal file
1
tests/topotests/bgp_instance_del_test/ce1
Symbolic link
1
tests/topotests/bgp_instance_del_test/ce1
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../bgp_l3vpn_to_bgp_vrf/ce1
|
1
tests/topotests/bgp_instance_del_test/ce2
Symbolic link
1
tests/topotests/bgp_instance_del_test/ce2
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../bgp_l3vpn_to_bgp_vrf/ce2
|
1
tests/topotests/bgp_instance_del_test/ce3
Symbolic link
1
tests/topotests/bgp_instance_del_test/ce3
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../bgp_l3vpn_to_bgp_vrf/ce3
|
1
tests/topotests/bgp_instance_del_test/ce4
Symbolic link
1
tests/topotests/bgp_instance_del_test/ce4
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../bgp_l3vpn_to_bgp_vrf/ce4
|
1
tests/topotests/bgp_instance_del_test/customize.py
Symbolic link
1
tests/topotests/bgp_instance_del_test/customize.py
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../bgp_l3vpn_to_bgp_vrf/customize.py
|
1
tests/topotests/bgp_instance_del_test/r1
Symbolic link
1
tests/topotests/bgp_instance_del_test/r1
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../bgp_l3vpn_to_bgp_vrf/r1
|
1
tests/topotests/bgp_instance_del_test/r2
Symbolic link
1
tests/topotests/bgp_instance_del_test/r2
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../bgp_l3vpn_to_bgp_vrf/r2
|
1
tests/topotests/bgp_instance_del_test/r3
Symbolic link
1
tests/topotests/bgp_instance_del_test/r3
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../bgp_l3vpn_to_bgp_vrf/r3
|
1
tests/topotests/bgp_instance_del_test/r4
Symbolic link
1
tests/topotests/bgp_instance_del_test/r4
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../bgp_l3vpn_to_bgp_vrf/r4
|
1
tests/topotests/bgp_instance_del_test/scripts
Symbolic link
1
tests/topotests/bgp_instance_del_test/scripts
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../bgp_l3vpn_to_bgp_vrf/scripts
|
89
tests/topotests/bgp_instance_del_test/test_bgp_instance_del_test.py
Executable file
89
tests/topotests/bgp_instance_del_test/test_bgp_instance_del_test.py
Executable file
@ -0,0 +1,89 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
#
|
||||||
|
# Part of NetDEF Topology Tests
|
||||||
|
#
|
||||||
|
# Copyright (c) 2018, LabN Consulting, L.L.C.
|
||||||
|
# Authored by Lou Berger <lberger@labn.net>
|
||||||
|
#
|
||||||
|
# Permission to use, copy, modify, and/or distribute this software
|
||||||
|
# for any purpose with or without fee is hereby granted, provided
|
||||||
|
# that the above copyright notice and this permission notice appear
|
||||||
|
# in all copies.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS" AND NETDEF DISCLAIMS ALL WARRANTIES
|
||||||
|
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NETDEF BE LIABLE FOR
|
||||||
|
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
|
||||||
|
# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||||
|
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
|
# OF THIS SOFTWARE.
|
||||||
|
#
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../'))
|
||||||
|
|
||||||
|
from lib.ltemplate import *
|
||||||
|
|
||||||
|
def test_check_linux_vrf():
|
||||||
|
CliOnFail = None
|
||||||
|
# For debugging, uncomment the next line
|
||||||
|
#CliOnFail = 'tgen.mininet_cli'
|
||||||
|
CheckFunc = 'ltemplateVersionCheck(\'4.1\', iproute2=\'4.9\')'
|
||||||
|
#uncomment next line to start cli *before* script is run
|
||||||
|
#CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
|
||||||
|
ltemplateTest('scripts/check_linux_vrf.py', False, CliOnFail, CheckFunc)
|
||||||
|
|
||||||
|
def test_adjacencies():
|
||||||
|
CliOnFail = None
|
||||||
|
# For debugging, uncomment the next line
|
||||||
|
#CliOnFail = 'tgen.mininet_cli'
|
||||||
|
CheckFunc = 'ltemplateVersionCheck(\'4.1\')'
|
||||||
|
#uncomment next line to start cli *before* script is run
|
||||||
|
#CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True)'
|
||||||
|
ltemplateTest('scripts/adjacencies.py', False, CliOnFail, CheckFunc)
|
||||||
|
|
||||||
|
def SKIP_test_add_routes():
|
||||||
|
CliOnFail = None
|
||||||
|
# For debugging, uncomment the next line
|
||||||
|
#CliOnFail = 'tgen.mininet_cli'
|
||||||
|
CheckFunc = 'ltemplateVersionCheck(\'4.1\')'
|
||||||
|
#uncomment next line to start cli *before* script is run
|
||||||
|
#CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True)'
|
||||||
|
ltemplateTest('scripts/add_routes.py', False, CliOnFail, CheckFunc)
|
||||||
|
|
||||||
|
def test_check_routes():
|
||||||
|
CliOnFail = None
|
||||||
|
# For debugging, uncomment the next line
|
||||||
|
#CliOnFail = 'tgen.mininet_cli'
|
||||||
|
CheckFunc = 'ltemplateVersionCheck(\'4.1\')'
|
||||||
|
#uncomment next line to start cli *before* script is run
|
||||||
|
#CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True)'
|
||||||
|
ltemplateTest('scripts/check_routes.py', False, CliOnFail, CheckFunc)
|
||||||
|
|
||||||
|
#manual data path setup test - remove once have bgp/zebra vrf path working
|
||||||
|
def test_check_linux_mpls():
|
||||||
|
CliOnFail = None
|
||||||
|
# For debugging, uncomment the next line
|
||||||
|
#CliOnFail = 'tgen.mininet_cli'
|
||||||
|
CheckFunc = 'ltemplateVersionCheck(\'4.1\', iproute2=\'4.9\')'
|
||||||
|
#uncomment next line to start cli *before* script is run
|
||||||
|
#CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
|
||||||
|
ltemplateTest('scripts/check_linux_mpls.py', False, CliOnFail, CheckFunc)
|
||||||
|
|
||||||
|
def test_del_bgp_instances():
|
||||||
|
CliOnFail = None
|
||||||
|
# For debugging, uncomment the next line
|
||||||
|
#CliOnFail = 'tgen.mininet_cli'
|
||||||
|
CheckFunc = 'ltemplateVersionCheck(\'4.1\')'
|
||||||
|
#uncomment next line to start cli *before* script is run
|
||||||
|
#CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True)'
|
||||||
|
ltemplateTest('scripts/del_bgp_instances.py', False, CliOnFail, CheckFunc)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
retval = pytest.main(["-s"])
|
||||||
|
sys.exit(retval)
|
@ -0,0 +1,7 @@
|
|||||||
|
from lutil import luCommand
|
||||||
|
|
||||||
|
luCommand('r1','/usr/lib/frr/vtysh -c "conf ter" -c "no router bgp 5227 vrf r1-cust1" -c "no router bgp 5226"','.','none','Cleared bgp instances')
|
||||||
|
luCommand('r2','/usr/lib/frr/vtysh -c "conf ter" -c "no router bgp 5226"','.','none','Cleared bgp instances')
|
||||||
|
luCommand('r3','/usr/lib/frr/vtysh -c "conf ter" -c "no router bgp 5227 vrf r3-cust1" -c "no router bgp 5226"','.','none','Cleared bgp instances')
|
||||||
|
luCommand('r4','/usr/lib/frr/vtysh -c "conf ter" -c "no router bgp 5228 vrf r4-cust2" -c "no router bgp 5227 vrf r4-cust1" -c "no router bgp 5226"','.','none','Cleared bgp instances')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user