AVF debug policy enabled devices behave differently from end-user's
devices, so some tests (mostly for benchmarks) couldn't have been tested
the real world situation.
Specified DisableMicrodroidDebugPolicyPreparer for some tests that better
to be run without AVF debug policy. We can add the preparer for more tests,
but let me start with a small subset.
Test: atest. Benchmark stats were improved as expected.
Bug: 272496125
Change-Id: I829111d38bb16ee9b78c20ea8cec4dce7240a1ed
Modify VS to require the USE_CUSTOM_VIRTUAL_MACHINE permission if a
config file is specified.
Modify the tests to grant the necessary permissions at runtime rather
than via AndroidTest.xml. Make use of a config file explicit, and only
do so (and grant the custom VM permission) for the tests that need it.
Moved the existing permission test to a device test and added a new
one for the custom VM permission. That failed unexpectedly, so I fixed
the way we were reporting the exception.
Other minor tidying up. Renamed MicrodroidTestCase to
MicrodroidHostTests because it kept confusing me.
Bug: 243513572
Test: atest MicrodroidTests MicrodroidHostTests
Change-Id: Ie67e7ed214dc9c95e453ca1fcc38a1b18d4f5f88
The test doesn't have enough permissions to read /proc/$pid/smaps by
default. Running the test as root fixes it. I couldn't find a more
precise fix.
Bug: 233870249
Test: atest "com.android.microdroid.benchmark.MicrodroidBenchmarks#testMemoryUsage"
Change-Id: I92e1c2badbc46ebc2336508ebc85ec44211eeff2
testMinimumRequiredRAM will find minimum required RAM to boot Microdroid
by bisecting. The result will be collected as a metric.
Bug: 231105297
Test: atest MicrodroidBenchmarks
Change-Id: Icb34a2cc2f9d906ebde661be86ac9b802288de5b