Commit graph

23451 commits

Author SHA1 Message Date
Stephen Crane
77bb564dc7 Use env to invoke python
/usr/bin/python may be python3. We should respect PATH to find the python
executable so it can be locally overridden to be python2.

Test: Build libc, repo upload
Change-Id: Iaddd7cd4a1c2177c32786e4fa0fc664ab0ad36de
2017-08-31 15:11:50 -07:00
Elliott Hughes
d40a833ab0 Add an extra test for a POSIX iconv requirement.
Bug: N/A
Test: ran tests
Change-Id: If211bf2a74ac3a6e8e84375c88f6c2580c392d50
2017-08-31 14:14:16 -07:00
Treehugger Robot
7f9f1b6f91 Merge "Don't run disable_ld_config_file test on non-production devices" 2017-08-30 23:57:40 +00:00
Elliott Hughes
e0e2798f11 Merge "Explicitly name DT_RPATH." 2017-08-30 19:37:53 +00:00
Treehugger Robot
b3aea2bb9a Merge "Use have_dl to guard all tests that rely on icu4c." 2017-08-30 18:22:37 +00:00
Jiyong Park
4945d8f121 Don't run disable_ld_config_file test on non-production devices
The test always fails when run on non-production devices. Silence the
expected failure.

Bug: 64908138
Test: run CtsBionicTestCases on userdebug device. disable_ld_config_file
test does not fail.

Merged-In: Icd24a356dfbc62f540e3263070434a4fd065bfbc
Change-Id: Icd24a356dfbc62f540e3263070434a4fd065bfbc
(cherry picked from commit 157655dc67)
2017-08-31 01:42:55 +09:00
Elliott Hughes
966d8a321e Use have_dl to guard all tests that rely on icu4c.
Bug: http://b/65138342
Test: ran tests
Change-Id: Iddded068a2481e8b15e102c8705545a886ae2772
2017-08-30 16:17:40 +00:00
Dimitry Ivanov
352afd0e93 Merge "Restore dummy libdl.a implementation" 2017-08-30 16:15:55 +00:00
Elliott Hughes
6eae4cc57b Explicitly name DT_RPATH.
The specific case of finding a DT_RPATH entry is a pretty common harmless
warning. An alternative to this change would be to just add a case to the
switch for DT_RPATH to just silently ignore it, since it's never been
supported and is deprecated anyway.

Bug: N/A
Test: builds
Change-Id: I01986da8f1f8d411fc2ea32d492c53b9f4488c72
2017-08-30 09:02:33 -07:00
Elliott Hughes
76a4bb980c Merge "Add tests for all C11 headers." 2017-08-30 15:57:40 +00:00
dimitry
dc7cc6258a Restore dummy libdl.a implementation
Bug: http://b/36206043
Test: bionic-unit-tests-static
Change-Id: If0400b72b51570e5ca0d70ec0bd9fb77664b9210
2017-08-30 10:52:19 +02:00
Treehugger Robot
dbd48e1d8c Merge "Add missing libm introduced=26 annotations." 2017-08-30 03:54:23 +00:00
Treehugger Robot
274e2661a2 Merge "Add new status document, based on internal wiki." 2017-08-30 00:06:04 +00:00
Elliott Hughes
45da326324 Add tests for all C11 headers.
Well, all except <threads.h> which we have no current plans to implement.

The only thing this turned up is that clang's <float.h> doesn't define
FLT_HAS_SUBNORM/DBL_HAS_SUBNORM/LDBL_HAS_SUBNORM, so for now we assert
that those are missing so that when we get a fixed clang, we notice.

Also the <tgmath.h> is utterly perfunctory, but seems like an appropriate
amount of effort to put in.

Bug: N/A
Test: ran tests
Change-Id: I7f7a7040b3271ceda625bee8a40a9d8cef52ee44
2017-08-29 15:32:18 -07:00
Dimitry Ivanov
0d5d0746e8 Merge changes from topic "version-script-for-binaries"
* changes:
  Replace artificial symbol table with proper one
  Implement __gnu_Unwind_Find_exidx/__cxa_type_match
2017-08-29 18:51:05 +00:00
Elliott Hughes
b6a6ac5ab2 Add missing libm introduced=26 annotations.
Without this, the NDK stub libm.so files think we've had the new O
functions since the beginning of time.

Bug: N/A
Test: nm
Change-Id: Ibdd7b910934b706348cc6d10b2b6b63a283d7320
2017-08-29 11:45:31 -07:00
Elliott Hughes
0bfcbaf4d0 Add new status document, based on internal wiki.
Also start breaking up the monolithic top level README.md, pulling the
32-bit ABI stuff out into its own file, and moving the remaining benchmark
documentation in with the rest of the benchmark documentation.

