Commit graph

960 commits

Author SHA1 Message Date
Ben Fennema
52c61939c3 Merge "libcutils: fs_config: fix "system/<partition>/" aliasing" am: 449bfd7a93 am: cd3584e90b
am: 609b4cf6a5

Change-Id: Ice84d7764a4394b3f101673b5b310860adf59fd6
2017-06-26 22:54:10 +00:00
Ben Fennema
cd3584e90b Merge "libcutils: fs_config: fix "system/<partition>/" aliasing"
am: 449bfd7a93

Change-Id: I9f3d0f0e4dc147d9d2a5a1e41486805ada29d62a
2017-06-26 22:49:41 +00:00
Ben Fennema
acd7b7b0c0 libcutils: fs_config: fix "system/<partition>/" aliasing
Pull prefix checking into fs_config_cmp and make prefix_cmp be a
glorified partial ? strncmp() : strcmp()

Results before:
[ RUN      ] fs_config.system_alias

[ ERROR ] system/core/libcutils/tests/fs_config.cpp:143:: vendor/lib/hw didn't match system/vendor/lib

[ ERROR ] system/core/libcutils/tests/fs_config.cpp:143:: system/vendor/bin/wifi didn't match vendor/bin/wifi

[ ERROR ] system/core/libcutils/tests/fs_config.cpp:143:: system/odm/bin/wifi didn't match odm/bin/wifi

[ ERROR ] system/core/libcutils/tests/fs_config.cpp:143:: system/oem/bin/wifi didn't match oem/bin/wifi
system/core/libcutils/tests/fs_config.cpp:247: Failure
Value of: check_fs_config_cmp(fs_config_cmp_tests)
  Actual: true
Expected: false
[  FAILED  ] fs_config.system_alias (6 ms)

Results after:
[ RUN      ] fs_config.system_alias
[       OK ] fs_config.system_alias (0 ms)

Bug: 62204623
Test: gTest libcutils-unit-test --gtest_filter=fs_config.*
Change-Id: I8282827002816e86ea3014fed29eabf43b837815
Signed-off-by: Ben Fennema <fennema@google.com>
2017-06-26 14:13:52 -07:00
Alex Naidis
fb5f04285b Merge "libcutils: Clarify schedboost_enabled()" am: 643b4776b5 am: 7ce1bdec47
am: 234fae2823

Change-Id: I9c65ccaf5f52db783b0611ca9c183cc64e8a9ad5
2017-06-20 18:36:40 +00:00
Alex Naidis
234fae2823 Merge "libcutils: Clarify schedboost_enabled()" am: 643b4776b5
am: 7ce1bdec47

Change-Id: Ia1b594ccd71a20d787cb70b2b8750c30158b7ffe
2017-06-20 18:22:26 +00:00
Alex Naidis
2d998ea99b libcutils: Clarify schedboost_enabled()
Commit 795267d4c7 ("Removed cpusets/schedboost build time dependency.")
turned the cpusets and schedtune options into runtime
decisions.

However the kernel option which is mentioned in the
code comment (CONFIG_SCHEDTUNE) is very misleading
as it doesn't exist (CONFIG_SCHED_TUNE does exist)
and it doesn't describe the real functionality of
the method. schedboost_enabled() will still return
false if CONFIG_SCHED_TUNE is set in the kernel but
CONFIG_CGROUP_SCHEDTUNE is not.

So to clarify this, we need to change the comment
to reflect that CONFIG_CGROUP_SCHEDTUNE, which depends
on CONFIG_SCHED_TUNE, is required.

Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-06-16 21:30:49 +00:00
Elliott Hughes
2daf8683f3 Merge "Fix prctl argument type" am: 6cc5927e0d am: 316b7334b8
am: 184fa60c23

Change-Id: Ibc96f273e17928f75148ab79c8a0aa1db166ba53
2017-06-12 20:00:05 +00:00
Elliott Hughes
184fa60c23 Merge "Fix prctl argument type" am: 6cc5927e0d
am: 316b7334b8

