Commit graph

28476 commits

Author SHA1 Message Date
Mark Salyzyn
dc5d05ba5a Merge "liblogcat: LOCAL_C_INCLUDE_DIRS correction" am: 01815fdcc5
am: 88af7ccd58

Change-Id: I42228da35c3b2adb5c22fa18f005d28a23c74efc
2017-02-21 19:44:56 +00:00
Mark Salyzyn
88af7ccd58 Merge "liblogcat: LOCAL_C_INCLUDE_DIRS correction"
am: 01815fdcc5

Change-Id: I28a7645ab5375f234b74c6555f774510cb364a8e
2017-02-21 19:41:50 +00:00
Treehugger Robot
01815fdcc5 Merge "liblogcat: LOCAL_C_INCLUDE_DIRS correction" 2017-02-21 19:36:30 +00:00
Michael Wright
ba1f83d70c Merge "Revert "Only allow system to write to existing input nodes."" am: 05009d9336
am: 8eef0a5dfb

Change-Id: Ic821d533028d8d6573f352f1ce3bb039f8aadc55
2017-02-21 19:04:51 +00:00
Michael Wright
8eef0a5dfb Merge "Revert "Only allow system to write to existing input nodes.""
am: 05009d9336

Change-Id: I74bc2d510ab4f978df3e90402b59681f8cbe7be2
2017-02-21 19:02:47 +00:00
Treehugger Robot
05009d9336 Merge "Revert "Only allow system to write to existing input nodes."" 2017-02-21 18:56:05 +00:00
Mark Salyzyn
b69d774a0e Merge changes I9494ce71,Idc14e4ad,I30de692e,Ieed3223b,I63d0667a am: ee57bbd9f8
am: 2a03cd7158

Change-Id: I34adb6be48b36b4d97dbce2995fb8608b36a9128
2017-02-21 18:10:23 +00:00
Isaac Chen
a0e845a1b6 Merge "Removed cpusets/schedboost build time dependency." am: d3f8d28db2
am: e60efc1b0b

Change-Id: Ie2d15917ea237c026bee7a526a75bf2544313580
2017-02-21 18:03:15 +00:00
Mark Salyzyn
2a03cd7158 Merge changes I9494ce71,Idc14e4ad,I30de692e,Ieed3223b,I63d0667a
am: ee57bbd9f8

Change-Id: I382a3a1e9c95a5e94a7930ed5a508f5e2b157349
2017-02-21 18:01:32 +00:00
Isaac Chen
e60efc1b0b Merge "Removed cpusets/schedboost build time dependency."
am: d3f8d28db2

Change-Id: Ic864fd54b2ddc225ce54050efb116c87cbf1180f
2017-02-21 17:52:41 +00:00
Michael Wright
14667c19cd Revert "Only allow system to write to existing input nodes."
This reverts commit 344e929e6d.

Bug: 35301292
Change-Id: Ib6805c986c0aa88d14652de59ad4602b1cce8b56
2017-02-21 17:12:59 +00:00
Mark Salyzyn
eb40816fb8 liblogcat: LOCAL_C_INCLUDE_DIRS correction
Test: compile
Bug: 35326290
Change-Id: I62b46443a6b9149577e85d4f512c3946b467a1fb
2017-02-21 08:48:29 -08:00
Mark Salyzyn
ee57bbd9f8 Merge changes I9494ce71,Idc14e4ad,I30de692e,Ieed3223b,I63d0667a
* changes:
  liblogcat: add android_logcat_popen and android_logcat_system
  liblogcat: add android_logcat_run_command_thread
  logcat: Create liblogcat
  logcat: Use std::string instead of large static buffer for -Q
  logcat: Add coding style
2017-02-21 15:35:01 +00:00
Isaac Chen
d3f8d28db2 Merge "Removed cpusets/schedboost build time dependency." 2017-02-21 02:05:24 +00:00
Isaac Chen
795267d4c7 Removed cpusets/schedboost build time dependency.
These two Soong product_variables were usually controlled by
ENABLE_CPUSETS and ENABLE_SCHEDBOOST in BoardConfig.mk. This change
turns the build time variables into runtime decision by checking if
a special file, "tasks", can be found under the mount points,
/dev/cpuset and /dev/stune, for cpusets and schedboost, respectively.

That special file only exists when the corresponding Linux kernel
configurations, CONFIG_CPUSETS and CONFIG_SCHEDTUNE, are set.

Bug: 34726944

Test: Tested on Sailfish with following configurations
          neither cpuset nor schedtune enabled in the kernel
          cpuset enabled, but schedtune disabled in the kernel
          both cpuset and schedtune enabled in the kernel

Change-Id: I6695b8b32b2fecb4fd995018418bbe2edc5d590f
2017-02-20 20:53:24 +08:00
Bowgo Tsai
13fc1463a9 Merge "Fix-up coding style" am: 4a534ebc91
am: cfcaca92d1

Change-Id: Ib10ba26be56b2c520bb764d9e961e539f2444c1f
2017-02-19 00:30:01 +00:00
Bowgo Tsai
cfcaca92d1 Merge "Fix-up coding style"
am: 4a534ebc91

Change-Id: Iab8691835c77b3d65ed33b1065946cc6fae64208
2017-02-19 00:27:09 +00:00
Treehugger Robot
4a534ebc91 Merge "Fix-up coding style" 2017-02-19 00:23:05 +00:00
Bowgo Tsai
4caf4c03c1 Fix-up coding style
The .clang-format is a symlink to ../init/.clang-format, which is merged
recently. As init is the major user of fs_mgr, it's better to keep the
style consistent.

Only recent newly-added files written by me are formatted. For other
files, let's format them gradually to keep 'git blame' intact.

Bug: None
Test: Device can boot with AVB

Change-Id: I5c72f23b38534d5bcef3e4f9f0f477fa40496433
2017-02-18 12:33:36 +08:00
Steven Moreland
4fbff753ba Merge "Vector.h: remove unused import <new>" am: 1a4e2dfdf5
am: c50fce7dac

Change-Id: Ic88e35637d9001e17e538ced0a35b47579da86cf
2017-02-17 23:44:13 +00:00
Steven Moreland
c50fce7dac Merge "Vector.h: remove unused import <new>"
am: 1a4e2dfdf5

Change-Id: I6177387a43353d5f9b4bd7fe9cc9fd7a4a10e997
2017-02-17 23:42:30 +00:00
Treehugger Robot
1a4e2dfdf5 Merge "Vector.h: remove unused import <new>" 2017-02-17 23:37:06 +00:00
Mark Salyzyn
6dabc81a0b liblogcat: add android_logcat_popen and android_logcat_system
Supply a wrapper to the logcat API that provides some analogous
functionality to popen and system libc calls with some bits of
KISS shell-like parsing for environment, quotes and error
redirection handling.

Test: gTest logcat-unit-tests
Bug: 35326290
Change-Id: I9494ce71267ad2b2bec7fcccfc7d4beddae9aea6
2017-02-17 14:42:14 -08:00
Mark Salyzyn
1d6928b736 liblogcat: add android_logcat_run_command_thread
A non-blocking API to run a logcat function in a background thread.
Returns a read end of a pipe to collect the output.

Test: gTest logcat-unit-tests
Bug: 35326290
Change-Id: Idc14e4ad955e0b2b9fafa5d3aeed8cd7fb4069fb
2017-02-17 14:42:14 -08:00
Mark Salyzyn
c0cf90d1fb logcat: Create liblogcat
Try to leverage as much of logcat as-is and produce a viable
library API that others can use for their own logcat execution.

Added a test to check ANDROID_PRINTF_LOG environment variable.

Test: gTest logcat-unit-tests
Bug: 35326290
Change-Id: I30de692ea9d83e6fd6e5d9e7cf93d31401a88a40
2017-02-17 14:42:14 -08:00
Mark Salyzyn
f329029081 logcat: Use std::string instead of large static buffer for -Q
Test: gTest logcat-unit-tests
Bug: 35326290
Change-Id: Ieed3223be2d1386897cfba5fa4d04549e72e4e50
2017-02-17 14:42:14 -08:00
Mark Salyzyn
5f606605ed logcat: Add coding style
- Android coding standard compliance with an eye to reducing merge
  impact.
- resolve a few misbehaviors in logcat_test.

SideEffects: none
Test: gTest logcat-unit-tests
Bug: 35326290
Change-Id: I63d0667ad34c0df11086a6ffe94b7030430b865b
2017-02-17 14:42:14 -08:00
Josh Gao
8a5c2176e0 Merge "debuggerd_test: add capability test." am: 94aabe47db
am: 8a69231cda

Change-Id: Ibffd13e7decc6b5d73acbba99f50c9dd1ed4c481
2017-02-17 22:38:17 +00:00
Josh Gao
8a69231cda Merge "debuggerd_test: add capability test."
am: 94aabe47db

Change-Id: I7316d51dc2d5ad0a98d64710427a9cbfe5b4a44d
2017-02-17 22:29:26 +00:00
Treehugger Robot
94aabe47db Merge "debuggerd_test: add capability test." 2017-02-17 21:20:11 +00:00
Steven Moreland
40c7ddfc09 Vector.h: remove unused import <new>
Test: pass
Change-Id: I9d04c909a1bc82352f1eebe36602bf095ec3ca30
2017-02-17 13:19:08 -08:00
Elliott Hughes
b343338459 Merge "adbd's children should have SIGPIPE set to SIG_DFL." am: 81c6ff3b96
am: 10ecd9de62

Change-Id: I204df35416733257c8ff2b2eb6f1ba22a17098bb
2017-02-17 20:59:29 +00:00
Elliott Hughes
10ecd9de62 Merge "adbd's children should have SIGPIPE set to SIG_DFL."
am: 81c6ff3b96

Change-Id: I5aaec2b05566d6885b11080a8de943dde838031f
2017-02-17 20:57:59 +00:00
Treehugger Robot
81c6ff3b96 Merge "adbd's children should have SIGPIPE set to SIG_DFL." 2017-02-17 20:55:55 +00:00
Elliott Hughes
1373a6c75c Merge "Add crasher check for passing a bad pthread_t to pthread_join." am: fac6d83d36
am: 1b607e7f6f

Change-Id: I4395eb6966dcc387d0da5b6de5eca2aa1984fe04
2017-02-17 20:50:58 +00:00
Elliott Hughes
1b607e7f6f Merge "Add crasher check for passing a bad pthread_t to pthread_join."
am: fac6d83d36

Change-Id: Icfa86004a6e15f80a25ed128be8f3496312a3e3b
2017-02-17 20:49:35 +00:00
Treehugger Robot
fac6d83d36 Merge "Add crasher check for passing a bad pthread_t to pthread_join." 2017-02-17 20:44:44 +00:00
Josh Gao
502cfd22ba debuggerd_test: add capability test.
Also, remove the dependency on crasher.

Bug: http://b/35100921
Bug: http://b/35241370
Test: /data/nativetest/debuggerd_test/debuggerd_test32
Test: /data/nativetest64/debuggerd_test/debuggerd_test64
Change-Id: I318f6de764d435251417953bf175ba321b59981f
2017-02-17 11:22:21 -08:00
Elliott Hughes
9eb551868b adbd's children should have SIGPIPE set to SIG_DFL.
POSIX lets you choose whether or not SIGPIPE disposition is inherited,
and Linux chose "yes". Work around that.

Bug: http://b/35209888
Test: "ps -A | head" without the toybox workaround
Change-Id: I6b5afa3d87eb2af04b24c6c37fa338ab60ad2336
2017-02-17 11:14:33 -08:00
Elliott Hughes
da9e3958d6 Add crasher check for passing a bad pthread_t to pthread_join.
Bug: http://b/35455349
Test: manual
Change-Id: If09454c7104a1e6de7c0edb50ee52118b7ca5eaa
2017-02-17 10:26:48 -08:00
Josh Gao
ba97f47964 Merge changes I29c45a8b,I807439d8 am: 892b158af8 am: 18ac6293a5
am: 33f684e1be

Change-Id: Iaacf8d11203869586cc6b2f3afebc9378630223c
2017-02-17 08:38:30 +00:00
Josh Gao
33f684e1be Merge changes I29c45a8b,I807439d8 am: 892b158af8
am: 18ac6293a5

Change-Id: I54b01e97da700e7e143f2f0da31285c162696290
2017-02-17 08:33:58 +00:00
Josh Gao
18ac6293a5 Merge changes I29c45a8b,I807439d8
am: 892b158af8

Change-Id: I5a42470134b1f7d3bb029e16d15346fc95a97fed
2017-02-17 08:29:29 +00:00
Josh Gao
892b158af8 Merge changes I29c45a8b,I807439d8
* changes:
  crash_dump: fix overflow.
  crash_dump: remove unneeded/faulty checks.
2017-02-17 08:21:14 +00:00
Josh Gao
5ad965bf41 crash_dump: fix overflow.
`1 << 32` overflows, resulting in bogus PR_CAP_AMBIENT_RAISE attempts,
and breaking dumping for processes with capabilities in the top 32 bits.

Bug: http://b/35241370
Test: debuggerd -b `pidof com.android.bluetooth`
Change-Id: I29c45a8bd36bdeb3492c9f74599993c139821088
2017-02-16 20:16:58 -08:00
Josh Gao
2a18b822d5 crash_dump: remove unneeded/faulty checks.
We already check our /proc/`getppid()` fd every time we attach a thread, so
these were unneeded at best. The one that happened after dropping
capabilities was actively wrong, though, because /proc/pid access
checks happen on every operation. (only on some kernels?)

Also, add a check that getppid() doesn't change after opening
/proc/getppid().

Bug: http://b/35241370
Test: debuggerd -b `pidof com.android.bluetooth`
Change-Id: I807439d8c2afd027f3c382face50167a8a7946c4
2017-02-16 19:26:09 -08:00
Steven Moreland
374ef9d1c4 Merge "Remove unused primes.py python file." am: 325eeebc47 am: e9ce5716ce
am: 72ff4d5360

Change-Id: I1c734230dce8940f0e364639f13daa2f84b31243
2017-02-17 01:25:59 +00:00
Steven Moreland
72ff4d5360 Merge "Remove unused primes.py python file." am: 325eeebc47
am: e9ce5716ce

Change-Id: I71b9956ece200ebd8783f5d9853d61a382776e99
2017-02-17 01:21:30 +00:00
Steven Moreland
e9ce5716ce Merge "Remove unused primes.py python file."
am: 325eeebc47

Change-Id: I65ff1525d413d60d958f6d3f20e9bf05c14ac50f
2017-02-17 01:16:57 +00:00
Treehugger Robot
325eeebc47 Merge "Remove unused primes.py python file." 2017-02-17 01:09:03 +00:00