Commit graph

35535 commits

Author SHA1 Message Date
Christopher Ferris
e07b33d3ad Only run the exec once if test passes.
I accidentally made the tests run MAX_RETRIES times instead of
running once when passing, and at most MAX_RETRIES when the
test fails. Also, add a bit of randomness to the usleep to try and
avoid tests syncing up on failures.

Bug: 193898572

Test: Ran unit tests and verified that a pass doesn't result in another run.
Test: Ran three copies of the unit tests at the same time to verify that
Test: there isn't a flaky test failure.
Change-Id: I8b8d3cd05ca7d1e87ce34bf10aeef84f6989fdab
2021-08-05 14:01:52 -07:00
Joel Galenson
f71046f8ef Merge "Move the Rust system property bindings into librustutils." am: ec75f703e1 am: d8700c311a
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1780298

Change-Id: I9a7d7aeb5db684f8576398346ff2312b78b96cc8
2021-08-03 14:49:40 +00:00
Joel Galenson
d8700c311a Merge "Move the Rust system property bindings into librustutils." am: ec75f703e1
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1780298

Change-Id: Ia8dfe763e10c4236072338de060900ad7be6ff43
2021-08-03 14:32:48 +00:00
Joel Galenson
ec75f703e1 Merge "Move the Rust system property bindings into librustutils." 2021-08-03 14:20:06 +00:00
Florian Mayer
1e6ca169d9 Merge "Reland "Fix GWP hooks not being restored, leading to crashes."" am: a4ffabe79b am: 1f03573276
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1783187

Change-Id: I30940219ccfd1e77e593bef62ebcbd2c859ade02
2021-08-03 08:19:36 +00:00
Florian Mayer
1f03573276 Merge "Reland "Fix GWP hooks not being restored, leading to crashes."" am: a4ffabe79b
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1783187

Change-Id: If2f61155273448844d94a212a2dc032c6c807a12
2021-08-03 08:06:37 +00:00
Florian Mayer
a4ffabe79b Merge "Reland "Fix GWP hooks not being restored, leading to crashes."" 2021-08-03 07:52:58 +00:00
Treehugger Robot
ccf8b9b6c5 Merge changes I6b097079,I6a12d50d am: 678cac51d4 am: 1988f44d6d
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1782748

Change-Id: I39376278616c927ded3a7f4de3e2efe253a6d2e1
2021-07-30 20:50:16 +00:00
Treehugger Robot
1988f44d6d Merge changes I6b097079,I6a12d50d am: 678cac51d4
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1782748

Change-Id: If080784fbff5e55942182cdfbbdbcc16f66f2479
2021-07-30 20:31:08 +00:00
Treehugger Robot
678cac51d4 Merge changes I6b097079,I6a12d50d
* changes:
  Enable posix strerror_r test in glibc
  POSIX strerror_r returns an error number, not -1
2021-07-30 20:16:35 +00:00
Florian Mayer
3a0ced8539 Reland "Fix GWP hooks not being restored, leading to crashes."
If the DispatchReset fails, the subsequent iteration has the wrong
idea of what the "original" table is, and if a subsequent DispatchReset
succeeds it unhooks them.

Repro in https://r.android.com/1767868.

Bug: 193012939
Bug: 189776979
Change-Id: I30445c053fcb785669f75d9c83056926d850edce
2021-07-30 17:59:17 +01:00
Colin Cross
4408b8abb0 Enable posix strerror_r test in glibc
Work around the incompatibility between libc++ and !_GNU_SOURCE
by defining a wrapper function around the posix strerror_r in
a file that does not include any libc++ or gtest headers.

Test: bionic-unit-tests-glibc
Change-Id: I6b097079777b5dcd802e295cc566964fe1c01382
2021-07-30 09:39:58 -07:00
Colin Cross
695af0da30 POSIX strerror_r returns an error number, not -1
The posix spec says strerror_r returns a positive error number,  not
-1 and set errno.

Test: bionic-unit-tests-static
Change-Id: I6a12d50d046f9caac299bf3bff63e6c9496c1b6f
2021-07-30 09:39:21 -07:00
Joel Galenson
e9898f393a Move the Rust system property bindings into librustutils.
Bug: 182498247
Test: Build
Change-Id: I688a1c7654d94b349b6903d9e7735656d31e7629
2021-07-29 15:55:07 -07:00
Florian Mayer
5d077fdeb0 Merge "Revert "Fix GWP hooks not being restored, leading to crashes."" am: bc1b267454 am: ff9895bde5
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1781388

Change-Id: Ib5ef42971118ae58040e5d6bd24d2e48adf22dea
2021-07-29 11:13:53 +00:00
Florian Mayer
ff9895bde5 Merge "Revert "Fix GWP hooks not being restored, leading to crashes."" am: bc1b267454
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1781388

