Commit graph

24282 commits

Author SHA1 Message Date
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
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
Elliott Hughes
1670e2a298 Merge "Add trivial ttyname(3) test." 2017-11-09 23:08:28 +00:00
Treehugger Robot
6e59a7817a Merge "Revert "Use builtins for fma/fmax/fmin/round on arm/arm64."" 2017-11-09 22:10:27 +00:00
Pirama Arumuga Nainar
c6fa2c3925 Merge "Make versioner depend on lib{LLVM,clang}_android.so" 2017-11-09 21:59:54 +00:00
Elliott Hughes
3b583f6330 Revert "Use builtins for fma/fmax/fmin/round on arm/arm64."
Apparently we still build non-NEON variants of bionic!

This reverts commit e57d772353.

Change-Id: I5436d913b1dc9b7d8f5e6afaea9b45002be7e825
2017-11-09 17:47:49 +00:00
Elliott Hughes
ccea843084 Merge "Remove test that adds no coverage." 2017-11-09 17:21:32 +00:00
Elliott Hughes
d62d61de30 Merge "Use builtins for fma/fmax/fmin/round on arm/arm64." 2017-11-09 16:55:53 +00:00
Elliott Hughes
728cde5be9 Add trivial ttyname(3) test.
Bug: N/A
Test: ran tests
Change-Id: Id5bf51a9c50db0fdbc9df0225165e87e698d0c83
2017-11-08 21:53:50 -08:00
Elliott Hughes
32f608dd46 Remove test that adds no coverage.
qsort_test doesn't test anything that stdlib's qsort tests don't already cover.

Bug: N/A
Test: ran tests
Change-Id: I6df3008d82083f1120a2027e759dc7cf77cc4e3b
2017-11-08 21:40:55 -08:00
Elliott Hughes
70f020953b Add trivial tests for the <resolv.h> base64 functions.
Bug: N/A
Test: ran tests
Change-Id: Ib57443efb03dbaddbe69e21949ebc8df6cf8a4bb
2017-11-08 21:13:15 -08:00
Elliott Hughes
1f4931751b Move shared parts of the two printfs out.
Bug: http://b/67371539
Test: ran tests
Change-Id: I24eae6a5d2c64ff4fd65c8d508a3709bab5a11c4
2017-11-08 16:27:49 -08:00
Elliott Hughes
e57d772353 Use builtins for fma/fmax/fmin/round on arm/arm64.
Bug: http://b/27829506
Test: ran tests and inspected arm/arm64/x86/x86-64 assembler
Change-Id: I8af60b44c75dddbb11949f208a8a70ed3cff12c8
2017-11-08 15:13:58 -08:00
Treehugger Robot
265b1ab966 Merge "Change bool, and string properties to *bool, and *string for cc" 2017-11-08 18:41:33 +00:00
Elliott Hughes
08448561e6 Merge "More printf de-duplication." 2017-11-08 17:21:39 +00:00
Christopher Ferris
946e02d9b0 Merge "Fix bionic benchmark unit tests." 2017-11-08 15:30:50 +00:00
Elliott Hughes
93a1f8b1f5 More printf de-duplication.
Just trivial use of macros.

The %s/%ls case in __find_arguments was backwards in the wide copy of
the code, but not problematically so because all pointers are the same
size anyway.

Bug: http://b/67371539
Test: ran tests
Change-Id: I8d34915d75ae5425c56c59510a16c328fc481d20
2017-11-07 22:52:29 -08:00
Treehugger Robot
1414802f93 Merge "[AArch64] Optimized memcmp" 2017-11-08 05:09:15 +00:00
Treehugger Robot
3404bb11a3 Merge "Allow 32-bit fseeko/fseeko64 SEEK_CUR/SEEK_SET to exceed 2 GiB" 2017-11-08 01:57:38 +00:00
Ryan Prichard
bf54986d19 Allow 32-bit fseeko/fseeko64 SEEK_CUR/SEEK_SET to exceed 2 GiB
Bug: http://b/68837650
Test: /data/nativetest/bionic-unit-tests/bionic-unit-tests
Test: /data/nativetest/bionic-unit-tests-static/bionic-unit-tests-static
Test: /data/nativetest64/bionic-unit-tests/bionic-unit-tests
Change-Id: I367e0238c31d35f76d8ad89fd0aa27ecfeb7c149
2017-11-07 15:34:23 -08:00
Christopher Ferris
ad05730143 Fix bionic benchmark unit tests.
Test: Ran unit tests.
Change-Id: I729572b101c7011cde5e7da4a72af7ede719b76b
2017-11-07 15:18:33 -08:00
Nan Zhang
dab0fd582f Change bool, and string properties to *bool, and *string for cc
there's no use case for prepending/appending to bool, and string
properties within module struct. Declearing "*bool" and "*string" almost
cover everything user need.

