summaryrefslogtreecommitdiff
path: root/libunwindstack/tests/MemoryCacheTest.cpp
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2019-04-18 12:41:29 -0700
committerMark Salyzyn <salyzyn@google.com>2019-04-23 07:14:44 -0700
commit67ee8a8ef9fe3c4f8eacd3d4246ceb43a7289bf1 (patch)
tree27cd3b06bfca4b3e61678488038a50230000fb6c /libunwindstack/tests/MemoryCacheTest.cpp
parent2ddb8df2ef22514f1bf91fe73b99877d19b2a964 (diff)
bootstat: Allow regex matches for boot reasons
If the matching string contains a [, \ or *, then it is also checked with a regex match. Exact match is always tried firsts. If we do not find an exact string match, switch to iterate through the entire list for regex strings to find a match. This allows us to scale with details without consuming a large number of enums, permitting details that we do not necessarily want resolution on to propagate to TRON. The hierarchical nature of the boot reason <reason>,<subreason>,<detail>... can cause scenarios where the <detail> does not matter to TRON, but does matter to bugreport collection. Add a bootstat --boot_reason_enum function to expose and test the kBootReasonMap matchihg algorithm. Add a kBootReasonMap test that exhaustively tests all built-in entries, and an example of one regex entry. New regex entries added to bootstat.cpp will need a series of exact match examples added into filter_kBootReasonMap() function. Test: boot_reason_test.sh kBootReasonMap (or all tests) Bug: 116838876 Bug: 128929506 Change-Id: I3f7b5de22f99195b7ce99672a212174365960b3f
Diffstat (limited to 'libunwindstack/tests/MemoryCacheTest.cpp')
0 files changed, 0 insertions, 0 deletions