topotests: test new log toggle

Test MSDP new log toggle: the MSDP peer connection state and SA events
should be logged.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
This commit is contained in:
Rafael Zalamena 2024-11-21 10:23:37 -03:00
parent fc39bfaa0a
commit 0b0648f15c
2 changed files with 22 additions and 0 deletions

View File

@ -22,5 +22,7 @@ ip pim rp 10.254.254.1
ip pim join-prune-interval 5
!
router pim
msdp log neighbor-events
msdp log sa-events
msdp peer 192.168.0.2 password 1234
!

View File

@ -17,6 +17,7 @@ import os
import sys
import json
from functools import partial
import re
import pytest
# Save the Current Working Directory to find configuration files.
@ -510,6 +511,25 @@ def test_msdp_sa_filter():
assert val is None, "multicast route convergence failure"
def test_msdp_log_events():
"Test that the enabled logs are working as expected."
tgen = get_topogen()
if tgen.routers_have_failure():
pytest.skip(tgen.errors)
r1_log = tgen.gears["r1"].net.getLog("log", "pimd")
# Look up for informational messages that should have been enabled.
match = re.search(
"MSDP peer 192.168.1.2 state changed to established", r1_log)
assert match is not None
match = re.search(
r"MSDP SA \(192.168.10.100\,229.1.2.3\) created", r1_log)
assert match is not None
def test_memory_leak():
"Run the memory leak test and report results."
tgen = get_topogen()