History log of /system/core/logcat/tests/logcat_test.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7545b471a223a4a222a24b8b1693cc4a69ee3833 11-Apr-2016 Mark Salyzyn <salyzyn@google.com> logcat: allow comma-separate list of buffers

(cherry pick from commit 45177732966d82a9ee8d558f9b115e061e0c7208)

- Add parsing to support comma+ separated list of buffers.
- Move get_size test into a standalone get_groups function
- add some additional tests for this feature, leveraging
get_groups to confirm buffer selection.

Bug: 28120456
Bug: 28788401
Bug: 28813587
Change-Id: I0b42736c08cf4b2a435cb74cda540dc163a26bd1
/system/core/logcat/tests/logcat_test.cpp
c869959d6266a07591653b6c9e8ea0c173c3b0c8 06-Jun-2016 Mark Salyzyn <salyzyn@google.com> logcat: clear when specifying file output

(cherry pick from commit b7d059bb2f4e480d2787cf41e03ef85b75503910)

If -c and -f are both specified, clear the files rather
than notifying the logger to clear its data. The -f then
acts like a switch between clearing the in-memory log
data, or the on-disk logrotate data.

Bug: 28788401
Bug: 28813587
Bug: 28936216
Change-Id: Ib1d1fb46ea09f81a2fd9bebb6c8f0f9f2355f6e8
/system/core/logcat/tests/logcat_test.cpp
3c535de75e3da05e32e69dfcdd6a864dbdc451fd 12-Apr-2016 Mark Salyzyn <salyzyn@google.com> logcat: apct test failures

(cherry pick from 3842b1a5f6f12bd1ffb885940aa88a7bb959e58d)

Change-Id: I100a5071c059fe9fa85bbdc33db552b16d7bdf60
/system/core/logcat/tests/logcat_test.cpp
1ab87e7712cea615ecdf70e65d74d14d3fd8fa85 01-Apr-2016 Mark Salyzyn <salyzyn@google.com> logcat: -f <non-existent-directory>/<filename> segfaults

(cherry pick from commit c18c2130d036b115b222860366a97e26a2a1c038)

- Check if the result of opendir is NULL in lastLogTime
- Cleanup: alphabetically sorted long options, reserved
an alias for --regex
- Add a unit test, non existent directory should return
gracefully with an exit(1) and not SIGSEGV.

NB: This failure was with eng/debug feature logpersist
turned on, /data/misc/logd/ directory was missing,
deleted, or temporarily inaccessible.

Bug: 27954627
Change-Id: I60246a53b02fdd7e5490fe458b02ad7b14843584
/system/core/logcat/tests/logcat_test.cpp
1164ef6a73b6ec4a1057027a3cb60e2b0b9c2c34 17-Mar-2016 Casey Dahlin <sadmac@google.com> logcat: Add --max-count option

(cherry pick from commit 6ac498d4bbfe262595a77bacb2df9bda2c128222)

This new option causes logcat to quit after it prints N messages.

Test: New unit test passes
Bug: 27706081
Change-Id: Ie52ddf300160a041e68a6bac0ae7ade68bb28a7c
/system/core/logcat/tests/logcat_test.cpp
0f7732d70810cd66cd2c69a40311785d67044c2c 18-Mar-2016 Casey Dahlin <sadmac@google.com> logcat: Add --regex option

(cherry pick from commit dc42a8734e5394eef022984de528718e195a0e8e)

You can now filter log output by a regex on the messages.

Test: New unit test passes
Bug: 27706081
Change-Id: Idfa637f62a25fb1b92e9b49b89572dff0fec6e08
/system/core/logcat/tests/logcat_test.cpp
8beb0d3ad7b00f47e655f126d619bfaa59334b30 15-Dec-2015 Mark Salyzyn <salyzyn@google.com> logcat: test: rotated logs can exceed size during crash

Some crash messages can be as large as 4K, so allow
the rotated logs to have a larger size.

Change-Id: I20ef8d526ad2d5eca128d1f99f4ea2d2da426403
/system/core/logcat/tests/logcat_test.cpp
ba7a9a016bf011fdf45b6736d4c6d6795faba9d3 02-Dec-2015 Mark Salyzyn <salyzyn@google.com> logd: liblog: logcat: switch to android_log_clockid() (2)

android_log_timestamp returns the property leading letter,
it is better to return a clockid_t with android_log_clockid()

Bug: 23668800
Change-Id: I38dee773bf3844177826b03a26b03215c79a5359
/system/core/logcat/tests/logcat_test.cpp
9e18cdcebd893fbbb2369d893be219a7d832865f 07-Dec-2015 Mark Salyzyn <salyzyn@google.com> Revert "logd: liblog: logcat: switch to android_log_clockid()"

