Commit graph

24320 commits

Author SHA1 Message Date
Treehugger Robot
c6097b0f9f Merge "Fix Mac build." 2017-11-29 04:19:28 +00:00
Treehugger Robot
8b9037a05e Merge "Improve the _FILE_OFFSET_BITS docs and link to them." 2017-11-29 02:57:18 +00:00
Elliott Hughes
4af70b4e15 Fix Mac build.
Bug: N/A
Test: builds
Change-Id: I98e44bc7ec2534443a1973aacf4bb97853b3a51f
2017-11-28 18:02:16 -08:00
Treehugger Robot
0a25aa60a2 Merge "Always wrap waitpid in TEMP_FAILURE_RETRY." 2017-11-29 00:23:11 +00:00
Elliott Hughes
a34817457f Improve the _FILE_OFFSET_BITS docs and link to them.
We're still seeing lots of confusion. People do seem to look as far as
the headers, but stop there. So let's try a bit harder to point them in
the right direction.

Also explicitly state that removing _FILE_OFFSET_BITS=64 is the
behavior-preserving fix for compilation problems when upgrading to NDK
r15 or later.

Bug: N/A
Test: N/A
Change-Id: I2d5c65b2fb5cccb9977901e51fea1ad2ccc0fd95
2017-11-28 15:47:01 -08:00
Elliott Hughes
72dcf2340f Merge "Revert "Remove mips/mips64 headers from the NDK sysroot."" 2017-11-28 23:26:03 +00:00
Elliott Hughes
cabc77f917 Always wrap waitpid in TEMP_FAILURE_RETRY.
Strictly not needed in the WNOHANG case, but it's probably best to have
every waitpid wrapped for future copy & pasters.

Bug: https://issuetracker.google.com/69525592
Test: ran tests
Change-Id: I013b0a52d2753e3d32638e9b84c79af7327fb405
2017-11-28 12:55:19 -08:00
Treehugger Robot
7d5777ef15 Merge "Fix vdso system call fallback failures." 2017-11-28 19:05:18 +00:00
Treehugger Robot
26b80da44a Merge "bionic: test: add clock_getres" 2017-11-28 19:05:18 +00:00
Elliott Hughes
be1bbb1e44 Merge "Document bionic's targetSdkVersion-specific behavior." 2017-11-28 17:51:01 +00:00
Elliott Hughes
9591df5294 Fix vdso system call fallback failures.
When a vdso call falls back to making a regular system call, the inline
code for the system call doesn't know about errno and just leaves the
usual kernel result to be translated. Add the missing translation.

Also fix the defaults for non-vdso systems so we actually take the
fallback path (and so avoid unintentionally doing the errno translation
twice in those cases).

Bug: http://b/69626243
Test: ran new tests from http://b/63737556
Change-Id: If379632ea2e059e3d3bc3ff41bf3608dc05fb0a3
2017-11-28 09:09:01 -08:00
Treehugger Robot
f5a6fd2001 Merge "Fix: dl#disable_ld_config_file" 2017-11-28 09:36:34 +00:00
Jiyong Park
9828386bd4 Fix: dl#disable_ld_config_file
linker now quits with exit(1) instead of abort().
This is a leftover of
https://android-review.googlesource.com/c/platform/bionic/+/497893

Bug: 69635156
Test: run dl#disable_ld_config_file in a user build
Change-Id: If65c50805ffe89a601f4a9bfc1c6f0bb8dc16b77
2017-11-28 13:37:03 +09:00
Mark Salyzyn
6a5a99faf3 bionic: test: add clock_getres
Add clock_getres test combinations. Add clock_gettime_unknown test
to ensure the errno is propagated correctly for that call as well.

Test: bionic-unit-tests --gtest_filter=time.*
Bug: 63737556
Bug: 69626243
Change-Id: I0256b7f03ac7e57bc5b36069b13fe576c29b9c75
2017-11-27 20:36:41 -08:00
Elliott Hughes
6347acec09 Document bionic's targetSdkVersion-specific behavior.
Bug: N/A
Test: N/A
Change-Id: I367edc592203e585a1d84a10ff3437ea3f2edd91
2017-11-27 18:12:04 -08:00
Lazar Trsic
790d2f7161 Revert "Remove mips/mips64 headers from the NDK sysroot."
This reverts commit 050f046d3d.

