summaryrefslogtreecommitdiff
path: root/tests/DexLoggerIntegrationTests/src
AgeCommit message (Collapse)Author
2019-02-20Rename test class to match code.Alan Stokes
Renaming DexLoggerIntegrationTests to DynamicCodeLoggerIntegrationTests, to match the rename and changed scope of the code it is testing. Test: atest -p services/core/java/com/android/server/pm/dex Bug: 122946463 Change-Id: I66abd6b173f148279085dee7a714aa64df7a941b
2019-02-18Attempt to de-flake tests.Alan Stokes
Some of these tests rely on audit logs being generated and then visible when we try to read them. Occasionally this doesn't work - probably because of throttling or the asynchronous, background nature of logging. When it happens the tests fail. To avoid this, re-run the susceptible tests multiple times rather than failing on the first go, with increasingly long delays between triggering and reading the logs on each run. Bug: 123507824 Test: atest -p services/core/java/com/android/server/pm/dex Change-Id: I62db997c912b2d153ecaea34011529c4c58207c7
2019-02-11Rename DexLogger to DynamicCodeLogger.Alan Stokes
Because it logs native code as well as DEX code now. Also fix up field names, getters, comments, etc. Test: atest -p services/core/java/com/android/server/pm/dex Bug: 122946463 Change-Id: I797b698504d24a76186f2f429a0e2f23a68614f0
2019-01-25Support multi-ABI in tests.Alan Stokes
Build the test .so for all ABIs and then pick the right one to load at runtime. (The executable doesn't need this, since it runs in its own process.) Bug: 123281572 Test: atest DexLoggerIntegrationTests Test: atest DexLoggerIntegrationTests -- --abi armeabi-v7a Change-Id: I0696ef75e42834b13524abde619dc0f8e79c8363
2019-01-21Add logging of dynamic loading of native code.Alan Stokes
This uses the SELinux audit messages generated when an untrusted app, targeting SDK 28 or lower, executes native code from an app data directory. "Executes" here covers memory mapping a file with execute permission (including using dl_open) or calling execve. As with dynamic loading of DEX code we write a hash of the contents of the file executed to the event log. The existing unit and integration tests are extended to verify the new behaviour. Bug: 111338677 Test: atest -p services/core/java/com/android/server/pm/dex Change-Id: Ifbb3b338135db413be2cd83b1a8e7499d61d88dd
2018-12-13Separate job service for dynamic code logging.Alan Stokes
Decouple logging of dynamic code loading from background DEX optimisation/reconciliation (BackgroundDexOptService). Add DynamicCodeLoggingService to run DCL logging daily while idle and charging. Update DexLoggerIntegrationTests to use the new job, and to verify that we now handle unknown class loaders. Bug: 111336847 Test: atest -p services/core/java/com/android/server/pm/dex Change-Id: Id688a7eef5976120be12606e726830ce32451a1e
2018-01-09More DexLoggerIntegrationTests tweaks.Alan Stokes
Add @LargeTest explicitly. Change package to ...pm.dex for consistency with other tests (and because that's where the code being tested lives). Test: atest DexLoggerIntegrationTests Bug: 63927552 Change-Id: Id76258292f318b331f19fac01fdbd94ed33e2d2e
2018-01-05Tidy up DexLoggerIntegrationTests.Alan Stokes
Addressing comments from ag/3381420. I also fixed two lines that were slightly too long. Bug: 63927552 Test: atest DexLoggerIntegrationTests Change-Id: I258d0aa2068c76175d30c0be9ba95482d3db9437
2018-01-03Add integration test for DexLogger.Alan Stokes
Bug: 63927552 Bug: 68703204 Test: atest DexLoggerIntegrationTests Change-Id: Ib61cf433ef4729c4e4a0539682b5ddbefdb65575