Commit graph

11337 commits

Author SHA1 Message Date
Dmitriy Ivanov
8b4b827338 Merge "Add test_forked() option" 2014-11-21 01:21:16 +00:00
Dmitriy Ivanov
00e37818a7 Add test_forked() option
Executing test via test_forked() allows us to
 avoid undesired global state changes in tests like
 atexit, dlopen(.., RTLD_NODELETE) and similar.

Change-Id: I118cdf009269ab5dd7b117c9b61dafa47de2a011
2014-11-20 17:11:06 -08:00
Elliott Hughes
770198d3f7 Merge "Make the ftw(3) tests a bit more thorough." 2014-11-20 00:09:32 +00:00
Elliott Hughes
5313c3ff89 Merge "Fix flockfile(3) and friends for stdin/stdout/stderr too." 2014-11-19 23:48:19 +00:00
Elliott Hughes
63bd43bbdc Make the ftw(3) tests a bit more thorough.
These also test much of fts(3).

Change-Id: Ia9245d6acbbd071191563ab1b91a400044104028
2014-11-19 15:47:53 -08:00
Elliott Hughes
c48c3e4bb3 Fix flockfile(3) and friends for stdin/stdout/stderr too.
stdin/stdout/stderr are special; their mutexes are initialized by
__sinit. There's no unit test for this, because __sinit has already
been called by the time the first unit test runs, but you could
reproduce this failure with a trivial main() that calls flockfile
or ftrylockfile on one of the standard streams before otherwise
using stdio.

Bug: 18208568
Change-Id: I28d232cf05a9f198a2bed61854d8047b23d2091d
2014-11-19 15:16:51 -08:00
Dmitriy Ivanov
6b48b20a1e Merge "Yet another relocation test" 2014-11-19 19:35:59 +00:00
Dmitriy Ivanov
7699d13a74 Yet another relocation test
This time we check if a -> b -> c function in 'a' relocates against
 implementation in 'c'.

Change-Id: I528180c3efd346bd447ea0237e5a8a0ac3cc031f
2014-11-19 10:39:05 -08:00
David 'Digit' Turner
c9278b8a17 Merge "libc: Move <sgidefs.h> to libc/arch-mips/" 2014-11-19 14:49:52 +00:00
Yabin Cui
649f78df79 Merge "fix shared gid support in getpwnam/getgrnam" 2014-11-19 04:25:24 +00:00
Yabin Cui
a04c79b9d3 fix shared gid support in getpwnam/getgrnam
Bug: 18374693
Change-Id: I5353403cbbead6f6abac87bee2cf53a60dba408c
2014-11-18 19:58:04 -08:00
Dmitriy Ivanov
27aa9c5b50 Merge "Fix jump to unmapped memory on atexit" 2014-11-18 21:25:37 +00:00
Dmitriy Ivanov
a2547055f2 Fix jump to unmapped memory on atexit
Split d-tor calls and soinfo_free to 2 separate steps

Bug: 18338888
Change-Id: Idbcb7242ade16fa18cba7fe30505ebd8d6023622
2014-11-18 13:16:27 -08:00
David 'Digit' Turner
6e50cb4544 libc: Move <sgidefs.h> to libc/arch-mips/
This is a MIPS-only header, and should not be part of the common
headers. See http://b.android.com/79841 for context.