Bug: N/A
Test: N/A
Change-Id: Ic1b9995e27b5044199ed34883cc0b8faa894df0e
2017-08-29 11:07:36 -07:00
dimitry
7abea57ba5 Replace artificial symbol table with proper one
This change also replaces elf-hash with gnu-hash.

Test: make
Test: bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: Ibc4026f7abc7e8002f69c33eebaf6a193f1d22eb
2017-08-29 18:18:28 +02:00
dimitry
25bf29bbad Implement __gnu_Unwind_Find_exidx/__cxa_type_match
Leaving these unimplemented causes linker to have 2 weak undefined
symbols which in turn results in 3 unwanted relocations for arm arch.
Implementing them removes unwanted relocations from resulted dynamic
object

Test: make && readelf --dyn-sym linker
Test: linker-unit-tests && bionic-unit-tests --gtest_filter=dl*:Dl*
Test: flash and boot angler
Change-Id: I10120271936c770659239898aaf852d31c5483c2
2017-08-29 18:18:27 +02:00
Treehugger Robot
0e23c87de5 Merge "Allow io_* syscalls." 2017-08-29 03:28:25 +00:00
Treehugger Robot
8468a1be01 Merge "Pretend the <fts.h> functions didn't appear until 21." 2017-08-26 00:02:50 +00:00
Treehugger Robot
6a4c0eff12 Merge "Improve names for function arguments in <unistd.h> for Studio." 2017-08-25 23:47:26 +00:00
Elliott Hughes
f11aa95ee7 Pretend the <fts.h> functions didn't appear until 21.
Because there was an accidental ABI breakage in 21, and we can't fix
the past. It seems more useful to refuse to build code that won't work
on any current or future device.

Bug: https://issuetracker.google.com/37051826
Test: builds
Change-Id: I4b5c30f899e2c7307642e2fb20e43a3ca14ae7fe
2017-08-25 15:18:33 -07:00
Elliott Hughes
bda6f3b6af Improve names for function arguments in <unistd.h> for Studio.
Spotted while adding syncfs(2). I'd previously seen that this file already
had names, but apparently not inspected them. A couple were missing, a
couple (pipe/pipe2) could usefully have a more specific type, and many
hadruntogethercstylenames.

Bug: http://b/64613623
Test: builds
Change-Id: I6b4a131bf51bf04825317ec481bc55e87c88c2b3
2017-08-25 15:07:05 -07:00
Treehugger Robot
d615a06068 Merge "Implement <iconv.h>." 2017-08-25 21:06:44 +00:00
Christopher Ferris
96b313506a Merge "Update the bionic benchmarks documentation." 2017-08-25 18:07:48 +00:00
Anders Lewis
814359a880 Update the bionic benchmarks documentation.
Test: NA
Change-Id: I6b804a1655b5cb76f189366070d478680f40c5d1
2017-08-25 10:41:38 -07:00
Elliott Hughes
a648733cb7 Implement <iconv.h>.
Bug: http://b/32978596
Test: ran tests
Change-Id: I56b6ae3d9c5a3a56d2b4afba33fb8f9e964bf7b9
2017-08-25 08:47:41 -07:00
Elliott Hughes
571c888236 Merge "Fix ndk build." 2017-08-25 15:44:23 +00:00
Elliott Hughes
44d8f7be1f Fix ndk build.
The NDK gen_stub_libs.py doesn't support introduced=P yet:

  Traceback (most recent call last):
    File "build/soong/cc/gen_stub_libs.py", line 439, in <module>
      main()
    File "build/soong/cc/gen_stub_libs.py", line 429, in main
      versions = SymbolFileParser(symbol_file, api_map).parse()
    File "build/soong/cc/gen_stub_libs.py", line 234, in parse
      versions.append(self.parse_version())
    File "build/soong/cc/gen_stub_libs.py", line 269, in parse_version
      symbols.append(self.parse_symbol())
    File "build/soong/cc/gen_stub_libs.py", line 286, in parse_symbol
      tags = decode_api_level_tags(tags, self.api_map)
    File "build/soong/cc/gen_stub_libs.py", line 76, in decode_api_level_tags
      raise ParseError('Unknown version name in tag: {}'.format(tag))
  __main__.ParseError: Unknown version name in tag: introduced=P

Bug: N/A
Test: builds
Change-Id: Ifd91e525b30f3aa9ad8c889c9564cd769a3a603a
2017-08-25 08:42:48 -07:00
Elliott Hughes
fa3d3291e1 Merge "Add syncfs(2)." 2017-08-25 14:50:58 +00:00
Elliott Hughes
eab34c8ad7 Merge "Fix overflow in get_phys_pages and get_avphys_pages." 2017-08-25 14:50:43 +00:00
Christopher Ferris
1ca334b1c4 Merge "A few small fix ups." 2017-08-25 01:03:13 +00:00
Elliott Hughes
5da4fe4ada Fix overflow in get_phys_pages and get_avphys_pages.
On LP32 mem_unit will be 4096 to allow more than 4GiB in the "ulong"
fields, but we need to promote to a 64-bit type before we multiply.