Change-Id: Ia7165cbe6527a5db7d469b2dd05cce549b2474f6
2021-07-29 11:03:11 +00:00
Florian Mayer
bc1b267454 Merge "Revert "Fix GWP hooks not being restored, leading to crashes."" 2021-07-29 10:48:57 +00:00
Florian Mayer
b4ab4f6d43 Revert "Fix GWP hooks not being restored, leading to crashes."
This reverts commit 9db8f2bc87.

Reason for revert: b/194806683

Change-Id: If6a91f26af17ae7510417eb0d65a79dc7ae2e04e
2021-07-29 09:57:37 +00:00
Christopher Ferris
1ae77d0dbe Merge "Allow retry of test if log missing." am: 1e9af0f339 am: 7f3f153abd
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1780491

Change-Id: Iebbf9d433a25d23192a18c15d8e6dccde61dbf2d
2021-07-28 21:01:06 +00:00
Christopher Ferris
7f3f153abd Merge "Allow retry of test if log missing." am: 1e9af0f339
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1780491

Change-Id: I3394d3831075c2bc4721220c6b3d9e8a53d7e3df
2021-07-28 20:45:15 +00:00
Christopher Ferris
1e9af0f339 Merge "Allow retry of test if log missing." 2021-07-28 20:25:38 +00:00
Christopher Ferris
d9d9ee8466 Allow retry of test if log missing.
Refactor the code a bit to allow retrying if a log message is missing.
This is because there is a possibility of a log message getting dropped.
If that happens, merely rerun up to three times and pass if the missing
message is present.

Also fix a race condition that can occur if the LogReader threads are
being terminated but happen to be allocating memory while they are
in the signal handler. This situation causes aborts in the memory
allocator or a deadlock. Before this change, the verify_leak*
tests would fail in less than twenty iterations. After, I could run
for hundreds of iterations.

Bug: 193898572

Test: Ran unit tests in a loop.
Change-Id: I0fb5beab6041dcf3e3fd19f6748bb20bb81a2506
2021-07-27 18:39:56 -07:00
Florian Mayer
a47916052a Merge "Fix GWP hooks not being restored, leading to crashes." am: 0f75a5a416 am: bc5138280a
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1772825

Change-Id: I3bb37c8807e128799d40f51f949c4e5c5f87bb1e
2021-07-27 17:19:36 +00:00
Florian Mayer
bc5138280a Merge "Fix GWP hooks not being restored, leading to crashes." am: 0f75a5a416
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1772825

Change-Id: I9d896e108bd8b7edf59c8801df6b33fea7a07472
2021-07-27 17:00:24 +00:00
Florian Mayer
0f75a5a416 Merge "Fix GWP hooks not being restored, leading to crashes." 2021-07-27 16:41:30 +00:00
Florian Mayer
9db8f2bc87 Fix GWP hooks not being restored, leading to crashes.
If the DispatchReset fails, the subsequent iteration has the wrong
idea of what the "original" table is, and if a subsequent DispatchReset
succeeds it unhooks them.

Repro in https://r.android.com/1767868.

Bug: 193012939
Bug: 189776979
Change-Id: Ie0644412291d3b53dcf89cdd056e542d32822975
2021-07-27 13:00:23 +01:00
Colin Cross
f4a3f4bbf7 Merge "Export kernel headers for musl" am: a0f3478e75 am: ff4ecb5ddb
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1777005

Change-Id: I3f3cc0ee8de2405e43d65a12ed35e464c06f5854
2021-07-26 20:05:02 +00:00
Colin Cross
ff4ecb5ddb Merge "Export kernel headers for musl" am: a0f3478e75
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1777005

Change-Id: I953a7cf2990d3cb6f83d4ed15beb9c4b25387bff
2021-07-26 19:47:06 +00:00
Colin Cross
a0f3478e75 Merge "Export kernel headers for musl" 2021-07-26 19:31:54 +00:00
Christopher Ferris
653df690bb Merge "Read the log while test runs instead of after." am: e397e49aa7 am: 41c20fb8d7
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1775665

Change-Id: I713b646236a10a309234d3dfcd7bd7c627dbc0c1
2021-07-23 22:47:39 +00:00
Christopher Ferris
41c20fb8d7 Merge "Read the log while test runs instead of after." am: e397e49aa7
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1775665

Change-Id: I19f7634402b2c3faca0813578d4749550ee014b3
2021-07-23 22:15:35 +00:00
Colin Cross
5d50dbb5f0 Export kernel headers for musl
Musl will reuse bionic's kernel headers.

Bug: 190084016
Test: m libc_musl
Change-Id: Ie750556f9a055984eb9bab41fa61faa965f037e5
2021-07-23 15:01:58 -07:00
Christopher Ferris
e397e49aa7 Merge "Read the log while test runs instead of after." 2021-07-23 21:53:32 +00:00
Treehugger Robot
63e3f9b200 Merge "Rename cc_object default_shared_libs to system_shared_libs" am: 3367bf3412 am: 86c150bea1
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1773166

Change-Id: I63c089274e6e90965117497de054e7e9a4cfba35
2021-07-23 21:28:09 +00:00
Treehugger Robot
86c150bea1 Merge "Rename cc_object default_shared_libs to system_shared_libs" am: 3367bf3412
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1773166

Change-Id: I2d563a61b147b46cc479363058864c063f93257b
2021-07-23 21:25:06 +00:00
Treehugger Robot
3367bf3412 Merge "Rename cc_object default_shared_libs to system_shared_libs" 2021-07-23 21:18:51 +00:00
Christopher Ferris
4990c2dcbb Read the log while test runs instead of after.
These tests can be flaky if something is spamming the log and
expiring messages. Previously, the log wasn't read until the
forked process was complete. Now, two threads are spawned right
after the process forks to read the log while running. This
should avoid any problems if the log is being spammed while the
test runs.

In addition, fixed some potential flakiness in the test that might
occur if the test incorrectly gets stale log data.

Bug: 193898572

Test: All unit tests pass on cuttlefish (both 32 bit and 64 bit).
Test: Forced an abort and verified that the crash log reader sees
Test: the message.
Test: Verified that the log reader for the main and crash log properly
Test: read data.
Test: Verified the test passes while swamping the log by running
Test: the log unit tests while running two copies of the system
Test: tests.
Change-Id: I68bd92a8c483eac0146ada87dd4201dda0902c49
2021-07-23 11:48:29 -07:00
Bowgo Tsai
b6cb168674 [automerger skipped] Revert "Adding system property tracing" am: c75fbc7b8a -s ours
am skip reason: Merged-In Ic7a83fb01a39113d408ed0c95d27f694d5a2649c with SHA-1 61a5a8380d is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15353073

Change-Id: Ifc84eb104986969ff7f5da61adf2713e75d28d57
2021-07-23 18:12:40 +00:00
Bowgo Tsai
9a2d3cac37 [automerger skipped] Revert "bionic_systrace: moving global static variables" am: 2ebdb61620 -s ours
am skip reason: Merged-In If59e3dc25684a3c2b1d3ff74f995311afe6c6e89 with SHA-1 3ec21f527a is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15353072

Change-Id: Ied2856102c8310ccae1d63e213b602e0e5ab4b5c
2021-07-23 18:12:39 +00:00
Joel Galenson
11fa022647 Merge changes from topic "rust-property-bindings" am: a67c7fdca8 am: 0504d629aa
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1773608

Change-Id: I396b2c42804abf0b3f260db2610aa2158a6fd90d
2021-07-23 15:22:21 +00:00
Joel Galenson
75989112f5 Migrate keystore2's Rust system library bindings to bionic. am: e1f1e79310 am: 13e81f8712
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1773607

Change-Id: Ic13580d7167049288dbb0c30bf6cd3718fcd2543
2021-07-23 15:22:19 +00:00
Joel Galenson
0504d629aa Merge changes from topic "rust-property-bindings" am: a67c7fdca8
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1773608

Change-Id: I89e98a821a6ca7735b0f7e1e2b24e9a8836d9f76
2021-07-23 15:04:57 +00:00
Joel Galenson
13e81f8712 Migrate keystore2's Rust system library bindings to bionic. am: e1f1e79310
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1773607

Change-Id: I6e088ac03ce5e98a81b335456fd6f6a43269ac05
2021-07-23 15:04:54 +00:00
Joel Galenson
a67c7fdca8 Merge changes from topic "rust-property-bindings"
* changes:
  Improve the Rust property bindings.
  Migrate keystore2's Rust system library bindings to bionic.
2021-07-23 14:46:55 +00:00
Christopher Ferris
b7b14b73b0 Merge "Fix NOTICE file." am: e780ad0c24 am: 103efe0c08
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1775588

Change-Id: I0e84b6e3899f790009f42445f8d074905442a2a5
2021-07-23 05:57:17 +00:00
Christopher Ferris
103efe0c08 Merge "Fix NOTICE file." am: e780ad0c24
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1775588

Change-Id: I55dc3bb98b057fe0e2b257dada9c142b58d40d67
2021-07-23 05:38:42 +00:00
Christopher Ferris
e780ad0c24 Merge "Fix NOTICE file." 2021-07-23 05:19:07 +00:00
Christopher Ferris
5c49616f70 Fix NOTICE file.
Test: Uploads.
Change-Id: I23fb9413dd62aa06ffa26e5e7fc0f7e26fa8cde4
2021-07-22 22:37:19 +00:00
Colin Cross
02f813703a Rename cc_object default_shared_libs to system_shared_libs
default_shared_libs has been removed, go back to the system_shared_libs
property that now has the same behavior.

Bug: 193559105
Test: m checkbuild
Change-Id: I9edac93f7e6d9d4b99883b7a7b14ab52942c0ef2
2021-07-22 12:02:10 -07:00
Treehugger Robot
a9519cd8bc Merge "Move system_shared_libs into target.bionic clause" am: 2ffa0eb7d3 am: 9328d2f1d8
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1764658

Change-Id: Ie784751c7ec83aea0a00b2133e0402a7877d30e6
2021-07-22 19:00:11 +00:00