Change-Id: I2549dfccced02b61383cd9e534bfd34cf1d6dba1
2017-11-27 16:48:14 +01:00
Isaac Chen
b7d6df2b61 Merge "Optimize libc for generic armv7/armv8 neon cores" 2017-11-23 09:08:24 +00:00
Yabin Cui
8fb8c61e48 Merge "Improve pty unit test to catch the bug more easily." 2017-11-22 17:58:56 +00:00
Yabin Cui
57a4006c10 Improve pty unit test to catch the bug more easily.
Bug: http://b/69260651
Test: run bionic-unit-tests.

Change-Id: Ifb89cc2952508b6e5a093c57053fb93cb61cd28c
2017-11-21 18:04:15 -08:00
Treehugger Robot
f40402a39f Merge "Fix support for typed tests and parameterized tests." 2017-11-17 02:40:35 +00:00
Yabin Cui
5e235c85bb Fix support for typed tests and parameterized tests.
Bug: http://b/69425095
Test: run bionic_unit_tests --bionic-selftest
Change-Id: Ifa23288f2ad84978b7748da0ea93d650fae926a8
2017-11-16 16:20:28 -08:00
Treehugger Robot
e070051254 Merge "Use -Werror in bionic/tests" 2017-11-17 00:19:33 +00:00
Chih-Hung Hsieh
38997e4aed Use -Werror in bionic/tests
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I64a0458c787054a0694c736be20dc53772ff3781
2017-11-16 13:51:17 -08:00
Elliott Hughes
8c75675ec6 Merge "Change ARG_MAX/_SC_ARG_MAX back to a constant." 2017-11-16 21:46:49 +00:00
Christopher Ferris
e0dfad4504 Merge "Update to kernel headers v4.14." 2017-11-16 19:28:13 +00:00
Elliott Hughes
c3f1b6a23d Merge "Simplify the posix_spawn sigdefault logic." 2017-11-16 00:08:31 +00:00
Elliott Hughes
baed51ee3a Change ARG_MAX/_SC_ARG_MAX back to a constant.
As per the lkml thread https://lkml.org/lkml/2017/11/1/946.

Bug: http://b/65818597
Test: ran tests
Change-Id: I7a0610e6903e6761f2b31416e2f5017bd7a60659
2017-11-15 15:14:35 -08:00
Elliott Hughes
de5f9a1c54 Merge "Reduce unnecessary quoting for --gtest_filter." 2017-11-15 22:38:30 +00:00
Tom Cherry
966f659d7f Merge "Only use uids and gids for which we've allocated AIDs" 2017-11-15 21:19:56 +00:00
Christopher Ferris
1308ad3ab3 Update to kernel headers v4.14.
Remove the hiding of the kernel structure binder_fd_array_object. This
structure now matches the structure used in the binder code.

Load the libclang_android.so shared library directly for parsing.
This file changed name in a recent update to the prebuilts.

Test: Compiles arm/arm64/x86/x86_64.
Test: Boots on hikey and boots on a sailfish.
Test: Ran bionic unit tests on hikey and sailfish.
Change-Id: I141a4b93ac3511cd58f4d12bb3c0d4efaa4c2742
2017-11-15 12:23:56 -08:00
Tom Cherry
4362f897f7 Only use uids and gids for which we've allocated AIDs
Currently, getpwnam, getpwent, etc return successfully for any uid
from AID_APP_START (10000) to AID_USER_OFFSET (100000) for each user.
This is not correct however, as only specific ranges above
AID_APP_START are reserved as valid ranges.  This change corrects this.

This is particularly important as the newly added AID_OVERFLOWUID is
65534, which is above AID_APP_START but not in any reserved range,
collided with the faulty returned values.

Bug: 69119022
Bug: 69128408
Test: pwd/grp bionic unit tests
Change-Id: I3dae97a90597915fa30a88fe27cda88b107e9c35
2017-11-15 10:31:49 -08:00
Elliott Hughes
10ba4bd6d1 Reduce unnecessary quoting for --gtest_filter.
Use posix_spawn rather than popen, to remove a surprising extra shell.

Bug: http://b/68949647
Test: /data/nativetest64/bionic-unit-tests/bionic-unit-tests --gtest_filter=stdio.swprintf_1$ju_UINTMAX_MAX
Change-Id: Id90afab04ee799932de9f5ca7e580e61ecfde7a4
2017-11-15 09:30:16 -08:00
Elliott Hughes
2b8ab4b5da Simplify the posix_spawn sigdefault logic.
I don't think there's any observable difference, but this is certainly
simpler.

