Skip to content

[BGP] Add clear arp to fix ping error in test_bgp_speaker#2114

Merged
neethajohn merged 1 commit intosonic-net:masterfrom
bingwang-ms:clear_arp
Aug 18, 2020
Merged

[BGP] Add clear arp to fix ping error in test_bgp_speaker#2114
neethajohn merged 1 commit intosonic-net:masterfrom
bingwang-ms:clear_arp

Conversation

@bingwang-ms
Copy link
Collaborator

Description of PR

Summary:
This commit is to fix the exception when pinging from DUT in test_bgp_speaker.

E               "stdout": "PING 192.168.0.3 (192.168.0.3) 56(84) bytes of data.\n\n--- 192.168.0.3 ping statistics ---\n3 packets transmitted, 0 received, 100% packet loss, time 2034ms", 
E               "stdout_lines": [
E                   "PING 192.168.0.3 (192.168.0.3) 56(84) bytes of data.", 
E                   "", 
E                   "--- 192.168.0.3 ping statistics ---", 
E                   "3 packets transmitted, 0 received, 100% packet loss, time 2034ms"
E               ]

The ping command in test_bgp_speaker return error code when running on Jenkins. This is because the test_wr_arp leave ARP table on DUT, which causes some ip address unreachable. This commit add clear after test_wr_arp and before test_bgp_speaker

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 ping failure in test_bgp_speaker when running on Jenkins.

How did you do it?

  1. Add sonic-clear arp after test_wr_arp to clear ARP cache, in case that the ARP table has lasting effect on other cases;
  2. Add sonic-clear arp before test_bgp_speaker to make itself more robust.

How did you verify/test it?

1.Run test_wr_arp and test_bgp_speaker_bgp_sessions, and both cases passed.
2.Run show arp on DUT to confirm ARP table is cleared.

========================================================================================= test session starts =========================================================================================
platform linux2 -- Python 2.7.12, pytest-4.6.5, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python
cachedir: .pytest_cache
ansible: 2.8.7
rootdir: /data/Networking-acs-sonic-mgmt/tests, inifile: pytest.ini
plugins: forked-1.1.3, xdist-1.28.0, ansible-2.2.2, repeat-0.8.0
collected 1 item                                                                                                                                                                                      

arp/test_wr_arp.py::TestWrArp::testWrArp ^@PASSED                                                                                                                                                 [100%]
platform linux2 -- Python 2.7.12, pytest-4.6.5, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python
cachedir: .pytest_cache
ansible: 2.8.7
rootdir: /data/Networking-acs-sonic-mgmt/tests, inifile: pytest.ini
plugins: forked-1.1.3, xdist-1.28.0, ansible-2.2.2, repeat-0.8.0
collected 1 item                                                                                                                                                                                      

bgp/test_bgp_speaker.py::test_bgp_speaker_bgp_sessions PASSED                                                                                                                                   [100%]

Any platform specific information?

No.

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

N/A

Documentation

N/A

test_bgp_speaker.
The ping command in test_bgp_speaker return error code when running on
Jenkins. This is because the test_wr_arp leave ARP table on DUT, which
causes some ip address unreachable. This commit add clear after
test_wr_arp and before test_bgp_speaker
@bingwang-ms bingwang-ms requested review from a team, pavel-shirshov and tahmed-dev August 18, 2020 06:58
Copy link
Collaborator

@lolyu lolyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@neethajohn neethajohn merged commit 62674d8 into sonic-net:master Aug 18, 2020
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
includes:

320591a [DualToR] Handle race condition between tunnel_decap and mux orchestrator (sonic-net#2114)
5027a8f Handling Invalid CRM configuration gracefully (sonic-net#2109)
0b120fa [ci]: use native arm64 and armhf pool (sonic-net#2013)
394e88a Don't handle buffer pool watermark during warm reboot reconciling (sonic-net#1987)
9008a01 patch for issue sonic-net#1971 - enable Rx Drop handling for cisco-8000 (sonic-net#2041)
2723ee3 create debug_shell_enable config to enable debug shell (sonic-net#2060)
d7be0b9 [request parser] Add unit tests for request parser for multiple values (sonic-net#1766)
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
c5c105f (HEAD -> 202111, origin/202111) [PBH] Implement Edit Flows (sonic-net#2093)
7050581 [techsupport] Handle minor fixes of TS Lock and update auto-TS (sonic-net#2114)
3602f99 Fix issues in clear_qos (sonic-net#2122)
4f96d3b Fixing get port speed when oper status is down (sonic-net#2123)
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.

5 participants