Commit graph

19028 commits

Author SHA1 Message Date
James Hawkins
5cd4bc299b bootstat: Fix the build on git_mnc-dr1.5-dev-plus-aosp by adding missing
C++ includes

Bug: 21724738
Change-Id: I27e1e8d7897302a1f2d1e4d44c226450194f1933
2016-01-22 11:07:51 -08:00
David Pursell
7fc87c9bc2 Merge "base: add network address parsing function from adb." 2016-01-22 16:20:33 +00:00
David Pursell
706955ff0d base: add network address parsing function from adb.
This CL moves the network address parsing function from adb to libbase
so that it can be used by fastboot as well as adb.

libbase seemed like the right choice because:
  1. It already has some parsing functions (parseint)
  2. The net address parsing function uses the libbase string
     functions so we have a libbase dependency anyway.

The parsing function has been modified slightly to make the canonical
address optional, and debug logging on success has been removed.

For adb the only functional difference is that parsing a network
address will no longer print the result to the debug log, which seemed
unnecessary.

Bug: http://b/26236380
Change-Id: Ife6df02937225fc66de87884d3572d79c092c522
2016-01-21 20:03:33 -08:00
David Pursell
bbedd9523f Merge "fastboot: use cutils socket functions." 2016-01-22 00:07:14 +00:00
David Pursell
572bce2908 fastboot: use cutils socket functions.
Now that cutils has cross-platform socket functionality, we can
restructure fastboot to remove platform-dependent networking code.

This CL adds socket_set_receive_timeout() to libcutils and combines the
fastboot socket code into a single implementation. It also adds TCP
functionality to fastboot sockets, but nothing uses it yet except for
the unit tests. A future CL will add the TCP protocol which will use
this TCP socket implementation.

Bug: http://b/26558551

Change-Id: If613fb348f9332b31fa2c88d67fb1e839923768a
2016-01-21 09:53:11 -08:00
David Pursell
1906de1e0f Merge "libcutils: share Windows networking code." 2016-01-21 16:40:00 +00:00
Steve Fung
b4cf452aad Merge "crash_reporter: Add unit tests to debug builds" 2016-01-21 04:43:23 +00:00
Steve Fung
120fe6aef2 Merge "crash_reporter: Fix unit tests to use ScopedTempDir" 2016-01-21 04:42:31 +00:00
Hung-ying Tyan
e7f9779886 Merge "Allow paths of .rc files to be specified at mount_all" 2016-01-21 04:12:23 +00:00
Hung-ying Tyan
dc738eaf15 Allow paths of .rc files to be specified at mount_all
In current implementation, the mount_all command imports all .rc files
under /{system,vendor,odm}/etc/init/ after mouting filesystems is complete.
There's a need from ODMs to import different .rc files under different boot
modes (e.g., factory mode). Without this support, they will have to fiddle
around the init implementation.

This commit makes mount_all import the .rc files/directories specified
as additional arguments. If no path is given, the original ones are applied
the same way as the current implementation.

BUG: 26549689
Change-Id: Ie67ce13dde4c440ff8bf534826bc392c882a433f
2016-01-21 09:35:43 +08:00
Alex Vakulenko
c937afebd9 Merge "libmetrics: Update BASE_VERS to 369476" 2016-01-21 00:23:16 +00:00
Mark Salyzyn
6197e5e611 Merge "liblog: fix android_log_printLogLine empty event string" 2016-01-20 23:59:12 +00:00
Alex Vakulenko
371b822e7a libmetrics: Update BASE_VERS to 369476
This is needed to uprev everything on ChromeOS side

