History log of /bionic/tests/gtest_main.cpp
Revision Date Author Comments
5cec377f49d6429b19895eb632225cd757ea611e 20-Jan-2018 Elliott Hughes <enh@google.com> Address a bunch of clang-tidy complaints.

There were a bunch more unreasonable/incorrect ones, but these ones
seemed legit. Nothing very interesting, though.

Bug: N/A
Test: ran tests, benchmarks
Change-Id: If66971194d4a7b4bf6d0251bedb88e8cdc88a76f
cabc77f9172d74ff0bfc56d0797a6a8255b14f2a 28-Nov-2017 Elliott Hughes <enh@google.com> Always wrap waitpid in TEMP_FAILURE_RETRY.

Strictly not needed in the WNOHANG case, but it's probably best to have
every waitpid wrapped for future copy & pasters.

Bug: https://issuetracker.google.com/69525592
Test: ran tests
Change-Id: I013b0a52d2753e3d32638e9b84c79af7327fb405
5e235c85bb216193407bb065ac7b1be06cb87d68 17-Nov-2017 Yabin Cui <yabinc@google.com> Fix support for typed tests and parameterized tests.

Bug: http://b/69425095
Test: run bionic_unit_tests --bionic-selftest
Change-Id: Ifa23288f2ad84978b7748da0ea93d650fae926a8
10ba4bd6d1e99faf05f058ab0de7708210d1f33e 14-Nov-2017 Elliott Hughes <enh@google.com> Reduce unnecessary quoting for --gtest_filter.

Use posix_spawn rather than popen, to remove a surprising extra shell.

Bug: http://b/68949647
Test: /data/nativetest64/bionic-unit-tests/bionic-unit-tests --gtest_filter=stdio.swprintf_1$ju_UINTMAX_MAX
Change-Id: Id90afab04ee799932de9f5ca7e580e61ecfde7a4
b09c4fc95793953cca7aa5ca49519b2a83c4bf19 22-Jul-2017 Elliott Hughes <enh@google.com> Make xfail passes not failures.

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

(cherry picked from commit 93a89f84e4616070bccfc1c9c898b5e88f1c21d6)

Change-Id: I63dff7748cbc4b3c1822a16c8bb9c839d148695b
93a89f84e4616070bccfc1c9c898b5e88f1c21d6 22-Jul-2017 Elliott Hughes <enh@google.com> Make xfail passes not failures.

Bug: http://b/63703384
Test: ran tests
Change-Id: I02dfc92cfc0e07831b8f3a974803be384bc02f1e
828b9e162feaaa75692aa697649f40228df1695f 11-May-2017 wy <yawanng@google.com> Fix clang-tidy perfomrance warnings.

Change-Id: Ibf3d32a5ba1cb70158d857be3d20aa3d1a870341
Test: build with WITH_TIDY=1
5b2cd3a358dd45d28d794858f29f98b1d7d9d9df 16-Mar-2017 Dimitry Ivanov <dimitry@google.com> Use libbase for realpath and dirname

Test: run bionic-unit-tests
Bug: http://b/31396973
Change-Id: Ie8dc60348b9c57892a77be6a24dadb42241f6b62
7d15dc388a5fb3d3e6f5097232d82ab2b9fe7ad2 14-Mar-2017 Josh Gao <jmgao@google.com> 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
010522229c2a984d3e553e244da67b449b9638d4 10-Jan-2017 Josh Gao <jmgao@google.com> Add support for expected failures to gtest runner.

Bug: http://b/33251022
Test: manually added tests that unexpectedly failed
Test: bionic-unit-tests/bionic-unit-tests64 on bullhead
Change-Id: Ie9aef80014b9fd6512b68f0e42abc298732a9b6e
c641a9583490559f58908b4cb236b9b2c8d0fe1f 12-Dec-2016 Yabin Cui <yabinc@google.com> Fix gtest_filter of bionic gtest runner.

