Commit graph

14099 commits

Author SHA1 Message Date
Mark Salyzyn
8c943b6dc8 logpersist: bundle with logcatd service
Bug: 23186545
Change-Id: I130d7c7e120acb372e58aec028f39e161d53628e
2015-09-21 13:53:01 -07:00
Mark Salyzyn
1b9456a1a5 logpersist: Additional barrier
If this shows up on "user" builds, block execution

Change-Id: I2e137d1ff7583ac000b81dee7390b582dfd02095
2015-09-21 13:52:45 -07:00
Evgenii Stepanov
ee08fb53bb Merge "asan: update condition to work with multiple SANITIZE_TARGET values." 2015-09-18 20:23:52 +00:00
Ivan Krasin
5039d8cd21 asan: update condition to work with multiple SANITIZE_TARGET values.
The goal is to enable SANITIZE_TARGET='address coverage', which
will be used by LLVMFuzzer.

Bug: 22850550
Change-Id: Iea756eaaedaa56aee4daf714510269efe3aaa553
2015-09-18 11:59:46 -07:00
Yabin Cui
94c617ccbb Merge "Revert "Add BacktraceOffline for offline backtracing."" 2015-09-17 22:58:36 +00:00
Yabin Cui
ab5e583327 Revert "Add BacktraceOffline for offline backtracing."
Using llvm makes libbacktrace stops building for 32 bit on linux host x86_64.

This reverts commit c9c6b6ee77.

Change-Id: Ieb807db881d7bb3132cd09e25fd08c28766ca0a8
2015-09-17 22:54:22 +00:00
Yabin Cui
ee645af487 Merge "Add BacktraceOffline for offline backtracing." 2015-09-17 22:07:04 +00:00
Elliott Hughes
a951a82dcc Merge "adb unittest for win32 handle inheritance" 2015-09-17 22:04:17 +00:00
Steve Fung
557aa2e998 Merge "crash_reporter: Generate and use own guid" 2015-09-17 19:51:51 +00:00
Dan Willemsen
9721bb4c9b Merge "Add Android.bp for liblog" 2015-09-17 19:30:50 +00:00
Bertrand Simonnet
ccdd012ff3 Merge "metricsd: Fix CumulativeUseTime metrics." 2015-09-17 18:13:13 +00:00
Bertrand SIMONNET
2d03783ccc metricsd: Fix CumulativeUseTime metrics.
This fixes three things:
* name of the metrics: the metrics does not represent the daily use.
* arithmetic error: we collect the use time in seconds so no need to
  divide by 1000 to get seconds.
* the metrics should not be reset daily.

This CL also renames the Send* helper methods to be more explicit about
resetting the counters.

This was also committed in Chrome OS at:
https://chromium-review.googlesource.com/#/c/300059/.

BUG:24131693
TEST: unit tests.

Change-Id: I712baa1fd639b9b0df60906d94a0904d8c6760aa
2015-09-17 09:39:34 -07:00
Spencer Low
1ce06087db adb unittest for win32 handle inheritance
adb.cpp: launch_server() has a long comment about how
stdin/stdout/stderr handles have to be made non-inheritable to prevent
hangs in callers to adb.exe.

It would be disastrous to do this wrong, and I've modified this code, so
here's a unittest to verify that I'm doing it right.

The test also runs fine on unix.

Change-Id: I3672c3066bc7498635c19212f9e5c50757942439
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-09-16 20:50:53 -07:00
Elliott Hughes
1d758c9095 Merge "adb unittest: make test_sync properly cleanup after itself" 2015-09-17 03:03:31 +00:00
Yabin Cui
0b743df4c4 Merge "Add unit tests for local socket." 2015-09-17 02:32:12 +00:00
Yabin Cui
c9c6b6ee77 Add BacktraceOffline for offline backtracing.
It is used by simpeleprf for stack unwinding.

Bug: 22229391
Change-Id: I26d698610ccdc9545da837bc5a8a9ec787f27a6b
2015-09-16 17:38:23 -07:00
Elliott Hughes
d17cf08eca Merge "adb: win32: fix regression on older versions of Windows" 2015-09-17 00:03:22 +00:00
Spencer Low
bc36bdbdc8 adb: win32: fix regression on older versions of Windows
On Windows 7, GetStdHandle() may return console pseudo-handles. If you
call SetHandleInformation(h, HANDLE_FLAG_INHERIT, 0) on such a handle,
it will fail. These failures should be ignored like the old code.

