required doesn't propagate from apexes, so we need a separate phony
target to track adbd's dependenecies.
Test: m
Change-Id: I4c97047dbd1c2f9b394d864aed229798f09fc9b1
logd currently only reports the UID of a log message for 'privileged'
readers (those with a uid or gid of root, system, or log). However,
UIDs are not particularly sensitive. Much more importantly,
non-privileged readers can only see less messages from their own UID,
so this restriction is essentially a no-op, as those readers will
already know their own uid.
Test: liblog and logd unit tests
Change-Id: I9da7d15eb840ba3200128391e70d618eec79f988
This document does not list every change in the unwinder between
Android versions. Instead it attempts to only include information
that someone building an app targeting a specific version of Android
might need to know to make sure their app can unwind properly.
It also tries to describe the way that stacktraces might be displayed
differently between Android versions.
Test: NA
Change-Id: I4029053f763f3471f7ddb5da9b1de2d325ead455
There's no point in client side security checks in this library. If a
process has access to these files, then they'll be able to do any of
these operations themselves.
Test: liblog unit tests
Change-Id: I75d4e1509eb8ff0ac4579f820a8968f4f5ad4e06
Enable more of the disabled tests. These should not be flaky and have
value.
The dual_reader test is rewritten in the style of RunLogTests() as
well.
Test: 100 iterations of these tests on CF without failure
Change-Id: I15de9e21b066aa22635cc0bd71b51e2648198823
On some devices the previous implementation of GetHash() was failing at
reading files, returning "Bad file descriptor" error.
Using ReadFileToString() that seems to have fixed the issue.
Test: libsnapshot_test
Change-Id: Ie3598d8bad5b3db1cf816c120e6922a066aa2743
Signed-off-by: Alessio Balsini <balsini@google.com>
The Linux kernel's dm-snapshot relies on a COW device to keep trace of
all the modified sectors.
The COW device has a precise structure, which allows to compute its
space requirement in advance, as a function of:
- sector size;
- chunk size;
- list of modifications applied to the snapshot device.
Create a class that implements the COW device space occupancy given this
information.
Bug: 140835698
Test: libsnapshot_test
Change-Id: I50e3815741ee689d14fc3611532ff9d3b3e0e879
Signed-off-by: Alessio Balsini <balsini@google.com>
Expose API to return name of task profile for cpuset/sched policy so
that libprocessgroup clients using SetTaskProfiles directly don't have
to maintain the mapping. This reduces the risk of inconsistency and saves
memory.
Bug: 139521784
Test: atest libcutils_test:SchedPolicy
Change-Id: I414312a038613913fb6a827bdcefceb3dec21264
When applying a downgrade package on a Virtual A/B device
(to a non-Virtual A/B build), source slot partitions must
be kept in the metadata.
Test: liblp_test
Bug: 138258570
Change-Id: I87afe68bcfa768bdc015f5966b593758b856c741
The log_time struct satisfies all of the requirements for an
implicitly created copy constructor to be present, so not defining one
here does not have any real effect.
We don't want to delete the copy constructor for the rationale given
either; modern C++ favors passing small types by value instead of by
reference as the compiler has more opportunity for optimization in
that case. That's especially true here, where the size of this struct
is the size of a pointer on 64 bit systems.
Test: the copy constructor exists for log_time
Change-Id: Id314ca7729f4b1ca02adb6c7f0ae759b22be2a5c
Continuing the speed up / clean up from the last change.
Enable a subtest that was previously disabled as well. It passes 100s
of cycles now on CF.
Test: liblog-unit-tests
Change-Id: Ifff6f400c3736a1a857a3fdaf22d7ef1794abf9b
The chunk size of the snapshot should be kept consistent among different
files.
Move it to libsnapshot/utility.h to improve its visibility.
Change-Id: I1cae6530a07c88f3a0091ca7d8bb2eb590a6710f
Bug: 140835698
Test: m
Signed-off-by: Alessio Balsini <balsini@google.com>
New linkerconfig reads some txt files which list various kinds of
vndk libraries. For example, vndksp.libraries.txt file has the list of
VNDKSP type libraries. The exact file names are retrieved from .vendor
variants.
With VNDK APEX, .vendor variants are not installed but
.com.android.vndk.current variants are packaged into VNDK APEX.
This CL changes the variant type from .vendor to
.com.android.vndk.current so that *.libraries.txt files can list the
installed files correctly.
Bug: 141451661
Test: m && device boot
Change-Id: Ibbc27b1ae6a44cc2337a0b14918caa27107a4c8e
Especially now that property_service is a thread, there may be some
delay between when init sets sys.powerctl and when the main thread of
init receives this and triggers shutdown. It's possible that
outstanding init commands are run during this gap and that is not
desirable.
Instead, have builtins call TriggerShutdown() directly, so we can be
sure that the next action that init runs will be to shutdown the
device.
Test: reboot works
Test: reboot into recovery due to bad /data works
Change-Id: I26fb9f4f57f46c7451b8b58187138cfedd6fd9eb
A lot of liblog tests follow this pattern:
1) Write a log message
2) Sleep ~1 second
3) Use the non_blocking log reader to dump all log messages
4) Test those log messages
This causes running back to back tests to be very slow and still
allows for some amount of flakiness if the system is very loaded.
This change replaces that pattern with the following:
1) Write a log message
2) Set an alarm for 2 seconds as a test timeout
3) Read logs with the blocking reader until finding the expected log
messages
4) Test those log messages
5) Use the non_blocking reader to dump all log messages
6) Re-test those log messages, to ensure no duplicates, etc, which
isn't done in step 3).
Despite dumping the logs twice, the tests are orders of magnitude
faster in the good case, and should be less prone to flakes.
Test: liblog-unit-tests
Change-Id: Iedf473316576b8007746fe3560815bde1813787a
C++20 will require members in a designated initializer to be in order
unlike C99.
Bug: 139945549
Test: mm
Change-Id: I8804f7dd5cba1035ac7a2979a47b661d722f664a
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
This should help in preventing silly typos like "on foo:"
Test: atest CtsInitTestCases
Test: builds
Bug: 135984674
Change-Id: I6e4e18970e957d25dea9f557f0d31a759fbe6150