History log of /frameworks/base/cmds/incidentd/tests/Section_test.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e09cde0cd986223fd152e7629411254015de016f 02-May-2018 Yi Jin <jinyithu@google.com> Merge "Add a section flag to bypass failure if a specific path can't be found." into pi-dev
7fe3dee3ae1cc47b50c4001cbac56c4fefbcc57b 17-Apr-2018 Yi Jin <jinyithu@google.com> Add a section flag to bypass failure if a specific path can't be found.

This is a temporary solution to bypass failure of reading cpu info or
battery type in P if the path doesn't exist on some devices. See bug for
details. However in Q, incidentd should implement reading from the
common Linux kernel interfaces.

Bug: 78028767
Bug: 78239764
Test: atest incidentd_test
Change-Id: I08ffcb21709efe5478d2ac46121deb5795af1024
Merged-In: I08ffcb21709efe5478d2ac46121deb5795af1024
/frameworks/base/cmds/incidentd/tests/Section_test.cpp
98ce81050b554630d74c77724d22f77431783d96 12-Apr-2018 Yi Jin <jinyithu@google.com> Fix incidentd skip collecting timedout of a section.

By moving the section stats collection before any return statements,
it won't missing stats collection.

Bug: 77962855
Test: atest incidentd_test
Change-Id: I0900556428c51636e24df48a407eb916ccff795c
/frameworks/base/cmds/incidentd/tests/Section_test.cpp
6cacbcbf436be744a34f7ea0d4f838ff97757446 30-Mar-2018 Yi Jin <jinyithu@google.com> Use modern c++ code style for incidentd.

This cl does not contain code logic changes.

Bug: 77333635
Test: manual and incidentd_test
Change-Id: Iea0a402b1051defd45159ca267e6dd705f9ffa49
/frameworks/base/cmds/incidentd/tests/Section_test.cpp
c858e2781c437c9b659141fb42299c1df4c95d74 29-Mar-2018 Yi Jin <jinyithu@google.com> Enable Last Kmsg, also fix the GZipSection test.

Bug: 73354384, 76208934
Test: atest incidentd_test and manual as well
Change-Id: I074027f4d972686ae3e9415b50e4d3967f6a2355
/frameworks/base/cmds/incidentd/tests/Section_test.cpp
c36e91dd127751b54ef0886175b56b4a2e6af28c 08-Mar-2018 Yi Jin <jinyithu@google.com> Found out it is not possible to exec procrank as non-root/shell.
But it is ok to disable procrank since the information can be obtain via
dumpsys meminfo

Optimize the code style a bit.

Bug: 72510307
Test: atest incidentd_test
Change-Id: If06201aa708461b569d9fb007f20d1e51342d5c2
/frameworks/base/cmds/incidentd/tests/Section_test.cpp
86dce413f808ca9ef160e8762f74deaafd7c23ae 07-Mar-2018 Yi Jin <jinyithu@google.com> Optimize incidentd memory usage

1. Remove dependency of libprotobuf-cpp-lite, saves .so mmap ~200KB
2. Don't use auto except iterator for readability.

Bug: 74254200
Test: adb shell dumpsys meminfo `pid incidentd`
Change-Id: If6198521c3b80929d6ea3f7ed466b5195991ccfd
/frameworks/base/cmds/incidentd/tests/Section_test.cpp
1a11fa10977ee1e2645d400844ff4d472b8f5f02 23-Feb-2018 Yi Jin <jinyithu@google.com> Implement a new section to attach LAST_KMSG to incident report
This section simply gzip a large file and stores result in GZippedFileProto

This greatly improves the size, before gzip, the last kmsg size ~500KB,
after gzip the proto size is ~60KB.

Bug: 73354384
Test: atest incidentd_test and manual on device test
Change-Id: I9bfc2cf07384487671edbffb5f0bd8495608fea6
/frameworks/base/cmds/incidentd/tests/Section_test.cpp
4e843106a6f510a7d77fedfbeaec8e95b57905b7 15-Feb-2018 Yi Jin <jinyithu@google.com> Throttler for incidentd based on size putting into dropbox.

The incidentd will accumulate the total size put into dropbox and once
it exceeds a threshold (currently 20MB) daily, it will stop further
requests. It allows collection again 24 hours later.

Bug: 64219725
Test: atest incidentd_test and manually flashed incidentd and test.
Change-Id: Iea21fbae40d5d01108797b190231d73e74eff213
/frameworks/base/cmds/incidentd/tests/Section_test.cpp
b592e3bc3169e39bd6b0bfce9f788631d5d22acd 02-Feb-2018 Yi Jin <jinyithu@google.com> This cl formats incidentd and makes it easier for debugging.

Bug: 72755317
Test: clang-format -type=file -i <files>
Change-Id: Ide91227f26c6b1db6d2e5fe8117ca5cc4cf77fd3
/frameworks/base/cmds/incidentd/tests/Section_test.cpp
329130b7e40d27f660aa275ef6905bd7ee91f64c 10-Feb-2018 Yi Jin <jinyithu@google.com> Put metadata or stats into each dropbox incident report.

Bug: 65451198
Test: atest incidentd_test
Change-Id: Ib406b177ad7f1b4bda7fef2e606fc66a9836e060
/frameworks/base/cmds/incidentd/tests/Section_test.cpp
437aa6e8ad24489fcd8a7ab2c889874cfae12d0b 10-Jan-2018 Yi Jin <jinyithu@google.com> Add more information to incident header. Especially add config keys
to check if the report is uploadable.

