13951 Commits

Author SHA1 Message Date
Yabin Cui
d16844abce am 4600bdac: am af3ba5c8: Merge "Make all output of child test go to parent process in gtest_main."
* commit '4600bdac709969408ac446507d85881db55b0ca7':
  Make all output of child test go to parent process in gtest_main.
2015-02-25 16:52:35 +00:00
Nick Kralevich
fccf68ace9 am e93bc6bb: am d91ded81: Merge "Fix "faccessat ignores flags""
* commit 'e93bc6bbe8ce180187e3914d0a7494cfe84f6255':
  Fix "faccessat ignores flags"
2015-02-25 16:52:22 +00:00
Yabin Cui
a1e4a4a3c6 am 8c41eae6: Merge "Move getusershell/endusershell/setusershell to ndk_cruft.cpp."
* commit '8c41eae6fcdb6cad1f6c46ae01708ead6b734060':
  Move getusershell/endusershell/setusershell to ndk_cruft.cpp.
2015-02-25 00:05:52 +00:00
Yabin Cui
8c41eae6fc Merge "Move getusershell/endusershell/setusershell to ndk_cruft.cpp." 2015-02-25 00:00:51 +00:00
Yabin Cui
4600bdac70 am af3ba5c8: Merge "Make all output of child test go to parent process in gtest_main."
* commit 'af3ba5c87319e19c10be6755b37af92521f702c2':
  Make all output of child test go to parent process in gtest_main.
2015-02-24 23:48:02 +00:00
Yabin Cui
af3ba5c873 Merge "Make all output of child test go to parent process in gtest_main." 2015-02-24 23:40:31 +00:00
Yabin Cui
7fb680bfda Move getusershell/endusershell/setusershell to ndk_cruft.cpp.
Bug: 19108648
Change-Id: I65134040345398dde612c4325d902db58f3bd2be
2015-02-24 14:46:59 -08:00
Yabin Cui
ea9c933f36 Make all output of child test go to parent process in gtest_main.
Change-Id: Iad460e89755051cdb99593cbf42c97d9a359f32b
2015-02-24 14:44:51 -08:00
Nick Kralevich
e93bc6bbe8 am d91ded81: Merge "Fix "faccessat ignores flags""
* commit 'd91ded81376a10a1c89f7a5ae3c462ae3b24188e':
  Fix "faccessat ignores flags"
2015-02-24 21:52:36 +00:00
Nick Kralevich
d91ded8137 Merge "Fix "faccessat ignores flags"" 2015-02-24 21:49:09 +00:00
Nick Kralevich
35778253a5 Fix "faccessat ignores flags"
The kernel system call faccessat() does not have any flags arguments,
so passing flags to the kernel is currently ignored.

Fix the kernel system call so that no flags argument is passed in.

Ensure that we don't support AT_SYMLINK_NOFOLLOW. This non-POSIX
(http://pubs.opengroup.org/onlinepubs/9699919799/functions/access.html)
flag is a glibc extension, and has non-intuitive, error prone behavior.

For example, consider the following code:

  symlink("foo.is.dangling", "foo");
  if (faccessat(AT_FDCWD, "foo", R_OK, AT_SYMLINK_NOFOLLOW) == 0) {
    int fd = openat(AT_FDCWD, "foo", O_RDONLY | O_NOFOLLOW);
  }

The faccessat() call in glibc will return true, but an attempt to
open the dangling symlink will end up failing. GLIBC documents this
as returning the access mode of the symlink itself, which will
always return true for any symlink on Linux.

Some further discussions of this are at:

  * http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003617.html
  * http://permalink.gmane.org/gmane.linux.lib.musl.general/6952

AT_SYMLINK_NOFOLLOW seems broken by design. I suspect this is why this
function was never added to POSIX. (note that "access" is pretty much
broken by design too, since it introduces a race condition between
check and action). We shouldn't support this until it's clearly
documented by POSIX or we can have it produce intuitive results.

Don't support AT_EACCESS for now. Implementing it is complicated, and
pretty much useless on Android, since we don't have setuid binaries.
See http://git.musl-libc.org/cgit/musl/commit/?id=0a05eace163cee9b08571d2ff9d90f5e82d9c228
for how an implementation might look.

Bug: 18867827
Change-Id: I25b86c5020f3152ffa3ac3047f6c4152908d0e04
2015-02-24 13:40:43 -08:00
Yabin Cui
b8ce474217 Switch system_properties.cpp from bionic atomic operations to stdatomic.
Bug: 17177189
Change-Id: I42e05ad1c490cc7a8040138151afc0ee72a9b63f
2015-02-24 10:41:53 -08:00
Elliott Hughes
df93bc50fc am 549aab61: am 4ec60a01: am 2aef607b: Merge "Fix dup2 in the case where the two fds are equal."
* commit '549aab610a36b696a4586e33c4b709a29a668c1a':
  Fix dup2 in the case where the two fds are equal.
2015-02-24 06:06:43 +00:00
Elliott Hughes
549aab610a am 4ec60a01: am 2aef607b: Merge "Fix dup2 in the case where the two fds are equal."
* commit '4ec60a017859b39d490cfeb089ed30da09863def':
  Fix dup2 in the case where the two fds are equal.
2015-02-24 06:03:02 +00:00
Elliott Hughes
4ec60a0178 am 2aef607b: Merge "Fix dup2 in the case where the two fds are equal."
* commit '2aef607b25c463baed5ae70d14212e24ea7bcf2b':
  Fix dup2 in the case where the two fds are equal.
2015-02-24 05:59:52 +00:00
Elliott Hughes
2aef607b25 Merge "Fix dup2 in the case where the two fds are equal." 2015-02-24 05:55:37 +00:00
Elliott Hughes
be52e65817 Fix dup2 in the case where the two fds are equal.
dup3's behavior differs from dup2 in this case, so we need to paper
over that in the C library.

Change-Id: I313cd6f226db5e237f61866f324c5ecdd12bf762
2015-02-23 21:52:56 -08:00
Elliott Hughes
7d85c81f31 am aced654f: am 491c09e0: am 393bdb15: Merge "Add RLIM_SAVED_CUR and RLIM_SAVED_MAX."
* commit 'aced654f583682074db54b10706511453a7521da':
  Add RLIM_SAVED_CUR and RLIM_SAVED_MAX.
2015-02-24 04:54:26 +00:00
Elliott Hughes
aced654f58 am 491c09e0: am 393bdb15: Merge "Add RLIM_SAVED_CUR and RLIM_SAVED_MAX."
* commit '491c09e0d5921edd57da2efb0c8ed4f32df93fe2':
  Add RLIM_SAVED_CUR and RLIM_SAVED_MAX.
2015-02-23 22:52:54 +00:00
Elliott Hughes
491c09e0d5 am 393bdb15: Merge "Add RLIM_SAVED_CUR and RLIM_SAVED_MAX."
* commit '393bdb156d5024a03f03425a977d0518c84dbb98':
  Add RLIM_SAVED_CUR and RLIM_SAVED_MAX.
2015-02-23 22:45:14 +00:00
Elliott Hughes
393bdb156d Merge "Add RLIM_SAVED_CUR and RLIM_SAVED_MAX." 2015-02-23 22:36:06 +00:00
Elliott Hughes
6af62e0d50 Add RLIM_SAVED_CUR and RLIM_SAVED_MAX.
Change-Id: Ia6be76460bfcf852832325c5f36cb272f49a4b87
2015-02-23 13:41:40 -08:00
Elliott Hughes
1d0ded2116 am c0e7f55d: am 07e218a4: am 3d83b189: Merge "[MIPS64] Fix mips64 build."
* commit 'c0e7f55d9b89c7d80083842223c941c413bc3942':
  [MIPS64] Fix mips64 build.
2015-02-23 16:19:21 +00:00
Elliott Hughes
c0e7f55d9b am 07e218a4: am 3d83b189: Merge "[MIPS64] Fix mips64 build."
* commit '07e218a484d8a1ac71c3b9317e86f5ba39aae919':
  [MIPS64] Fix mips64 build.
2015-02-23 16:12:38 +00:00
Elliott Hughes
07e218a484 am 3d83b189: Merge "[MIPS64] Fix mips64 build."
* commit '3d83b18970f32467596830845793b18a858f59e6':
  [MIPS64] Fix mips64 build.
2015-02-23 16:09:17 +00:00
Elliott Hughes
3d83b18970 Merge "[MIPS64] Fix mips64 build." 2015-02-23 16:04:20 +00:00
Nikola Veljkovic
daf8911079 [MIPS64] Fix mips64 build.
Build was broken by:
https://android-review.googlesource.com/133834

Use <unistd.h> to get syscall().
Remove <asm/unistd.h>, it gets included through <sys/syscall.h>.

Change-Id: Id762f6dea5f9538c19b79cdd46deda978efd50fe
2015-02-23 16:21:31 +01:00
Greg Hackmann
f937761134 am 973ceef6: am 4602d8c7: am 04bbef37: Merge "Fix 64-bit benchmark build"
* commit '973ceef6869a7dad02195389547bf6177bb6cb34':
  Fix 64-bit benchmark build
2015-02-20 19:30:41 +00:00
Greg Hackmann
973ceef686 am 4602d8c7: am 04bbef37: Merge "Fix 64-bit benchmark build"
* commit '4602d8c7621ffd87e32f53c8f7e8ac5453a404ca':
  Fix 64-bit benchmark build
2015-02-20 19:27:13 +00:00
Greg Hackmann
4602d8c762 am 04bbef37: Merge "Fix 64-bit benchmark build"
* commit '04bbef377b9941bf6d67d9c515b6640a314fb032':
  Fix 64-bit benchmark build
2015-02-20 19:21:19 +00:00
Greg Hackmann
04bbef377b Merge "Fix 64-bit benchmark build" 2015-02-20 19:16:49 +00:00
Greg Hackmann
567bfb3779 Fix 64-bit benchmark build
The * flag to printf() wants an int instead of size_t, and these are
distinct types on 64-bit.  To accomodate this, make the name column
width helpers return int.

In theory this truncates things, but in practice this only matters if
you have a benchmark with more than INT_MAX characters in its name (in
which case you have bigger problems).

Change-Id: I3338948c25a3a8d84f1ead2f5b457c05da8a01cf
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2015-02-20 11:07:38 -08:00
Elliott Hughes
3f89ed1b47 am 5bf236e9: am 6421f8f5: am c39eef71: Merge "valgrind can\'t find syscall because we didn\'t put it in <unistd.h>."
* commit '5bf236e95f75de0169abbb22fc083c767ec681a6':
  valgrind can't find syscall because we didn't put it in <unistd.h>.
2015-02-20 17:15:16 +00:00
Elliott Hughes
5bf236e95f am 6421f8f5: am c39eef71: Merge "valgrind can\'t find syscall because we didn\'t put it in <unistd.h>."
* commit '6421f8f5b21357b3f956f4b20c3622f96863a219':
  valgrind can't find syscall because we didn't put it in <unistd.h>.
2015-02-20 17:08:47 +00:00
Elliott Hughes
6421f8f5b2 am c39eef71: Merge "valgrind can\'t find syscall because we didn\'t put it in <unistd.h>."
* commit 'c39eef71a7f66b69e2216a51d0e7fbc1796d0696':
  valgrind can't find syscall because we didn't put it in <unistd.h>.
2015-02-20 17:02:25 +00:00
Elliott Hughes
c39eef71a7 Merge "valgrind can't find syscall because we didn't put it in <unistd.h>." 2015-02-20 16:56:58 +00:00
Elliott Hughes
4c5891d93d valgrind can't find syscall because we didn't put it in <unistd.h>.
Change-Id: I1e47291d4476bd2816138a8cf58f29d4986d39e3
2015-02-19 22:49:44 -08:00
Christopher Ferris
1e0f763c9a am e84dff9a: am 479070c5: am 324313a9: Merge "Refactor the benchmark code."
* commit 'e84dff9a1f1d583c428e137cf0120fdd4ce315ce':
  Refactor the benchmark code.
2015-02-20 01:10:48 +00:00
Christopher Ferris
e84dff9a1f am 479070c5: am 324313a9: Merge "Refactor the benchmark code."
* commit '479070c51e34f9f9f809df4daa8184e5b2947f14':
  Refactor the benchmark code.
2015-02-20 01:03:22 +00:00
Christopher Ferris
479070c51e am 324313a9: Merge "Refactor the benchmark code."
* commit '324313a9e58c0e8d2546d124d8fcf04306a114f5':
  Refactor the benchmark code.
2015-02-20 00:59:18 +00:00
Christopher Ferris
324313a9e5 Merge "Refactor the benchmark code." 2015-02-20 00:53:25 +00:00
Bill Yi
c390f2eae6 am f5700e1f: am a6395dda: Merge commit \'9d7f68ebfd79b1ce54dc56bceb7346f34615e5a1\' into HEAD
* commit 'f5700e1fd4eb70f3458b3bd508a9bf945561d22a':
2015-02-20 00:26:52 +00:00
Bill Yi
f5700e1fd4 am a6395dda: Merge commit \'9d7f68ebfd79b1ce54dc56bceb7346f34615e5a1\' into HEAD
* commit 'a6395dda54057170fc66faf00410e983202aa7e0':
2015-02-20 00:22:45 +00:00
Christopher Ferris
df4942c04a Refactor the benchmark code.
Changes:
- Modify the benchmarks to derive from a single Benchmark object.
- Rewrite the main iteration code. This includes changing the iteration
  code to use the actual total time calculated by the benchmark as a basis
  for determining whether there are enough iterations instead of using
  the time it takes to run the benchmark.
- Allow benchmarks to take no argument, int, or double.
- Fix the PrettyInt printer for negative integers.
- Modify the max column width name to include the whole name including
  the arg part.
- Reformat property_benchmark.cpp in line with the rest of the code.
- Modify a few of the math benchmarks to take an argument instead of
  separate benchmarks for the same function with different args.
- Create a vector of regex_t structs to represent the args all at
  once instead of when running each benchmark.

This change is in preparation for adding new math based benchmarks.

Tested by running on a nexus flo running at max using the new code
and the old code and comparing. All of the numbers are similar, but
some of the iterations are different due to the slightly different
algorithm used.

Change-Id: I57ad1f3ff083282b9ffeb72e687cab369ce3523a
2015-02-19 14:58:24 -08:00
Christopher Ferris
cd4e501223 am 4379016a: Revert "Modify test to avoid race condition."
* commit '4379016a20131740e25b33b2b09a2caef0aa62bd':
  Revert "Modify test to avoid race condition."
2015-02-19 22:36:17 +00:00
Bill Yi
a6395dda54 Merge commit '9d7f68ebfd79b1ce54dc56bceb7346f34615e5a1' into HEAD 2015-02-19 14:30:25 -08:00
Christopher Ferris
4379016a20 Revert "Modify test to avoid race condition."
This reverts commit 3da136aa47e2d1608b98abb2580f024b36f92831.

This change is not needed any where but lmp mr1.

Change-Id: I3f38e2e8e418959a487bc0c4148d3238743e4626
2015-02-19 13:35:47 -08:00
Elliott Hughes
77a24e14c3 am 4dc261b1: am d071b814: am 97484d3a: Merge "Add GNU extensions mempcpy and wmemcpy."
* commit '4dc261b13c351edf26efd18aca448aa98f925d41':
  Add GNU extensions mempcpy and wmemcpy.
2015-02-19 20:27:25 +00:00
Dan Albert
60787a931f am c2c319b2: am 43379c9c: am 3e1b5f46: Merge "Parameterize use of clang in libc_ndk."
* commit 'c2c319b2cb5dc3a7928121ecdd4312331dfb0496':
  Parameterize use of clang in libc_ndk.
2015-02-19 20:26:35 +00:00
Christopher Ferris
d2c65d8815 am 9ccce5d7: am 3da136aa: Modify test to avoid race condition.
* commit '9ccce5d7efde606914ec0b88fa50785b21ea672b':
  Modify test to avoid race condition.
2015-02-19 20:26:26 +00:00