Commit graph

14117 commits

Author SHA1 Message Date
Yabin Cui
65744003a9 Merge "Revert "Revert "Revert "Revert "Add BacktraceOffline for offline backtracing.""""" 2015-09-22 22:03:51 +00:00
Bertrand Simonnet
216442e61b Merge "metricsd: Fix unit tests." 2015-09-22 21:29:50 +00:00
David Pursell
36856b7306 Merge "adb: add -Tt options to adb shell." 2015-09-22 20:23:57 +00:00
David Pursell
4e2fd36bc8 adb: add -Tt options to adb shell.
Adds -T (no PTY) and -t (force PTY) options to `adb shell` to mimic
ssh options. Small cleanup to send an entire FeatureSet to the adb
client at once to avoid multiple round-trips when querying multiple
features.

Known issue: humans using `adb shell -T` to start a non-PTY interactive
session may experience problems since neither side will have PTY
features like echoing or newline translation. This is probably OK for
now as the -Tt options are primarily useful for scripting.

Bug: http://b/23825231
Change-Id: I4d0df300db0abd1f7410bab59dd4d5b991babda7
2015-09-22 12:50:11 -07:00
Yabin Cui
9e402bb20c Revert "Revert "Revert "Revert "Add BacktraceOffline for offline backtracing.""""
This reverts commit 94ece83270.

Change-Id: Ie06465c89a5fc115517130f9f2904cc855973155
2015-09-22 04:46:57 +00:00
Yabin Cui
00ea49fc98 Merge "Revert "Revert "Revert "Add BacktraceOffline for offline backtracing."""" 2015-09-22 01:39:46 +00:00
Yabin Cui
94ece83270 Revert "Revert "Revert "Add BacktraceOffline for offline backtracing."""
This reverts commit 0a411c934a.

Change-Id: Ic1824afac6c32f1087b66de9d6368a561f235d13
2015-09-22 01:38:17 +00:00
Mark Salyzyn
6eec17e356 Merge "logcatd: up size from 16MB to 256MB" 2015-09-21 23:36:56 +00:00
Mark Salyzyn
44210dfe4b Merge "logpersist: bundle with logcatd service" 2015-09-21 21:52:59 +00:00
Mark Salyzyn
2f25cb479b Merge "logpersist: Additional barrier" 2015-09-21 21:52:41 +00:00
Yabin Cui
ebc4965467 Merge "Revert "Revert "Add BacktraceOffline for offline backtracing.""" 2015-09-21 21:08:09 +00:00
Mark Salyzyn
3ffbdb9009 logcatd: up size from 16MB to 256MB
Change-Id: Ic151d42151efdb3103470ba46c626a800cf29125
2015-09-21 13:53:16 -07:00
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
Yabin Cui
2b5f5fb9d9 Merge "base logging: fix errno restoring, severity conditionality, dangling ifs" 2015-09-21 19:56:52 +00:00
Yabin Cui
0a411c934a Revert "Revert "Add BacktraceOffline for offline backtracing.""
This reverts commit ab5e583327.

And statically link llvm libraries on host to remove dependency
on 32-bit llvm shared library which is not included in the prebuilt.

Bug: 22229391

Change-Id: I8210687655ee1809fd820ab2a6ca5dfaf3f9096d
2015-09-21 12:54:45 -07:00
Spencer Low
765ae6bcfc base logging: fix errno restoring, severity conditionality, dangling ifs
Fix LOG() to properly save and restore errno. Test this properly.

Only do logging if severity is >= the minimum.

Fix dangling if statements in CHECK(), CHECK_STR{EQ,NE}(). Test this
properly.

Fix base logging tests on Windows. All libbase_tests now pass on
Windows.

Change place to lock, so the lock can protect logging of all data in
LogMessage.

Change-Id: I7ff531c67ae10a99ef0a2bbfe279aa77282d5ae9
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-09-21 12:46:12 -07:00
Bertrand SIMONNET
dc034771cd metricsd: Fix unit tests.
When logging, libchrome will extract the program's name from the command
line. If the command line helpers have not been initialized, the logging
call will fail and the program will abort.

BUG: 24262190
TEST: unit tests.

Change-Id: Ie7982d5491f8373dc06ba44b69b518ff8673b568
2015-09-21 11:15:32 -07:00
Dan Albert
71f878f89b Merge "Move python-adb to development/python-packages." 2015-09-21 17:26:15 +00:00
Dan Albert
8858883388 Move python-adb to development/python-packages.
We want to be able to use this in the NDK without having to pull in
all of system core.

Also, this clarifies the separation of adb and its python interface.

Bug: http://b/22881740
Change-Id: I0b437d9bf621e371d4698d7f8e8828072c7ff347
2015-09-18 13:39:13 -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