Commit graph

1891 commits

Author SHA1 Message Date
Elliott Hughes
57ad09278f Merge "Replace killpg." 2017-07-24 20:16:40 +00:00
Elliott Hughes
3a4c45499e Replace fmemopen.
A new implementation starting from the FreeBSD fmemopen rather than the
OpenBSD one we used to use.

The tests were arrived at by translating each sentence in
http://pubs.opengroup.org/onlinepubs/9699919799/functions/fmemopen.html,
plus http://man7.org/linux/man-pages/man3/fmemopen.3.html for historical
GNU bugs.

Bug: http://b/31304889
Test: ran tests
Change-Id: Id8b168c9ecde638e9cdedbc3b8a0982fc83c7048
2017-07-24 10:48:42 -07:00
Elliott Hughes
93a89f84e4 Make xfail passes not failures.
Bug: http://b/63703384
Test: ran tests
Change-Id: I02dfc92cfc0e07831b8f3a974803be384bc02f1e
2017-07-21 18:51:06 -07:00
Elliott Hughes
452c185a0b Merge "Hide various mbstate implementation details."
am: dcdd0e3760

Change-Id: I4f2941939f40c04344f3f9dcfd5debe7780d9275
2017-07-15 03:19:16 +00:00
Elliott Hughes
697f42afdb Hide various mbstate implementation details.
...by inlining them.

Also fix a couple of harmless bugs in passing. I've added tests, but in
both cases I don't think it was actually possible to hit the bad behavior:
we'd hit another test and fail immediately after in an externally
indistinguishable way.

Bug: N/A
Test: readelf
Change-Id: I8466050b0bfe2b7b94c76b383cf10c1d9d28debd
2017-07-14 17:00:05 -07:00
Elliott Hughes
7b41aaf3d5 Loosen _POSIX_THREAD_PROCESS_SHARED test.
Bug: http://b/62424597
Test: bionic unistd.sysconf test
Change-Id: I4adb6d227f761360e9d3fe084a45c386bc6944da
2017-07-13 13:40:12 -07:00
Elliott Hughes
5a99bd4ea7 Merge "Fix unistd._POSIX_macros_smoke test."
am: 03e9c498d4

Change-Id: I751bc797ae578760664b51859c7b9a1711709adb
2017-07-13 19:27:58 +00:00
Elliott Hughes
a35293534f Fix unistd._POSIX_macros_smoke test.
We now claim _POSIX2_VERSION, but the test wasn't updated.

Bug: N/A
Test: ran tests
Change-Id: Idb3369b3df4b964f585597f0d37962ae619322d2
2017-07-13 10:20:41 -07:00
Elliott Hughes
f826a37b95 Apply recent strto* fix, add new tests.
The behavior with "0xy" was wrong: we'd swallow the 'x'.

Bug: N/A
Test: ran tests
Change-Id: I2464d22a2408e99880303876306f18a25c390ad9
2017-07-13 09:35:15 -07:00
Elliott Hughes
7532b32627 Replace killpg.
Upstream's killpg is diverging further from glibc behavior, so let's just fork.

Bug: N/A
Test: ran tests
Change-Id: I70a3543018bc0a5c0bbf019ac527043b90568fda
2017-07-11 15:00:17 -07:00
Pavel Labath
8431285728 Merge "sys_ptrace_test: Better detect missing HW support"
am: fbefc86310

Change-Id: Idd43ea10d7e91353e33ff9efe0531eed64bd1a31
2017-07-11 08:17:17 +00:00
Pavel Labath
95d8fb1e84 sys_ptrace_test: Better detect missing HW support
If the hardware debug support is missing from the CPU, the kernel can
end up in the state where it reports that it supports N(>0) watchpoints,
but the "maximum supported watchpoint size" is zero.

This is not a really sensible API, but it is what we have. I'm going to
speak to folks upstream about whether we can have it report something
more sensible, but that will take a while (if ever).

So, for the time being, detect this situation and treat it as if no
hardware watchtpoints/breakpoints are supported.

Test: bionic-unit-tests --gtest_filter="sys_ptrace.*"
Change-Id: Id6a013c9bec8d8b450b4a36c28431f6b7fd15879
Bug: 63116544
2017-07-10 12:52:35 +00:00
Elliott Hughes
e716af709d Merge "Make <sys/ttydefaults.h> more usable."
am: 1de6d0bb8a

Change-Id: Id12e3e0847f8c114509f9acd4ef3751c889cae18
2017-07-06 22:33:46 +00:00
Elliott Hughes
1de6d0bb8a Merge "Make <sys/ttydefaults.h> more usable." 2017-07-06 22:20:34 +00:00
Elliott Hughes
02fdd0570e Make <sys/ttydefaults.h> more usable.
* TTYDEF_OFLAG referred to the BSD OXTABS constant instead of the Linux XTABS,
  so references to it wouldn't compile.

* CEOL was incorrect (compared to `stty -a`).

* ttydefchars wouldn't compile (removed rather than attempt to fix something
  of unclear utility).

Bug: http://b/63145226
Test: new test
Change-Id: I823e5eaab789cafd2eeea03f77ea553346822f74
2017-07-06 10:33:15 -07:00
Andreas Gampe
6b3a608fc9 Merge "Bionic: Add ziparchive test dependency"
am: 7b7475ce85

Change-Id: I391591c530b2c33ddb8ace15c98f895e52140c5f
2017-07-06 15:00:04 +00:00
Andreas Gampe
b9797fe91c Bionic: Add ziparchive test dependency
Add missing dependency.

Bug: 37342627
Test: m
test: mmma bionic
Change-Id: I43ae69a007f0e8745db5721296f457b3e58206dd
2017-07-05 22:36:20 -07:00
Dimitry Ivanov
d24ffb697b Merge "Enable dlfcn.dt_runpath_absolute_path in glibc tests"
am: 291e895b37

Change-Id: Id8ced96e8189dce17a1636aa30effbbb65121df2
2017-06-27 19:56:24 +00:00
Dimitry Ivanov
db6ab3d5ec Enable dlfcn.dt_runpath_absolute_path in glibc tests
dlfcn.dt_runpath_absolute_path no longer fails when
running bionic-unit-tests on glibc

Bug: http://b/25320359
Test: bionic-unit-tests-glibc --gtest_filter=dlfcn.dt*
Change-Id: Ia0ecf43293cb0fed28516fd8cb87e7f5f2d6e648
2017-06-27 11:02:51 -07:00
Elliott Hughes
02a12a3fd4 Merge "Shave another uninteresting stack frame off aborts." am: e300bf837f
am: 14dddaef5a