This reverts commit 77b5696b1dea6f7afed89e113e479f4a131c14fc.

Change-Id: I7711bf1a7e3f72ed29a2498d7287b725a0e624bd
/system/core/logcat/tests/logcat_test.cpp
77b5696b1dea6f7afed89e113e479f4a131c14fc 02-Dec-2015 Mark Salyzyn <salyzyn@google.com> logd: liblog: logcat: switch to android_log_clockid()

android_log_timestamp returns the property leading letter,
it is better to return a clockid_t with android_log_clockid()

Bug: 23668800
Change-Id: I3c4e3e6b87f6676950797f1f0e203b44c542ed43
/system/core/logcat/tests/logcat_test.cpp
b6bee33182cedea49199eb2252b3f3b442899c6d 08-Sep-2015 Mark Salyzyn <salyzyn@google.com> liblog: logd: support logd.timestamp = monotonic

if ro.logd.timestamp or persist.logd.timestamp are set to the value
monotonic then liblog writer, liblog printing and logd all switch to
recording/printing monotonic time rather than realtime. If reinit
detects a change for presist.logd.timestamp, correct the older entry
timestamps in place.

ToDo: A corner case condition where new log entries in monotonic time
occur before logd reinit detects persist.logd.timestamp, there
will be a few out-of-order entries, but with accurate
timestamps. This problem does not happen for ro.logd.timestamp
as it is set before logd starts.

NB: This offers a nano second time accuracy on all log entries
that may be more suitable for merging with other system
activities, such as systrace, that also use monotonic time. This
feature is for debugging.

Bug: 23668800
Change-Id: Iee6dab7140061b1a6627254921411f61b01aa5c2
/system/core/logcat/tests/logcat_test.cpp
9812fc4bd0b92baeb8f1cad6abdc440512e3cf40 06-Oct-2015 Mark Salyzyn <salyzyn@google.com> logcat: continue where we left off

Issue introduced as part of new logcatd functionality in
commit f3555d9427425c2cba9600ceffb49305c440aa4a

Faulty logic, add a gTest to confirm.

Bug: 19608716
Change-Id: Ic1b97def25e03e69faae4398a3dff2ff0f88545e
/system/core/logcat/tests/logcat_test.cpp
f28f6a9ba228803b402ebaccb59f1b2f2fd4af92 31-Aug-2015 Mark Salyzyn <salyzyn@google.com> liblog: logcat: Add year and zone to date on each line

- '-v year' modifier adds the four digit year prefix
- '-v <timezone>' modifier sets and prints the timezone suffix
- Only promise in logcat to support UTC as a timezone since
all others are based on the configured environment
- '-v zone' modifier toggles the timezone suffix on or off
- '-T YYYY-MM-DD HH:MM:SS.mmm...' format is added

Bug: 23668700
Change-Id: I7521c1efb7455dc9a25434fce72a69a65dcf72ea
/system/core/logcat/tests/logcat_test.cpp
9c51243d8bbcc5ee65dd6f7adc031e410ba5e86b 09-Mar-2015 Mark Salyzyn <salyzyn@google.com> logcat: test: logcat.logrotate fails

Test did not handle all possible multiples of block sizes.

Bug: 19604106
Change-Id: I693358be9598926389631baf21c5883e0f2fd735
/system/core/logcat/tests/logcat_test.cpp
1eca6a91a10a42662afd3d507867f8fedea0f29c 23-Nov-2014 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> Remove unused variable

Change-Id: Ifba91dd93a9c8170f8837c413756554e117be894
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
/system/core/logcat/tests/logcat_test.cpp
eba7344fc1aca4ae232b881fdf6c5b16e6f59bc9 17-Oct-2014 Aristidis Papaioannou <aristidis@google.com> Made suffix length of rotated logcat files constant.

The suffix now uses as many digits as needed to cover the maximum number
of rotated files.

eg, for 20 files it would use 2 digits: log_file.{01,02,03,...,20}

Change-Id: I4709b3cf4bf88c209db3c4d9e24a3a4731c98bae
/system/core/logcat/tests/logcat_test.cpp
a5e2429f09295dd94b0ae2125e380cfb3b02ab04 18-Sep-2014 Mark Salyzyn <salyzyn@google.com> logcat: tests: deal with -v threadtime default

- specify -v brief where necessary to preserve tests
- fix an occasional issue for logrotate and device block size

Change-Id: I09b02cc0359dc351a89311abc3ee762a0f23582c
/system/core/logcat/tests/logcat_test.cpp
d03caa23ddd8670ccd83eaf4ef4fc0c78e065c1b 10-Jul-2014 Mark Salyzyn <salyzyn@google.com> logcat: test: logrotate flags

