Move ARPHRD_ETHER assertion below test assume condition
Makes saner error if device does not even support APF at all.
Test: TreeHugger
Bug: 385979701
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ided37893d7e0d6b03436064f44d1fa9061f0951d
diff --git a/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt b/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt
index fc66ce0..c7d95a5 100644
--- a/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt
+++ b/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt
@@ -366,9 +366,6 @@
val vsrApiLevel = getVsrApiLevel()
assume().that(vsrApiLevel).isAtLeast(34)
- // ApfFilter does not support anything but ARPHRD_ETHER.
- assertThat(caps.apfPacketFormat).isEqualTo(OsConstants.ARPHRD_ETHER)
-
// DEVICEs launching with Android 14 with CHIPSETs that set ro.board.first_api_level to 34:
// - [GMS-VSR-5.3.12-003] MUST return 4 or higher as the APF version number from calls to
// the getApfPacketFilterCapabilities HAL method.
@@ -400,6 +397,9 @@
assertThat(caps.apfVersionSupported).isEqualTo(6000)
assertThat(caps.maximumApfProgramSize).isAtLeast(4000)
}
+
+ // ApfFilter does not support anything but ARPHRD_ETHER.
+ assertThat(caps.apfPacketFormat).isEqualTo(OsConstants.ARPHRD_ETHER)
}
// APF is backwards compatible, i.e. a v6 interpreter supports both v2 and v4 functionality.