Commit graph

29229 commits

Author SHA1 Message Date
Wei Wang
eb6d588cd6 Merge "libcutils: remove schedgroup" am: 3d8911fbbe
am: c0fc8e7b7b

Change-Id: I348e7151248f3116f483f6c5ae4e7c924fe75490
2017-03-28 00:24:53 +00:00
Wei Wang
c0fc8e7b7b Merge "libcutils: remove schedgroup"
am: 3d8911fbbe

Change-Id: I351d6c199512cc8e5c5cd466452ea910f69061e7
2017-03-28 00:21:53 +00:00
Treehugger Robot
3d8911fbbe Merge "libcutils: remove schedgroup" 2017-03-28 00:15:46 +00:00
Mark Salyzyn
c974c79c8c Merge "logcat: test: run 256 simultaneous logcats" am: b15429c0ea
am: 232b57c60b

Change-Id: I83fba7238ee3632211008b5d80080ff403efbda9
2017-03-27 22:54:33 +00:00
Mark Salyzyn
232b57c60b Merge "logcat: test: run 256 simultaneous logcats"
am: b15429c0ea

Change-Id: I88aaf94060873c6aebfd30f169741afa43616371
2017-03-27 22:51:36 +00:00
Mark Salyzyn
b15429c0ea Merge "logcat: test: run 256 simultaneous logcats" 2017-03-27 22:46:03 +00:00
Mark Salyzyn
77a1fa9070 Merge changes I96998c4b,I161bf03b am: dd0cd8d88f
am: f17500474a

Change-Id: I1458020e121f52070082b7dc6791f1fc2079c131
2017-03-27 22:39:37 +00:00
Keun-young Park
3c86cc4bc8 Merge "update shutdown sequence and use shutdown_timeout to cover all wait" am: 59cebb6e6f
am: bfb9bea368

Change-Id: I35d70a225670c1946e0a705e174c856ebe67ba7a
2017-03-27 22:39:25 +00:00
Mark Salyzyn
f17500474a Merge changes I96998c4b,I161bf03b
am: dd0cd8d88f

Change-Id: I54191d23beed6fa2a2703a5cf8cb688b5c7a50fc
2017-03-27 22:35:19 +00:00
Keun-young Park
bfb9bea368 Merge "update shutdown sequence and use shutdown_timeout to cover all wait"
am: 59cebb6e6f

Change-Id: I4a09594aba83bc489c9e1735b27e4dbdf5256385
2017-03-27 22:35:03 +00:00
Mark Salyzyn
dd0cd8d88f Merge changes I96998c4b,I161bf03b
* changes:
  logd: last iterator initialized incorrectly
  logd: ASAN cleansing
2017-03-27 22:28:35 +00:00
Keun-young Park
59cebb6e6f Merge "update shutdown sequence and use shutdown_timeout to cover all wait" 2017-03-27 22:27:30 +00:00
Mark Salyzyn
1f46716f1c logd: last iterator initialized incorrectly
last should start with mLogElements.end() and be updated as
we iterate to find a matching time entry in the list. Since
it is impossible(sic) for a newer start time to be supplied
than the list, the incorrect iterator initialization should
be inconsequential, but if it ever happens this change will
behave correctly and dump nothing.

Test: gTest liblog-unit-tests, logd-unit-tests and logcat-unit-tests
Bug: 36536248
Bug: 36608728
Change-Id: I96998c4b713258f29d5db2e24a83ae562ddf3420
2017-03-27 21:26:13 +00:00
Keun-young Park
3ee0df9bdf update shutdown sequence and use shutdown_timeout to cover all wait
- Use ro.build.shutdown_timeout to cover the total time for shutdown.
  Limit wait time for termination only to half of shutdown_timeout
  with max of 3 secs as process not terminating by that time
  will not terminate anyway. It is better to move to the next
  stage quickly. fsck time for user shutdown is excluded from timeout.
- Change last detach to kill, sync, and umount. Last detach did not
  work in many tests.
