summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLou Berger <lberger@labn.net>2020-02-08 16:36:49 +0100
committerLou Berger <lberger@labn.net>2020-02-08 16:36:49 +0100
commitf2ebe24292cbb6b914a492c7e6ccf0c369d5f06c (patch)
tree9fd289705e18cd6f0ae3a601581c934a8fd68a7a /tests
parentMerge pull request #5722 from donaldsharp/kernel_routes (diff)
downloadfrr-f2ebe24292cbb6b914a492c7e6ccf0c369d5f06c.tar.xz
frr-f2ebe24292cbb6b914a492c7e6ccf0c369d5f06c.zip
topotest: bgp_l3vpn_to_bgp_vrf - report unexpected BGP notifications
Signed-off-by: Lou Berger <lberger@labn.net>
Diffstat (limited to 'tests')
-rw-r--r--tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/notification_check.py9
-rwxr-xr-xtests/topotests/bgp_l3vpn_to_bgp_vrf/test_bgp_l3vpn_to_bgp_vrf.py36
2 files changed, 45 insertions, 0 deletions
diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/notification_check.py b/tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/notification_check.py
new file mode 100644
index 000000000..d44754878
--- /dev/null
+++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/notification_check.py
@@ -0,0 +1,9 @@
+from lutil import luCommand
+rtrs = ['ce1', 'ce2', 'ce3', 'r1', 'r2', 'r3', 'r4']
+for rtr in rtrs:
+ ret = luCommand(rtr, 'vtysh -c "show bgp neigh"', 'Notification received .([A-Za-z0-9/ ]*)', 'none', 'collect neighbor stats')
+ found = luLast()
+ if ret != False and found != None:
+ val = found.group(1)
+ ret = luCommand(rtr, 'vtysh -c "show bgp neigh"', 'Notification received', 'fail', 'Notify RXed! {}'.format(val))
+#done
diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/test_bgp_l3vpn_to_bgp_vrf.py b/tests/topotests/bgp_l3vpn_to_bgp_vrf/test_bgp_l3vpn_to_bgp_vrf.py
index 2dad5e768..7e3639829 100755
--- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/test_bgp_l3vpn_to_bgp_vrf.py
+++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/test_bgp_l3vpn_to_bgp_vrf.py
@@ -47,6 +47,15 @@ def test_adjacencies():
#CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True)'
ltemplateTest('scripts/adjacencies.py', False, CliOnFail, CheckFunc)
+def test_notification_check():
+ 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/notification_check.py', False, CliOnFail, CheckFunc)
+
def SKIP_test_add_routes():
CliOnFail = None
# For debugging, uncomment the next line
@@ -75,6 +84,15 @@ def test_check_linux_mpls():
#CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
ltemplateTest('scripts/check_linux_mpls.py', False, CliOnFail, CheckFunc)
+def test_notification_check():
+ 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/notification_check.py', False, CliOnFail, CheckFunc)
+
def test_check_scale_up():
CliOnFail = None
# For debugging, uncomment the next line
@@ -84,6 +102,15 @@ def test_check_scale_up():
#CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
ltemplateTest('scripts/scale_up.py', False, CliOnFail, CheckFunc)
+def test_notification_check():
+ 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/notification_check.py', False, CliOnFail, CheckFunc)
+
def test_check_scale_down():
CliOnFail = None
# For debugging, uncomment the next line
@@ -93,6 +120,15 @@ def test_check_scale_down():
#CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
ltemplateTest('scripts/scale_down.py', False, CliOnFail, CheckFunc)
+def test_notification_check():
+ 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/notification_check.py', False, CliOnFail, CheckFunc)
+
def SKIP_test_cleanup_all():
CliOnFail = None
# For debugging, uncomment the next line