Skip to content

Commit

Permalink
topotests: test new log toggle
Browse files Browse the repository at this point in the history
Test MSDP new log toggle: the MSDP peer connection state and SA events
should be logged.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
  • Loading branch information
rzalamena committed Nov 21, 2024
1 parent fc39bfa commit 0b0648f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/topotests/msdp_topo1/r1/pimd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
!
20 changes: 20 additions & 0 deletions tests/topotests/msdp_topo1/test_msdp_topo1.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import sys
import json
from functools import partial
import re
import pytest

# Save the Current Working Directory to find configuration files.
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 0b0648f

Please sign in to comment.