Merge changes from topic "dscp-cts13-r2" into android13-tests-dev

* changes:
  DscpPolicy: remove v6 default route as it is added by the RA
  deflake DscpPolicyTest
  Update DscpPolicyTest to use random IPv6 prefixes.
  DscpPolicyTest: annotate with ConnectivityModuleTest
  DscpPolicy BPF Add Checksum Validation to Test
  DscpPolicyTest: fix linter errors
diff --git a/tests/cts/net/src/android/net/cts/EthernetManagerTest.kt b/tests/cts/net/src/android/net/cts/EthernetManagerTest.kt
index db24b44..a0fb29e 100644
--- a/tests/cts/net/src/android/net/cts/EthernetManagerTest.kt
+++ b/tests/cts/net/src/android/net/cts/EthernetManagerTest.kt
@@ -64,6 +64,7 @@
 import com.android.testutils.waitForIdle
 import org.junit.After
 import org.junit.Assume.assumeFalse
+import org.junit.Assume.assumeTrue
 import org.junit.Before
 import org.junit.Test
 import org.junit.runner.RunWith
@@ -227,15 +228,20 @@
         }
     }
 
+    private fun isEthernetSupported() = em != null
+
     @Before
     fun setUp() {
+        assumeTrue(isEthernetSupported())
         setIncludeTestInterfaces(true)
         addInterfaceStateListener(ifaceListener)
     }
 
     @After
     fun tearDown() {
+        if (!isEthernetSupported()) return
         setIncludeTestInterfaces(false)
+
         for (iface in createdIfaces) {
             iface.destroy()
             ifaceListener.eventuallyExpect(iface, STATE_ABSENT, ROLE_NONE)
@@ -329,11 +335,10 @@
         validateListenerOnRegistration(listener1)
 
         // If an interface appears, existing callbacks see it.
-        // TODO: fix the up/up/down/up callbacks and only send down/up.
         val iface2 = createInterface()
-        listener1.expectCallback(iface2, STATE_LINK_UP, ROLE_CLIENT)
-        listener1.expectCallback(iface2, STATE_LINK_UP, ROLE_CLIENT)
-        listener1.expectCallback(iface2, STATE_LINK_DOWN, ROLE_CLIENT)
+        // TODO: fix the up/up/down/up callbacks and only send down/up. Change to expectCallback
+        // once that is fixed.
+        listener1.eventuallyExpect(iface2, STATE_LINK_DOWN, ROLE_CLIENT)
         listener1.expectCallback(iface2, STATE_LINK_UP, ROLE_CLIENT)
 
         // Register a new listener, it should see state of all existing interfaces immediately.