Change-Id: I070e374dd4abe92884b88231ba60c82b69c72806
2016-01-20 15:49:35 -08:00
Josh Gao
7e923fb3c5 Merge "adbd: use pty to determine whether a session is interactive." 2016-01-20 23:37:02 +00:00
Josh Gao
b5028e46b0 adbd: use pty to determine whether a session is interactive.
Bug: http://b/26236990
Change-Id: I8baa4009a2fbe9a4c93f6ef5350ce61161b7237d
2016-01-20 15:32:56 -08:00
James Hawkins
17bcba1631 Merge "bootstat: Followup cleanups from the initial bootstat checkin." 2016-01-20 22:59:44 +00:00
Alex Vakulenko
4ef51c348e Merge "crash_reporter/metricsd: Update libchrome APIs to r369476" 2016-01-20 22:43:45 +00:00
Steve Fung
78fcf66c17 crash_reporter: Fix unit tests to use ScopedTempDir
Some of the unit tests manually create their own temp
directories from a relative path.  This creates a temp folder
in the folder that the test is run from.  This is a problem
when using test_droid or a non-interactive ADB shell command,
since the root directory is not writable.  Instead use a
ScopedTempDir to handle temporary folders.

Bug: 26671657
Change-Id: Iaf71d345565dcb4393e80426784a864f7f8b5929
Test: Unit tests pass when running brillo_WhitelistedGtests
2016-01-20 14:23:13 -08:00
Mark Salyzyn
7cc8013e37 liblog: fix android_log_printLogLine empty event string
Allow _one_ empty line to get through before evaluating
further. Add __android_log_bswrite testing for content
and contentless cases; checking for propagation and for
expected printing. As for printing which is fixed here,
security variants cover the same code paths as the events.

Bug: 26646213
Change-Id: I484718aa604e0a00afde4c34a00e87468ea93aa5
2016-01-20 14:15:19 -08:00
Alex Vakulenko
ea05ff9229 crash_reporter/metricsd: Update libchrome APIs to r369476
The new libchrome has been ported from Chromium and some APIs have
changed. Make necessary changes at call sites.

Change-Id: I9e45975cdef43913270b82e3fca2c027e614a464
2016-01-20 13:43:30 -08:00
James Hawkins
6d0d12a9d8 bootstat: Followup cleanups from the initial bootstat checkin.
* Clarify the README.md that the logs data may be utilized by anyone.
* Fix a whitespace issue.

Bug: 21724738
Change-Id: Id472485f505afb14588ccd645844a3f4a728abc2
2016-01-20 13:17:02 -08:00
Josh Gao
fb494eb40d Merge "adbd: don't leave zombies when subprocess creation fails." 2016-01-20 20:44:40 +00:00
Josh Gao
c65fae9ef5 adbd: don't leave zombies when subprocess creation fails.
Bug: http://b/26660675
Change-Id: I8e65d51af73f409c30be47575f76bc6b0f227c54
2016-01-20 11:40:31 -08:00
Steve Fung
333fc5c19d crash_reporter: Add unit tests to debug builds
Add crash_reporter_tests to debug builds, so that they can be
run by test_droid.

Bug: 26663796
Change-Id: Iddaa14ab55474875a45b0e8482bac310fbe8cff2
Test: /data/nativetest/crash_reporter_tests exists on eng build
2016-01-20 01:15:20 -08:00
Calin Juravle
312532252a Merge "nativebrige: log code_cache access errors to stderr as well" 2016-01-20 02:31:47 +00:00
Bertrand Simonnet
7fbe8b9285 Merge "metricsd: Add tests to the default debug build." 2016-01-20 02:18:33 +00:00
Bertrand SIMONNET
30c174b7f9 metricsd: Add tests to the default debug build.
This will allow the tests to be run by the continuous builder.

Bug: 26571398
Change-Id: I7eae2761603e83e3d1f003cb3b06582abc4ed24f
Test: Build an eng build. The tests are installed.
2016-01-19 17:58:40 -08:00
Elliott Hughes
d320cbf5ba Merge "bootstat: Fix the base includes to be AOSP-friendly." 2016-01-20 01:29:12 +00:00
James Hawkins
eabe08b55e bootstat: Fix the base includes to be AOSP-friendly.
Change-Id: I625cc55b41f5258addf3bb74bcef42063c565465
Bug: 21724738
2016-01-20 01:28:48 +00:00
Bertrand Simonnet
195bbc718b Merge "metricsd: Persist metrics on shutdown." 2016-01-20 00:58:37 +00:00
Mark Salyzyn
390100305b Merge "logd: prune maintain per-id watermark (part deux)" 2016-01-20 00:50:10 +00:00
Mark Salyzyn
7fd6c5c6f5 logd: prune maintain per-id watermark (part deux)
iterator corruption as we allow mLast to slip through the FIFO