Change-Id: I610bc3ff626b57e7854dad15a4a2f67e1e5ded75
2014-11-18 20:13:10 +01:00
Elliott Hughes
8eda0a6d69 Merge "libc: Fix mktime returns an uncorrect time in empty TZ case" 2014-11-17 23:14:58 +00:00
Dmitriy Ivanov
ee4c8febb7 Merge "bionic/test: migrate sysconf tests from system/extras to bionic/tests" 2014-11-17 18:43:32 +00:00
Elliott Hughes
f2c882095b Merge "Add getaddrinfo(3) tests for NULL arguments." 2014-11-17 18:26:46 +00:00
Elliott Hughes
35f8910e4c Merge "Remove remaining bionic support for TARGET_CPU_SMP being false." 2014-11-17 18:24:22 +00:00
Elliott Hughes
bfbf7a4300 Remove remaining bionic support for TARGET_CPU_SMP being false.
Change-Id: I02a0a1c0ae55ccb5c45d17fb99a09c374d71def4
2014-11-17 10:06:20 -08:00
Elliott Hughes
32fea147ea Add getaddrinfo(3) tests for NULL arguments.
According to https://github.com/ukanth/afwall/pull/213 some OEMs have
shipped a getaddrinfo(3) that crashes given NULL hostnames.

Change-Id: I9cea5fdd68546b7c64cf47e10e2b2b4d672b69d0
2014-11-16 12:14:04 -08:00
Dan Albert
eef1eb64bb Merge "Allow asan for glibc tests." 2014-11-15 06:47:08 +00:00
Dan Albert
01f1ff2440 Allow asan for glibc tests.
SANITIZE_HOST will break if we don't allow ASAN.

Change-Id: I0beed82b058db391f633e0ea1098f140497c65d4
2014-11-14 20:00:06 -08:00
Satoru Takeuchi
154e2026c8 libc: Fix mktime returns an uncorrect time in empty TZ case
The mktime API returned an uncorrect time when TZ is set as empty.
A timezone UTC/GMT+0 should be implied in the empty case. However
mktime keeps previous information about timezone. If mktime was called
with a timezone which has DST before, the "defaulttype" member of
"state" structure wouldn't be 0. Then it would be used next time,
even though UTC/GMT+0 doesn't have DST.

Added initialization of the "defaulttype" in the empty TZ case.

Change-Id: Ic480c63c548c05444134e0aefb30a7b380e3f40b
2014-11-14 18:13:07 -08:00
Derek Xue
bc6447673f bionic/test: migrate sysconf tests from system/extras to bionic/tests
The old test are implemented in file:
  system/extras/tests/bionic/libc/other/test_sysconf.c
This change is to migrate them to bionic/tests with the gtest format.

and since the sysconf is defined in unistd.h, will put the test under
bionic/tests/unistd_test.cpp file as unistd.syscon test

Change-Id: Ie519147c1c86a6c4cefa8c88b18bf58bdfbffbdb
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2014-11-15 09:48:36 +08:00
Yabin Cui
38569312bc Merge "Add functions in sysinfo.h." 2014-11-15 00:53:37 +00:00
Yabin Cui
9d93986481 Add functions in sysinfo.h.
Bug: 17703902

Change-Id: I699d12d76a8fc483c919be730c2ac63641b71a1d
2014-11-14 16:22:48 -08:00
Yabin Cui
661423a453 Merge "Increase support of pathconf options." 2014-11-14 23:45:45 +00:00
Yabin Cui
b5e581abfe Increase support of pathconf options.
Bug: 18206366
Change-Id: Ie770e49f5af3631eb9fbd2cd5174edf004c81e00
2014-11-14 23:45:24 +00:00
Elliott Hughes
4cf942d318 Merge "sysconf(3) returns long." 2014-11-14 23:33:20 +00:00
Elliott Hughes
60d84af172 sysconf(3) returns long.
On LP32, this makes no difference. Not an ABI change.

On LP64, results are going to be in %rax or x0 whether they're 32- or 64-bit,
and the only difference is going to be whether the top bits are clobbered.

Bug: 18390956
Change-Id: I0bd4496231bdded34c1fa03e895021ac0df7f8e1
2014-11-14 15:14:44 -08:00
Elliott Hughes
cdcef73a23 Merge "Add non-macro stdin/stdout/stderr too." 2014-11-14 22:52:08 +00:00
Elliott Hughes
168667c972 Add non-macro stdin/stdout/stderr too.
Various C and C++ standards explicitly say that stdin/stdout/stderr
should be macros, but glibc makes them global variables too. This
means it's possible to write code that uses those names as locals,
but that code (toybox being an example) won't build on bionic.

