diff options
| author | Mark Salyzyn <salyzyn@google.com> | 2017-04-12 15:11:24 -0700 |
|---|---|---|
| committer | Mark Salyzyn <salyzyn@google.com> | 2017-04-14 12:56:06 -0700 |
| commit | 01bdb04be63bce0c81d1d07a77699631e913ceb5 (patch) | |
| tree | f0244feec1ad7e758c9b56f214de2f5214e6a29a /logcat | |
| parent | 5768d3d9769c37ede68efa2f7df98bb146881e62 (diff) | |
| download | system_core-01bdb04be63bce0c81d1d07a77699631e913ceb5.tar.gz system_core-01bdb04be63bce0c81d1d07a77699631e913ceb5.tar.bz2 system_core-01bdb04be63bce0c81d1d07a77699631e913ceb5.zip | |
liblog: allow event tags to include some punctuations
event_log_tag parser complains about a period (.) in the name,
we would consider such an enhancement to the tag names possible.
I expect we would want to be able to support alphanumerics,
underscore (_), period (.), minus (-), at (@) and comma (,) for
starters as they are present in the other text log buffer tags.
We introduce a local endOfTag function that is used during parsing and
during android_lookupEventTagNum for submitting new tags. This
function caused us to enforce const char more closely. By filtering
in both places we resolve an issue that could have plagued us if
garbage requests were made.
Test: gTest liblog-unit-tests, logd-unit-tests & logcat-unit-tests
Bug: 31456426
Change-Id: I596b8706e843719ddac07ec40e1cd2875c214bed
Diffstat (limited to 'logcat')
| -rw-r--r-- | logcat/tests/logcat_test.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/logcat/tests/logcat_test.cpp b/logcat/tests/logcat_test.cpp index 33355e4f5..e487a9720 100644 --- a/logcat/tests/logcat_test.cpp +++ b/logcat/tests/logcat_test.cpp @@ -1677,7 +1677,7 @@ TEST(logcat, descriptive) { // Invent new entries because existing can not serve EventTagMap* map = android_openEventTagMap(nullptr); ASSERT_TRUE(nullptr != map); - static const char name[] = ___STRING(logcat) "_descriptive_monotonic"; + static const char name[] = ___STRING(logcat) ".descriptive-monotonic"; int myTag = android_lookupEventTagNum(map, name, "(new|1|s)", ANDROID_LOG_UNKNOWN); android_closeEventTagMap(map); |
