提交 f9ba79ec 编写于 作者: S sdong

crash_test to trigger fail points other than file appending more frequently

Summary:
For half of the crash_test run, disable fail point for file appending, in order to trigger other fail point more frequently.
Also, tune crash test parameter a little bit for it to initialize faster.

Test Plan: Run crash_test and make sure it issues db_stress commands as expected.

Reviewers: yhchiang, igor, rven, anthony, IslamAbdelRahman, kradhakrishnan

Reviewed By: kradhakrishnan

Subscribers: leveldb, dhruba

Differential Revision: https://reviews.facebook.net/D48843
上级 2f2de338
......@@ -71,6 +71,7 @@ def main(argv):
total_check_mode = 4
check_mode = 0
kill_mode = 0
test_tmpdir = os.environ.get("TEST_TMPDIR")
if test_tmpdir is None or test_tmpdir == "":
......@@ -83,7 +84,19 @@ def main(argv):
killoption = ""
if check_mode == 0:
# run with kill_random_test
killoption = " --kill_random_test=" + str(kill_random_test)
if kill_mode == 0:
killoption = " --kill_random_test=" + str(kill_random_test)
elif kill_mode == 1:
# Remove kill point for normal reads and reduce kill odds
# by 3, so that it still runs about one minutes in average
# before hitting a crash point.
killoption = " --kill_random_test=" + \
str(kill_random_test / 3 + 1)
killoption += \
" --kill_prefix_blacklist=WritableFileWriter::Append," \
"WritableFileWriter::WriteBuffered"
# Run kill mode 0 and 1 by turn.
kill_mode = (kill_mode + 1) % 2
# use large ops per thread since we will kill it anyway
additional_opts = "--ops_per_thread=" + \
str(100 * ops_per_thread) + killoption
......@@ -133,6 +146,8 @@ def main(argv):
--filter_deletes=%s
--memtablerep=skip_list
--prefix_size=0
--nooverwritepercent=1
--log2_keys_per_lock=10
%s
""" % (threads,
write_buf_size,
......@@ -172,6 +187,8 @@ def main(argv):
--filter_deletes=%s
--memtablerep=prefix_hash
--prefix_size=7
--nooverwritepercent=1
--log2_keys_per_lock=10
%s
""" % (random.randint(0, 1),
threads,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册