Commit graph

43372 commits

Author SHA1 Message Date
Yifan Hong
6af857f21d Merge "liblp: MetadataBuilder::HasBlockDevice" 2018-11-16 23:14:38 +00:00
Josh Gao
3a2bd498f8 Merge "Fix double closes in ziparchive tests." 2018-11-16 19:58:27 +00:00
Josh Gao
5db84229e1 Fix double closes in ziparchive tests.
Bug: http://b/119632446
Test: setprop debug.fdsan fatal && /data/native64/ziparchive-tests/ziparchive-tests
Change-Id: I3a9e6f3823ba49c56602041779cb085a6971ca6d
2018-11-16 19:54:41 +00:00
Mark Salyzyn
5d4f420c8c Merge changes Iffbd6261,Ic7382a61
* changes:
  fs_mgr: overlayfs: test: adding diagnostic value
  fs_mgr: overlayfs: test: skip apex mounts
2018-11-16 15:17:44 +00:00
Christopher Ferris
78bde50e21 Merge "Remove overly restrictive check for memory." 2018-11-16 06:30:49 +00:00
Elliott Hughes
a59ecfd940 Merge "Stop using __STRING unnecessarily." 2018-11-15 23:04:41 +00:00
Mark Salyzyn
271485feba fs_mgr: overlayfs: test: adding diagnostic value
Add a test report df before overlay applied to make it clearer what
the device looked like before applying for remount.  Check error
code from adb disable-verity and use that to terminate test if bad.
Collect a sliced logcat for failures to help diagnose problems.
If the device does not come back after flashing, timeout and fail
when waiting.  Fix some issues that result when running script under
set -x when diagnosing the tests logistics.

Test: adb-remount-test.sh
Bug: 109821005
Change-Id: Iffbd6261703393417cb6ec3a12042d59523c348d
2018-11-15 23:02:29 +00:00
Mark Salyzyn
0733a86990 fs_mgr: overlayfs: test: skip apex mounts
Strip out /dev/block/loop* devices to filter out apex mounts.  Deal
with scale of skip_administrative_mounts function to make for easier
maintenance.

Test: adb-remount-test.sh
Bug: 109821005
Bug: 112455435
Change-Id: Ic7382a613db8f3ac7cdc10721194042378d136b9
2018-11-15 23:01:27 +00:00
Yifan Hong
dca3b3bb2c liblp: MetadataBuilder::HasBlockDevice
Query whether a block device is used in the metadata.

Test: pass
Bug: 118506262
Change-Id: I67196b68918ac232e735b10a850299f8653e4d3f
2018-11-15 14:45:41 -08:00
Christopher Ferris
5565906732 Remove overly restrictive check for memory.
Remove unit test that is not needed any more.

Slightly reorganize the code around the changed check.

Bug: 77958880

Test: Ran backtrace tests with new linker options.
Test: Ran libunwindstack unit tests.
Change-Id: Ie95707323fb51616a093cafb83e0343fa24e7e61
2018-11-15 14:06:26 -08:00
Treehugger Robot
5729cff611 Merge "liblp: partition_opener: fix log; more logs" 2018-11-15 02:01:34 +00:00
Janis Danisevskis
2fda3db108 Merge "Multi-threaded Keystore" 2018-11-15 01:19:10 +00:00
Treehugger Robot
2979d385cb Merge "base: TemporaryDir add DoNotRemove() method" 2018-11-15 00:37:03 +00:00
Treehugger Robot
baa4818925 Merge changes from topic "TemporaryDir rm -rf"
* changes:
  base: TemporaryDir rm -rf directory in destructor
  liblp: Use TMPDIR instead of P_tmpdir.
2018-11-14 23:21:09 +00:00
Treehugger Robot
01acb70e80 Merge "base: Add sensitivity to TMPDIR environment for TemporaryDir and TemporaryFile" 2018-11-14 23:03:32 +00:00
Yifan Hong
098cc974de liblp: partition_opener: fix log; more logs
Test: manual
Change-Id: I48777a479651dbd389e0a4420505342cb272b9f2
2018-11-14 22:45:20 +00:00
Elliott Hughes
da94ca4d28 Stop using __STRING unnecessarily.
Bug: N/A
Test: builds
Change-Id: I8748abf834ec3a808eb2fc6ee0f288562fb0b4ea
2018-11-14 14:27:22 -08:00
Mark Salyzyn
d2f5888894 base: TemporaryDir add DoNotRemove() method
Recursively delete all contents in a temporary directory in the
destructor.  If the caller wants the contents preserved, then
call DoNotRemove().

Test: compile
Bug: 119313545
Change-Id: I3601c06334920055a60dd3074b249824f4d6f510
2018-11-14 12:54:08 -08:00
Mark Salyzyn
46c2df5812 base: TemporaryDir rm -rf directory in destructor
Recursively delete all contents in a temporary directory in the
destructor.

Test: compile
Bug: 119313545
Change-Id: I9570a8591f4e51f8f4f1157e75ccc1b781f8a19d
2018-11-14 12:52:42 -08:00
David Anderson
a14f111377 liblp: Use TMPDIR instead of P_tmpdir.
lpmake should be using the intermediates directory for temporary work
rather than /tmp.  Add ability to respect TMPDIR environment as
inherited from TemporaryFile.

Bug: 119313545
Test: manual test
Change-Id: I1a0317538875ee37fb4066602ff7a75e4658d74b
2018-11-14 12:52:23 -08:00
Mark Salyzyn
6009a2debc base: Add sensitivity to TMPDIR environment for TemporaryDir and TemporaryFile
Test: compile
Bug: 119313545
Change-Id: I2917847f0e90df94d74f4bfc0b13fbc6a5f243c3
2018-11-14 12:52:13 -08:00
Treehugger Robot
b9cb149441 Merge "switch to using android-base/file.h instead of android-base/test_utils.h" 2018-11-14 20:27:23 +00:00
Mark Salyzyn
9f1cf25332 switch to using android-base/file.h instead of android-base/test_utils.h
Test: compile
Bug: 119313545
Change-Id: I4f7ad84743e974b4b4d1d7256088f6c8b749a237
2018-11-14 09:35:34 -08:00
Treehugger Robot
e77298ce9f Merge "base: move TemporaryFile and TemporaryDir to android-base/file.h" 2018-11-14 15:20:47 +00:00
Treehugger Robot
af4a0e846e Merge "liblp: SparseBuilder: num_blocks aren't check correctly" 2018-11-14 06:57:46 +00:00
Treehugger Robot
0d700897c4 Merge "liblp: fix error message" 2018-11-14 03:08:49 +00:00
Yifan Hong
6ddf9683a1 liblp: fix error message
Test: pass
Change-Id: I5a969c3fbabd8f32ea785a6196225e655205245b
2018-11-13 13:58:27 -08:00
Yifan Hong
27a34d71c1 liblp: SparseBuilder: num_blocks aren't check correctly
Test: builds

Change-Id: Ic0fe481cd168217d764b7c69dfe9da124a277f82
2018-11-13 12:57:44 -08:00
Mark Salyzyn
0790b2465a base: move TemporaryFile and TemporaryDir to android-base/file.h
Allow a wider legitimate audience to use TemporaryFile and
TemporaryDir by moving them from android-base/test_utils.h to
android-base/file.h.

Test: compile
Bug: 119313545
Change-Id: Ie558c5873ce5b3937914918b6bfb427e5b61d0da
2018-11-13 12:44:21 -08:00
Josh Gao
c55fab4a59 Merge "Revert "adb: make benchmarks build on the host."" 2018-11-13 19:29:20 +00:00
Josh Gao
1289e1ec65 Revert "adb: make benchmarks build on the host."
This reverts commit 80dd70d285.

Breaks the darwin build.

Change-Id: If95266c6fc027cf2a706f3c83dce7e50b762b8aa
2018-11-13 11:28:29 -08:00
Josh Gao
7d3f006666 Merge changes Ifed3b97a,I09aacb94,I9afedd7b
* changes:
  adb: fix NonblockingFdConnection's behavior with large writes.
  adb: fix zero-initialization in Block.
  adb: make benchmarks build on the host.
2018-11-13 18:51:30 +00:00
Tom Cherry
02ac44c993 Merge "logd: fix memory leak due to slow reader" 2018-11-13 16:18:58 +00:00
Treehugger Robot
34ffa7e074 Merge "init: error log on by-name identical replacement" 2018-11-13 15:27:27 +00:00
Treehugger Robot
a07d2959cf Merge "Add support for updatable services" 2018-11-13 11:11:58 +00:00
Josh Gao
bc4dbfafb1 adb: fix NonblockingFdConnection's behavior with large writes.
Large opportunistic writes would perform a write without updating
writable_ or waking up the polling thread, which resulted in the worker
thread never polling with POLLOUT.

Test: adb_benchmark
Change-Id: Ifed3b97a4b647b539dcd2df858572fa7da9a22d0
2018-11-12 20:54:39 -08:00
Josh Gao
10d079a37b adb: fix zero-initialization in Block.
Iccfe3bd4fe45a0319bd9f23b8cbff4c7070c9f4d changed Block from using
malloc to std::make_unique, which does the equivalent of
`new char[size]()`, which value initializes the array members to 0.
Switch to `reset(new char[size])` to avoid this costly initialization.

Test: adb_benchmark
Change-Id: I09aacb949a7bd4a946ce35a8ee65d1f451577b72
2018-11-12 20:54:39 -08:00
Josh Gao
80dd70d285 adb: make benchmarks build on the host.
Test: adb_benchmark
Change-Id: I9afedd7bdcf645652e514d98bb88036753718168
2018-11-12 20:54:30 -08:00
Josh Gao
d08b470e25 Merge changes Ibb109618,If1451871
* changes:
  adb: flush stderr after logging on Windows.
  adb: libusb: don't set interface alternate setting.
2018-11-13 04:53:03 +00:00
Tom Cherry
877e074eaf Merge "fs_mgr: remove same partition check for vbmeta" 2018-11-13 00:40:24 +00:00
Jiyong Park
80aa44704c Add support for updatable services
A service with 'updatable' option can be overriden by the same service
definition in APEXes.

/system/etc/init/foo.rc:

service foo /system/bin/foo
    updatable

/apex/myapex/etc/init.rc:

service foo /apex/myapex/bin/foo
    override

Overriding a non-updatable (i.e. without updatable option) service
from APEXes is prohibited.

When an updatable service is started before APEXes are all activated,
the execution is delayed until when the APEXes are all activated.

Bug: 117403679
Test: m apex.test; adb push <built_apex> /data/apex; adb reboot
adb shell, then lsof -p $(pidof surfaceflinger) shows that
the process is executing
/apex/com.android.example.apex@1/bin/surfaceflinger instead of
/system/bin/surfaceflinger

Change-Id: I8a57b8e7f6da81b4d2843e261a9a935dd279067c
2018-11-13 08:59:14 +09:00
Josh Gao
68b5d0c3e3 adb: flush stderr after logging on Windows.
Test: set ADB_TRACE=1 & adb.exe server nodaemon
Change-Id: Ibb109618be7eaae49461a306e34ff79451ec330e
2018-11-12 14:08:40 -08:00
Josh Gao
cd85556151 adb: libusb: don't set interface alternate setting.
Match behavior with the legacy implementation.

Test: ADB_TRACE=1 adb server nodaemon
Change-Id: If1451871f252ef4499b3bb887e947169f8d2432f
2018-11-12 14:08:40 -08:00
Mark Salyzyn
3c426b65f6 init: error log on by-name identical replacement
The following message creates unnecessary alarm:

init: Partition system_a already existed in the by-name symlink map \
 with a value of \
 /dev/block/platform/soc/1d84000.ufshc/by-name/system_a, new value \
 /dev/block/platform/soc/1d84000.ufshc/by-name/system_a will be \
 ignored.

and in the code is cited as an ERROR.  The message admittedly does
point out an inefficiency by reporting multiple updates.

Test: compile
Change-Id: I388a76fa078cf9de5840930247f732d16ccb0719
2018-11-12 20:27:09 +00:00
Treehugger Robot
42b38900d7 Merge "fastboot: pin USB interface versions on darwin." 2018-11-12 20:23:26 +00:00
Jintao_Zhu
5f93072db3 logd: fix memory leak due to slow reader
Kernel panic - not syncing: Out of memory occurred once after 8 hours
automatic test which cases are about Summary:logd memory leak UTResult
: 1/1

IssueID: 93440

Rootcause: the method "LogTimeEntry::FilterSecondPass"(called inside
"LogBuffer::flushTo") does not check the condition flag
"LogTimeEntry::mRelease" which will be set to true when "logd" begins
to kick off a client when it finding the client is slow-est.
Therefore the client cannot be kicked off and hence the log-element
list becomes longer and longer if the slowest client reading more
slower than the writer writing.

Change-Id: I91a44a393e63b3122c15ce269ee195e0eb4339e8
Solution: add the check.
Test: logd kills slow reader
2018-11-12 10:24:15 -08:00
Tom Cherry
13856a05e7 Merge "Reland: "init: chroot from recovery to /first_stage_ramdisk"" 2018-11-12 16:38:59 +00:00
Nick Kralevich
adfe8c4545 Merge "Set bin directories to 0751" 2018-11-12 05:06:50 +00:00
Treehugger Robot
a4e4e39421 Merge "init parses *.rc files from APEXes" 2018-11-12 02:53:41 +00:00
Eran Messeri
be0ab0a6e0 fastboot: pin USB interface versions on darwin.
Similar to the change to adb in Id26760bc62c89a1f7ef67511b21f9d9252ab69f3,
pin the interface version to IOUSBFamily 5.0.0.

Bug: 119264733
Test: Manual
Change-Id: Ied9164532c0ba6f20415dafecb0c774578aa5c57
2018-11-11 18:14:58 -08:00