Changeset: 86aaccb85197 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=86aaccb85197 Modified Files: testing/Mtest.py.in Branch: Jan2014 Log Message:
Try to recognize unreleased sockets during testing. diffs (72 lines): diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in --- a/testing/Mtest.py.in +++ b/testing/Mtest.py.in @@ -2083,6 +2083,8 @@ def RunTest(env, TST, BusyPorts, COND, o errcode = F_SEGV elif tres == 'abort': errcode = F_ABRT + elif tres == 'socket': + errcode = F_SOCK elif tres == 'error': errcode = F_WARN elif tres is not None: @@ -2105,6 +2107,12 @@ def RunTest(env, TST, BusyPorts, COND, o ##rm -f .new.left-over.tmp.bats. $TSTTRGBASE/Tests/.old.left-over.tmp.bats. ##if [ -f .all.left-over.tmp.bats. ] ; then mv -f .all.left-over.tmp.bats. $TSTTRGBASE/Tests/.old.left-over.tmp.bats. ; fi + if tres == 'socket': + if quiet: + STDOUT.write("\n%s : Socket!\n" % TST) + elif verbose: + STDOUT.write("(Socket!) ") + if tres == 'timeout': if quiet: STDOUT.write("\n%s : Timeout!\n" % TST) @@ -2343,7 +2351,9 @@ def RunTest(env, TST, BusyPorts, COND, o FailedOut, FailedErr) if not verbose and not quiet: - if tres == 'timeout': + if tres == 'socket': + STDOUT.write("%sSOCKET%s" % (PURPLE, BLACK)) + elif tres == 'timeout': STDOUT.write("%sTIMEOUT%s" % (PURPLE, BLACK)) elif tres == 'recursion': STDOUT.write("%sRECURSION%s" % (PURPLE, BLACK)) @@ -2964,22 +2974,20 @@ def DoIt(env, SERVER, CALL, TST, EXT, PR return None # Try to detect segfaults and the like - TO = re.compile("(^(|[^#]*[\t ])((Memory|Segmentation) [Ff]ault|Bus [Ee]rror|Aborted|Assertion (|.* )failed[:\.]|!FATAL: BATSIGabort:)([ \t]|$))", re.MULTILINE) - # FIXME: this begs for a much nicer solution (100% copy of below) - for f in (TestErrFile, TestOutFile): - if os.path.isfile(f): - for l in open(f): - if TO.search(l): - return 'segfault' - # Try to detect aborts due to too deep recursion - TO = re.compile("aborted too deep recursion", re.MULTILINE) - # FIXME: this begs for a much nicer solution (100% copy of above) - for f in (TestErrFile, TestOutFile): - if os.path.isfile(f): - for l in open(f): - if TO.search(l): - return 'recursion' + for (regexp, msg) in [("(^(|[^#]*[\t ])((Memory|Segmentation) [Ff]ault|Bus [Ee]rror|Aborted|Assertion (|.* )failed[:\.]|!FATAL: BATSIGabort:)([ \t]|$))", + 'segfault'), + ("aborted too deep recursion", + 'recursion'), + ("mal_mapi\.listen:operation failed: bind to stream socket port", + 'socket')]: + TO = re.compile(regexp, re.MULTILINE) + # FIXME: this begs for a much nicer solution (100% copy of below) + for f in (TestErrFile, TestOutFile): + if os.path.isfile(f): + for l in open(f): + if TO.search(l): + return msg return None _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list