Skip to content

Commit

Permalink
tests: Addition of AutoRP Discovery uncovered broken PIM test
Browse files Browse the repository at this point in the history
With AutoRP discovery running by default, that adds a new
IGMP group that needs to be accounted for in IGMP output.

For pim.py
  The clear IGMP interfaces function is in a broken state. It was
  already ignoring any errors and returned true always, but with
  the addition of the AutoRP discovery group, you could end up
  with a different group order in the json which would cause a key
  error making the test fail. For now I just added a check to
  avoid the key error.

Signed-off-by: Nathan Bahr <[email protected]>
  • Loading branch information
nabahr committed Sep 24, 2024
1 parent ec37f60 commit dff1db9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/topotests/lib/pim.py
Original file line number Diff line number Diff line change
Expand Up @@ -2454,10 +2454,11 @@ def clear_igmp_interfaces(tgen, dut):

# Verify uptime for groups
for group in group_before_clear.keys():
d1 = datetime.datetime.strptime(group_before_clear[group], "%H:%M:%S")
d2 = datetime.datetime.strptime(group_after_clear[group], "%H:%M:%S")
if d2 >= d1:
errormsg = ("[DUT: %s]: IGMP group is not cleared", " [FAILED!!]", dut)
if group in group_after_clear:
d1 = datetime.datetime.strptime(group_before_clear[group], "%H:%M:%S")
d2 = datetime.datetime.strptime(group_after_clear[group], "%H:%M:%S")
if d2 >= d1:
errormsg = ("[DUT: %s]: IGMP group is not cleared", " [FAILED!!]", dut)

logger.info("[DUT: %s]: IGMP group is cleared [PASSED!!]")

Expand Down

0 comments on commit dff1db9

Please sign in to comment.