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

Add option to extend ping duration for ipaddr module tests #958

Open
evensonbryan opened this issue Jun 7, 2022 · 0 comments
Open

Add option to extend ping duration for ipaddr module tests #958

evensonbryan opened this issue Jun 7, 2022 · 0 comments

Comments

@evensonbryan
Copy link

My device is changing its IP address as directed during the ipaddr module tests. However, my device is failing the connection.ipaddr.disconnect_ip_change and connection.ipaddr.ip_change tests. There is some settling time on my device and the new IP address takes effect about 4 to 5 seconds after receiving the new IP address from the DHCP server. However, the ipaddr module is pinging my device immediately after the DHCP ACK and before the new IP address takes effect.

On the release_stable branch I changed this line:

output = src.cmd('ping -c2', ping_opt, dst_ip, '> /dev/null 2>&1 || echo ', failure)

to this:
output = src.cmd('ping -c10', ping_opt, dst_ip, '> /dev/null 2>&1 || echo ', failure)

After this change, all my ipaddr module tests passed.

I see on the master branch the ping_test() function in runner.py was modified to accept a 'count' variable which sets how many pings to send. However, that variable is never set anywhere and the ping count is still always set to 2. I propose adding an ipaddr module configuration option that sets the ping count in ping_test(). If it is not set, the system will continue to default to a ping count of 2.

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

No branches or pull requests

1 participant