This test has been said to be flaky, and I suppose it could be if
it somehow regularly manages to tick a second in between the two calls
to wfTimestampNow(). So let's make just one call and reuse the value to
see if that fixes it.
Bug: T232266
Change-Id: I8fbdfa2f906839423cc238cd3741b94435a84505
RandomImageGenerator::getRandomLines() is trying to select a random
subset of lines from a dictionary file, but the algorithm has a few bugs
that cause it to potentially leave entries in the returned array as null
and to be biased against the first few lines in the file.
This patch corrects the bugs to implement a Fisher–Yates (or Knuth)
shuffle,[1] run in reverse so that N does not need to be known ahead of
time and only maintaining the desired subset of the array in memory.
In local testing over many trials, it has produced output without nulls
100% of the time and the aggregate results do not have any obvious bias.
[1]: https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle
Bug: T222416
Change-Id: If136928bda2165198d3957a3536de85d465321fc
Deprecate mBlock, mBlockedby and mHideName as public properties,
since they allow the user to be put into an inconsistent state.
These properties were previously used by now-deprecated hooks
(bf5464614b, af24fc1a7a) and tests.
Bug: T229035
Change-Id: Ia657eaf8b5e4a77ff9df84eb706de1030e17c3bd
This is to ensure that the CI job is working with the new version.
Note: redundant_condition_detection should have worked as expected by
this version, but unfortunately it still has false positives.
Bug: T235049
Bug: T231636
Change-Id: Idaba6584cb5b2ff19b6455c7bbec6b89619ddbff
* Only call FileBackend::clearCache() only specific file paths.
Make FSFileBackend respect specific path lists in doClearCache().
* Detect FSFileBackendList errors during initialization rather than
doing additional stat calls beforehand.
* Simplify FSFileBackend::doPrepareInternal() by removing is_readable()
check as well as is_writable() when mkdir() was just successfully run.
* Simplify FSFileBackend::isPathUsableInternal() to just look at the
parent directory (more likely to exist and be cacheable). Since files
are renamed into place, there isn't much need to sanity check the
target file path itself.
* Add a process cache for "usable directories" to FSFileBackend.
* Use is_dir() in TempFSFile to avoid triggering access() syscalls
each time.
Change-Id: Ib2c76f4c4117b9beffd89370498aa57b5972f167