Increase coverage of libartpalette-system native API.
- Call PaletteAshmemCreateRegion and PaletteAshmemSetProtRegion, which
don't get exercised on memfd capable kernels.
- Call PaletteNotify{Begin,End}JniInvocation regardless of what the
ShouldReport gate function says. Start a VM to give them a valid
JNIEnv argument.
- Add a CTS test to run dex2oat with a new special flag to make it call
PaletteNotify{Start,End}Dex2oatCompilation regardless of what the
ShouldReport gate function says. This way they get valid fd's for the
oat and vdex files.
Test: m cts cts-tradefed
cts-tradefed run commandAndExit cts \
--module art_standalone_dex2oat_cts_tests
cts-tradefed run commandAndExit cts \
--module art_standalone_libartpalette_tests
with log messages in the hook functions in palette_android_partner.cc
to verify that they are called.
Test: art/tools/run-gtests.sh \
/apex/com.android.art/bin/art/{x86,x86_64}/art_libartpalette_tests
in device chroot test environment
Test: m test-art-host-gtest-art_libartpalette_tests
Bug: 206657952
Change-Id: I91f3182f15d234dbaca2a4357442efd2e957373f
8 files changed