ethernet: temporary mitigation for test that uses TUNSETCARRIER

Since creating an interface without carrier can still have carrier for a
short period of time, the never available assertion is flaky.

This change removes the assertion which is to be readded after
IFF_NO_CARRIER is supported in the kernel.

Test: atest EthernetManagerTest
Bug: 249611919
Change-Id: I437fa2ed34fa28c07b66358b63be40a80d00acf0
This commit is contained in:
Patrick Rohr
2022-09-28 17:03:26 -07:00
parent 5d00e57759
commit c06e79d3c8

View File

@@ -798,7 +798,10 @@ class EthernetManagerTest {
val iface = createInterface(false /* hasCarrier */)
val cb = requestNetwork(ETH_REQUEST)
cb.assertNeverAvailable()
// TUNSETCARRIER races with the bring up code, so the network *can* become available despite
// it being "created with no carrier".
// TODO(b/249611919): re-enable assertion once kernel supports IFF_NO_CARRIER.
// cb.assertNeverAvailable()
iface.setCarrierEnabled(true)
cb.expectAvailable()