[Fix whilebox crash test failure]

Summary:
I think the check for "error" that I added had caused
false alarm. Fixed that.

Test Plan:
Revert Plan: OK

Task ID: #

Reviewers: emayanke, dhruba

Reviewed By: emayanke

Differential Revision: https://reviews.facebook.net/D11139
main
Vamsi Ponnekanti 12 years ago
parent e982b5a489
commit 3bb9449906
  1. 4
      Makefile
  2. 13
      tools/db_crashtest2.py

@ -120,10 +120,10 @@ ldb_tests: all $(PROGRAMS) $(TOOLS)
crash_test: blackbox_crash_test whitebox_crash_test
blackbox_crash_test: db_stress
python tools/db_crashtest.py
python -u tools/db_crashtest.py
whitebox_crash_test: db_stress
python tools/db_crashtest2.py
python -u tools/db_crashtest2.py
valgrind_check: all $(PROGRAMS) $(TESTS)
echo TESTS THAT HAVE VALGRIND ERRORS > $(VALGRIND_DIR)/valgrind_failed_tests; \

@ -111,12 +111,19 @@ def main(argv):
expected = True
if not expected:
print "TEST FAILED!!!\n"
print "TEST FAILED. See kill option and exit code above!!!\n"
sys.exit(1)
stdoutdata = stdoutdata.lower()
if ('error' in stdoutdata) or ('fail' in stdoutdata):
print "TEST FAILED!!!\n"
errorcount = (stdoutdata.count('error') -
stdoutdata.count('got errors 0 times'))
print "#times error occured in output is " + str(errorcount) + "\n"
if (errorcount > 0):
print "TEST FAILED. Output has 'error'!!!\n"
sys.exit(2)
if (stdoutdata.find('fail') >= 0):
print "TEST FAILED. Output has 'fail'!!!\n"
sys.exit(2)
time.sleep(1) # time to stabilize after a kill

Loading…
Cancel
Save