| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch includes the static library version of libbrillo-stream and
fixes the missing static library dependencies in libbrillo.
This cherry-pick updates the library names to match those in nyc.
Bug: 27178350
TEST=Built a static update_engine_sideload.
(cherry picked from commit cad86b899faa8bf925646522d8bb348095199cdf)
Change-Id: Iaea03720ca7fa8079a5ee1cfe930b00746d385f1
|
|\
| |
| |
| |
| |
| |
| | |
am: ba882304e0
* commit 'ba882304e0dee418bb05fa19b6cf8c30cecb59d0':
Make BinderWatcher use brillo::MessageLoop.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch breaks the dependency between the BinderWatcher and the
base::MessageLoopForIO implementation, making it use the
brillo::MessageLoop class instead.
Bug: 26356682
TEST=Binder based `update_engine_client` still works.
Change-Id: I46a8a9c8d00d536c2d54889017f109c581eb0bc7
|
|\|
| |
| |
| |
| |
| |
| | |
am: 2a6e3f7c9d
* commit '2a6e3f7c9dfe0ed3c3be143d97588ac8ea9c898a':
libbrillo_test: Compile only on 'eng' builds.
|
| |
| |
| |
| |
| | |
Bug: 26967770
Change-Id: Ic35850cbf1672fc69310b0da64557dbc9a1d9e51
|
|\|
| |
| |
| |
| |
| |
| | |
am: dd1c7d7bd4
* commit 'dd1c7d7bd4362917884f5871f9dedb8428652338':
policy: Fix unittests.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previous CL deprecating some policy fields missed fixes in the
unit tests.
Bug: None
TEST=FEATURES=test emerge-link libbrillo
Change-Id: I6212e9ef27c2cdd99a4209ff062a6e2e6885246d
|
|\|
| |
| |
| |
| |
| |
| | |
am: b2e83208f8
* commit 'b2e83208f8e974ad7ee726332fd471c8852057a3':
Remove deprecated policy DeviceProxySettingsProto
|
| |
| |
| |
| |
| |
| |
| | |
BUG=chromium:442466
TEST=none
Change-Id: I39f474bc5a53f0a9b199ea557924726bb988e58a
|
|\|
| |
| |
| |
| |
| |
| | |
am: b57ecfa6fb
* commit 'b57ecfa6fbbb44522b404b13fe1e364366d5ba74':
libbrillo: Add base::Value conversion functions
|
| |
| |
| |
| |
| |
| |
| | |
This makes using base::Value less painful of an experience.
BUG: 26558300
Change-Id: I6e202b863e049f33643c6547f9710991f2c56240
|
|\|
| |
| |
| |
| |
| |
| | |
am: eb350bccd2
* commit 'eb350bccd25b686cd669f54ca0abbcd595557a3e':
Add userdb_utils.
|
| |
| |
| |
| |
| |
| | |
BUG=25746269
Change-Id: Idfc0e0f83c3ad0724bff01765ee7ae62045f2a30
|
|\|
| |
| |
| |
| |
| |
| | |
am: b137dc9b98
* commit 'b137dc9b98e6200ed955ab1290df711a4b2c144a':
Set default USE flags values as local variables.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Setting variables such as BRILLO_USE_FOO can leak to other makefiles,
so the local default value set by another project can affect the
default behavior. This patch defines local variables with the local
default value for the USE flags.
Bug: None
TEST=mmma external/libbrillo
Change-Id: Iefca0c4de48d7bd09d41b06ca18f1c95716f6fce
|
|\|
| |
| |
| |
| |
| |
| | |
am: 2a25190ea7
* commit '2a25190ea741023a3753e7f381a8a2b1465c43c1':
Add DBusConnection helper class to use instead of DBusDaemon.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This CL moves the logic in DBusDaemon to a helper class that can be
included in another class inheriting from Daemon without needed to use
multiple inheritance nor forcing a DBus connection to succeed.
DBusDaemon was modified to re-use this class without changing its
behaviour to be compatible with existing code.
Bug: 26690086
TEST=mm; Update update_engine to use this class and tested it on edison.
Change-Id: If05a5582158552b6aeebf86dbde2aaa161f5a29f
|
|\|
| |
| |
| |
| |
| |
| | |
am: 037abdbfc6
* commit '037abdbfc6e180b0db2624c958000ea9388516c0':
libbrillo: Update BASE_VERS to 369476
|
| |
| |
| |
| |
| |
| | |
This is needed to uprev everything on ChromeOS side.
Change-Id: Ibc67cea6d3d64825db24cb0a9f2fcae0e1399298
|
|\|
| |
| |
| |
| |
| |
| | |
am: 80b7ee94e3
* commit '80b7ee94e36e2d25a97a262d3b558bbf130c2a01':
libbrillo: Update libchrome APIs to r369476
|
| |
| |
| |
| |
| |
| |
| | |
The new libchrome has been ported from Chromium and some APIs have
changed. Make necessary changes at call sites.
Change-Id: If39615b805ec50b9487b6327702c4cdbbd21b7ee
|
|\|
| |
| |
| |
| |
| |
| | |
am: 77edc5357e
* commit '77edc5357e1ff2c507a07d4c97f943910609ee44':
Disable binder detection for the host.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When building for the host, disable the binder file descriptor
detection workaround since we don't use binder on the host and the
required modules are not always available.
Bug: None
TEST=`mmma external/libbrillo` on linux and mac.
Change-Id: I36e2786ff036bc3cd01780ae50c242baf407a0a8
|
|\|
| |
| |
| |
| |
| |
| | |
am: d671746a66
* commit 'd671746a66d87edf9598cfbe077b3430e50a09d3':
Don't delete and add the binder fd in BaseMessageLoop.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The binder driver polling mechanism doesn't work well with epoll. In
particular, you can't add the binder file descriptor to epoll (with
EPOLL_CTL_ADD) when there's work to do in the binder driver, then
wait for it when there isn't any more work to do.
To avoid this situation, we only add the binder file descriptor at the
beginning and never try to remove and add it back when running
callbacks for it.
Bug: 26524111
TEST=unittests for parsing.
TEST=Tested with an example service, strace shows the binder fd is not added/removed each time.
Change-Id: I11d6af5593fa78631f80e9ba09d933f4b8ef70df
|
|\|
| |
| |
| |
| |
| |
| | |
am: 27f8f9440e
* commit '27f8f9440e012927c1ff2831da1a0d7478559c5c':
Disable TypeTag tests when USE_RTTI_FOR_TYPE_TAGS is defined.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Tests using tags from the __PRETTY_FUNCTION__ don't work when using
RTTI to get the type name since the format is different.
This CL disables those tests as they check the proper parsing of a
function not used when USE_RTTI_FOR_TYPE_TAGS is defined.
Bug: 26292405
TEST=FEATURES=test emerge-link libbrillog
Change-Id: I7c3383359bc16faebd493f3da003663916be390d
|
|\|
| |
| |
| |
| |
| |
| | |
am: f68e898423
* commit 'f68e898423cfeeb6fc5efdd2af2a9b2d19a9d2ff':
Enable USE_RTTI_FOR_TYPE_TAGS in Chrome OS.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Chrome OS doesn't compile with clang by default, so we need to enable
this define and use rtti information.
Bug: None
TEST=emerge-link libbrillo update_engine
Change-Id: I258813f483cf37914b7631a45a05b5acbb3c144c
|
|\|
| |
| |
| |
| |
| |
| | |
am: 4d8501c1f9
* commit '4d8501c1f9689c833d38c9087df28b971a6ebe42':
libbrillo: Remove RTTI from the library
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The main reason why we needed run-time type information is so that
we can get a type name string for a particular type T. This string
was used in type comparisons in brillo::Any as the only reliable way
of determining if two Any instances have values of the same type.
For this typeid(T).name() was used which requires RTTI to be enabled.
However using RTTI causes issues when linking to libraries with RTTI
disabled. To resolve this issue, stop relying on RTTI in libbrillo
and throughout the rest of Brillo code.
A special work-around was implemented to obtain a type name for
a given type, which relies on the fact that __PRETTY_FUNCTION__ macro
on GCC/clang includes the full signature of a method, including any
template parameters.
For example, brillo::GetTypeTag<double>() would return
const char *brillo::GetTypeTag() [T = double]
and extracting the type name ("double") is just a matter of simple
string manipulations.
To speed up the code at run-time, we don't really need to extract
the type name from this function name when comparing two types, but
rather compare the two function names directly. This function name
with embedded type is called "type tag" in the code.
Unfortunately GCC and CLANG handle __PRETTY_FUNCTION__ differently
for certain template types, so added #error statement to force
compiling using clang only (since this is the compiler used most
often for Brillo targets).
BUG: 26292405
Change-Id: Ie70012b62f66911ee7787e5cf7eeab88359bd959
|
|\|
| |
| |
| |
| |
| |
| | |
am: 2fd46ba145
* commit '2fd46ba1458275cd16b0949675bff70cc8abcdad':
Fix compiler warnings in libbrillo
|
| |
| |
| |
| |
| |
| |
| | |
Bug: 26379664
Test: Compiles
Change-Id: I67658ba9ceb8b769c97f0c345f7711bc96d27a84
|
|\|
| |
| |
| |
| |
| |
| | |
am: d6720ce258
* commit 'd6720ce258a19c08fd2cfe6ea61b5eeefcfb9582':
libbrillo: extend Process API to support sandboxing
|
| |
| |
| |
| |
| |
| |
| |
| | |
Extend the brillo::Process API to support some sandboxing
options.
BUG: 26190154
Change-Id: I6d657ee2afda20d18d6286b132c9143dce0ffc9d
|
|\|
| |
| |
| |
| |
| |
| | |
am: 7a8c2c1f3b
* commit '7a8c2c1f3b25446cec0e7e897f74c9769f4fb6be':
minijail: add support for resetting child process's signal mask
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows the caller to specify whether the child process
should reset its signal mask or not.
Bug: None
BUG=chrome-os-partner:47785
TEST=Manual test using shill
Change-Id: I584c4790fc402624345b39fb6fa78308d6897c85
|
|\|
| |
| |
| |
| |
| |
| | |
am: 21cfdb8e75
* commit '21cfdb8e751c4d24d7d274dd48946eb0112006ad':
libbrillo: Fix unit tests.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We are using stat in the unit tests which is available under two
different path on Chromium OS (/usr/bin/stat) and Android
(/system/bin/stat).
Bug: 26181888
Test: unit tests pass on Android.
Test: unit tests pass on Chromium OS.
Change-Id: I9374e1d8b962b7cf310bbba15adab9d99804c5a5
|
|\|
| |
| |
| |
| |
| |
| | |
am: 88a74f9b14
* commit '88a74f9b14726d6192b69fe64bb8dd6301b6125e':
libbrillo: add brillo/unittest_utils to Android.mk
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add brillo/unittest_utils.mk so that process_unittest.cc can
be built on Android builds.
BUG: None
Change-Id: I3f84c8d30dd5953dbdefd41ebd72615a2ae84651
TEST: 'mma -j32' in external/libbrillo succeeds.
|
|\|
| |
| |
| |
| |
| |
| | |
am: 992e42977b
* commit '992e42977bb39c34360e5224a85115a1a9f834dc':
Fix Process unittests.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The unused file descriptor tests were flaky because they had a 10ms
sleep were the child process was supposed to run. While 10ms is
typically enough for that, our builders run at a high load at 10ms
could not be enough.
This patch uses a different approach to test the same behavior by
checking if the file descriptors are available from the same child
process. It also fixes a fd leak by used a ScopedPipe.
Bug: None
TEST=FEATURES=test emerge-link libbrillo
Change-Id: I53d529c5dbebbfa1af4cc858d76a200d3344d3ff
|
|\|
| |
| |
| |
| |
| |
| | |
am: 866e2e5333
* commit '866e2e53338b17e8a3f646c85174437c75ec568f':
Disable libbrillo-http and libbrillo-stream on mac.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These libraries don't compile on mac, so we will disable them for now.
Bug: 24619596
TEST=`mmma external/libbrillo` on mac
Change-Id: I4dc408f0b39308404fe2687c53d3deaceb3c5097
|
|\|
| |
| |
| |
| |
| |
| | |
am: dc87856e39
* commit 'dc87856e399654209fcaab6732669516009d802c':
Build libbrillo-http and libbrillo-stream for the host.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To be aligned with the new build system, the host and target modules for
libbrillo-* libraries should be the same. This patch creates two new
modules for building libbrillo-stream and libbrillo-http for the host
and renames libbrillo-host to libbrillo.
Bug: 24619596
TEST=mma on linux and mac
Change-Id: I8a17b14e2ac598e7f7e5c586ead5a9d19d59c778
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
To be aligned with the new build system, the host and target modules for
libbrillo-* libraries should be the same. This patch creates two new
modules for building libbrillo-stream and libbrillo-http for the host
and renames libbrillo-host to libbrillo.
Bug: 24619596
TEST=mma on linux and mac
Change-Id: I8a17b14e2ac598e7f7e5c586ead5a9d19d59c778
(cherry picked from commit dc87856e399654209fcaab6732669516009d802c)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we're leaking all opened file descriptors from the
parent process to the child process. This causes undesired side
effects where the file descriptors in the parent might get into
a weird state (e.g. file is ready for read without any data).
Fix this by allowing the caller to set a flag, so that unused file
descriptors inherited from parent will get closed when starting
the child process. Default it to false for now to avoid causing
any unexpected side effects for other callers.
Bug: None
BUG=chromium:567357
TEST=new unit tests
TEST=Manual test
Change-Id: Icf13c4832305096c54e013872360f1da6ee65fb8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of using the default CA certificates, libbrillo should use the
restricted list of certificates installed in
/system/etc/security/cacerts_google.
Bug: 25797832
Test: manual: Enable the verbose mode of libcurl.
* The certificates used are correct.
* POSTing to a google server works.
* POSTing to a CA in the default CA list but not in the restricted
list fails on the certificate verification step.
Test: manual: The ledflasher example works.
Change-Id: If3b836a2fa461ba3103e05c60e5630c8c919d1f3
|