Skip to content

[test_fdb] Fix test_fdb failure caused by FDB aging.#2658

Merged
bingwang-ms merged 3 commits intosonic-net:masterfrom
bingwang-ms:fixture_disable_fdb
Dec 15, 2020
Merged

[test_fdb] Fix test_fdb failure caused by FDB aging.#2658
bingwang-ms merged 3 commits intosonic-net:masterfrom
bingwang-ms:fixture_disable_fdb

Conversation

@bingwang-ms
Copy link
Collaborator

@bingwang-ms bingwang-ms commented Dec 14, 2020

Signed-off-by: bingwang bingwang@microsoft.com

Description of PR

Summary:
Fixes # (issue)
The test case test_fdb is failing consistently on some testbed (like A7260). The root cause for the failure is the double loop among all interfaces costs too much time, which is beyond the fdb age (10 minutes in default). This PR address the issue by introducing a module level fixture to disable FDB aging.
This commit also clears the dataplane of testutil to ensure that the packet queue inside testutil is not filled up.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

This PR is to fix test_fdb failure caused by expired FDB entry.

How did you do it?

This PR address the issue by introducing a module level fixture to disable FDB aging.

How did you verify/test it?

Verified on A7260 (122 interfaces).

py.test --inventory ../ansible/str,../ansible/veos --host-pattern str-7260cx3-acs-2 --module-path ../ansible --testbed vms7-t0-7260-2 --testbed_file ../ansible/testbed.csv --junit-xml=tr.xml --log-cli-level info --collect_techsupport=False --topology=t0,any,util fdb/test_fdb.py
collected 1 item                                                                                                                                                                                      

fdb/test_fdb.py::test_fdb[arp_reply] 
------------------------------------------------------------------------------------------- live log setup --------------------------------------------------------------------------------------------
07:04:04 INFO __init__.py:set_default:49: Completeness level not set during test execution. Setting to default level: CompletenessLevel.basic
......
07:04:31 INFO __init__.py:loganalyzer:17: Log analyzer is disabled
-------------------------------------------------------------------------------------------- live log call --------------------------------------------------------------------------------------------
07:49:45 INFO test_fdb.py:test_fdb:207: "show mac" output on DUT:
[u'  No.    Vlan  MacAddress         Port         Type',
 u'-----  ------  -----------------  -----------  -------',
 u'    1    1000  02:11:22:33:5E:03  Ethernet204  Dynamic',
 u'    2    1000  02:11:22:33:09:03  Ethernet18   Dynamic',
......
 u' 1232    1000  02:11:22:33:31:06  Ethernet114  Dynamic',
 u'Total number of entries 1232 ']
PASSED                                                                                                                                                                                          [100%]
------------------------------------------------------------------------------------------ live log teardown ------------------------------------------------------------------------------------------
07:49:46 INFO ptfhost_utils.py:remove_ip_addresses:104: Remove IPs to restore ptfhost 'vms7-8'


------------------------------------------------------------------ generated xml file: /data/Networking-acs-sonic-mgmt/tests/tr.xml -------------------------------------------------------------------
===================================================================================== 1 passed in 2743.41 seconds =====================================================================================

Any platform specific information?

No.

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

No.

Documentation

The test cast test_fdb is failing consistently on some testbed. The
root cause for the failure is the double loop among all interfaces costs
too much time, which is beyond the fdb age (10 minutes in default). This
PR address the issue by introducing a module level fixture to disable
FDB aging.

Signed-off-by: bingwang <bingwang@microsoft.com>
@bingwang-ms bingwang-ms requested a review from a team December 14, 2020 08:35
This commit introduces two updates:
1. Use swssconfig instead of bcmcmd to disable fdb aging
2. Clear ptfafapter's dataplane after sending warmup packet to ensure
the queue in testutil's dataplane is not filled up.

Signed-off-by: bingwang <bingwang@microsoft.com>
This commit change the destination mac of arp request to router mac.
This is because the broadcast arp request to DUT will be broadcast to
all vlan members, as a result, a large amount of packets are generated,
which can't be handled by ptfadapter in time.

Signed-off-by: bingwang <bingwang@microsoft.com>
@bingwang-ms bingwang-ms merged commit 08a8cff into sonic-net:master Dec 15, 2020
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
Include following commits:
- c98b9f09 [202012][orchagent]: Get bridge port ID from FDBOrch cache instead of SAI API sonic-net#2657 (sonic-net#2658)
- 59886b8f [MuxOrch] Enabling neighbor when adding in active state (sonic-net#2601)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants