Move tests in the same directory as the corresponding code, so it's
easier to see what is/isn't tested.
Fix naming of libcutils_tests (plural) to match the singular that's more
common (even though the plural makes more sense to me).
Add these two to system/core/'s TEST_MAPPING.
Remove obsolete AndroidTest.xml.
Fix a flaky (timing-dependent) libcutils test.
Test: ran tests
Change-Id: I7e0a31ff45c8a152562bf66fc97161594249366e
If ro.boot.boottime is malformed or truncated, it will crash
bootstat operations.
Test: compile
Bug: 121161069
Bug: 124114707
Change-Id: Ie2edcffb6d54a8e0c7f2e9a89ae4b29cce246d75
Confusion has occurred with respect to the kernel patch requirements,
added some clarity.
Corrected some spelling mistakes in other areas.
Test: inspect gitties and run spell
Bug: 118225373
Change-Id: I4ff9497aa5a584b20e9cb2028342aa4e7e4660c3
Test: build with master-art manifest
Exempt-From-Owner-Approval: Required for unbreaking ART development.
Change-Id: I6afc0e5444dfa21532a4c802f8c463091cab2b11
Fixes:
system/core/libmeminfo/libdmabufinfo/tools/dmabuf_dump.cpp:109:39: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
Test: lunch aosp_arm-eng && m dmabuf_dump
Change-Id: Ie605d9b94f5eff888f6a64801512216253a6babb
bootstat updates boot reason upon boot_complete, however users of the
updated properties e.g. getLastShutdownReason from PowerManager could
be called before boot_complete. This introduces a inconsistency and
racing for those APIs.
In this CL, we change boot reason to be updated at the same time when
zygote starts where persist properties have been loaded already. Also
the initialization of bootloader's boot reason is pulled into post-fs
where all kernel command line arguments have been parsed in init already.
Bug: 122696730
Bug: 119509425
Test: trigger thermal shutdown and see warnings
Test: verify boot reason properties updated correctly post boot
Change-Id: Ia393b98ea072bc0ae6e4110d111393b34be0ee5d
Signed-off-by: Wei Wang <wvw@google.com>
The reconnection test is spuriously failing on test infrastructure for
unclear reasons, which might be due to a race between the connection
attempt and the first command we send. Insert a sleep to hopefully
reduce the flakiness.
Bug: http://b/123247844
Test: ./test_adb.py (but it didn't fail for me in the first place)
Change-Id: Ic36924c16bae424accfec700af4623794fd1f123
Previously, we were rejecting the flag and failing with EINVAL. File
handles aren't inherited by default, so just ignore the flag.
Bug: http://b/123753498
Test: adb install --streaming foo.apk
Change-Id: I17401fcdd58024956d47a5c4c0c57b06831d9817
This reverts commit 5c8c6a90fd.
Reason for revert: Another try with http://r.android.com/892234 in place.
Test: Flash and boot
Bug: 113373927
Change-Id: I508c217a177e9cdd65d8a405d1315aeeacabe18d
dmabuf_dump had a hard dependency on debugfs to gather the initial list
of buffers for all proceses, make it optional.
Change-Id: I1d271297c0ad6124b321a1ee8aa01d3e88ca9fed
Signed-off-by: Erick Reyes <erickreyes@google.com>
Removed dependency on libc++fs and changed liblog to shared linkage to
cope with build errors derived from the change.
Removed dmabuf_dump unnecessary dependencies and made it soc_specific.
Removed reference to std::filesystem::is_symlink to workaround the
following error when linking with the library:
ld.lld: error: undefined symbol:
std::__1::__fs::filesystem::__symlink_status(std::__1::__fs::filesystem::path
const&, std::__1::error_code*)
>>> referenced by filesystem:1743
(external/libcxx/include/filesystem:1743)
>>>
dmabufinfo.o:(android::dmabufinfo::AppendDmaBufInfo(int,
std::__1::vector<android::dmabufinfo::DmaBuffer,
std::__1::allocator<android::dmabufinfo::DmaBuffer> >*)) in archive
Bug: 63860998
Change-Id: Ieafdc87c64f153625df9e21fc8299292b2447aef
Signed-off-by: Erick Reyes <erickreyes@google.com>
The sys.use_memfd property is set by default to false in Android
to temporarily disable memfd, till vendor and apps are ready for it.
The main issue: either apps or vendor processes can directly make ashmem
IOCTLs on FDs they receive by assuming they are ashmem, without going
through libcutils. Such fds could have very well be originally created with
libcutils hence they could be memfd. Thus the IOCTLs will break.
Set default value of sys.use_memfd property to true once the issue is
resolved, so that the code can then self-detect if kernel support is present
on the device. The property can also set to true from adb shell, for
debugging.
Bug: 113362644
Change-Id: I0f572ef36cac2a58fe308ddb90bbeffbecdaed3b
Signed-off-by: Joel Fernandes <joelaf@google.com>
This patch adds support to make libcutils create and use memfd where
possible, instead of ashmem.
The libcutils library is made dynamic, since apps are still sending over
ashmem FDs to processes and we are working on moving those apps away
from ashmem. The best we can do for that is make the library work, and
force apps in the long run to move away from directly using ashmem.
Due to further complications mentioned in the 'NOTE' section of the
patch, memfd is kept disabled for now, so nothing changes yet. To enable
it, set the sys.use_memfd property (check user_debug build).
Bug: 113362644
Change-Id: I491cb7841b664db5b1c26b3e07a440a14810e182
Signed-off-by: Joel Fernandes <joelaf@google.com>
fs_mgr_overlayfs_setup return false second time around if all
are setup. It should report true if candidate list is all done.
Test: adb-remount-test.sh
Bug: 122602260
Change-Id: Ic9e16489e2c8ac4d3de91fcf8cfceedc23595e94
Expand the tests to deal with the boot environment for marlin.
Recognize that older overlayfs drivers do not report to /sys/module
and the parsing /proc/filesystem is another place to interrogate this.
Suppress adb push and pull noise during testing. Resolve APEX
failures. Add some cleanup to test script.
NB: Running test to completion is difficult because marlin's USB
driver is flakey enough through the multitude of reboots and
may not reconnect. The tester will have to notice when a reboot
is stalling and manually disconnect and reconnect the USB
connection to trigger discovery and to continue through the
test sequences. To make this easier, report when we are
waiting for the device to make it easier to babysit.
Test: system/core/fs_mgr/tests/adb-remount-test.sh
Bug: 120448575
Bug: 123079041
Change-Id: I5fc5f01b4e4788ac57541cb5235f7ac4e4284d71
Adding tool to dump the dmabuf information using the dmabufinfo library.
Test: run "dmabuf_dump" and "dmabuf_dump <pid>" on crosshatch
Bug: 63860998
Change-Id: I16fe0a701deb5086ca0e1a8ceecb70dbc17934e6
Signed-off-by: Erick Reyes <erickreyes@google.com>
The number of references to a buffer total_refs was not accounting for
a process holding multiple references to the same buffer.
Also, clarify AppendDmaBufInfo functionality in comments
Change-Id: I044a18acad1570492a925d51b9464d5b0e60ca35
Signed-off-by: Erick Reyes <erickreyes@google.com>
When cgroup directory is created its user and ownership gets set, however
because previous code was storing getpwnam() return value the second
invocation would effectively override the previous ones result. Fix this
by copying necessary results. Also change getpwnam() to getgrnam() when
group name is converted into gid. getpwnam() works because of the way
Android uses these ids, however more generally this is incorrect and
getgrnam() should be used instead.
Bug: 111307099
Test: verified user/group membership of the cgroup directories
Change-Id: I78668bc1a36a74f53d8e9825e2d06e3e09501e7a
Signed-off-by: Suren Baghdasaryan <surenb@google.com>