- add sync after emulated partitions umount as it can trigger
  change in /data.

bug: 36551393
Test: many reboots
Change-Id: Ib75dc19af79b8326b02ccef6b16a8817ae7f8b0e
2017-03-27 13:44:50 -07:00
Mark Salyzyn
0484b3b575 logd: ASAN cleansing
A mixture of fixes and cleanup for LogKlog.cpp and friends.

- sscanf calls strlen.  Check if the string is missing a nul
  terminator, if it is, do not call sscanf.
- replace NULL with nullptr for stronger typechecking.
- pass by reference for simpler code.
- Use ssize_t where possible to check for negative values.
- fix FastCmp to add some validity checking since ASAN reports that
  callers are not making sure pre-conditions are met.
- add fasticmp templates for completeness.
- if the buffer is too small to contain a meaningful time, do not
  call down to log_time::strptime() because it does not limit its
  accesses to the buffer boundaries, instead stopping at a
  terminating nul or invalid match.
- move strnstr to LogUtils.h, drop size checking of needle and
  clearly report the list of needles used with android::strnstr
- replace 'sizeof(static const char[]) - 1' with strlen.

Test: gTest liblog-unit-test, logd-unit-tests & logcat-unit-tests
Bug: 30792935
Bug: 36536248
Bug: 35468874
Bug: 34949125
Bug: 34606909
Bug: 36075298
Bug: 36608728
Change-Id: I161bf03ba029050e809b31cceef03f729d318866
2017-03-27 13:32:57 -07:00
Jeff Vander Stoep
cf4fdc1c6a Merge "Move selinux policy build decisions to sepolicy Makefile" am: 784c851785
am: b19825012e

Change-Id: I78d6d58f31e5e7c77178b949e629c99257c90ea5
2017-03-27 20:09:49 +00:00
Jeff Vander Stoep
b19825012e Merge "Move selinux policy build decisions to sepolicy Makefile"
am: 784c851785

Change-Id: If07e860115d028acd98b62488326eeb9c9a49ceb
2017-03-27 20:06:50 +00:00
Treehugger Robot
784c851785 Merge "Move selinux policy build decisions to sepolicy Makefile" 2017-03-27 20:03:04 +00:00
Tao Bao
4ba8d8b5bf Merge "fs_mgr: use different fstab paths for normal/recovery boot" am: 9c59029add
am: 07052c0509

Change-Id: I63466cb1770c99665fbfc96bd19ab9f770a2e429
2017-03-27 19:32:12 +00:00
Tao Bao
07052c0509 Merge "fs_mgr: use different fstab paths for normal/recovery boot"
am: 9c59029add

Change-Id: I1b7d622f1d518f446301c4467fab72107cc4f171
2017-03-27 19:29:41 +00:00
Tao Bao
9c59029add Merge "fs_mgr: use different fstab paths for normal/recovery boot" 2017-03-27 19:23:12 +00:00
Mark Salyzyn
fbc0fe429b logcat: test: run 256 simultaneous logcats
For logd daemon, heavy reader stress. For system popen fork and
execute of logcat measure baseline against liblogcat. For liblogcat
local concurrent thread, locking, argument parsing and context scaling
for popen-style pair of android_logcat_run_command_thread* functions.

NB: 1000 logcat executables ran, but did not scale well on time
    blocked for more than a minute. With 343 contexts of
    android_logcat_run_command_thread ran out of local resources
    to even return a file descriptor, and the per-context event tag
    mappings coincidentally ran out at 340 when threads ran, although
    that path was consistently 15% faster than the popen test.

Test: gtest logcat-unit-tests --gtest_filter=*.End_to_End_multitude
Bug: 35326290
Change-Id: I0e1a5d4f8ffbd77fa8db13d53f4d328973731895
2017-03-27 11:57:53 -07:00
Wei Wang
40267986da libcutils: remove schedgroup
After removing bg_non_interactive cgroup, there is only a ROOT cgroup.
This CL removes the no-op trying to set cgroup.
It also removes the attempt to open non-exist bg_non_interactive cgroup.

Bug: 36649832
Test: marlin boosts and cgroup ROOT task looks normal
Change-Id: Ibccd6db1499306174c940aec9219b20c1b86173d
2017-03-27 11:57:29 -07:00
Bowgo Tsai
d05a2f7dcb fs_mgr: use different fstab paths for normal/recovery boot
recovery boot: /etc/recovery.fstab
  normal boot: use the first one found by the order:
               /odm/etc/fstab.{hardware} ->
               /vendor/etc/fstab.{hardware} ->
               /fstab.{hardware}

Bug: 35811655
Bug: 36637553

Test: Sideload OTA installation in sailfish
Change-Id: I3e260e077afa5a37fb65246246c824e9379e68c8
2017-03-28 01:34:28 +08:00
Steven Moreland
352b3d737c Merge "Revert "Revert "Start hwservicemanager earlier.""" am: ca622b4e78
am: e326cb121e

Change-Id: Ie53fb18bdc194adeab7ec8e46b11463e633a3afc
2017-03-27 17:34:00 +00:00
Steven Moreland
e326cb121e Merge "Revert "Revert "Start hwservicemanager earlier."""
am: ca622b4e78

Change-Id: I6d08f24f108f84130c059f2515219ebcdbc82b18
2017-03-27 17:31:05 +00:00
Treehugger Robot
ca622b4e78 Merge "Revert "Revert "Start hwservicemanager earlier.""" 2017-03-27 17:28:38 +00:00
Bowgo Tsai
07fb5bf7f0 Merge "fs_mgr_avb: fix return value check of fs_mgr_get_boot_config()" am: 51da2aaa36
am: eb0a5e7e26

Change-Id: Ib6e4a659fb1b3912263ec9b32f9da24c4d1ea16c
2017-03-27 17:16:55 +00:00
Bowgo Tsai
eb0a5e7e26 Merge "fs_mgr_avb: fix return value check of fs_mgr_get_boot_config()"
am: 51da2aaa36

Change-Id: Icf84ec85fe8e6c32238433a1e9ffec202ccb5a75
2017-03-27 17:14:25 +00:00
Treehugger Robot
51da2aaa36 Merge "fs_mgr_avb: fix return value check of fs_mgr_get_boot_config()" 2017-03-27 17:08:33 +00:00
Bowgo Tsai
97db0809f4 fs_mgr_avb: fix return value check of fs_mgr_get_boot_config()
fs_mgr_get_boot_config() returns true/false but the return value check
in current fs_mgr_avb is for 0/1. This was introduced during a refactoring.

Check true/false for the return value.

Bug: 33254008
Test: manual test AVB on bullhead
Change-Id: I72c366627214df4a99c4d9cf1eb577e94f7afb31
2017-03-27 22:33:21 +08:00
Jeff Vander Stoep
7ef28f4e4f Move selinux policy build decisions to sepolicy Makefile
Test: Test build/boot Marlin with split policy
Test: Test build/boot Bullhead with combined policy
Bug: 36138508
Change-Id: I84654d19c4d8e9fe9086fde742ee80cd043dfbe1
2017-03-26 07:56:29 -07:00
Dimitry Ivanov
7bbe56c46b Merge "Add ld.config.txt to /system/etc" am: d444f8663d
am: e6f9497cca

Change-Id: I7889a08a6805a94740b87259312631b2ca0c12f6
2017-03-25 05:23:56 +00:00
Dimitry Ivanov
e6f9497cca Merge "Add ld.config.txt to /system/etc"
am: d444f8663d

Change-Id: I47a9dc4f028582575fb9da0c5a87103ed22c7945
2017-03-25 05:21:23 +00:00
Treehugger Robot
d444f8663d Merge "Add ld.config.txt to /system/etc" 2017-03-25 05:17:33 +00:00
Steven Moreland
d627502bb0 Revert "Revert "Start hwservicemanager earlier.""
This reverts commit 5011270225.

Now starting even earlier.

Reason for revert: Needed change, reverted b/c broken device.

Bug: 36278706
Test: original DOA device boots
Test: angler, bullhead, fugu, marlin, ryu
Test: all these devices boot with wipe
Test: all these devices boot with w/o wipe
Test: lshal shows all included services

Change-Id: Ic639aedf7834b1bd3a26d23d109727f5559317e9
2017-03-24 20:52:44 -07:00
Elliott Hughes
f1af800562 Merge ""Requested dump for tid XXX" message shouldn't be fatal." am: f5d727f221
am: f62f611e01

Change-Id: I7708be47c46ef13808cb01acbd60edde4364f4df
2017-03-24 23:35:26 +00:00
Fernando Lugo
cefc9134f8 Merge "fs_mgr: update to new androidboot.slot param" am: 0fc8a4b363
am: 64bf462eb9

Change-Id: Idab5bef714d80651e3402fb370e811310f5bbb35
2017-03-24 23:35:13 +00:00
Elliott Hughes
f62f611e01 Merge ""Requested dump for tid XXX" message shouldn't be fatal."
am: f5d727f221

Change-Id: Icd3b5afb31360b16cd688ccf0a45d9d6e2e7e693
2017-03-24 23:33:31 +00:00
Fernando Lugo
64bf462eb9 Merge "fs_mgr: update to new androidboot.slot param"
am: 0fc8a4b363

Change-Id: Idf923e6f6766eee6448cc57c3165930ad7fcb510
2017-03-24 23:33:18 +00:00
Elliott Hughes
f5d727f221 Merge ""Requested dump for tid XXX" message shouldn't be fatal." 2017-03-24 23:29:23 +00:00
Fernando Lugo
0fc8a4b363 Merge "fs_mgr: update to new androidboot.slot param" 2017-03-24 23:29:19 +00:00
Fernando Lugo
9c7ae587c2 fs_mgr: update to new androidboot.slot param
androidboot.slot_suffix is being deprecated for a androidboot.slot.
Bootloader must pass slot used to boot into the androidboot.slot which
does not include the '_' character

Test: boot android
Bug: 36533366
Change-Id: I6137bd08418f67a88120c8609eda10b2ada4607d
Signed-off-by: Fernando Lugo <flugo@google.com>
2017-03-24 23:28:55 +00:00
Josh Gao
6a611d9731 Merge "adb: allow symlinks to directories in directory_exists." am: c10c31e8ba
am: 36699d3fb2

Change-Id: If5d4ad7ee69be834f58788d823758cf230f51fdc
2017-03-24 18:45:23 +00:00
Josh Gao
36699d3fb2 Merge "adb: allow symlinks to directories in directory_exists."
am: c10c31e8ba

Change-Id: I9480b98081f9db54955da19a4565c9a458781cdb
2017-03-24 18:43:23 +00:00
Josh Gao
c10c31e8ba Merge "adb: allow symlinks to directories in directory_exists." 2017-03-24 18:37:36 +00:00
Christopher Ferris
ebeb5966b7 Merge "Test unwinding through a signal handler." am: d13099e66c
am: 37cc8984d0

Change-Id: I919bc17b38b199963d5ebc2209a9cbeff4848ce1
2017-03-24 17:28:20 +00:00
Christopher Ferris
37cc8984d0 Merge "Test unwinding through a signal handler."
am: d13099e66c

Change-Id: I2ff5b1dd1b15c02f50a2cb83eaf509b5f9fc4448
2017-03-24 17:26:54 +00:00
Christopher Ferris
d13099e66c Merge "Test unwinding through a signal handler." 2017-03-24 17:22:25 +00:00
Thierry Strudel
ea6de14c5e Merge "Revert "Start hwservicemanager earlier."" am: 3ba313597d
am: 263cf5c8d9

Change-Id: I9b9249a1a9e31ec7ff477b27e7df5ed9f23b7bfd
2017-03-24 14:39:38 +00:00