Improve waiting for interface added or removed
In a previous CL, code was added to wait for interfaces being properly
registered with the EthernetTracker before continuing the test. The same
logic applies to removingInterfaces (which prevents a previous tests
Lost callbacks to show up in a subsequent test).
The createInterface listener was improved to expect the down callback
first. EthernetTracker receives down and up callbacks from netd which it
posts on its handler. While the initial up-up callbacks (KI) can be
flaky, down-up should always be the correct signal that the interface is
ready and properly registered with the ethernet code.
Test: atest EthernetManagerTest
Bug: 227008268
Change-Id: Id2a078da732009411934166df7ae08bedd17a19d
Merged-In: Id2a078da732009411934166df7ae08bedd17a19d
1 file changed