Test: m -j checkbuild
Bug: b/68853585
Change-Id: I8342d4a43fb81f2842532ddb38fba414767ac82a
2017-11-07 12:39:10 -08:00
Treehugger Robot
8574a1f630 Merge "Fix arm/arm64 <fenv.h> to match current reality." 2017-11-07 18:50:41 +00:00
Dimitry Ivanov
62c43ed23c Merge "Add test checking library unload on dlclose" 2017-11-07 17:06:22 +00:00
dimitry
109040c868 Add test checking library unload on dlclose
Bug: http://b/68262627
Test: Run bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: Ied85bc4ab37524cfcdbc33fd6c6e69b8d87ee08a
2017-11-07 10:51:59 +01:00
Treehugger Robot
691758c1c2 Merge "versioner: properly handle extern "C", "C++"." 2017-11-07 04:31:31 +00:00
Josh Gao
8e13b67c64 versioner: properly handle extern "C", "C++".
extern "C" and "C++" are parsed as a LinkageSpecDecl with the real Decl
as a child node. This leads to the preprocessor sticking its guard
between the extern specifier and the declaration.

Update the AST visitor to add a special-case for calculating the
SourceRange on a LinkageSpecDecl, and add a test.

Bug: https://github.com/android-ndk/ndk/issues/440
Test: python run_tests.py
Change-Id: I76445fe366cef46cfd2f16fb93d534d410c5edca
2017-11-06 17:23:36 -08:00
Treehugger Robot
db4f334695 Merge "Clean up crt defaults" 2017-11-06 22:09:22 +00:00
Pirama Arumuga Nainar
ac5603a979 Make versioner depend on lib{LLVM,clang}_android.so
Bug: http://b/64121881

The modules built in the Android tree are now named
lib{LLVM,clang}_android.so.  Let versioner depend on these temporarily
before eventually depending on the prebuilt libraries.

Test: aosp_marlin checkbuild with FORCE_BUILD_LLVM_COMPONENTS set and
unset.

Change-Id: I4e04dd2c74a19e0918f81bac04c1daee63ed6b24
2017-11-06 11:26:57 -08:00
Colin Cross
8697f10e74 Merge "Remove no_default_compiler_flags from crt*" 2017-11-06 18:59:00 +00:00
Elliott Hughes
2ca61ebe97 Merge "Fix for dlfcn.rtld_next_from_library." 2017-11-04 17:03:26 +00:00
Elliott Hughes
b6c7f6e595 Fix arm/arm64 <fenv.h> to match current reality.
ARM stopped supporting enabling of FP exceptions years ago.

Bug: http://b/68832485
Test: ran tests
Change-Id: I8450baa78e04d994c352180975b0a1ecd5a9f662
2017-11-03 16:46:32 -07:00
Elliott Hughes
c18f55ca2b Merge "10x printf speedup." 2017-11-03 23:11:06 +00:00
Raj Mamadgi
527229cb72 Fix for dlfcn.rtld_next_from_library.
Using fclose to get the same address for the test assertion because
Samsung already uses LD_PRELOAD to intercept `close`.

Bug: http://b/67978141
Bug: http://b/68855476
Test: ran tests
Change-Id: I2da463e8b27e0db5cb1ba370d30f0402d7531396
Signed-off-by: Raj Mamadgi <r.mamadgi@samsung.com>
2017-11-03 15:00:09 -07:00
Treehugger Robot
b06bb71672 Merge "Remove mips/mips64 headers from the NDK sysroot." 2017-11-03 21:30:15 +00:00
Elliott Hughes
5305a4d4a7 10x printf speedup.
Android is UTF-8. Don't make everyone pay to convert UTF-8 to ASCII just
so we can recognize '%'. With UTF-8 we can just strchr forwards.

Before:

  ---------------------------------------------------------------
  Benchmark                        Time           CPU Iterations
  ---------------------------------------------------------------
  BM_stdio_printf_literal       1290 ns       1290 ns     442554
  BM_stdio_printf_s             1204 ns       1204 ns     582446
  BM_stdio_printf_d             1206 ns       1206 ns     578311
  BM_stdio_printf_1$s           2263 ns       2263 ns     310002

After:

  ---------------------------------------------------------------
  Benchmark                        Time           CPU Iterations
  ---------------------------------------------------------------
  BM_stdio_printf_literal        178 ns        178 ns    3394001
  BM_stdio_printf_s              246 ns        246 ns    2850284
  BM_stdio_printf_d              252 ns        252 ns    2778610
  BM_stdio_printf_1$s            363 ns        363 ns    1929011

Add missing __find_arguments error checking to the wide variant to match
the regular one.

Also replace various char/wchar_t differences with the macro.

Bug: http://b/67371539
Test: ran tests
Change-Id: I18f122009c22699943ab5d666a98ea594a972c40
2017-11-03 14:19:00 -07:00
Colin Cross
7d7b368a44 Clean up crt defaults
Make crt_so_defaults inherit from crt_defaults, remove duplicates
from crt_so_defaults, and make the users of crt_so_defaults not
directly use crt_defaults.

Test: m checkbuild
Change-Id: I1448a5a4c86521b994fd4d79120e0b7d3a9c5ba9
2017-11-03 13:38:40 -07:00
Colin Cross
6a2610dbd3 Remove no_default_compiler_flags from crt*
no_default_compiler_flags is unnecessary and causes problems when
necessary flags like -no-canonical-prefixes are not passed.

Bug: 68719465
Test: m checkbuild
Change-Id: Ifdc68067eb3208b151b0a96820aa9a57b82db057
2017-11-03 13:37:42 -07:00
Elliott Hughes
e11e7fbfeb Merge "test: trivial fixes in documentation" 2017-11-03 19:23:29 +00:00