If we'd done this earlier, we could have hidden __sF for LP64, but
it's too late now.

Change-Id: I90cf8c73f52b66e1760b8fa2e135b9f9f9651230
2014-11-14 14:42:59 -08:00
Dmitriy Ivanov
27fa71ebc6 Merge "Fix host build for arm/arm64" 2014-11-14 20:19:37 +00:00
Dmitriy Ivanov
9df4b13baf Fix host build for arm/arm64
Change-Id: Id92543e4080aede205b3e63099fa2baa36ba21f0
2014-11-14 12:17:06 -08:00
Dmitriy Ivanov
898aab282c Merge "Add test for --hash-style=sysv" 2014-11-14 19:31:33 +00:00
Dmitriy Ivanov
b3356773c6 Add test for --hash-style=sysv
With build system switched to gnu-hash we need
 a test for sysv-hashed library.

Change-Id: I34adc216fa79199aa46066cf13fcc1c1f2581f0e
2014-11-14 11:19:22 -08:00
Dmitriy Ivanov
c490b5029f Merge "Rename soinfo methods and fields" 2014-11-14 16:33:17 +00:00
Dmitriy Ivanov
047b5934b5 Rename soinfo methods and fields
Change-Id: If68fbe287d3ad954238b1688f71013371f3f7fae
2014-11-13 19:48:32 -08:00
Christopher Ferris
59b1dea882 Merge "Add missing function prototypes wcpcpy/wcpncpy." 2014-11-14 03:23:35 +00:00
Christopher Ferris
5c7d9584d9 Add missing function prototypes wcpcpy/wcpncpy.
Also add smoke tests for a few of the wchar functions.

Change-Id: Id1be522f55a6708564d444941f42097548f16497
2014-11-13 18:56:12 -08:00
Elliott Hughes
0a135b4259 Merge "Fix our <mntent.h> implementation." 2014-11-14 00:00:53 +00:00
Elliott Hughes
e3c4acf1e3 Fix our <mntent.h> implementation.
Used by toybox.

Change-Id: I36a5053423e5cc54ae02a68f4fe110d75134accd
2014-11-13 15:51:36 -08:00
Elliott Hughes
288fa03a5a Merge "Assume glibc >= 2.15." 2014-11-13 18:11:00 +00:00
Elliott Hughes
6229798a7c Merge "Don't receive structs containing pointers over sockets." 2014-11-13 17:56:08 +00:00
Hans Boehm
854c98d636 Merge "Allow stdatomic.h to be included from mingw prebuilt." 2014-11-13 17:49:53 +00:00
Elliott Hughes
55293c1dad Don't receive structs containing pointers over sockets.
Fixes x86-64 netd.

Change-Id: Iee5ef802ebbf2e000b2593643de4eec46f296c04
2014-11-12 22:06:35 -08:00
Elliott Hughes
68d98d832b Assume glibc >= 2.15.
This catches one trivial difference between us and glibc --- the error
returned by pthread_setname_np for an invalid pthread_t.

Change-Id: If4c21e22107c6488333d11184f8005f8669096c2
2014-11-12 21:03:26 -08:00
Elliott Hughes
92a585c91a Merge "Fix glibc 2.15 build." 2014-11-13 03:37:47 +00:00
Dmitriy Ivanov
38b47f6eb4 Merge "Fix mips build" 2014-11-13 03:36:54 +00:00
Elliott Hughes
fb50057138 Fix glibc 2.15 build.
glibc 2.15 has prlimit64, has an unsetenv that's declared nonnull,
and hasn't fixed the problems we were having trying to use the
POSIX strerror_r in C++ code.

Change-Id: I834356a385e5ae55500bd86781691b6c1c9c8300
2014-11-12 19:31:21 -08:00