Bug: http://b/29514723
Test: run bionic-unit-tests --gtest-filter='*grp*'
Change-Id: I45ed561702bd601bae84c8d77824aa5769dbfa9c
cf754620120c43c286801a457232e8837cbc17fc 10-Dec-2016 Yabin Cui <yabinc@google.com> Fix the way to find negative filter pattern.

Bug: http://b/29514723
Test: run CtsBionicTestCases --gtest_filter=-Fortify2_clang.strncpy --gtest_list_tests
Change-Id: Ia3adec1fc03252adee4aed238b9c88508da17faf
d0b5c3ad65accd2c0298edbdfd527ede63e68ba1 25-Nov-2016 Dimitry Ivanov <dimitry@google.com> Fix bionic-unit-tests-glibc

Also add another test for dlsym(RTLD_NEXT, ..)

Bug: http://b/33106624
Test: run bionic-unit-tests-glibc and bionic-unit-tests
Change-Id: I340165d66bf2360b0e3273d3561a08cb5e7bd025
48de71e3cce640e0f78c6cb203952eba518a772c 28-Oct-2016 Elliott Hughes <enh@google.com> Show amount of parallelism in gtest output.

Bug: http://b/19075519
Test: ran tests
Change-Id: Ia190f728cc28e2283636e9cfea927e525d6c10c8
a36e59bb9973aaae2e3487e0bfadd1f79814097e 01-Sep-2016 Dimitry Ivanov <dimitry@google.com> Move test libraries under /data/nativetests

Move libraries used in bionic-unit-tests out of system partition to
/data/nativetests../bionic-loader-test-libs

Bug: http://b/22182538
Test: build bionic and run bionic-unit-tests
Change-Id: I170177bef782839d0b4970ae4418bf54d0a77836
a456fae45f608e10499ac27fca8b37ef48378b34 31-Aug-2016 Elliott Hughes <enh@google.com> 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
554374693408cd7c74d0cae596fca7349661edea 21-Jul-2016 Dimitry Ivanov <dimitry@google.com> Pass argc/argv/envp to dso constructors

The glibc implementation of the loader passes argc/argv/envp
to all elf constructors. This change makes bionic linker
behave in the same way.

Bug: http://b/30145768
Change-Id: I1c65c42aa5305a5b133c64b5748205bbde869e0e
Test: run bionic-unit-tests --gtest_filter=dl*:Dl*
dcaef3710df817db5652a1f3ab4646f43f5cd3ee 17-May-2016 Dimitry Ivanov <dimitry@google.com> Fix dlopen of main executable by absolute path

This CL adds initialization of inode for the main executable
which enables linker to resolve the correct soinfo when
application calls dlopen with absolute path to the
main executable.

Bug: http://b/28420266
Change-Id: I102e07bde454bd44c6e46075e3faeeb5092830d8
(cherry picked from commit 2ba1cf39ae6087249a839ec7b3793d4d4fa75438)
2ba1cf39ae6087249a839ec7b3793d4d4fa75438 17-May-2016 Dimitry Ivanov <dimitry@google.com> Fix dlopen of main executable by absolute path

This CL adds initialization of inode for the main executable
which enables linker to resolve the correct soinfo when
application calls dlopen with absolute path to the
main executable.

Bug: http://b/28420266
Change-Id: I102e07bde454bd44c6e46075e3faeeb5092830d8
d17a377c49201bd5f0e4c71d84f1ce25a86642de 01-Mar-2016 Dimitry Ivanov <dimitry@google.com> linker: print "not accessible" error message to the log

Print properties of the namespace on "library is not accessible"
error to better diagnose problems with native library accessiblity

Bug: http://b/27406143
Change-Id: Icf3d6c604f09dfa015de863fdb1267d343930d2a
(cherry picked from commit 350bdad61cc6551db649fcaeb8642f4a1d6b139a)
350bdad61cc6551db649fcaeb8642f4a1d6b139a 01-Mar-2016 Dimitry Ivanov <dimitry@google.com> linker: print "not accessible" error message to the log

Print properties of the namespace on "library is not accessible"
error to better diagnose problems with native library accessiblity

Bug: http://b/27406143
Change-Id: Icf3d6c604f09dfa015de863fdb1267d343930d2a
09a99641ecda72a0b08951db56bbdb0255a4a105 14-Jan-2016 Dan Albert <danalbert@google.com> Escape failure messages in XML test output.

The gtest XML format requires escaped HTML characters in the test
results.

Change-Id: Ieb9519a55cb52093dfb10a88e883b569bc372cdb
a2b22263f6ad2d2bf253399151b0b72c19b7e060 04-Dec-2015 Yabin Cui <yabinc@google.com> Don't use StringPrintf() in gtest runner.

Change-Id: I0cd0b3cbb952c65b1c449e88ce12964b93029538
a32fc8685dc0b81f9e10d99fdb248f33c0fa05f7 04-Dec-2015 Yabin Cui <yabinc@google.com> Don't use StringPrintf() in gtest runner.

Change-Id: I0cd0b3cbb952c65b1c449e88ce12964b93029538
d4c9b9d5ac3438d34536613143bbe63374e586f1 17-Nov-2015 Yabin Cui <yabinc@google.com> Improve unit test runner.

1. Read unit test's output while the test is running. Previously
we only read output when the test finishes, which has trouble
when the test outputs too many stuff.
2. Report failed unit test's exit code. It is useful when the
test doesn't fail in ASSERT_xxx, but in somewhere else.

Bug: 25392375
Change-Id: Ie90823337f7c2ee25fa489a5534801d991258f95
bc6379d7da110d9164d5b34cdbebff2e4fc487b8 07-Oct-2015 Yabin Cui <yabinc@google.com> Remove the workaround which fixes JOB_COUNT in CTS test.

Bug: 24376925
Change-Id: Ib195ce1577ee9412068cc1b6223fc051b5bcfcaa
0b2acdfcc99ecf3ff36fc6337e14b171170f38cf 03-Oct-2015 Elliott Hughes <enh@google.com> Use const auto& in for loops.

Change-Id: Ic437c59797ee4e7dc38291da35c72d827bc89c8d
93a91f0cf4f015762ac1ed57395c4c0de8ba7db3 25-Sep-2015 Christopher Ferris <cferris@google.com> Force cts to only run one test at a time.

Also, slightly increase the timeout for each test run.

Bug: 24198050

(cherry picked from commit daaaed18ce1d2f2da9d2240e974922299d937670)

Change-Id: I29e169e962da803a89abf0a28e071abcafa315b7
daaaed18ce1d2f2da9d2240e974922299d937670 25-Sep-2015 Christopher Ferris <cferris@google.com> Force cts to only run one test at a time.

Also, slightly increase the timeout for each test run.

Bug: 24198050
Change-Id: I2b0ebdebb909023d0f179e0a433c564266a99161
767fb1c5c685be7a044199a93e0faea2ca88206e 02-Sep-2015 Yabin Cui <yabinc@google.com> build bionic gtest runner on mac.

Change-Id: I39a7e94b6662256646dfaeb8f9ecd5c03cd5fbc6
bf830ade7f4d45ab884b8c56631db7d7b4b5c077 10-Aug-2015 Yabin Cui <yabinc@google.com> Omit comment when reading --gtest_list_tests option's output.

Gtest add comments when listing typed tests. And we should omit them.

Bug: 23040880
Change-Id: If6034af301337fc06eeab294d2dbe5317a6b7f91
119cb55d43304579af741d8dbc3ca701b97bbf70 02-Apr-2015 Christopher Ferris <cferris@google.com> gtest_repeat should allow negative values.

If you pass in a negative value to gtest_repeat, it should run forever.
The new runner didn't allow this, now it does.

Change-Id: Ie0002c12e2fdad22b264adca37c165cfcfe05c7a
64a9c4f697a2588bbcfb20534b8b15b823595d1f 13-Mar-2015 Yabin Cui <yabinc@google.com> Make gtest_main exit 1 when some test are failed.

This is the gtest behavior, which I think can make test status
judgement more convenient.

Change-Id: I7d3c210d1744b954a4148cd905dd5c353207fce8
f6237470a3f5ce801b5df2500f3d0ffb1aec4515 27-Feb-2015 Yabin Cui <yabinc@google.com> Make bionic gtest main be compatible with gtest output format for cts test.

Bug: 17589740
Change-Id: Ifab521da379a33bf0a7bf11c21386f936f0d494c
ea9c933f360cc07b821b542321309c65cceddbfc 24-Feb-2015 Yabin Cui <yabinc@google.com> Make all output of child test go to parent process in gtest_main.

Change-Id: Iad460e89755051cdb99593cbf42c97d9a359f32b
ead08148bdfe880f40c457d923e6456044196fc7 05-Feb-2015 Yabin Cui <yabinc@google.com> Add path separator in bionic-unit-tests program path.

Bug: 19220800
Change-Id: I4245b1270363544cd5f083fe7ea7d9b11b46cdc0
1d4c780a2e1fe81cf3ea35ba0641dd14744c142a 03-Feb-2015 Yabin Cui <yabinc@google.com> Add signal handling in bionic gtest main.

The two bugs are very closely related and code amount is very small,
So I think they may be fixed in one change.

Bug: 19128558
Bug: 19129994
Change-Id: I44a35398e64dfca7e9676428cb8f4026e8f6e488
11c4353cdd9f78bdb36837ab0c97c41bb46d49ed 28-Jan-2015 Yabin Cui <yabinc@google.com> Add --gtest-filter as synonym for --gtest_filter in bionic gtest main.

Bug: 19130480
Change-Id: I0d3df70ee8f692581cc4b9b742c5f347259fd0d2
0bc4e9697e75acae012f54352887bba885cf923f 27-Jan-2015 Yabin Cui <yabinc@google.com> Fix parse of gtest_filter in bionic gtest main.

Bug: 19130330
Change-Id: Id6a60570a8aab6ae7259ff228b3801285b378f77
4a82ede75449deb1f554ef95b7ce2e4cd2b5d072 27-Jan-2015 Yabin Cui <yabinc@google.com> Rename "TIMEWARN" to "SLOW" in bionic gtest.

Bug: 19109188.
Change-Id: Idfe769ac652bf37642da24e4abb6061ca861d57e
657b1f9befa56251a39eec1b0624a00c5f068f57 23-Jan-2015 Yabin Cui <yabinc@google.com> Support --gtest_ouput option in bionic gtest main.

Bug: 19109500
Change-Id: Ib18f90ad522e66ea62dd4e02e314585d9b36e15f
516eb531137a50e2fd82108c5b7a43b87c103312 20-Jan-2015 Yabin Cui <yabinc@google.com> Remove testcase time printing in bionic-unit-tests.

Bug: 19075565
Change-Id: Icccb60657a2985e96abb1703673f0ebe2199586a
be837360c38d365c2d5e70f87fae1a42c520acb0 03-Jan-2015 Yabin Cui <yabinc@google.com> Make bionic-unit-tests default run isolate mode.

Fix bug of handling signal terminated tests.

Bug: 17589740
Bug: 18951146
Change-Id: I4803382b26cd5454693090202b3ba38e3dbe66e5
294d1e2c9e17873a0ce1c23cb2a559fc04f610be 08-Dec-2014 Yabin Cui <yabinc@google.com> better gtest runner for bionic

1. option to run each test in a separate forked process: "--isolate".
2. warnings about slow tests: "--warnline".
3. run multiple tests at the same time: "-j N".

Bug: 17589740
Change-Id: Ife5f4cafec43aa051ad7bd9c9b2b7e2e437db0de