Move incidentheader.proto to libincident so statds is able to include a lite
proto class for incident header.

Change IncidentReportArgs to add the proto object instead of serialized
bytes to prevent caller gives meaningless data.

Bug: 70241842
Test: push config to statsd and verify incidentd generate the report
with correct header.

Change-Id: If95b655be71047b019b229e5903a08f3c21a1f29
/frameworks/base/cmds/incidentd/tests/Section_test.cpp
3c034c987e1eeb49660fb62d3426c292a01412c9 23-Dec-2017 Yi Jin <jinyithu@google.com> Implement a new type of section which reads from logd and dumps proto.

And implement a file section which reads from event-log-tags for
decoding binary logs.

Bug: 70936599
Test: atest incidentd_test && atest incident_helper_test and flush on
device and test log sections and event_log_tag_map
Change-Id: Ib3d35e317f355de69f01ded012482486e9a43da6
/frameworks/base/cmds/incidentd/tests/Section_test.cpp
bdf58942c86240070bacc25203177cf47f6a1577 15-Nov-2017 Yi Jin <jinyithu@google.com> 1. Implement Privacy Policy Tag Inheritance
2. Expose Dest values in IIncidentReportArgs.h

Please see bug for detail descriptions.

Bug: 67869340
Test: unit tested and on-device test. Ran command:
$ out/host/linux-x86/bin/incident-section-gen incidentd
to test various of privacy taggings.
Change-Id: I12af3d7da4c7c72bd63598893fe2c1f70b09baa4
/frameworks/base/cmds/incidentd/tests/Section_test.cpp
254102d858942393482589b8f1e6102b33797b58 10-Nov-2017 Wei Wang <wvw@google.com> Remove unnecessary parameter WriteStringToFile

By default, WriteStringToFile will not follow link, the 'false'
parameter is unnecessary.

Test: build
Change-Id: Ied6dcbf2a85533108dc2f6d71a4571b44684e800
/frameworks/base/cmds/incidentd/tests/Section_test.cpp
edfd5bb7888899976762623a4c940710026480ea 07-Sep-2017 Yi Jin <jinyithu@google.com> Extract IncidentHeaderProto to a separated file for statsd to consume

Create a HeaderSection to deal with header protos which is more testable

Bug: 65422268
Test: unit tested
Change-Id: Icdcbeded8bc963940a8f9e503cb65a9a247ca5b2
/frameworks/base/cmds/incidentd/tests/Section_test.cpp
0f0471623e91c202fb7381a050cc331572fb439f 05-Sep-2017 Yi Jin <jinyithu@google.com> Implement Pii Stripper Part 3

The incident request args sets privacy spec. Strip action is optimized
to run once for each type of spec and ready for flush multiple times.
Incident command is updated to take -p option to specify privacy spec.

Bug: 64687253
Test: unit tests written, manually run incident command to test as well
Change-Id: I6753df117f76dc1a5f4d2152baa3fbbf56b490e4
/frameworks/base/cmds/incidentd/tests/Section_test.cpp
99c248feb2d1f863b864bdfd1e3b37af17f18732 26-Aug-2017 Yi Jin <jinyithu@google.com> Implement PII Stripper, part 2

Implement EncodedBuffer that strip pii based on given privacy request.
The reason to implement another buffer is the length-delimited field's
size could change when its submessage gets stripped. It also intends to
keep the orignal data around for other requests to consume it.

In addition, the section implementation has adapted EncodedBuffer so
write out to each request's fd could be request-specific. The next step
is allow requests to set its privacy spec.

Notice the current design set the privacy spec of dropbox to AUTOMATIC,
this behavior might change in the future.

Bug: 64687253
Test: unit tests are writtern, see README.md for how to run unit tests.
Change-Id: I7ac236b8265ba9289dc6e17a8a5bf7f67ffb6bf5
/frameworks/base/cmds/incidentd/tests/Section_test.cpp
b44f7d46b647e24d8ea4fdf45742bbcbbfb03113 21-Jul-2017 Yi Jin <jinyithu@google.com> This cl implements CommandSection and use it to add procrank.proto Section

Bug: 63863444
Test: manual - create gtests for CommandSection and Procrank Parser following
instructions in the README.md of incidentd and incident_helper on how to
run them.

Change-Id: I099808fd13bf9ed9a564b122f1126b1691a83291
/frameworks/base/cmds/incidentd/tests/Section_test.cpp
0a3406fc4f8e9a8c8a9155fc7886a0496f692496 23-Jun-2017 Yi Jin <jinyithu@google.com> This cl does the following things:

0) Implements a skeleton of incident_helper
1) Implements FileSection class which calls incident_helper to parse
file content to protobuf
2) Adds Kernel Wake Sources to incident.proto and makes it parsed by
FileSection
3) Adds basic gtests to test FdBuffer, io_utils, FileSection
implementation

Bug: 62923266
Bug: 62926061
Test: manual - push incidentd, incident_helper and incident to my device
and verify kernel wakeup sources file is able to be parsed.
Change-Id: I2aa6b6158d962ce70e6fa6c8a9c42213a45ff41c
/frameworks/base/cmds/incidentd/tests/Section_test.cpp