Bug: N/A
Test: tested manually with an x86 static binary on my 64GiB desktop.
Signed-off-by: YiPing Xu <xuyiping@hisilicon.com>
Change-Id: Id663932503b75793bb7c26a008129f3e2e4cccbf
2017-08-24 16:51:48 -07:00
Elliott Hughes
896362eb0e Add syncfs(2).
GMM calls this system call directly at the moment. That's silly.

Bug: http://b/36405699
Test: ran tests
Change-Id: I1e14c0e5ce0bc2aa888d884845ac30dc20f13cd5
2017-08-24 16:31:49 -07:00
Christopher Ferris
d9d39be0f0 A few small fix ups.
- Add a default xml file to run if nothing is specified on the command-line.
- Add a way to specify a xml file in suites without having to specify the
  full path name.
- Move all of the test xml files into their own directory.
- Add the suites directory for to glibc benchmarks.
- Add a new test for help data.
- Modify the full suite test to verify the default xml is chosen and use
  the real full.xml instead of the test one. Delete the test_full.xml.
- Move the property tests to the end of the suite.
- Add skipping of xml comments.

Test: Ran the unit tests and ran the bionic benchmarks.
Change-Id: Ie99965f86fe915af0175de46c7780ab79e2b0843
2017-08-24 14:50:03 -07:00
Treehugger Robot
96c577c482 Merge "tests: explain how to debug FileCheck failures" 2017-08-24 18:01:38 +00:00
Christopher Ferris
8e410a73d4 Merge "Fix local path assumption in interface_test." 2017-08-24 17:01:56 +00:00
Dimitry Ivanov
506f3f11f1 Merge "Add support of architecture specific ld.configs" 2017-08-24 09:38:33 +00:00
Treehugger Robot
7b4fb64177 Merge "Add more const-correct C++ overloads." 2017-08-24 02:31:35 +00:00
Treehugger Robot
8afd42ff28 Merge "Remove dead longjmperror." 2017-08-24 01:07:36 +00:00
George Burgess IV
c7bd90ff6f tests: explain how to debug FileCheck failures
As requested by enh@ in Ie9ed1fbcc794e14a0c9bba13b5307ad677949613.

Bug: None
Test: mma
Change-Id: I3beb97fb500faa50d79f9355898bf778ab1184bd
2017-08-24 00:36:15 +00:00
Elliott Hughes
8f0c87e21f Remove dead longjmperror.
This used to be used by the ARM longjmp implementation, but hasn't been in
libc.so for as long as we've used a linker script.

Bug: N/A
Test: builds
Change-Id: I3dff4d154d5e317955c349c9eaa08b982cbf0285
2017-08-23 15:40:03 -07:00
Elliott Hughes
73c23ead42 Merge "Benchmark fgetln(3) and getline(3) as well as fgets(3)." 2017-08-23 22:20:57 +00:00
Elliott Hughes
df9a489b2b Add more const-correct C++ overloads.
libc++ actually provides overloads for all the standard C library stuff,
so we just need to handle the POSIX and GNU extensions, of which there
are just two more: memrchr and strcasestr.

Bug: http://b/22768375
Test: builds
Change-Id: Ie9ed1fbcc794e14a0c9bba13b5307ad677949613
2017-08-23 14:34:40 -07:00
Elliott Hughes
938bece9e0 Benchmark fgetln(3) and getline(3) as well as fgets(3).
On Pixel 2016, there's about 1us overhead for getline versus
fgets. fgetln(3) is worse still because of the intermediate buffering
(though it might actually be better if you were only reading one line
whose length was less than BUFSIZ).

Also use somewhat realistic input for these benchmarks: /dev/zero makes
no sense at all.

Bug: N/A
Test: ran benchmarks
Change-Id: I4a319825a37ac3849014c4c6b31523c1e200c641
2017-08-23 14:03:43 -07:00
Elliott Hughes
57e07a150e Merge "Fix the stdio fwrite benchmark." 2017-08-23 15:55:28 +00:00
dimitry
fe1b27cf84 Add support of architecture specific ld.configs
Prefer architecture specific ld.config.<arch>.txt if it exists;
fall back to default ld.config.txt files if arch-specific one is
not present.

Bug: http://b/64061157
Test: bionic-unit-tests && linker-unit-tests
Change-Id: I83a298a932f2e4af7acb2049a7641fb86908736c
2017-08-23 10:47:07 +02:00
Logan Chien
96ba713f73 Merge "Fix wchar.wcstold_hex_floats on arm64" 2017-08-23 07:16:34 +00:00
Elliott Hughes
3ce774c83b Merge "Add three more functions to the list of POSIX cruft." 2017-08-23 00:29:45 +00:00