diff options
author | Mark Salyzyn <salyzyn@google.com> | 2019-04-18 12:41:29 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2019-05-01 18:17:04 +0000 |
commit | c805a48b116a0b5879f524fa34411d5f91fef6ff (patch) | |
tree | 25830ffc5e99643751241f85fa130789dd28ee5d /trusty/coverage/coverage.cpp | |
parent | 1040109071250522f465867af42b2924682aa900 (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
Merged-In: I3f7b5de22f99195b7ce99672a212174365960b3f
Diffstat (limited to 'trusty/coverage/coverage.cpp')
0 files changed, 0 insertions, 0 deletions