network_3GSmokeTest sometimes fails with an exception "illegal IP address string passed to inet_aton" |
|||
Issue description
network_3GSmokeTest sometimes fails with an exception "illegal IP address string passed to inet_aton":
UnhandledTestFail: Unhandled error: illegal IP address string passed to inet_aton
Traceback (most recent call last):
File "/usr/local/autotest/common_lib/test.py", line 818, in _call_test_function
return func(*args, **dargs)
File "/usr/local/autotest/common_lib/test.py", line 471, in execute
dargs)
File "/usr/local/autotest/common_lib/test.py", line 348, in _call_run_once_with_retry
postprocess_profiled_run, args, dargs)
File "/usr/local/autotest/common_lib/test.py", line 381, in _call_run_once
self.run_once(*args, **dargs)
File "/usr/local/autotest/tests/network_3GSmokeTest/network_3GSmokeTest.py", line 141, in run_once
self.run_once_internal()
File "/usr/local/autotest/tests/network_3GSmokeTest/network_3GSmokeTest.py", line 108, in run_once_internal
interface)
File "/usr/local/autotest/cros/network.py", line 210, in CheckInterfaceForDestination
interface = routes.getRouteFor(address).interface
File "/usr/local//usr/lib/flimflam/test/routing.py", line 135, in getRouteFor
ip = convertIpToInt(ip_as_int_or_string)
File "/usr/local//usr/lib/flimflam/test/routing.py", line 42, in convertIpToInt
return struct.unpack('I', socket.inet_aton(i))[0]
error: illegal IP address string passed to inet_aton
The issue is that network_3GSmokeTest uses network.CheckInterfaceForDestination() from third_party/autotest/files/client/cros/network.py to check if routes for a specified host go through a given interface. Under the hood, network.CheckInterfaceForDestination() uses NetworkRoutes.getRouteFor() from shill/test-scripts/routing.py. However, as NetworkRoutes doesn't currently handle IPv6 routes / addresses, NetworkRoutes.getRouteFor() raises an exception when it receives an IPv6 address.
,
Jul 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/53e79ddbc4f409ba73104c83d3e9c9ec25772172 commit 53e79ddbc4f409ba73104c83d3e9c9ec25772172 Author: Ben Chan <benchan@chromium.org> Date: Fri Jul 14 02:46:14 2017 Workaround IPv6 issue in network.CheckInterfaceForDestination A few tests (e.g. network_3GSmokeTest, network_WiMaxSmoke) use network.CheckInterfaceForDestination() to check if routes for a specified host go through a given interface. Under the hood, network.CheckInterfaceForDestination() uses NetworkRoutes.getRouteFor() provided by shill/test-scripts/routing.py. However, as NetworkRoutes doesn't currently handle IPv6 routes / addresses, NetworkRoutes.getRouteFor() raises an exception when it receives an IPv6 address. As IPv6 support isn't stricitly necessarily at this point, this CL temporarily works around the issue by filtering out IPv6 addresses reported by socket.getaddrinfo() in network.CheckInterfaceForDestination(). BUG= chromium:742043 TEST=Run network_3GSmokeTest on a DUT with a cellular modem. Change-Id: I41fc6a7944a70e6e390d947469e57dad121804c6 Reviewed-on: https://chromium-review.googlesource.com/569491 Commit-Ready: Ben Chan <benchan@chromium.org> Tested-by: Ben Chan <benchan@chromium.org> Reviewed-by: Eric Caruso <ejcaruso@chromium.org> [modify] https://crrev.com/53e79ddbc4f409ba73104c83d3e9c9ec25772172/client/cros/network.py
,
Jul 14 2017
,
Jul 29 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/bfd5284709ecdda966cbf2b6dc775da0066eec23 commit bfd5284709ecdda966cbf2b6dc775da0066eec23 Author: Ben Chan <benchan@chromium.org> Date: Sat Jul 29 05:07:58 2017 Handle missing route in network.CheckInterfaceForDestination. network.CheckInterfaceForDestination checks if any route to a host goes through a particular interface. As multiple IP addresses may be resolved for the host, it's ok if some but not all addresses don't have a route. This CL modifies network.CheckInterfaceForDestination to fail only if there is no route to reach the host or if some route goes through an interface other than the specified one. BUG= chromium:742043 TEST=Run network_3GSmokeTest on a DUT with cellular modem. Change-Id: I3884ec139110c8f6559480dd8605f741606bc5cc Reviewed-on: https://chromium-review.googlesource.com/592404 Commit-Ready: Ben Chan <benchan@chromium.org> Tested-by: Ben Chan <benchan@chromium.org> Reviewed-by: Ben Chan <benchan@chromium.org> [modify] https://crrev.com/bfd5284709ecdda966cbf2b6dc775da0066eec23/client/cros/network.py
,
Jan 22 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by benchan@chromium.org
, Jul 13 2017