Change-Id: I364afd38ee1112cac0bc30232bdb43e4f31c0e17
2017-06-21 00:32:19 +00:00
Elliott Hughes
d7c52625f2 Shave another uninteresting stack frame off aborts.
With this, stack frame 0 is the abort, not tgkill.

arm:

     #00 pc 0001a41c  /system/lib/libc.so (abort+63)

arm64:

     #00 pc 000000000001d75c  /system/lib64/libc.so (abort+120)

Also "include what you use" for <sys/syscall.h>.

Bug: N/A
Test: ran `crasher abort` and `crasher64 abort`
Change-Id: I6517ac67b39b4133e890d52efc115071c812958b
2017-06-20 14:58:16 -07:00
Elliott Hughes
206a1fd78b Merge "Add #defines for some key enums." am: 0c44c05166
am: ed283e7926

Change-Id: I1324ac46c7bd0212fad673f2bd463b568a3e9967
2017-06-16 21:10:00 +00:00
Elliott Hughes
0c44c05166 Merge "Add #defines for some key enums." 2017-06-16 20:56:06 +00:00
Christopher Ferris
1e5a6b651b Merge "Update posix_memalign testing." am: b33accf799
am: 4d8149bf9e

Change-Id: I38858d0e49f5ad01dce7a7965697401abe399a5a
2017-06-15 23:23:14 +00:00
Elliott Hughes
8ad4093659 Add #defines for some key enums.
Building ruby actually trips over both of these:

* if the RTLD_ constants aren't #defined, it uses its own incorrect values.

* if the REG_ constants aren't #defined, it confuses x86 with x86-64.

In all other places where we have enums in our headers, we already match
existing glibc practice.

Bug: http://b/62531921
Test: builds
Change-Id: I5b3aab25a1a24611bdc58f2eda4104a78e9f841c
2017-06-15 15:12:29 -07:00
Christopher Ferris
3a32d95e28 Update posix_memalign testing.
Move all tests into stdlib_test.cpp since that's where the definition lives
in bionic.

Add a sweep test and a various size test.

Test: Run new unit tests on glibc and angler.
Change-Id: Ief1301f402bea82ce90240500dd6a01636dbdbae
2017-06-15 14:18:08 -07:00
Elliott Hughes
edc195b403 Merge "Remove volatile from the __errno declaration." am: 7f6bcc4780
am: ccc97f46d3

Change-Id: Ied1902ae342999dc7e344528570793d711946d3c
2017-06-14 01:03:36 +00:00
Treehugger Robot
7f6bcc4780 Merge "Remove volatile from the __errno declaration." 2017-06-14 00:44:33 +00:00
Elliott Hughes
e452cb1ff3 Remove volatile from the __errno declaration.
This breaks code that declares `errno` itself for whatever crazy reason:

  b.c:22:12: error: conflicting types for '__errno'
  extern int errno;
             ^
  /usr/local/google/ndkports/toolchain/bin/../sysroot/usr/include/errno.h:47:20: note: expanded from macro 'errno'
  #define  errno   (*__errno())
                     ^
  /usr/local/google/ndkports/toolchain/bin/../sysroot/usr/include/errno.h:44:15: note: previous declaration is here
  volatile int* __errno(void) __attribute_const__;
                ^

Bug: N/A
Test: built various bits of GNU source
Change-Id: I27c03bf3bde419a001f98f1ea6c267c847f31271
2017-06-13 16:02:07 -07:00
Xin Li
99bba22fcb Merge "libc: Sync qsort(3) with FreeBSD revision r318515." am: 017ee76b15
am: d36052b8ec

Change-Id: I5ff8510d83d2630336a923e53ce7bf6454339f50
2017-06-13 20:56:44 +00:00
Xin Li
4b1a3992de libc: Sync qsort(3) with FreeBSD revision r318515.
r279663: enhance to handle 32-bit aligned data on 64-bit systems

r279666: qsort(3): small style(9) cleanups.

r288030: Use ANSI C prototypes.  Eliminates -Wold-style-definition
warnings.

r318514: Use size_t.

r318515: Reduce the possible recursion level to log2(N) by always
recursing on the smaller partition instead.

Bug: 38450217
Test: builds, ./tests/run-on-host.sh 64
Change-Id: Ieb622e6f54f8f6d6f62e1bdb491d3b5c8e2f9965
2017-06-13 18:49:54 +00:00
Josh Gao
e567fed451 Merge "Explain why we have a test that FALLOC_FL_PUNCH_HOLE is missing." am: 4f61181428
am: b466d39c40

Change-Id: Ia5c40bf1231e3a525532832e6509277b7d833401
2017-06-09 06:06:56 +00:00
Matthias Hausner
7864cb7495 bionic: tests: only test falloc_punch on ext4
am: 47a52109a4

Change-Id: Ie12666653eaf324dc6d93f09d20000e3d8a87281
2017-06-03 21:20:40 +00:00
Josh Gao
24ed8b5fbf Explain why we have a test that FALLOC_FL_PUNCH_HOLE is missing.
Change-Id: I7388f2e0bc419f195247a1d3e73195cb4d199d5c
Test: none
2017-06-02 14:58:44 -07:00
Matthias Hausner
47a52109a4 bionic: tests: only test falloc_punch on ext4
Test fcntl#falloc_punch is wrong. It checks that fallocate() with mode
FALLOC_FL_PUNCH_HOLE fails on ext4 file system on older kernels. The
test fails to ensure that the file it creates is indeed on an ext4
partition. On an Angelfish device for example, the file is created on an
f2fs partition, which supports FALLOC_FL_PUNCH_HOLE, and thus the test
fails (wrongly).

Change-Id: I23c1ba4d0fcee81551531779e93ac3d5e19ba1d7
Fixes: 62220977
Test: run bionic-unit-tests as per bionic/README.md###Device tests
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2017-06-02 14:25:06 -07:00
Dimitry Ivanov
cd510cbed9 Make dl_iterate_phdr return correct name for first entry
Test: bionic-unit-tests --gtest_filter=link*
Change-Id: Ib3f1e0fbc76fed9a5f27ffdd9bbf847a3e8d3665
2017-05-31 23:45:15 +00:00
Elliott Hughes
6be65c135b Merge "Enable exporting the non-uapi scsi headers." 2017-05-26 18:04:28 +00:00
Elliott Hughes
5059939c87 Enable exporting the non-uapi scsi headers.
Callers are supposed to #include <scsi/sg.h> but if we tell soong to add
bionic/libc/kernel/android/ to the include path, the uapi headers in there
would be (unintentionally) accessible as either <linux/name.h> or
<uapi/linux/name.h>.