- test -f -n and -r flags
- fix issue with parse error for sizes in bytes (no multiplier)

Bug: 16147190
Change-Id: Iadf2fd903d5e881d02f1d2b491441cc8090ee1c9
/system/core/logcat/tests/logcat_test.cpp
9879ac8e1290d744fc4363e6a976516053d5f64d 03-Jun-2014 Mark Salyzyn <salyzyn@google.com> logcat: test: modernize

- split sequential sort output test out as a benchmark check
- Allow up to two failures of sort results because of occasional reader locks.
- logcat -g output was changed to handle wider set of values incorporating a
multiplier for UX, and would not pass test if 'logcat -G 1M' was run.
- If spam filter is turned off, prune checks would fail, allowed for an
empty default.

Change-Id: I06d6089e18279df7525d1c16a1f76b3125ddbf05
/system/core/logcat/tests/logcat_test.cpp
b149e245c8ccd90b52227f3d07ab572080afac53 30-Apr-2014 Mark Salyzyn <salyzyn@google.com> logcat: turn on -Werror

- Deal with some -Wunused issues

Change-Id: Ic4ab9a49f13e156a73d40266e413dee3e6396178
/system/core/logcat/tests/logcat_test.cpp
1c950479393d42d18829d4009dbdb3a7f03acbb7 02-Apr-2014 Mark Salyzyn <salyzyn@google.com> logd: liblog: logcat: enable prune features for user

- Enable whitelist, blacklist and logsize tuneables for user

Change-Id: Id0c283844c71c5263a8cfbebf2e550f7ac415858
/system/core/logcat/tests/logcat_test.cpp
ef7c411ac384665fba6209f6b26d83932f9de576 11-Mar-2014 Mark Salyzyn <salyzyn@google.com> logcat: test arbitrary time to tail

- Add tail_time
- Use EXPECT instead of ASSERT to provide more coverage
- Use EXPECT_TRUE/ASSERT_TRUE when comparing NULL
- Itemize order complaints in sorted_order test

Change-Id: I55a7543fa3300c0a9524fac70111e680c2877eea
/system/core/logcat/tests/logcat_test.cpp
5fef7b6e31c22657dbd0294f0455d6adc6762ade 19-Mar-2014 Mark Salyzyn <salyzyn@google.com> logcat: timed tests fail under load

Change-Id: Ic1cdf0509617720eef7a3ad0b17a3b6f88c9d87e
/system/core/logcat/tests/logcat_test.cpp
22e287df0dfbc6e10c02f570d2fc0c42a2a6b7aa 21-Mar-2014 Mark Salyzyn <salyzyn@google.com> logcat: white and blacklist failure

- logcat improperly squashes out count
- logcat test enhanced to catch failure
- logd places entries in ascending sorted order

Change-Id: If39d8e2c40852b520c98e7840034ab63c2538e5d
/system/core/logcat/tests/logcat_test.cpp
95cfc7b8e2e6e5c6cdc97989563e49208915a583 11-Mar-2014 Mark Salyzyn <salyzyn@google.com> logcat: test White Black list

Change-Id: Ia9509ad09dd86e4d9169ed7d0b33911f1ca9eec6
/system/core/logcat/tests/logcat_test.cpp
9b986497e7f19a7fde9e35eb73d765f4a09dee07 22-Jan-2014 Mark Salyzyn <salyzyn@google.com> logcat: test: add clear and blocking check

(cherry picked from commit 1beb2ab6f6f7cec157b25a2e728c6de8c6be58c4)

Change-Id: I243b1338c4a5935a297a0519c03697fd828e47e6
/system/core/logcat/tests/logcat_test.cpp
5d3d1f17dbcb01aedd510b5435ebdaf1d6afc138 09-Dec-2013 Mark Salyzyn <salyzyn@google.com> logcat: Add -T flag (-t w/o assumption of -d)

(cherry picked from commit de02546e3d7c9c307e3d87e0a7fe8bb39b363a72)

Change-Id: I49763e2db83755e0b7b12dfa3f83a3957c54d389
/system/core/logcat/tests/logcat_test.cpp
65772ca7d7b61b111e75fb0f66f43966f0794bbd 13-Dec-2013 Mark Salyzyn <salyzyn@google.com> logcat: Add logcat test suite

(cherry picked from commit 2807db9a269baaa7b3f67c337d3312877ba90aa0)

Change-Id: Ic4c84b88b8d899965c9765bdc3ee223ef73ba7d1
/system/core/logcat/tests/logcat_test.cpp