Change-Id: Iaaf987d8b996a44a0b11eae3a1f1386adf721f3c
2017-06-12 19:56:56 +00:00
Stephen Crane
f5b8e34660 Fix prctl argument type
Although prctl is declared as a varargs function, in actuality it takes
unsigned long arguments (after the first int argument). This patch
ensures that the slack value passed to prctl is correctly sized.

Without this change, the 32-bit ARM compiler places the 64-bit slack
value in registers r2 and r3, but prctl expects the first argument to be
in r1. For kernel versions < 4.6, set_sched_policy has not been
correctly setting the timer slack value in 32-bit ARM code.

Test: Run on bullhead device. Verified assembly of libcutils.so

Change-Id: Ie0e22cbf74a74ff168b257b2e58d0c252449d6c9
2017-06-07 17:25:00 -07:00
Elliott Hughes
99f28f61c2 Merge "Revert "Load {default,build}.prop from /{system,vendor,odm}/etc/"" am: f9259b59e8 am: b2f12e42ca am: 22cdddecba
am: 3e9223f460

Change-Id: Icedc316c4b33a94cc19683213dbdd76e787362bb
2017-05-25 18:21:13 +00:00
Elliott Hughes
3e9223f460 Merge "Revert "Load {default,build}.prop from /{system,vendor,odm}/etc/"" am: f9259b59e8 am: b2f12e42ca
am: 22cdddecba

Change-Id: I6e41d84c76a0d1f31e54d5422638817905f202f4
2017-05-25 18:18:40 +00:00
Hung-ying Tyan
3346338919 Revert "Load {default,build}.prop from /{system,vendor,odm}/etc/"
This reverts commit 723f1a2b31.

Bug: 62075509
2017-05-25 19:18:17 +08:00
Hung-ying Tyan
b1211e9368 Merge "Load {default,build}.prop from /{system,vendor,odm}/etc/" am: a9aa77d259 am: 26c4bcfadd am: 0cd0d52147
am: a22e004f57

Change-Id: Ife17941907dd35507b95c56fe587f83003341684
2017-05-25 02:49:11 +00:00
Hung-ying Tyan
a22e004f57 Merge "Load {default,build}.prop from /{system,vendor,odm}/etc/" am: a9aa77d259 am: 26c4bcfadd
am: 0cd0d52147

Change-Id: Ide638286886cef323e8bb049f5baf4bbe659c47a
2017-05-25 02:46:10 +00:00
Treehugger Robot
a9aa77d259 Merge "Load {default,build}.prop from /{system,vendor,odm}/etc/" 2017-05-25 02:32:37 +00:00
Hung-ying Tyan
723f1a2b31 Load {default,build}.prop from /{system,vendor,odm}/etc/
/default.prop may be moved to /system/etc/ and renamed as prop.default.
/{system,vendor,odm}/build.prop may be moved to /{system,vendor,odm}/etc/
and renamed as prop.build.
This patch makes property_service load prop.* from the new locations
first. Also replaces NULL with nullptr for C++ cleanup.

Bug: 37815285
Test: Booted pixel phones, checked the locations of prop.*, verified
      symlinks, checked a few properties (via adb shell getprop)
      and manually tested a few apps (Camera, Maps etc).
      ODM is not tested as it does not exist on the tested device.
Change-Id: Id8eeb3c1a5728dd04005dfad4733b8e6336f9093
2017-05-25 08:41:08 +08:00
Scott Randolph
a37cce06ba Merge "Add AID_EVS for use by the Automotive EVS system" am: 58620a8d4a am: 39e0f550b9 am: 8ba873809e
am: cd6086b298

Change-Id: I3b1934fe4dc156ce5179c3c0c7ee784671215a20
2017-05-24 00:10:35 +00:00
Scott Randolph
cd6086b298 Merge "Add AID_EVS for use by the Automotive EVS system" am: 58620a8d4a am: 39e0f550b9
am: 8ba873809e

Change-Id: I320848d0ff8ba32d3571110604634656c646a647
2017-05-24 00:05:48 +00:00
Scott Randolph
d5d3276482 Add AID_EVS for use by the Automotive EVS system
The EVS HAL and related software stack will use this id when running
daemons that monitor car state, capture and display video, and interact
with users.
Test:  visual inspection