Bug: N/A (hit while upgrading strace to 4.17)
Test: builds
Change-Id: I8d47dd51da688c38f747a255d401dfb2c209c805
2017-05-25 19:17:55 -07:00
Dimitry Ivanov
f008a11ef2 Relax flaky _SC_AVPHYS_PAGES check in sys_sysinfo_test
The number of available physical pages is not constant and can
potentially change between calls to get_avphys_pages and
sysconf(_SC_AVPHYS_PAGES) calls.

Relax the assert to check that sconf(_SC_AVPHYS_PAGES) <= phys_pages.

Bug: http://b/31502852
Test: build and run bionic-unit-tests
Change-Id: Ibf8873d2151d93239391d2638dfbf055b70cde3a
2017-05-25 14:27:37 -07:00
Treehugger Robot
1f66c6d078 Merge "Fix _POSIX_THREAD_PROCESS_SHARED." 2017-05-24 07:13:36 +00:00
Christopher Ferris
f187faa5fa Add support for modifying decay timer.
Add the mallopt function, and only a single option so far.

Bug: 36401135

Test: Built and booted bullhead.
Test: Ran jemalloc unit tests.
Test: Ran bionic unit tests.
Test: Ran a test that allocated and free'd a large piece of memory,
Test: and verified that after changing the parameter, the PSS
Test: sticks around (decay timer set to 1), the PSS is purged (decay
Test: timer set to 0).
(cherry picked from commit a1c0d2fd4c)

Change-Id: Ie8125dc3a5615a859efb66dc91a6feeb0d57b478
2017-05-23 13:43:14 -07:00
Dan Willemsen
6718e0309e Move libdlext_... to NATIVE_TESTS instead of ETC
ETC did end up causing problems, since it's not per-arch. But
SHARED_LIBRARIES isn't correct either, since the build system tries to
read shared libraries as ELF files (to create the toc files).

NATIVE_TESTS is slightly better -- they are not libraries, so we don't
attempt to generate toc files, but they are considered per-arch.

Bug: 38463793
Test: Run CtsBionicTestCases
Change-Id: I01b4b093359e0c39eb2f8639d5c5dde9e304ed20
2017-05-22 17:36:16 -07:00
Elliott Hughes
468c8086e6 Fix _POSIX_THREAD_PROCESS_SHARED.
We've had pthread_*_setpshared for long enough that there are no
__INTRODUCED_IN guards.

Found because fio's configure script was confused by this.

