mdbx-test: more probability of zero-window (i.e. flipcoin_x4) for ttl and nested testcases.

Change-Id: Ida539a080f86e046c7f10320b504d58219560c3d
This commit is contained in:
Leonid Yuriev 2019-10-19 00:21:23 +03:00
parent 4e386be914
commit 7681132704
2 changed files with 4 additions and 2 deletions

View File

@ -247,7 +247,8 @@ bool testcase_nested::run() {
while (should_continue()) {
const uint64_t salt = prng64_white(seed) /* mdbx_txn_id(txn_guard.get()) */;
const unsigned window_width = edge2window(salt, window_max);
const unsigned window_width =
flipcoin_x4() ? 0 : edge2window(salt, window_max);
const unsigned head_count = edge2count(salt, count_max);
log_debug("nested: step #%zu (serial %" PRIu64
", window %u, count %u) salt %" PRIu64,

View File

@ -80,7 +80,8 @@ bool testcase_ttl::run() {
while (should_continue()) {
const uint64_t salt = prng64_white(seed) /* mdbx_txn_id(txn_guard.get()) */;
const unsigned window_width = edge2window(salt, window_max);
const unsigned window_width =
flipcoin_x4() ? 0 : edge2window(salt, window_max);
unsigned head_count = edge2count(salt, count_max);
log_debug("ttl: step #%zu (serial %" PRIu64
", window %u, count %u) salt %" PRIu64,