Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test]add more ARP and neighbor-mac tests #303

Merged
merged 3 commits into from
Oct 20, 2017

Conversation

maggiemsft
Copy link
Contributor

this PR covers 2 issues: #287; #302

  1. add additional neighbor-mac test using kernel mac change and cover ipv6
  2. improve ARP test coverage to test unicast ARP request

@@ -59,7 +102,7 @@ def main():
if arp_tbl == None:
Copy link
Contributor

Choose a reason for hiding this comment

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

based on the impl, it can never return None. It can only throw exception, you need to catch exception.

@@ -37,6 +37,36 @@ def runTest(self):
send_packet(self, 1, pkt)
verify_packet(self, exp_pkt, 1)

class ExpectUnicastReply(acs_base_test.ACSDataplaneTest):
Copy link
Contributor

@lguohan lguohan Oct 18, 2017

Choose a reason for hiding this comment

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

the function name is confusing.

ExpectUnicatReply mean expect unicast reply. What your function really does is SendUnicastArpRequest, I prefer function name to be VerifyUnicastArpRequest. #Resolved

# - debug: var=arptable

- fail: msg="cannot find a IPv4 and IPv6 neighbor to change mac address"
when: ( arptable.v4 | length == 0 ) or ( arptable.v6 | length == 0 )
Copy link
Contributor

Choose a reason for hiding this comment

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

we do not need to fail if there is no neighbor, we can just first create a neigbhor entry.

with_dict: "{{ arptable.v6 }}"
when:
- "'fe80::' not in item.key | lower"
- ('Ethernet' in item.value['interface']) or ('PortChannel' in item.value['interface'])
Copy link
Contributor

Choose a reason for hiding this comment

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

move to v6 section below.

@@ -2,6 +2,9 @@
# Test run example:
# ansible-playbook -i inventory --limit arc-switch1027 test_sonic.yml -b -e "ptf_host=ptf-1" --tags neighbour

- name: Add a new test to test SONiC kernel change neighbor mac address, no ptf neighbor requried
include: neighbour-mac-noptf.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

let's add this to the sonic.yml make it independent of neighour-mac.yml

Copy link
Contributor

@lguohan lguohan left a comment

Choose a reason for hiding this comment

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

as comments.

Copy link
Contributor

@lguohan lguohan left a comment

Choose a reason for hiding this comment

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

:shipit:

@lguohan
Copy link
Contributor

lguohan commented Oct 20, 2017

we need later consider mac address change on the vlan interface.

@maggiemsft maggiemsft merged commit 24e4d57 into sonic-net:master Oct 20, 2017
@maggiemsft maggiemsft deleted the masun/arp_and_neigh branch November 21, 2017 04:26
praveen-li pushed a commit to praveen-li/sonic-mgmt that referenced this pull request Jun 20, 2019
* msft_github/master:
  [test]: Add ptf_platform_dir: ptftests to enable more than 32 ports testbed (sonic-net#315)
  [bgp_speaker]: Support t0-64 topology (sonic-net#316)
  [Minigraph Templates]: Add new <DhcpRelays> node to Vlans as appropriate (sonic-net#298)
  [sensors]: Add comment to indicate the sensors data file path
  [ptf_runner]: Add ptf_platform_dir option to indicate --platform-dir option (sonic-net#304)
  Make fetch command arguments supported by newer ansible version (sonic-net#310)
  [arista7260cx3] define t0 116 ports topology
  [fast-reboot test]: Cosmetic fixes (sonic-net#307)
  [test]add more ARP and neighbor-mac tests (sonic-net#303)
  After boot_onie, admin up all bgp interfaces (sonic-net#306)
  Update README.test.md
  add test case bgp multipath relax (sonic-net#284)
  [minigraph]: Remove unnecessary quotes (sonic-net#301)
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.

3 participants