[qa] Test non-atomic chainstate writes
commit176c021d085f5a45bc9e038e760942aa648dd797
authorSuhas Daftuar <sdaftuar@gmail.com>
Thu, 15 Jun 2017 21:08:48 +0000 (15 17:08 -0400)
committerPieter Wuille <pieter.wuille@gmail.com>
Mon, 26 Jun 2017 21:48:42 +0000 (26 14:48 -0700)
treecd057e23d8dedece53ffa4db73efa245c204b796
parentd6af06d68aae985436cbc942f0d11078041d121b
[qa] Test non-atomic chainstate writes

Adds new functional test, dbcrash.py, which uses -dbcrashratio to exercise the
logic for recovering from a crash during chainstate flush.

dbcrash.py is added to the extended tests, as it may take ~10 minutes to run

Use _Exit() instead of exit() for crash simulation

This eliminates stderr output such as:
    terminate called without an active exception
or
    Assertion failed: (!pthread_mutex_destroy(&m)), function ~recursive_mutex, file /usr/local/include/boost/thread/pthread/recursive_mutex.hpp, line 104.

Eliminating the stderr output on crash simulation allows testing with
test_runner.py, which reports a test as failed if stderr is produced.
src/txdb.cpp
test/functional/dbcrash.py [new file with mode: 0755]
test/functional/test_framework/util.py
test/functional/test_runner.py