Change-Id: I53404c624933b7f55f1292c041c6c712522ab13b
2017-05-23 12:44:24 -07:00
Mark Salyzyn
19b47ced71 Merge "libcutils: fs_config: remove aliases" into oc-dev-plus-aosp
am: 7ee349f41f

Change-Id: Id656b715dc5975ded5ee5d7e18735fb01f6ce635
2017-05-19 22:16:32 +00:00
Mark Salyzyn
940a9a08e5 libcutils: fs_config: remove aliases
Covered by the code automatically now. Dropping duplicate wifi.

Test: gTest libcutils_test --gtest_filter=fs_config.*
Bug: 37703469
Change-Id: I86e29192e321e1e449d2c30161af69c34b8baa16
2017-05-19 13:30:08 -07:00
Mark Salyzyn
7ed7cf3f9f libcutils: fs_config: remove aliases
am: 88c04aae1e

Change-Id: I54438298bc2ffa27e2c831a666afac47ac84d7a3
2017-05-19 18:34:01 +00:00
Mark Salyzyn
88c04aae1e libcutils: fs_config: remove aliases
Covered by the code automatically now.

Test: gTest libcutils_test --gtest_filter=fs_config.*
Bug: 37703469
Change-Id: Iad6ba65e023845aaea7a181b277a7383c44bd937
2017-05-19 18:16:23 +00:00
Mark Salyzyn
2c40768040 Merge "Revert "Partial revert of "libcutils: fs_config.c mark vendor, odm and oem partitions in duplicate" Revert just the wifi hardware part."" into oc-dev am: 6a93fd7e7c
am: de439332ba

Change-Id: I01452558cfe986eed3dcddf6050e8cf6afd95de5
2017-05-19 18:14:29 +00:00
Mark Salyzyn
de439332ba Merge "Revert "Partial revert of "libcutils: fs_config.c mark vendor, odm and oem partitions in duplicate" Revert just the wifi hardware part."" into oc-dev
am: 6a93fd7e7c

Change-Id: Ifc81c5a2b17176711138c34b1a82ac945e7186a6
2017-05-19 18:12:30 +00:00
Mark Salyzyn
9f462a0af2 Merge changes Iad6ba65e,Ia6a7e8c9,Ida9405cb am: 037d2b71dc am: 219e7200be am: 7c466b936a
am: 645d62facb

Change-Id: I8306d0694089e333f65bdae8db0731b825cbf8a9
2017-05-19 14:41:05 +00:00
Mark Salyzyn
645d62facb Merge changes Iad6ba65e,Ia6a7e8c9,Ida9405cb am: 037d2b71dc am: 219e7200be
am: 7c466b936a

Change-Id: I9da0e906b391b9e4846c534eda77fb33d96e191a
2017-05-19 14:35:34 +00:00
Mark Salyzyn
cb0b5e6753 Revert "Partial revert of "libcutils: fs_config.c mark vendor, odm and oem partitions in duplicate" Revert just the wifi hardware part."
This reverts commit 6db432daf7.

Test: Build
Bug: 37921982
Bug: 37483427
Bug: 37703469
Change-Id: Ie19221f4383a45e317bc0b190e9a70459706fc79
2017-05-19 14:31:41 +00:00
Mark Salyzyn
2cf243528f libcutils: fs_config: remove aliases
Covered by the code automatically now.

Test: gTest libcutils_test --gtest_filter=fs_config.*
Bug: 37703469
Change-Id: Iad6ba65e023845aaea7a181b277a7383c44bd937
2017-05-18 15:56:54 -07:00
Mark Salyzyn
fa39110a8f libcutils: fs_config test report aliases
Instead of requiring aliases, let's report when we see
system/<partition>/ all by itself, or in the company of the alias
<partition>/.  Report if we see duplicate entries.  Add checking for
overrides as well.  Report any simple corruptions in internal table
or in the override files.

