sign: Clear ARP/NDP cache & ping before tx in test script

This helps setting ARP/NDP such that they do not expire during tx for
unidirectional flows
This commit is contained in:
Srivats P 2016-12-08 20:59:51 +05:30
parent 58a16a253e
commit 72521f782e

View File

@ -446,9 +446,24 @@ def test_unidir(drone, ports, dut, dut_ports, dut_ip, emul_ports, dgid_list,
drone.resolveDeviceNeighbors(emul_ports)
time.sleep(3)
# clear ARP/NDP cache before ping from DUT to devices
# - this helps set up ARP/NDP on DUT so that it doesn't age out
# while traffic is flowing
sudo('ip neigh flush all')
out = run('ping -c3 10.10.1.101', warn_only=True)
assert '100% packet loss' not in out
out = run('ping -c3 10.10.2.101', warn_only=True)
assert '100% packet loss' not in out
out = run('ping -6 -c3 1234:1::65', warn_only=True)
assert '100% packet loss' not in out
out = run('ping -6 -c3 1234:2::65', warn_only=True)
assert '100% packet loss' not in out
# FIXME: dump ARP/NDP table on devices and DUT
try:
#run('ip -6 neigh show')
drone.startCapture(ports.y)
drone.startCapture(ports.x)
time.sleep(1)
@ -460,6 +475,8 @@ def test_unidir(drone, ports, dut, dut_ports, dut_ip, emul_ports, dgid_list,
drone.stopCapture(ports.x)
drone.stopCapture(ports.y)
#run('ip -6 neigh show')
# verify port stats
x_stats = drone.getStats(ports.x)
log.info('--> (x_stats)' + x_stats.__str__())