Bug: N/A
Test: ran tests
Change-Id: I07b4d937741e4dcd7e615f2371b17c827341917a
2017-05-20 13:11:14 -07:00
Elliott Hughes
8fbd15a6d0 Merge "Make union semun usable." 2017-05-19 18:24:09 +00:00
Elliott Hughes
497ad30d7d Make union semun usable.
This is a bit bogus because it's been removed from glibc (though not
thoroughly) and is never useful on Android (because the system calls
in question are compiled out of Android kernels, and SELinux would
disallow them even if you weren't running an Android kernel). This
also means that on glibc you need to include <linux/sem.h> for this
and on bionic you need <sys/sem.h> (and for either if you #include
the other file, you won't get this union).

Bug: https://github.com/android-ndk/ndk/issues/400
Test: added new test
Change-Id: I47f721da77515531f616d6ad8479bfbc9b60ee47
2017-05-18 15:05:26 -07:00
Treehugger Robot
f06535035e Merge "Fix Mac build." 2017-05-18 02:23:37 +00:00
Elliott Hughes
3fa758f49c Fix Mac build.
Bug: N/A
Test: builds
Change-Id: Ia3dae9f86a0aaa5431929e790f5c36f8beaf3bed
2017-05-17 17:36:08 -07:00
Dan Willemsen
b02206a602 Remove reference to obj/lib
It's going away, since we don't have a single library on device anymore,
and it's simpler to keep the host looking like the device. This doesn't
seem to need it anymore either -- the libraries are found relative to
the test binary.

Test: bionic/tests/run-on-host.sh glibc
Change-Id: Ie9bf6388ecd773623181ec9eadb35d6e0ba0a441
2017-05-17 16:49:56 -07:00
Treehugger Robot
7ff7ed1c7d Merge "tests/utils.h should #include <sys/sysmacros.h>" 2017-05-17 22:48:55 +00:00
Zhenhua WANG
f963bc3833 Compare Pss of tested library in VerifyMemorySaving
DlExtRelroSharingTest.VerifyMemorySaving verifies whether
android_dlopen_ext(ANDROID_DLEXT_USE_RELRO) really saves memory.

This patch compares Pss of the tested library rather than total
Pss of the process, in case different behavior of dlopen() and
android_dlopen_ext() introduces random Pss usage.

Test: DlExtRelroSharingTest.VerifyMemorySaving

(cherry picked from commit 81aad0058c)

Bug: https://issuetracker.google.com/38226388
Change-Id: I4248628fa951b38818fe2af363fdf78abf09a112
2017-05-17 14:33:08 -07:00
Elliott Hughes
5d949da8a9 tests/utils.h should #include <sys/sysmacros.h>
Bug: https://github.com/android-ndk/ndk/issues/398
Test: builds
Change-Id: Ie81b49787d468e409db4024763f29946d3e4250f
2017-05-17 11:43:39 -07:00
Dan Willemsen
3d68fca0da Stop using $(TARGET_OUT_INTERMEDIATE_LIBRARIES)
It's going away, so use the built versions in the per-library
intermediate directories instead.

Test: `m -j bionic-unit-tests` produces the same output before/after
Change-Id: Ia5cd874d13129b2be89cdc26e4ec598be4003c87
2017-05-16 15:25:35 -07:00
Christopher Ferris
a1c0d2fd4c Add support for modifying decay timer.
Add the mallopt function, and only a single option so far.

Bug: 36401135

Test: Built and booted bullhead.
Test: Ran jemalloc unit tests.
Test: Ran bionic unit tests.
Test: Ran a test that allocated and free'd a large piece of memory,
Test: and verified that after changing the parameter, the PSS
Test: sticks around (decay timer set to 1), the PSS is purged (decay
Test: timer set to 0).
Change-Id: I6927929b0c539c1023d34772d9e26bb6a8a45877
2017-05-15 16:59:16 -07:00
Zhenhua WANG
97ef40beed test: check unbounded memory leak in pthread detach
In pthread_leak.detach test, compare the memory usage after two same
scenarios - all children threads have exited. Thus, test emulated by
NativeBridge, which may reserve a memory pool, will pass if it's not
unbounded leak.

Bug: https://issuetracker.google.com/37920774
Test: CtsBionicTestCases

(cherry picked from commit cf17b487ef)

Change-Id: Ib47b26975489b397783e29d65f67fe775b060589
2017-05-15 09:23:49 -07:00
Zhenhua WANG
cf17b487ef test: check unbounded memory leak in pthread detach
In pthread_leak.detach test, compare the memory usage after two same
scenarios - all children threads have exited. Thus, test emulated by
NativeBridge, which may reserve a memory pool, will pass if it's not
unbounded leak.

Bug: https://issuetracker.google.com/37920774
Test: CtsBionicTestCases
Change-Id: Ia51aa67bacb588284747652b36ea5d8e85bea832
2017-05-12 11:09:45 -07:00
wy
828b9e162f Fix clang-tidy perfomrance warnings.
Change-Id: Ibf3d32a5ba1cb70158d857be3d20aa3d1a870341
Test: build with WITH_TIDY=1
2017-05-10 15:57:26 -07:00
Treehugger Robot
a93fcd0394 Merge "greylist is no longer enabled by default." 2017-05-10 02:33:30 +00:00
Treehugger Robot
9259c5bde6 Merge "Remove known failures from arm ifunc tests" 2017-05-10 02:27:57 +00:00
Jiyong Park
37b91af0f3 greylist is no longer enabled by default.
greylist is needed only for application namepaces. Since we started using
linker-namesapces for vendors and other platform apps linker should not
enable greylist workaround by default.

Bug: http://b/37731053
Bug: https://issuetracker.google.com/38146125
Test: sailfish builds and boots
Test: bionic-unit-tests and linker-unit-tests pass
Change-Id: Iee83db6fb1ae754f5ade18491321d9bca3b5ead4
(cherry picked from commit e8ffe56a9c)
2017-05-09 17:59:00 -07:00
Jiyong Park
e8ffe56a9c greylist is no longer enabled by default.
greylist is needed only for application namepaces. Since we started using
linker-namesapces for vendors and other platform apps linker should not
enable greylist workaround by default.

Bug: http://b/37731053
Bug: https://issuetracker.google.com/38146125
Test: sailfish builds and boots
Test: bionic-unit-tests and linker-unit-tests pass
Change-Id: Iee83db6fb1ae754f5ade18491321d9bca3b5ead4
2017-05-08 23:22:16 -07:00
Christopher Ferris
2f030af250 Add new memchr/strrchr tests.
There are new optimizations for these functions, so adding some extra
testing for these routines.

Also, clean up the strchr test slightly with some extra comments.

Test: Ran new tests on glibc version, and on angler.
Change-Id: I41bf4e5e2c84295cc1ce9d2226ed57c2d228d7b8
2017-05-08 20:10:32 -07:00
Yabin Cui
ed0c5f2392 Fix pthread_barrier_smoke test (part 2).
Bug:http://b/37652807
Test: run bionic-unit-tests.
Change-Id: Iaea553177956c5d08f754210273637f69d888c20
(cherry picked from commit ab4cddc329)
2017-05-03 11:44:59 -07:00
Dimitry Ivanov
c42b4bb097 Remove known failures from arm ifunc tests
Since clang does not produce IRELATIVE relocations
this test started passing when we switched away from gcc
This is still a problem because it now leads to
situation where static ifuncs become globally visible
but this is a different problem.

Test: bionic-unit-tests --gtest_filer=dl*
Change-Id: Id27ba5093b88519c00acbc43ab8a991a671a9f51
2017-05-03 11:01:00 -07:00
Christopher Ferris
5725481f1e Merge "Move libc_log code into libasync_safe." 2017-05-03 17:43:35 +00:00
Yabin Cui
f546e49645 Fix pthread_barrier_smoke test.
Bug: http://b/37652807
Test: run bionic-unit-tests.
Change-Id: Id7245223bc2a284efed6e710892b58947ef5d555
(cherry picked from commit d5c04c5ebb)
2017-05-03 10:41:34 -07:00
Dimitry Ivanov
846924ae95 Merge "Add ifunc for variable test-case" 2017-05-03 16:11:27 +00:00
Christopher Ferris
7a3681e5b6 Move libc_log code into libasync_safe.
This library is used by a number of different libraries in the system.
Make it easy for platform libraries to use this library and create
an actual exported include file.

Change the names of the functions to reflect the new name of the library.

Run clang_format on the async_safe_log.cpp file since the formatting is
all over the place.

Bug: 31919199

Test: Compiled for angler/bullhead, and booted.
Test: Ran bionic unit tests.
Test: Ran the malloc debug tests.
Change-Id: I8071bf690c17b0ea3bc8dc5749cdd5b6ad58478a
2017-05-03 08:50:43 -07:00
Treehugger Robot
6323cfad74 Merge "Shared namespaces inherit parent ns properties" 2017-05-03 01:28:35 +00:00
Dimitry Ivanov
f1cb669a9c Shared namespaces inherit parent ns properties
Make shared namespace inherit namespace links and
search/permitted paths from the parent namespace.

Bug: http://b/37854032
Test: bionic_unit_tests --gtest_filter=dl*:Dl*
Change-Id: I174661d4a1dd0cbe4a378179073719aa955f3592
(cherry picked from commit ec43dd6c36)
2017-05-02 16:42:28 -07:00
Dimitry Ivanov
21975b2861 Add ifunc for variable test-case
Also move ifunc tests to clang and c++.

Test: bionic-unit-tests --gtest_filter=dlfcn.ifunc*
Change-Id: I008c4fc01470c8e4d314003c03a2b63ff9bf7fd8
2017-05-02 16:35:20 -07:00
Yabin Cui
3f4735fafa Merge "Fix pthread_barrier_smoke test (part 2)." 2017-05-02 23:20:32 +00:00
Yabin Cui
ab4cddc329 Fix pthread_barrier_smoke test (part 2).
Bug:http://b/37652807
Test: run bionic-unit-tests.
Change-Id: Iaea553177956c5d08f754210273637f69d888c20
2017-05-02 16:18:13 -07:00
Treehugger Robot
85408ef2da Merge "Fix test compile errors after LLVM rebase" 2017-05-02 22:25:59 +00:00
Yi Kong
2d3122c90b Fix test compile errors after LLVM rebase
After the new rebase of Clang, we now support the alloc_size attribute,
so we can remove the warning about switching to alloc_size once Clang
has support.

Also fix an issue where 'false' is returned in a main method.

Test: make cts
Bug: 37752547
Change-Id: I32ee814aaa0338567cb8174a68d7ee1bfece2f75
2017-05-02 21:14:42 +00:00
Yabin Cui
d5c04c5ebb Fix pthread_barrier_smoke test.
Bug: http://b/37652807
Test: run bionic-unit-tests.
Change-Id: Id7245223bc2a284efed6e710892b58947ef5d555
2017-05-02 12:57:39 -07:00
Dimitry Ivanov
ec43dd6c36 Shared namespaces inherit parent ns properties
Make shared namespace inherit namespace links and
search/permitted paths from the parent namespace.

Bug: http://b/37854032
Test: bionic_unit_tests --gtest_filter=dl*:Dl*
Change-Id: I174661d4a1dd0cbe4a378179073719aa955f3592
2017-05-02 11:40:50 -07:00
Treehugger Robot
fd478a8cba Merge "fix half-deleted comments in tests" 2017-05-01 20:17:21 +00:00
George Burgess IV
cf44343c1a fix half-deleted comments in tests
they were half-deleted in If341a27756d608a0fa77ba6518e9bcc725f7632c.

Bug: None
Test: mma
Change-Id: I4e0c8208a7f2a55d273f4c87adca1d755dc98b77
2017-05-01 11:20:31 -07:00
Elliott Hughes
d390df1dbc Restore ELF32_ST_INFO/ELF64_ST_INFO.
Mistakenly removed years ago, along with its genuinely duplicated companions.
This patch also redefines one of those rather than use the Linux uapi header
definition, which leads to signed/unsigned warnings in calling code.

Bug: https://github.com/android-ndk/ndk/issues/377
Test: ran tests
Change-Id: Ib25b17949f04969f12b945ca88ab87d080677cf9
2017-04-30 22:56:10 -07:00
Elliott Hughes
306ea55952 Merge "Compare Pss of tested library in VerifyMemorySaving" 2017-04-27 15:40:37 +00:00
Pavel Labath
6d1193a93c watchpoint_imprecise test: set 4-byte watchpoints on 32-bit arches
8-byte watchpoints are not supported on 32-bit kernels (at least on x86,
probably arm as well). 8-byte watchpoints are not required for this
test, so just decrease the size of watchpoints on these architectures.

Test: bionic-unit-tests-static --gtest_filter=sys_ptrace.*
Bug: 37662849
Change-Id: I450a78fc1d6b8807fe1c776f5fa62d329788969e
(cherry picked from commit 778c048a8f)
2017-04-27 09:41:21 +00:00
Zhenhua WANG
81aad0058c Compare Pss of tested library in VerifyMemorySaving
DlExtRelroSharingTest.VerifyMemorySaving verifies whether
android_dlopen_ext(ANDROID_DLEXT_USE_RELRO) really saves memory.

This patch compares Pss of the tested library rather than total
Pss of the process, in case different behavior of dlopen() and
android_dlopen_ext() introduces random Pss usage.

Test: DlExtRelroSharingTest.VerifyMemorySaving

Change-Id: I696eca736018fca5d9ec9385ac1c79ced280281d
2017-04-26 17:06:32 -07:00
Pavel Labath
4a6202683a watchpoint_imprecise test: set 4-byte watchpoints on 32-bit arches
8-byte watchpoints are not supported on 32-bit kernels (at least on x86,
probably arm as well). 8-byte watchpoints are not required for this
test, so just decrease the size of watchpoints on these architectures.

Change-Id: Ie96b4bc8ce0ad8c924ac737083cf9fe0182aee4d
Test: bionic-unit-tests-static --gtest_filter=sys_ptrace.*
Bug: 37662849
2017-04-26 11:33:17 +01:00
Dimitry Ivanov
15f1db35fa Revert "Revert "loader: enable loading libraries from tmpfs""
This reverts commit 6d59318d78.

Bug: http://b/37245203
Bug: http://b/37590327
Test: bionic-unit-tests on angler and marlin
Test: boot an angler and make sure mediacodec does not crash
2017-04-24 13:35:41 -07:00
Elliott Hughes
5deddda68e Merge "Add basic tests for <link.h>." 2017-04-24 17:52:13 +00:00
Yin-Chia Yeh
6d59318d78 Revert "loader: enable loading libraries from tmpfs"
This reverts commit bb8b22a087.

http://b/37245203
http://b/37590327
Change-Id: I36f45697f7478b830947d641942e453ed0d5466e
2017-04-22 23:55:41 +00:00
Christopher Ferris
6c8881d99c Merge "Update static functions/macro definitions." 2017-04-22 19:16:39 +00:00
Christopher Ferris
ee1e0a34ae Update static functions/macro definitions.
Fix the list of static functions coming from swab.h to match the
ones exported by glibc.

Force the definition of __HAVE_BUILTIN_BSWAP{16,32,64}__ so the headers
use the builtin.

Add a unit test to guarantee that kernel header updates do not break this.

Test: Built and booted angler.
Test: Built the bionic unit tests for arm, arm64, mips, x86, x86_64.
Test: Ran the new test on angler and glibc.

Change-Id: I4ce229e3f198c204186d72bf22dd97b5cdf239e4
2017-04-21 20:59:53 -07:00
Elliott Hughes
7c10abb4a4 Add basic tests for <link.h>.
The dl_iterate_phdr test is new, but the exidx test is largely copy & paste
from ndk_translation.

Bug: http://b/31556066
Test: ran tests
Change-Id: If754f1459ef1d789ee98a89cd2215188edca51da
2017-04-21 17:35:06 -07:00
Dimitry Ivanov
bf34ba3641 loader: enable loading libraries from tmpfs
This change adds two tests for dlopen from temporary files.
1. One Uses memfd_create() can be used to load libraries directly
from memory. This requires relaxing namespace accessibility check
in order to make this work in isolated namespaces.
2. Another checks that open with O_TMPFILE works.

Bug: http://b/37245203
Test: bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: I3be1d7198ca17e7f1ba022a0d86c64d59a493506
(cherry picked from commit bb8b22a087)
2017-04-21 14:45:07 -07:00
Dimitry Ivanov
bb8b22a087 loader: enable loading libraries from tmpfs
This change adds two tests for dlopen from temporary files.
1. One Uses memfd_create() can be used to load libraries directly
from memory. This requires relaxing namespace accessibility check
in order to make this work in isolated namespaces.
2. Another checks that open with O_TMPFILE works.

Bug: http://b/37245203
Test: bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: I3be1d7198ca17e7f1ba022a0d86c64d59a493506
2017-04-21 14:37:00 -07:00
Dimitry Ivanov
f1db8372de Add missing required libraries
Test: m
Change-Id: Id8c8c69547fbfb0c8efe73b324c8b6dcd52aa8ca
2017-04-19 11:58:52 -07:00
Elliott Hughes
a0e5d06c80 Un-deprecated __system_property_find_nth.
Netflix was using this, and looking the header file, although
__system_property_find_nth has been available since the beginning of time,
__system_property_foreach only appeared in 16. So anyone who wants to run
on pre-JellyBean devices would want to use __system_property_find_nth.

It's pretty much a one-liner in terms of __system_property_foreach anyway,
so it doesn't cost us anything to keep it.

Also restore slightly better tests than we originally removed.

Bug: http://b/36566667
Test: ran tests

(cherry picked from commit 438e01940b)

Change-Id: I639f2142ad4ba049b990b13ccccd255be4b4f479
2017-04-17 17:16:44 -07:00
Elliott Hughes
438e01940b Un-deprecated __system_property_find_nth.
Netflix was using this, and looking the header file, although
__system_property_find_nth has been available since the beginning of time,
__system_property_foreach only appeared in 16. So anyone who wants to run
on pre-JellyBean devices would want to use __system_property_find_nth.

It's pretty much a one-liner in terms of __system_property_foreach anyway,
so it doesn't cost us anything to keep it.

Also restore slightly better tests than we originally removed.

Bug: http://b/36566667
Test: ran tests
Change-Id: Id268c2c2e848da17bb0a5a5420af234d9dcb829a
2017-04-17 14:53:07 -07:00
Dimitry Ivanov
4bd3542767 'make bionic-unit-tests' now builds all the required binaries
Test: make
Change-Id: Ie2f5dffaa4a09eba6714ced8ab0043fd7446bee5
2017-04-11 16:15:32 -07:00
Tom Cherry
c40af334c7 Merge "Move scopeguard into android::base" 2017-04-06 22:41:02 +00:00
George Burgess IV
5f8a673a7f Enable FORTIFY unit tests for clang
And add a thing to remind us to enable the malloc FORTIFY test when we
pull a new clang in.

Bug: 34747525
Test: vts -m BionicUnitTests on bullhead
Change-Id: If341a27756d608a0fa77ba6518e9bcc725f7632c
2017-04-06 11:27:41 -07:00
Hans Boehm
78661f52b5 Fix compare_exchange_weak tests to allow spurious failure
Test: Ran bionic unit tests on angler.

Bug: 36869788

(cherry picked from commit 590a410d29)

Change-Id: I22c280baa6bc50334765dae043307d21e1e9c930
2017-04-05 18:34:03 -07:00
Hans Boehm
e06c69d073 Merge "Fix compare_exchange_weak tests to allow spurious failure" 2017-04-06 01:02:28 +00:00
Tom Cherry
b8ab61804c Move scopeguard into android::base
Test: boot bullhead, bionic unit tests
Change-Id: I223249684867655ecb53713b10da41d3014f96ae
2017-04-05 16:37:07 -07:00
Hans Boehm
590a410d29 Fix compare_exchange_weak tests to allow spurious failure
Test: Ran bionic unit tests on angler.

Bug: 36869788
Change-Id: Ic1e0e4e409ac719d5b426391a771b4858a6149ee
2017-04-05 16:12:09 -07:00
George Burgess IV
bd3d2088d9 libc: add const-correct string.h overloads
libcxx provides const-correct overloads for a few string.h functions.
These overloads use clang's enable_if attribute, so they're preferred
over our FORTIFY'ed equivalents.

This weakens _FORTIFY_SOURCE=2 when used with some of these functions,
since clang needs to see __pass_object_size in order to pass an accurate
result for __builtin_object_size(s, 1) at a callsite. Since those
functions don't have __pass_object_size on their params, clang can't do
that. This makes LLVM lower the __builtin_object_size calls, which means
we get the same result as __builtin_object_size(s, 0).

We have to provide all of the overloads in Bionic, since enable_if is
only used to disambiguate overloads with (otherwise) the same type. In
other words:

// overload 1
char *strchr(const char *, int s) __attribute__((enable_if(1, "")));
// overload 2
char *strchr(char *, int s);

void foo() {
  char cs[1] = {};
  strchr(static_cast<const char *>(cs), '\0'); // calls overload #1.
  strchr(cs, '\0'); // calls overload #2.
}

Bug: 34747525
Test: m checkbuild on bullhead internal master + AOSP. vts -m
BionicUnitTests passes on both. Surprisingly, the only code that this
seems to break is contained in Bionic.

Change-Id: Ie406f42fb3d1c5bf940dc857889876fc39b57c90
2017-04-05 13:17:07 -07:00
Dimitry Ivanov
e3f66625e3 Merge "Fix lookup logic for linked namespaces"
am: 6a2c7f5a68

Change-Id: I6af8cccc6ca6a18ced2f4843621563319fdc29f5
2017-04-02 02:20:13 +00:00
Dimitry Ivanov
dedcf35bcc Fix lookup logic for linked namespaces
When looking for already loaded libraries include
linked namespaces to the search, but check if
the library is accessible from the main namespace.

Bug: http://b/36008422
Bug: http://b/35417197
Bug: http://b/34052337
Bug: http://b/36660652
Bug: https://issuetracker.google.com/36636090
Test: run bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: Ic7c1d48114da3ca5dc6512ef03f595dd17b6ed17
(cherry picked from commit d3e7d08845)
2017-04-01 19:15:32 -07:00
Treehugger Robot
6a2c7f5a68 Merge "Fix lookup logic for linked namespaces" 2017-04-02 02:14:47 +00:00
Josh Gao
bcf3b3d868 Merge "Add more ptrace process resumption tests."
am: ccec0f4c11

Change-Id: Ia951508d38a146fb879e3a7aa34e3b1bc4d6169f
2017-03-30 01:40:54 +00:00
Josh Gao
ccec0f4c11 Merge "Add more ptrace process resumption tests." 2017-03-30 01:33:58 +00:00
Elliott Hughes
842423911f Fix x86 system calls made from ELF preinit.
Used by CFI, so broke cfi_test#early_init@x86, but I've added a specific
test for this (and a similar test for getauxval from preinit, which this
patch does not fix).

Bug: http://b/35885875
Test: ran tests

(cherry picked from commit eb04ed506f)

Change-Id: Ie9da1bf4c2dcc23be7d75c739ae8549309813f88
2017-03-29 16:15:08 -07:00
Elliott Hughes
5b35e2b9c2 Merge "Fix x86 system calls made from ELF preinit."
am: 12a07044db

Change-Id: I6377f5bcc5edfc725c923b596490aa74e55ea224
2017-03-29 23:14:56 +00:00
Elliott Hughes
12a07044db Merge "Fix x86 system calls made from ELF preinit." 2017-03-29 23:08:18 +00:00
Dimitry Ivanov
d3e7d08845 Fix lookup logic for linked namespaces
When looking for already loaded libraries include
linked namespaces to the search, but check if
the library is accessible from the main namespace.

Bug: http://b/36008422
Bug: http://b/35417197
Bug: http://b/34052337
Bug: http://b/36660652
Bug: https://issuetracker.google.com/36636090
Test: run bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: Ic7c1d48114da3ca5dc6512ef03f595dd17b6ed17
2017-03-29 15:36:40 -07:00
Josh Gao
bc055cae45 Add more ptrace process resumption tests.
Add tests to verify that ptrace unlink happens immediately for unreaped
processes.

Test: /data/nativetest/bionic-unit-tests/bionic-unit-tests --gtest_filter="Ptrace*"
Test: /data/nativetest64/bionic-unit-tests/bionic-unit-tests --gtest_filter="Ptrace*"
Change-Id: I9803ee5be2a0686c21556598ecf17348df09f601
2017-03-29 15:02:18 -07:00
Elliott Hughes
eb04ed506f Fix x86 system calls made from ELF preinit.
Used by CFI, so broke cfi_test#early_init@x86, but I've added a specific
test for this (and a similar test for getauxval from preinit, which this
patch does not fix).

Bug: http://b/35885875
Test: ran tests
Change-Id: I43885bedfb88c0a26b4474bd3c27a87dec7bbc97
2017-03-29 13:48:02 -07:00
Dimitry Ivanov
72aed61800 Merge "Disable compat_elf_hash_and_relocation_tables test for x86"
am: fe96db819b

Change-Id: I6ff32babeeb514cd00704e797a713ac4149dc868
2017-03-24 23:06:39 +00:00
Dimitry Ivanov
fe96db819b Merge "Disable compat_elf_hash_and_relocation_tables test for x86" 2017-03-24 23:02:56 +00:00
Dimitry Ivanov
fc32dcb128 Disable compat_elf_hash_and_relocation_tables test for x86
Bug: http://b/36571076
Test: run bionic-unit-tests on fugu
Change-Id: I2f901bc99e55f15b06fe6a5b0d7a125d1b8241a8
2017-03-24 10:58:23 -07:00
Christopher Ferris
ab39630cef Merge "Verify at least 2 frames out of signal handler."
am: 8f804d71d0

Change-Id: I101d82f95345ebda7d385142301e5fa3e35daeed
2017-03-23 19:15:50 +00:00
Christopher Ferris
ac2f3dd5cb Verify at least 2 frames out of signal handler.
Modify the test slightly to make sure that the unwinder properly unwinds
through at least 2 frames outside of the signal handler. This guarantees
that if the first frame outside of the handler happens to be garbage,
this test will fail.

Bug: 34468756

Test: Ran the unit tests on fugu, angler (both 32 bit and 64 bit).
Change-Id: I6b76ac9fc1df9ed6fd5bbcc6f5fa4bf458354dff
2017-03-23 09:45:10 -07:00
Dimitry Ivanov
b1a44366b8 Merge "Use libbase for realpath and dirname"
am: e0561cb0c9

Change-Id: I7fe096792674724641548d62c9c6e7041ebce85b
2017-03-16 20:42:01 +00:00
Dimitry Ivanov
5b2cd3a358 Use libbase for realpath and dirname
Test: run bionic-unit-tests
Bug: http://b/31396973
Change-Id: Ie8dc60348b9c57892a77be6a24dadb42241f6b62
2017-03-16 11:47:08 -07:00
Josh Gao
96be725d4b Merge "Split up the stack space tests into their own noinline functions."
am: b2882dd429

Change-Id: Id6212e053b0f4b886146224a962fd8744d5e8eb4
2017-03-16 06:49:38 +00:00
Josh Gao
61db9ac8da Split up the stack space tests into their own noinline functions.
Prevent the compiler from being too smart and allocating a stack buffer
at the beginning of a function.

Bug: http://b/36206043
Test: 32/64-bit dynamic tests pass, static ones still don't
Change-Id: I90c575be43a9dd6c4fefc0d8b514f1ae0405b994
2017-03-15 19:53:17 -07:00
Josh Gao
0531178d46 Merge "Add tests for pthread TLS leak."
am: a4db9d6f41

Change-Id: I595112f67b875a1f8cc841adaf9adf3c10a792b4
2017-03-15 22:14:01 +00:00
Josh Gao
7d15dc388a Add tests for pthread TLS leak.
Add tests that ensure that threads don't leak memory mappings after
they exit.

Bug: http://b/36045112
Test: /data/nativetest/bionic-unit-tests/bionic-unit-tests --gtest_filter=*leak*
Test: /data/nativetest64/bionic-unit-tests/bionic-unit-tests --gtest_filter=*leak*
Change-Id: Id0c1194b5d2bb7d89947b1ade16eb0d768d8c5b7
2017-03-15 13:30:05 -07:00
Josh Gao
778751ff6f Merge changes from topic 'debuggerd_fallback'
am: cf96f35dd1

Change-Id: I875bbf95ca55919a5164752d2f49d5415ea6ded2
2017-03-09 22:08:30 +00:00
Josh Gao
415daa8cca Increase signal stack size on 32-bit to 16kB.
snprintf to a buffer of length PATH_MAX consumes about 7kB of stack.

Bug: http://b/35858739
Test: bionic-unit-tests --gtest_filter="*big_enough*"
Change-Id: I34a7f42c1fd2582ca0d0a9b7e7a5290bc1cc19b1
2017-03-08 16:43:59 -08:00
Victor Khimenko
869aed6b0f Merge "Stop using __system_property_area__"
am: 9e10b7fa44

Change-Id: I2b3add48f5d5e41e250a1024dab6fd8411447416
2017-03-01 21:51:00 +00:00
Victor Khimenko
4a92ffd302 Stop using __system_property_area__
Apparently that "backdoor" is no longer needed - the proper way is
to reinitialize properties:
    https://android-review.googlesource.com/#/c/181794/24/tests/system_properties_test.cpp

Also removes mentions of libnativehelper test (it no longer uses
__system_property_area__) and removes useless "extern" declaration
(actual use was removed long ago).

Test: refactoring CL, existsing tests still pass

BUG=21852512
BUG=34114501

Change-Id: I2223cab2fcb671ea180ad4470a7aba5c9cd20bd8
2017-03-01 20:43:42 +01:00
Dimitry Ivanov
ea7961b604 Merge "Fix greylist exception to account for linked namespaces"
am: 6e528631d1

Change-Id: I639c4ac215359a5c3caa6b19a2cd59ace1ff1ca4
2017-02-28 00:47:49 +00:00
Dimitry Ivanov
35c8e3b125 Fix greylist exception to account for linked namespaces
Do not load second copy of libraries that are supposed to
be provided by linked namespaces. Also do not print
error in the log if caller tries to open shared library
using absolute path for apps targeting N+.

Bug: http://b/35454141
Bug: http://b/26833548
Bug: http://b/35338922
Test: run bionic-unit-tests --gtest_filter=dl*
Change-Id: Icf3aeedff18d287d2ba0b3df3808b100f3ef5f7a
2017-02-27 14:16:04 -08:00
Elliott Hughes
383efd5f2e Merge "Add tests for <endian.h>."
am: 78e6c4ec7c

Change-Id: I3593c8f899707d5e45fad839733b0dcbcc945df0
2017-02-25 03:14:15 +00:00
Treehugger Robot
78e6c4ec7c Merge "Add tests for <endian.h>." 2017-02-25 03:10:19 +00:00
Dimitry Ivanov
566d200680 Merge "loader: set PT_INTERP to itself"
am: 0b87362f53

Change-Id: I505616f5b4223dcd6cdad396db340c81b61a87b5
2017-02-25 02:31:13 +00:00
Dimitry Ivanov
2a6955e040 loader: set PT_INTERP to itself
Some versions of kernel set AT_BASE to 0
if dynamic loader does not have PT_INTERP
set.

Bug: http://b/30739481
Test: run /system/bin/linker64 and /system/bin/linker
Change-Id: I1b67777166fe917d3ee1a97277045ca6f5db0084
2017-02-24 16:56:38 -08:00
Elliott Hughes
ba267f45d6 Add tests for <endian.h>.
Also, for the stuff that's also in <netinet/in.h> as real functions,
check that they're there too (and as functions rather than macros,
since that was historically not true).

Bug: http://b/28432448
Test: ran tests
Change-Id: I7e4ae926f7e02de3b6dd38d1953e5b3b43d44f74
2017-02-24 16:19:53 -08:00
Pavel Labath
8c8ce57d77 Merge "Silence a compiler warning due to unused variable on mips"
am: 3678078440

Change-Id: I789328684c5a5253b515c42a9dbdc6714272b9c1
2017-02-24 10:27:10 +00:00
Pavel Labath
fb5a6396dc Silence a compiler warning due to unused variable on mips
oops, I did it again.

Test: lunch mips && cd bionic && mma
Change-Id: I1fe2cb847d0698b34766869f9626398dbcf81960
2017-02-24 10:20:54 +00:00
Pavel Labath
df6f95b8a0 Merge "Add "imprecise" watchpoint ptrace test"
am: a936199ce0

Change-Id: I4fbf4ce77868d3483d5ea34c51b3d6f51cfb1b4d
2017-02-24 09:21:06 +00:00
Pavel Labath
3dad8d5d07 Add "imprecise" watchpoint ptrace test
This tests for the presence of a kernel bug that meant that the kernel
would sometimes fail to report the watchpoint hit if the hardware
reported a address which did not exactly match the address range being
watched (which it is allowed to do per ARM spec if the instruction
accesses a larger block of memory than the region being watched). This
bug was fixed in linux kernel 4.9, and has been backported to older
android kernels.

Bug: 30802222
Bug: 30919905
Test: bionic-unit-tests --gtest_filter="sys_ptrace.*"
Change-Id: I80c35b29eaf28e2dbacb9e8ee5317fdea653fc87
2017-02-24 09:16:06 +00:00
Dimitry Ivanov
6a1ce9cc3d Merge "Add test for a greylisted library"
am: 3f76dadf15

Change-Id: Ia5bb595314b154bca36d816f30b640eaf20c6cd7
2017-02-23 17:13:34 +00:00
Dimitry Ivanov
1862314dd4 Add test for a greylisted library
Test: bionic-unit-tests --gtest_filter=dlext.ns*
Bug: http://b/35338922
Change-Id: I2f4895cb1ec458c2f565a7e4d06f7a1f6200e7aa
2017-02-23 00:03:42 -08:00
Elliott Hughes
d57cfaf631 Merge "Cope with argv[0] being null in the dynamic linker."
am: c84e8a507c

Change-Id: I9d864e07d907a5090266658e074953cca119678a
2017-02-23 03:32:49 +00:00
Elliott Hughes
30a36273ab Cope with argv[0] being null in the dynamic linker.
Somewhat unsurprisingly, very few commands are happy to be run like this,
in particular multiplexed commands like toybox. But that's no reason for
the linker to get in the way too.

Bug: http://b/33276926
Test: new test
Change-Id: I6dd71ea0183f4da83571039c2198ebb6ed38520e
2017-02-22 17:37:52 -08:00
Elliott Hughes
39cacfe03f Merge "Add timeout support to __system_property_wait."
am: c9a840ac76

Change-Id: Ifaa6521599c8d36386cee6e980d0e10a7a6c1ef9
2017-02-22 01:47:53 +00:00
Treehugger Robot
c9a840ac76 Merge "Add timeout support to __system_property_wait." 2017-02-22 01:43:31 +00:00
Elliott Hughes
145e1f2ec7 Merge "Downgrade the special case of pthread_t(0) to a warning."
am: 2cb4fb033f

Change-Id: If4f963995645b9d57666d0cef0661aa96d8aa2a1
2017-02-22 00:42:11 +00:00
Elliott Hughes
40c885a4d1 Add timeout support to __system_property_wait.
Bug: http://b/35201172
Test: ran tests
Change-Id: I3a78813bf3cd50d1b308ecb3c742f923606c0cc4
2017-02-21 14:36:24 -08:00
Elliott Hughes
6ce686c48b Downgrade the special case of pthread_t(0) to a warning.
So far this is the only issue we've hit in vendor code, and we've hit
it several times already. Rather than try to fix bullhead (the current
problem), let's just admit that the special case of 0 is a lot less
worrying.

Also fix the test expectations to correspond to the new abort message.

Bug: http://b/35455349 (crashes on 0)
Bug: http://b/35622944 (tests)
Test: ran tests
Change-Id: Iec57011fa699a954ebeaec151db2193e36d1ef35
2017-02-21 14:21:43 -08:00
Josh Gao
5abca780c9 Merge "Add tests for ptrace resumption behavior." am: d11584665c
am: d4233fbc5e

Change-Id: Id0ee86d392268211501183e67600bcb9c7fde1d9
2017-02-17 19:46:25 +00:00
Josh Gao
d11584665c Merge "Add tests for ptrace resumption behavior." 2017-02-17 19:35:59 +00:00