Newer versions of Windows return real handles that don't have this
issue. Console pseudo-handles can apparently be identified by the values
3, 7, 11.

This is a regression from 2122c7a148.

https://code.google.com/p/android/issues/detail?id=186599

Change-Id: I287a74a81d37e0ebe62d673a3f5651ee5439c0d2
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-09-16 16:40:06 -07:00
Dan Willemsen
63aa47afd7 Add Android.bp for liblog
Change-Id: Ibbb476a5e6b247cba96929e683727c25f66d90f0
2015-09-16 15:59:22 -07:00
Andres Morales
2b71daefb2 Merge "Revert "[core][trusty] add gatekeeper module"" 2015-09-16 22:54:14 +00:00
Andres Morales
1a1474caf2 Revert "[core][trusty] add gatekeeper module"
This reverts commit 6ee0f94adf.

Change-Id: I673103c60f43b409cc72176c9450883336831cae
2015-09-16 22:53:49 +00:00
Andres Morales
9dde56672b Merge "Revert "[core][trusty] add keymaster module"" 2015-09-16 22:45:06 +00:00
Andres Morales
8ea9657ccd Revert "[core][trusty] add keymaster module"
This reverts commit 748b690415.

Change-Id: Ic65ce4af2d2f811129d941069dcd70e814c18f36
2015-09-16 22:44:34 +00:00
Yabin Cui
c1b1f6ff5d Add unit tests for local socket.
Add has_write_error flag in asocket, so it will not wait on local_socket_closing_list
to write pending packets in local_socket_close(). Although it doesn't fix any problem,
it helps to make the code more stable.
Add a missing put_apacket() in error handling.
Add a check when adding local socket in local_socket_closing_list.

Bug: 23314034

Change-Id: I75b07ba8ee59b7f277fba2fb919db63065b291be
2015-09-16 15:00:59 -07:00
Andres Morales
0e26977c56 Merge changes from topic 'trusty-gk-km''
* changes:
  [core][trusty] add gatekeeper module
  [core][trusty] add keymaster module
2015-09-16 21:58:36 +00:00
Michael Ryleev
ebbbb7c677 Merge "Add libtrusty and corresponding test utility" 2015-09-16 21:56:35 +00:00
Andres Morales
6ee0f94adf [core][trusty] add gatekeeper module
Change-Id: I1559a719034a754788d2cfa9a05fa60f36583bbf
2015-09-16 11:31:03 -07:00
Andres Morales
748b690415 [core][trusty] add keymaster module
Change-Id: I7495161a96c7a0652ff3d8318ebe6dab533fe319
2015-09-16 11:30:55 -07:00
Samuel Tan
630e05b6af Merge "metricsd: move timer.h into include/metrics/" 2015-09-16 18:24:15 +00:00
Michael Ryleev
0a72ad9a1d Add libtrusty and corresponding test utility
libtrusty is an interface to Trusty TEE.

Change-Id: I7d53a744010f122257b686247997a8f11a4d480c
2015-09-16 11:15:43 -07:00
Yasuhiro Matsuda
ada7fa063e Merge "Fix perfboot.py to work with the recent change." 2015-09-16 02:41:58 +00:00
Steve Fung
12e61caae7 crash_reporter: Generate and use own guid
Rather than share the guid with metrics, crash_reporter should
use its own guid that is persistent across reboots but not
across factory resets.

Bug: 24102242
Change-Id: I1bcc1a10aa8e1c09372386fe8e1661a8894b8d70
2015-09-15 19:40:48 -07:00
Samuel Tan
1c4d8f10da metricsd: move timer.h into include/metrics/
Move timer.h into the include/metrics/ folder since some
source files in shill need to include this header file.
Adjust the timer.h include paths in the metricsd accordingly.

