Create a tethered interface request in setUp
This CL makes the TetheredInterfaceRequester a class member that gets
initialized (and therefore creates a tethered interface request) in
setup, and releases it again in tearDown. This ensures that when a test
interface is created, ethernet never puts said interface in client mode.
In a previous iteration of this test, there was a race where test
interfaces were briefly put in client mode, which started an IpClient on
the interface. One of the first things the IpClient startup code does is
enable IPv6 which causes RS and MLD packets to be transmitted. This
caused a lot of flaky test failures as the tests were not expecting to
see these packets (and they did not drain the interface appropriately).
Making the tethered interface request permanent during the runtime of
this test solves this issue. As a follow up, the test interfaces should
also be drained when first being passed to TetheringTester.
Test: atest EthernetTetheringTest --iterations 50 (-> there was one
flaky failure that is still being investigated).
Bug: 341800184
Change-Id: Ib0a2518b89d8cc05bb800db6ec5e31f527ba2daa
3 files changed