Test: gTest libcutils_test --gtest_filter=fs_config.*
Bug: 37703469
Change-Id: Ia6a7e8c9bc9f553d0c1c313937b511b2073318a9
2017-05-18 15:55:48 -07:00
Mark Salyzyn
2d37797b68 libcutils: fs_config: alias "system/<partition>/" to "<partition>/"
For the known partitions entrenched in the build system: vendor, oem
and odm only. We will alias entries that reference system/<partition>
and <partition>/ so that if either are specified, the rule will apply
to both possible paths.

Test: gTest libcutils-tests
Bug: 37703469
Change-Id: Ida9405cbed323489a3d0599c1645e9be2c7b9d08
2017-05-18 15:54:31 -07:00
Elliott Hughes
f6d8985b3a Merge "libcutils should #include <sys/sysmacros.h>" am: c3b931aad3 am: 2668f35d31 am: ce49fc9d0a
am: 5d4d139c1e

Change-Id: Ia3958f7e7a3406e83f142dffdb6f2f0d92eb199f
2017-05-17 21:05:13 +00:00
Elliott Hughes
5d4d139c1e Merge "libcutils should #include <sys/sysmacros.h>" am: c3b931aad3 am: 2668f35d31
am: ce49fc9d0a

Change-Id: Iad330e5266e27f412687209f3bd6375f777dc905
2017-05-17 20:54:05 +00:00
Elliott Hughes
d77b537732 libcutils should #include <sys/sysmacros.h>
Bug: https://github.com/android-ndk/ndk/issues/398
Test: builds
Change-Id: I8ca21a74e2856fde09c284aee1343c627d8381e6
2017-05-17 11:36:51 -07:00
Joel Fernandes
88ef9f0629 libcutils: Add support for RT schedtune group
Add an SP_RT_APP group which will be used to provide minimum
capacity guarantees to RT tasks sensitive to frequency drops
such as synthesizer workloads.

Bug: 33085313
Change-Id: I07cca79e52661d1325a1db9ef3b61eb0f8d20989
Signed-off-by: Joel Fernandes <joelaf@google.com>
2017-05-13 19:41:05 +00:00
Siarhei Vishniakou
f608eb283a Merge "Adding 'uhid' permission for access to /dev/uhid." am: cecbc9993d am: 04daed4793 am: d819380f50
am: b995b58631

Change-Id: I0c4f2e22d6195f219a2e1b0ef346ce89b642dc6c
2017-05-12 03:50:14 +00:00
Siarhei Vishniakou
b995b58631 Merge "Adding 'uhid' permission for access to /dev/uhid." am: cecbc9993d am: 04daed4793
am: d819380f50

Change-Id: If06b07c88276c32cdf5b53e6afcf0563e6538544
2017-05-12 01:00:46 +00:00
Siarhei Vishniakou
cecbc9993d Merge "Adding 'uhid' permission for access to /dev/uhid." 2017-05-11 19:02:32 +00:00
Siarhei Vishniakou
0729dd1edb Adding 'uhid' permission for access to /dev/uhid.
This CL is in support of another CL c/2048848, topic
'Refactor hid command in /frameworks/base/cmds' in
internal master. Adding the permissions for
shell here to access uhid_node as part of the
new 'uhid' group.

Bug: 34052337
Test: Tested on angler, bluetooth mouse works OK.

Change-Id: If9e100aa1262d689fb8adc5c0ce93f157c96399e
2017-05-11 01:28:53 +00:00
Mathias Agopian
324a309cfe fix circular dependency libnativewindow <-> libui
Bug: 37647680, 37648355
Test: compile, manual
Change-Id: Ie0d20e6fe7d64641a2b84f536ec17f3e7971f559
2017-05-09 15:15:50 -07:00
Dan Willemsen
8e5c7bf623 Merge "Assume bionic has up-to-date linux/capability.h" am: 1445c4b932 am: c09d16234f
am: c27f7911b1

Change-Id: Ib66ee19c79c85fccd9dcf419891f99b751957c23
2017-05-07 21:20:35 +00:00
Dan Willemsen
0de03b53fc Assume bionic has up-to-date linux/capability.h
The fallback android_filesystem_capability.h doesn't play nicely with
other kernel headers, since it #undef's __user. If we're building with
bionic (either for device or host), we use the same kernel headers, so
just use those.

