Commit graph

18879 commits

Author SHA1 Message Date
Dan Willemsen
4156770d84 cc_test_library now creates shared libraries too
Make these compile as static libraries by properly declaring their
dependencies.

I turned off the shared version of libBionicTests because it produces
this linker warning (treated as error):

external/libcxx/include/sstream:859: warning: relocation refers to
discarded section

Change-Id: I2e1448b47a441b273d208ebd068d0d22e340a0ff
2016-08-31 16:35:01 -07:00
Treehugger Robot
af071ed598 Merge "List failing tests last, to reduce the amount of scrolling." 2016-08-31 23:13:29 +00:00
Elliott Hughes
a456fae45f List failing tests last, to reduce the amount of scrolling.
On actual devices, we have a lot of slow tests. Warnings about those
cause cause the failed tests to scroll off the display.

Also replace the made-up word "warnline".

Change-Id: I6b579521a21b56da8a1add08cd34888fc902646e
2016-08-31 14:49:32 -07:00
Treehugger Robot
6d7a1eec4c Merge "Remove $(module)_install_to_out_data flag from test makefile" 2016-08-30 21:16:33 +00:00
Elliott Hughes
af730e63a3 Merge "Fix SysV IPC test failures on Android devices." 2016-08-30 19:35:04 +00:00
Dimitry Ivanov
b16e443239 Remove $(module)_install_to_out_data flag from test makefile
Use non-empty $(module)_install_to_out_data_dir as indication
of custom target dir for a library.

Bug: http://b/22182538
Test: build and run bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: Ibfc87f45084a6fe2f487ca1b17a7625a8d8ec707
2016-08-30 11:38:43 -07:00
Christopher Ferris
ac04d34573 Merge "Update to kernel headers v4.7.2." 2016-08-29 19:14:10 +00:00
Christopher Ferris
106b3a8a7d Update to kernel headers v4.7.2.
Modify the kernel header update script to rename C++ keyword
struct members to something else. This fixes problems when including
these kernel files in C++ code.

Also, make a manual change to linux/fib_rules.h and comment out the
value FRA_PAD since it conflicts with a special android kernel value
FRA_UID_START that has not been upstreamed yet.

Test: Built aosp_angler, aosp_x86_64, aosp_mips (bionic only)
Test: Booted on angler and ran bionic unit tests
Test: Built these changes in internal master

Change-Id: Ia22b7e3ca409404696dba76311f49157f4a9ceed
2016-08-29 12:07:13 -07:00
Treehugger Robot
b04c771581 Merge "Fix pty.bug_28979140 test in Bionic" 2016-08-27 18:57:47 +00:00
Alex Vakulenko
e9014474c9 Fix pty.bug_28979140 test in Bionic
The test relies on the fact/assumes that CPU 0 is available to the
test process. This is not necessarily the case. Instead of allocating
CPU 0 to the main thread, find the first available CPU and use that
instead.

BUG=b/29991929
TEST=All Bionic unit tests pass

(cherrypick of 766275e7f697c30164678e1fed55b2a2fcbf8546.)

Change-Id: I36b311cdba57112d663d652757fd5114183fc780
2016-08-27 09:12:31 -07:00
Elliott Hughes
40bae4fc89 Fix SysV IPC test failures on Android devices.
SysV IPC has been compiled out of all our kernels.

Change-Id: I1294459697ed7dff4f21af5c7b04c8b3d3649329
2016-08-26 19:23:39 -07:00
Treehugger Robot
3db601360f Merge "Initialize __abort_message_ptr in linker's copy of libc" 2016-08-27 01:22:09 +00:00
Dimitry Ivanov
864f3ec186 Initialize __abort_message_ptr in linker's copy of libc
The linker calls to __libc_fatal resulted in tombstones
with missing abort message. This commit fixes it by
initializing __abort_message_ptr for the linker's copy
of libc.

Bug: http://b/31095185
Change-Id: I883d654d7fd0ef309c80f8021202b6bfd5d5cea5
2016-08-26 17:03:01 -07:00
Christopher Ferris
0b1a282650 Merge "Fix a typo in the debug malloc usage info" 2016-08-26 17:58:10 +00:00
Treehugger Robot
6313116b74 Merge "Revert "Switch back to the BSD exec for now."" 2016-08-26 17:54:48 +00:00
Elliott Hughes
e19c672a06 Revert "Switch back to the BSD exec for now."
This reverts commit 18c31d7f4c.

63615066d9 fixed the bug.

Change-Id: I1d59c4be6ad1a05b23dce0198737f0789d7e034a
2016-08-26 16:15:57 +00:00
Elliott Hughes
6395a3047a Merge "Fix execvp/execvpe behavior with absolute paths and ENOEXEC." 2016-08-26 16:14:52 +00:00
Tamas Berghammer
545808a608 Fix a typo in the debug malloc usage info
Change-Id: I010fdc6c228a5f64edfef1c267cde7a2eef5190b
2016-08-26 12:34:16 +01:00
Treehugger Robot
a1e5972278 Merge "linker: stat /proc/self/exe instead of executable_path" 2016-08-26 04:32:54 +00:00
Dimitry Ivanov
f4e3ebe1e3 linker: stat /proc/self/exe instead of executable_path
The absolute path to an executable may no longer be valid for
example when the file is unlinked immediately after exec.
Using /proc/self/exe instead of absolute path solves this problem.

Bug: http://b/31084669
Test: Run the app from http://b/31084669 make sure executable starts
Test: by checking ps and /proc/<pid>/exe
Change-Id: I5c819f39ef0fc4fc71b05de71e8af9ede611f04c
(cherry picked from commit 7da4bbbe87)
2016-08-25 19:41:23 -07:00
Treehugger Robot
0e99e40892 Merge "Switch back to the BSD exec for now." 2016-08-26 01:44:29 +00:00
Elliott Hughes
63615066d9 Fix execvp/execvpe behavior with absolute paths and ENOEXEC.
Bug: http://b/31091962
Change-Id: Id0b3d41868f5e3ed1ccf618bfefb46609367bc9a
2016-08-25 17:40:27 -07:00
Elliott Hughes
18c31d7f4c Switch back to the BSD exec for now.
Bug: http://b/31091962
Change-Id: Ia155c4aa0d6db7b91d7486433c3c01a841b0e509
2016-08-25 17:25:31 -07:00
Elliott Hughes
e1d792b10c Merge "Fix execvpe ENOEXEC behavior." 2016-08-25 16:18:24 +00:00
Elliott Hughes
3c1159024c Fix execvpe ENOEXEC behavior.
The special case for absolute paths wasn't handling ENOEXEC.

Also add more extensive tests for execvpe.

Also switch to manually doing the fork in ExecTestHelper::Run because
ASSERT_EXIT doesn't actually return, meaning we were only running the
first part of each test.

Bug: http://b/31073104
Change-Id: I7a4640afc6d290c51ba2e66fc1b9bb6b0fc174f7
2016-08-24 22:56:52 -07:00
Treehugger Robot
fac56897f8 Merge "Rewrite the exec family." 2016-08-24 21:21:43 +00:00
Elliott Hughes
1b40aafe3f Rewrite the exec family.
* Removes duplication.
* Removes fixed PATH_MAX limit.
* Adds basic tests.

Bug: http://b/30032507
Change-Id: I4087a9de3e53884ac3297ebafbec4e6f8a9871b6
2016-08-24 13:03:04 -07:00
Dimitry Ivanov
e8cce1aa09 Merge "Don't warn about DT_FLAGS_1 containing DF_1_PIE"
am: 42d24ca818

Change-Id: I10e5d9f9c06592fb6e11ce2766afd665c66d185e
2016-08-22 20:43:31 +00:00
Dimitry Ivanov
42d24ca818 Merge "Don't warn about DT_FLAGS_1 containing DF_1_PIE" 2016-08-22 20:31:16 +00:00
Bernhard Rosenkränzer
59ba65e086 Don't warn about DT_FLAGS_1 containing DF_1_PIE
DF_1_PIE is set in PIE code built with gcc 6.x. The flag is purely
informational and the linker doesn't need to do anything about it,
so Bionic handles it correctly - no need to warn.

Change-Id: If99c1742fe22f8842a84818909ed961716ef5ca5
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2016-08-19 21:57:12 +02:00
Elliott Hughes
723a2e6d78 Merge "Fix mips build."
am: 685ed4467c

Change-Id: If3bc475a3397c79ba1b7583110eb92b3c1ff8ba7
2016-08-19 02:44:09 +00:00
Treehugger Robot
685ed4467c Merge "Fix mips build." 2016-08-19 02:40:21 +00:00
Elliott Hughes
1878ea08de Fix mips build.
Tests still pass on arm/aarch64/x86/x86-64.

Change-Id: I6a17b5bca356dbc7273b5427c68d538c0dd6deed
2016-08-18 18:25:07 -07:00
Elliott Hughes
a0a3a8c3b6 Merge "Flesh out <sys/msg.h>, <sys/sem.h>, <sys/shm.h>."
am: 7d4e28a486

Change-Id: Idbf296a5a4342b4a9816f6cd3a4db896a80854a5
2016-08-19 00:03:27 +00:00
Elliott Hughes
7d4e28a486 Merge "Flesh out <sys/msg.h>, <sys/sem.h>, <sys/shm.h>." 2016-08-18 23:58:43 +00:00
Elliott Hughes
7c59f3f6f3 Flesh out <sys/msg.h>, <sys/sem.h>, <sys/shm.h>.
Also fix <sys/ipc.h>.

Not useful except to systems/bringup folks for testing. Trivial tests
added, and double-checked under strace to see that things look right.

x86 -- which works differently to everything else -- tested on the host.

Bug: http://b/27952303
Change-Id: I328534e994ae9e90755f545478fba03038c0bb94
2016-08-18 15:23:38 -07:00
Dimitry Ivanov
2223d5bb1c Merge "[mips] Add missing linker shdr tests"
am: fc9958ce76

Change-Id: I621c6e98dac498e12552281b87374a7ba4578e71
2016-08-17 19:00:02 +00:00
Dimitry Ivanov
fc9958ce76 Merge "[mips] Add missing linker shdr tests" 2016-08-17 18:29:52 +00:00
Elliott Hughes
4321522b66 Merge "Be more restrictive about max frame size."
am: a6b73d36ef

Change-Id: I635cae0c7147aad3d6e6a36e889ddc90e1db44d6
2016-08-17 17:39:57 +00:00
Treehugger Robot
a6b73d36ef Merge "Be more restrictive about max frame size." 2016-08-17 17:29:25 +00:00
Elliott Hughes
74600ce304 Merge "Document that our getnameinfo(3) prototype is unfixably wrong."
am: f74eb2609f

Change-Id: Ie9bd6e383ba5143242453a467234d91cb77a04a0
2016-08-17 00:32:50 +00:00
Treehugger Robot
f74eb2609f Merge "Document that our getnameinfo(3) prototype is unfixably wrong." 2016-08-17 00:17:24 +00:00
Elliott Hughes
8e547bde4b Be more restrictive about max frame size.
exec and realpath both have PATH_MAX buffers (which is a bug in its own
right, since PATH_MAX isn't a real limit). The printf/scanf implementation
has a few large functions, and the DNS implementation is a complete 1970s
C nightmare.

Bug: http://b/30032507
Change-Id: I4b9daa552123c16bbe84f0632b2b32eba17a9dbd
2016-08-16 15:57:47 -07:00
Elliott Hughes
5c730feb44 Merge "Add missing <sys/stat.h> macros."
am: fe4ab7dc30

Change-Id: Iebe7bd3970e16796493b2804b11621d744108baa
2016-08-16 22:18:20 +00:00
Elliott Hughes
daf7506af7 Merge "Fix various <sys/socket.h> prototypes."
am: c8476bb7ad

Change-Id: I383ececb2f1757b15c804737dc0ceba6ec80e056
2016-08-16 22:18:17 +00:00
Elliott Hughes
d29747f935 Merge "mprotect and msync take void*, not const void*."
am: 1df81cd177

Change-Id: I41a5ae96481e09a1de238d5cd361f32c65dc1e7c
2016-08-16 22:18:14 +00:00
Elliott Hughes
ecb7611538 Document that our getnameinfo(3) prototype is unfixably wrong.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/getnameinfo.html

We could fix it for LP32, but that's probably just more confusing and
inconvenient.

Change-Id: Ic37c60fe3665a309cc35c89961712b484dbdaa4c
2016-08-16 15:05:57 -07:00
Treehugger Robot
fe4ab7dc30 Merge "Add missing <sys/stat.h> macros." 2016-08-16 21:59:16 +00:00
Treehugger Robot
c8476bb7ad Merge "Fix various <sys/socket.h> prototypes." 2016-08-16 21:57:31 +00:00
Treehugger Robot
1df81cd177 Merge "mprotect and msync take void*, not const void*." 2016-08-16 21:39:21 +00:00