Pause APF filter before starting test

adb shell cmd apf <iface> install requires APF to be paused beforehand.
Resume in tearDown.

Test: atest ApfIntegrationTest
Change-Id: I1b1345a629dc03446ae3b74ab06f40a06085cd28
This commit is contained in:
Patrick Rohr 2024-03-29 15:10:49 -07:00
commit ee085cc201

View file

@ -93,6 +93,7 @@ class ApfIntegrationTest {
ifname = assertNotNull(it.lp.interfaceName)
true
}
runShellCommandOrThrow("cmd network_stack apf $ifname pause")
}
@After
@ -100,6 +101,7 @@ class ApfIntegrationTest {
if (::networkCallback.isInitialized) {
cm.unregisterNetworkCallback(networkCallback)
}
runShellCommandOrThrow("cmd network_stack apf $ifname resume")
}
fun getApfCapabilities(): ApfCapabilities {