BUG: None
Change-Id: Id2f5e079d3a095f40d0f4d4e0d438bd22f1274ff
TEST: "mma" in metricsd folder succeeds.
2015-09-15 11:52:59 -07:00
Yabin Cui
fa965d9639 Merge "adb: move adb to poll." 2015-09-15 18:40:51 +00:00
David Pursell
d9076f2132 Merge "adb: Kill subprocess when the client exits." 2015-09-15 18:27:33 +00:00
David Pursell
544e795fbb adb: Kill subprocess when the client exits.
When the client exits (e.g. with Ctrl+C) the subprocess should be
notified as well so it can cleanup if needed.

Bug: http://b/23825725
Change-Id: Idb771710b293e0a9f7bebc9e2814b3a816e2c50e
2015-09-15 10:16:24 -07:00
Yabin Cui
a10801674c adb: move adb to poll.
It is reported that the registered fd can be bigger than FD_SETSIZE, and can't be
handled by select(). By moving to poll(), we can remove the limitation.
Although we can't ignore the possibility that there is a fd leak, but we can
still make the potential bug more explicit by moving to poll().
We didn't move to epoll() because it is not supported on mac.

Bug: 23820751

Change-Id: Icb39329c4984f1fef749472c9e088682ee8c3444
2015-09-15 10:12:31 -07:00
David Pursell
0af19a0e82 Merge "adb: Fix missing shell protocol usage." 2015-09-15 15:06:42 +00:00
Yasuhiro Matsuda
6ee194013a Fix perfboot.py to work with the recent change.
device.shell() was changed to return a (stdout, stderr) tuple in
the following CL.

https://android-review.googlesource.com/170420

This CL fixes perfboot.py to work with the return value.

Change-Id: I85d72fc63c1f96257fb19c3051482991a7b4049d
2015-09-15 14:00:10 +09:00
Steve Fung
f597475599 Merge "crash_reporter: Add model_manifest_id field to report" 2015-09-15 04:47:35 +00:00
Spencer Low
80fdc0bf86 adb unittest: make test_sync properly cleanup after itself
It wasn't deleting the tempfile.mkdtemp() dir that it made.

Change-Id: I59c5f98aa8297c7b28d38799dd21ffe9566f2145
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-09-14 18:53:25 -07:00
Steve Fung
33046dcbfa Merge "crash_reporter: Ensure crash_sender spread time is not negative" 2015-09-15 01:06:09 +00:00
Steve Fung
ed78930923 crash_reporter: Add model_manifest_id field to report
Add the model_manifest_id from weave's configuration to the
crash report.

Bug: 22874192
Change-Id: I26d5334a6eb3b82fd07338e98ce0f3efbb2ff16d
2015-09-14 16:16:27 -07:00
Bertrand Simonnet
3ef7f0afb8 Merge "metricsd: Add test case for the upload service." 2015-09-14 22:48:39 +00:00
Bertrand Simonnet
dd11d286ca Merge "metricsd: Persist the report to disk if an upload fails." 2015-09-14 22:48:32 +00:00
Bertrand Simonnet
a9f1ed16a8 Merge "metricsd: Use the metrics directory everywhere." 2015-09-14 22:48:25 +00:00
David Pursell
71c83126a8 adb: Fix missing shell protocol usage.
Some adb commands use the shell service but weren't using the
shell protocol, causing a protocol mismatch between the client and
the device. This CL uses the shell protocol whenever possible.

Change-Id: I4c9c75b7fd1d5bf3dc1f73900711840270527682
2015-09-14 15:33:50 -07:00
Steve Fung
18ca9b364b crash_reporter: Ensure crash_sender spread time is not negative
When calculating the crash_sender spread time, make sure that the
random number is not negative when converted to a shell int variable.

Bug: 24004011
Change-Id: I3b95dc244a26270ef2b93d5af4b0593a93eedcad
2015-09-14 22:18:24 +00:00
Steve Fung
758db4dbe7 Merge "crash_reporter: Read crash server from property" 2015-09-14 22:06:19 +00:00
Bertrand SIMONNET
4c8a8ad3bf metricsd: Add test case for the upload service.
This test case ensures that we can log a metric with the metrics library
and upload it with the upload service.

BUG: 22879646
TEST: unit tests.

Change-Id: Idf4a1240d41745ebf7835089230608082eed19f5
2015-09-14 13:55:33 -07:00