Commit Graph

4 Commits

Author SHA1 Message Date
Dmitry Muhomor
6ad888c42a memtag_test: improve capturing of test results
Using debuggerd + logcat parsing is unreliable and slow, print SEGV signal code to stderr instead.
2023-10-29 15:06:14 +02:00
Dmitry Muhomor
1adfed0252 memtag_test: improve tag_distinctness test
- check that tag distinctess checks are actually reached (it was previously verified manually by
looking at the now-removed printf output)
- check that only non-reserved tags are used
- check that all of non-reserved tags are used
- print tag usage statistics at the end of run
2023-10-29 15:02:51 +02:00
Dmitry Muhomor
14f4e927ca memtag_test: remove usages of rand()
It didn't work correctly due to not being seeded and its usage wasn't necessary.
2023-10-29 13:23:55 +02:00
Dmitry Muhomor
62166c10cf android: add MTE tests
To run them, connect an MTE-enabled device via adb and execute `atest HMallocTest:MemtagTest`.

Since these tests are not deterministic (and neither is hardened_malloc itself), it's better to run
them multiple times, e.g. `atest --iterations 30 HMallocTest:MemtagTest`.

There are also CTS tests that are useful for checking correctness of the Android integration:
`atest CtsTaggingHostTestCases`
2023-10-28 21:06:12 +03:00