Bug: http://b/68707996
Test: ran tests
Change-Id: Id9e1a7d40533c90d073ebf391a72bbdfe79627de
2017-11-14 22:31:43 -08:00
Tom Cherry
315dd896de Merge changes I39663cc3,Ie75ec6fe
* changes:
  Remove some globals from system_properties
  Split system_properties.cpp into its component pieces
2017-11-14 20:55:13 +00:00
Tom Cherry
f76bbf5384 Remove some globals from system_properties
pa_size should be static to prop_area, so make it so.

__system_property_area__ was reused for various purposes, but
realistically is a deprecated symbol and this finally separates us
from it.

Bug: 36001741
Test: boot bullhead, system property unit tests
Change-Id: I39663cc3b613093fa4c728b21d8ba58754f8e105
2017-11-14 08:55:27 -08:00
Tom Cherry
fd44b9f8d8 Split system_properties.cpp into its component pieces
system_properties.cpp is a little bit unmanageable in its current
form, and is overdue for a refactoring into more clearly defined
components.

Of particular interest, is creating of a Contexts interface that
handles mapping of system property name -> SEContext and its
associated prop_area, and creating two classes that implement the
current and legacy functionality.  This is needed as there will likely
be a third even newer way to do this mapping.

Bug: 36001741
Test: boot bullhead, system property unit tests
Change-Id: Ie75ec6fea1a95f90813918f54669d533e51327c6
2017-11-14 08:50:52 -08:00
Elliott Hughes
40a5cfa8d1 Merge "Remove more trivial char/wchar_t printf differences." 2017-11-14 00:58:04 +00:00
Elliott Hughes
b70576b048 Remove more trivial char/wchar_t printf differences.
Bug: http://b/67371539
Test: ran tests
Change-Id: I899458af92517dc21f874519716fa3f3a0f0e3d6
2017-11-13 11:10:05 -08:00
Elliott Hughes
0793e3dd07 Merge "Yet more printf de-duplication." 2017-11-13 18:04:18 +00:00
Treehugger Robot
13e86af056 Merge "Move public scanf functions away from implementation." 2017-11-13 17:17:10 +00:00
Elliott Hughes
345b727e96 Move public scanf functions away from implementation.
Bug: N/A
Test: ran tests
Change-Id: Ifb8bd91132865f8c6d0b95baf1021af3b3b3c353
2017-11-10 16:20:43 -08:00
Elliott Hughes
bc27bdc24f Yet more printf de-duplication.
Bug: http://b/67371539
Test: ran tests
Change-Id: Iae38055426596919c0de4f5080c99eba95fac3a9
2017-11-10 15:25:49 -08:00
Treehugger Robot
1c9f04464b Merge "Better test handling and logging in grp_pwd_test.cpp" 2017-11-10 21:11:37 +00:00
Tom Cherry
2c05c0f9b0 Better test handling and logging in grp_pwd_test.cpp
grp_pwd_test.cpp uses ASSERT_ where EXPECT_ is possible, causing
missing failures when multiple failures are present.

Also, print out the uid/gid in the _iterate tests, to make debugging
easier.

Test: these same unit tests
Change-Id: I839b74fb86232b3e896091e76ab862cc5b6b8782
2017-11-10 10:57:21 -08:00
Treehugger Robot
843e340874 Merge "Add trivial test for __memrchr_chk." 2017-11-10 01:57:24 +00:00
Elliott Hughes
9b0def7139 Merge "Use builtins for fma/fmax/fmin/round on arm64." 2017-11-10 01:50:17 +00:00
Elliott Hughes
9a1bb70ba0 Use builtins for fma/fmax/fmin/round on arm64.
Bug: http://b/27829506
Change-Id: Id243e3ba0041d5efce496f0760815e591a2c00a0
Test: ran tests and inspected arm64 assembler
2017-11-09 15:57:34 -08:00
Elliott Hughes
55a8cc2a0d Add trivial test for __memrchr_chk.
Bug: N/A
Test: ran tests
Change-Id: I42aefcbf1fac6b96e56a0e21f94586a3caa524dc
2017-11-09 15:46:51 -08:00
Elliott Hughes
5e186f9a8e Merge "Move shared parts of the two printfs out." 2017-11-09 23:10:01 +00:00
Elliott Hughes
a6092a9a75 Merge "Add trivial tests for the <resolv.h> base64 functions." 2017-11-09 23:09:18 +00:00