Bug: 23685592
Bug: 26646087
Change-Id: Ifcbaecf390ee47b195c3d823d080c66c15db4530
2016-01-19 16:14:39 -08:00
James Hawkins
d0009911de Merge "system/core: Add initial implementation of the bootstat command." 2016-01-19 23:23:48 +00:00
James Hawkins
abd73e6179 system/core: Add initial implementation of the bootstat command.
The bootstat command enables the measurement and logging of boot time
metrics
for GMS devices.

BUG:21724738
Change-Id: I331456dd38a60fb4ef24a4d5320909dbad30db66
2016-01-19 15:10:38 -08:00
Josh Gao
6a27196516 Merge "fastboot: show progress when sending sparse images." 2016-01-19 23:02:14 +00:00
Josh Gao
d8ecde09c7 Merge "fastboot: add .clang-format." 2016-01-19 22:58:38 +00:00
Josh Gao
9da9ac5b2a fastboot: show progress when sending sparse images.
Bug: http://b/25443220
Change-Id: Ica0c88aea2a0661f39ff1415ebba464c037651da
2016-01-19 14:50:18 -08:00
Josh Gao
cb73db7cd8 fastboot: add .clang-format.
Change-Id: Iacad00adfa3948118543d680651814b3c8c42858
2016-01-19 14:49:45 -08:00
Christopher Ferris
ad12df20e9 Merge "Allow setting an arbitrary alignment for an entry." 2016-01-19 22:28:02 +00:00
Bertrand SIMONNET
d6862317a6 metricsd: Persist metrics on shutdown.
When metricsd receives a SIGTERM signal (on system shutdown for
example), save the metrics to disk before exiting.

Bug: 26184202
Test: Start metricsd. Log a metric sample. Stop metricsd. The metric is
saved to disk.

Change-Id: Ib224efa8837130393fac5d06fa80d320263cfc84
2016-01-19 14:04:25 -08:00
Christopher Ferris
5e9f3d44a3 Allow setting an arbitrary alignment for an entry.
The current code only allows the creation of an entry that is 32 bit
aligned.

Bug: 25446938

Change-Id: I6c924df12ef2bc067b3de7789257af7e3db7e904
2016-01-19 13:55:53 -08:00
Steve Fung
8074b16e3a Merge "crash_reporter: Add README.md" 2016-01-19 21:14:28 +00:00
Rubin Xu
95d1bd2421 Merge "Add logd security buffer tag types and string write API." 2016-01-19 20:40:16 +00:00
Bertrand Simonnet
818f757383 Merge "metricsd: Persist the metrics to disk periodically." 2016-01-19 19:09:57 +00:00
Bertrand Simonnet
90bfc8035b Merge "metricsd: Cleanup on TERM signal." 2016-01-19 19:09:45 +00:00
Nick Kralevich
542a511f87 Merge "logging: avoid unnecessary printfs" 2016-01-19 18:04:10 +00:00
Elliott Hughes
6acf7663c2 Merge "Remove unused cruft from <log/log.h>." 2016-01-19 17:27:09 +00:00
Rubin Xu
d545d2930e Add logd security buffer tag types and string write API.
Bug: 22860162
Change-Id: I1cceed3462eaebdd8208abf101b127f27f0023a7
2016-01-19 17:13:28 +00:00
Nick Kralevich
5db8d6aafa logging: avoid unnecessary printfs
Don't spend CPU cycles formatting a bunch of strings if we're
just going to throw them away later. Maybe make booting faster.

Change-Id: I4d8eb99fb3fa873ca91cf776933d0ad01988abf5
2016-01-16 16:20:24 -08:00
Elliott Hughes
3a84b685e9 Remove unused cruft from <log/log.h>.
The callers are, in fact, already gone.

Change-Id: I665183ce595b542b1e47df79bc8990e069571b97
2016-01-16 11:11:19 -08:00