Bug: 38056396
Test: build with Host_bionic:true
Change-Id: Idc61b6d96d86891164abe71604924638d67aefe2
2017-05-07 12:06:55 -07:00
Greg Hackmann
d0307c25a7 Merge changes If7b13672,I96135a8c am: 484acce026 am: 4f152a5f50
am: 6aa8a19427

Change-Id: If4085e37140b25504f20f3363c63a7c95fb342ee
2017-05-05 21:51:45 +00:00
Greg Hackmann
4a9531d326 AshmemTest: expand ProtTest cases
ashmem buffers start with PROT_EXEC | PROT_READ | PROT_WRITE and can
have bits individually removed (but not added) through the
ASHMEM_SET_PROT_MASK ioctl.  Test that removing prot bits more than once
works, and that the kernel blocks adding prot bits.

Also test that the complementary ASHMEM_GET_PROT_MASK ioctl returns the
expected prot mask.

Test:  /data/nativetest64/libcutils_test/libcutils_test64 \
       --gtest_filter=AshmemTest.* (on hikey)
Test:  /data/nativetest/libcutils_test/libcutils_test32 \
       --gtest_filter=AshmemTest.* (on hikey)

Change-Id: If7b13672547ec4cf6dfd1886197f40f12b2f1c85
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2017-05-05 20:04:12 +00:00
Greg Hackmann
be11d570ec AshmemTest: test lseek() and read() on ashmem fds
ashmem has in-kernel handlers for lseek() and read(), but they aren't
currently being tested.

Add tests for various seeks on a buffer containing holes.  If we land
inside data, then check that we read() the expected data at that offset.

Test:  /data/nativetest64/libcutils_test/libcutils_test64 \
       --gtest_filter=AshmemTest.* (on hikey)
Test:  /data/nativetest/libcutils_test/libcutils_test32 \
       --gtest_filter=AshmemTest.* (on hikey)

Bug: 37254818
Change-Id: I96135a8cea2ce99932e3bc97b5254c95ef6b264a
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2017-05-05 19:58:09 +00:00
Mark Salyzyn
e9e599751b Merge "libcutils: fs_config internal table alias test" am: 8fad110bfa am: bfead93a3a
am: 4bc080ab1a

Change-Id: Iddf608a4082d9442f48355291abd15e2aef6a18d
2017-05-04 21:25:25 +00:00
Mark Salyzyn
0f6a270d24 libcutils: fs_config internal table alias test
Private interface to permit testing only added to fs_config to
expose android_files and android_dirs.

Make sure that both paths to a partition are specified in fs_config
internal tables.

Test: gTest libcutils-unit-test --gtest_filter=fs_config.*
Bug: 37703469
Change-Id: Ida5fccdb786dc6d67325005d4fdd1fa1ffaef396
2017-05-04 11:41:17 -07:00
Daniel Cardenas
21fff17ed6 Partial revert of "libcutils: fs_config.c mark vendor, odm and oem partitions in duplicate" Revert just the wifi hardware part.
am: 6db432daf7

Change-Id: I7796ffcf07d6478ead19c5bab171a9ff4ce4f758
2017-05-03 19:42:52 +00:00
Daniel Cardenas
6db432daf7 Partial revert of
"libcutils: fs_config.c mark vendor, odm and oem partitions in duplicate"
Revert just the wifi hardware part.

This partially wqreverts commit fde19425f3.
b/37921982

Test: netflix, play movies, youtube
Change-Id: I1a47b66dbc2a74270eb4ef75c3a5b55624c2013d
2017-05-03 12:11:27 -07:00
Mark Salyzyn
5cad367060 Merge "libcutils: convert fs_config.cpp" am: c50245e43e am: a255ab0cb0
am: 5f82055a2e

Change-Id: I93bdac8212b6d913c0851d4ef1145a1943a76e3b
2017-05-03 16:57:09 +00:00