Allow to disable the multithread mode

Use the --test-io-cache=1 option to use a special
monothread mode.
This commit is contained in:
Andrea Mazzoleni 2016-03-15 22:40:13 +01:00
parent 1ed5a25f79
commit fe3ad31cbb
6 changed files with 350 additions and 142 deletions

View file

@ -803,7 +803,7 @@ int main(int argc, char* argv[])
break;
case OPT_TEST_IO_CACHE :
opt.io_cache = atoi(optarg);
if (opt.io_cache < IO_MIN || opt.io_cache > IO_MAX) {
if (opt.io_cache != 1 && (opt.io_cache < IO_MIN || opt.io_cache > IO_MAX)) {
/* LCOV_EXCL_START */
log_fatal("The IO cache should be between %u and %u.\n", IO_MIN, IO_MAX);
exit(EXIT_FAILURE);