Skip to content

[action] [PR:17904] Increase timeout to 5 in verify_packet_any_port for background traffic#17921

Merged
mssonicbld merged 1 commit intosonic-net:202411from
mssonicbld:cherry/202411/17904
Apr 10, 2025
Merged

[action] [PR:17904] Increase timeout to 5 in verify_packet_any_port for background traffic#17921
mssonicbld merged 1 commit intosonic-net:202411from
mssonicbld:cherry/202411/17904

Conversation

@mssonicbld
Copy link
Collaborator

Description of PR

Summary: Increase timeout to 5 in verify_packet_any_port for background traffic
Fixes #522, #496

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
  • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405
  • 202411

Approach

What is the motivation for this PR?

The test is giving us a false negative

msg = 'Did not receive expected packet on any of ports [7, 13, 17, 30, 27, 25, 5, 34, 21, 16, 24, 1, 33, 12, 4, 20, 2, 0, 11... 01 .............0..\n0050 00 AA BB CC DD EE ......\n==============================\n'
self = <tests.common.plugins.ptfadapter.ptfadapter.PtfTestAdapter testMethod=runTest>

/usr/lib/python3.8/unittest/case.py:753: AssertionError

Although on a closer look we found that the DUTis forwarding the packet in a reasonable duration of time but for some reason testutils.verify_packet_any_port is taking longer to detect it.

There is also another issue which doesn't cause any failure but defeats the purpose of testing. In case of active-active dualtor we call setup_standby_ports_on_rand_unselected_tor_unconditionally to put the system in active-standby mode. If this is called after background_traffic then the background trafffic flows through the unselected ToR which is not desired.

How did you do it?

Increase the timeout to 5s from system default for testutils.verify_packet_any_port

Make the order of fixture execution deterministic so that setup_standby_ports_on_rand_unselected_tor_unconditionally is called before background_traffic

How did you verify/test it?

Verified on Arista-7050CX3 with dualtor-aa topology.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

sonic-net#17904)

What is the motivation for this PR?
The test is giving us a false negative

msg        = 'Did not receive expected packet on any of ports [7, 13, 17, 30, 27, 25, 5, 34, 21, 16, 24, 1, 33, 12, 4, 20, 2, 0, 11... 01  .............0..\n0050  00 AA BB CC DD EE                                ......\n==============================\n'
self       = <tests.common.plugins.ptfadapter.ptfadapter.PtfTestAdapter testMethod=runTest>

/usr/lib/python3.8/unittest/case.py:753: AssertionError
Although on a closer look we found that the DUTis forwarding the packet in a reasonable duration of time but for some reason testutils.verify_packet_any_port is taking longer to detect it.

There is also another issue which doesn't cause any failure but defeats the purpose of testing. In case of active-active dualtor we call setup_standby_ports_on_rand_unselected_tor_unconditionally to put the system in active-standby mode. If this is called after background_traffic then the background trafffic flows through the unselected ToR which is not desired.

How did you do it?
Increase the timeout to 5s from system default for testutils.verify_packet_any_port

Make the order of fixture execution deterministic so that setup_standby_ports_on_rand_unselected_tor_unconditionally is called before background_traffic

How did you verify/test it?
Verified on Arista-7050CX3 with dualtor-aa topology.
@mssonicbld
Copy link
Collaborator Author

Original PR: #17904

@mssonicbld
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld mssonicbld merged commit 60274db into sonic-net:202411 Apr 10, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants