A totally green build, right?
https://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/318975
But from
https://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/318975/steps/sql_unittests%20%28with%20patch%29%20on%20Mac-10.9/logs/stdio
[ RUN ] SQLRecoveryTest.AttachFailure
[17256:1287:1019/203115:9039693390179:ERROR:connection.cc(1892)] SQLTest.db sqlite error 26, errno 0: file is encrypted or is not a database, sql: PRAGMA auto_vacuum
[17256:1287:1019/203115:9039693506453:ERROR:connection.cc(1892)] SQLTest.db sqlite error 26, errno 0: file is encrypted or is not a database, sql: PRAGMA journal_mode = TRUNCATE
[17256:1287:1019/203115:9039693609199:ERROR:connection.cc(1892)] SQLTest.db sqlite error 26, errno 0: file is encrypted or is not a database, sql: SELECT name FROM sqlite_master WHERE type=? AND name=? COLLATE NOCASE
[17256:1287:1019/203115:9039693737699:ERROR:connection.cc(1892)] SQLTest.db sqlite error 26, errno 0: file is encrypted or is not a database, sql: SELECT COUNT(*) FROM sqlite_master
[17256:1287:1019/203115:9039694023726:ERROR:connection.cc(1892)] sqlite error 26, errno -2: file is encrypted or is not a database, sql: ATTACH DATABASE ? AS ?
../../base/test/histogram_tester.cc:59: Failure
Expected: (static_cast<base::HistogramBase*>(__null)) != (histogram), actual: NULL vs NULL
Histogram "Sqlite.RecoveryEvents" does not exist.
[ FAILED ] SQLRecoveryTest.AttachFailure (3 ms)
[75/76] SQLRecoveryTest.AttachFailure (3 ms)
[76/76] SQLMemoryDumpProviderTest.OnMemoryDump (0 ms)
Retrying 1 test (retry #1)
[77/77] SQLRecoveryTest.AttachFailure (9 ms)
SUCCESS: all tests passed.
Every time. Running things locally:
./out/Default/sql_unittests # FAIL, but success on retry.
./out/Default/sql_unittests --single-process-tests # success first time.
./out/Default/sql_unittests --gtest_filter=SQLRecoveryTest.* # FAIL
./out/Default/sql_unittests --gtest_filter=SQLRecoveryTest.AttachFailure # success first time.
The gist of this test is:
base::HistogramTester tester;
// Call some code.
tester.ExpectBucketCount(kEventHistogramName, kEventEnum, 1);
Where it's testing that UMA_HISTOGRAM_ENUMERATION() recorded once under the name for the value.
I think what's happening is that state in the histogram system is different when it's running with other tests or not. But as of yet my mental model can't explain the --single-process-tests success, as this is the last test in the code, so if previous tests mess up state then I'm not sure why it works right both when all the tests run in the same process and when only one test runs in the process.
Comment 1 by bugdroid1@chromium.org
, Oct 25 2016