Commit d9841039 authored by Neal Norwitz's avatar Neal Norwitz

Don't ever report a failure when the sum of the reference count differences

are zero.  This should help reduce the false positives.

The message about references leaking is maintained to provide as much
info as possible rather than simply suppressing the message at the source.
parent 360496d9
...@@ -682,9 +682,10 @@ def dash_R(the_module, test, indirect_test, huntrleaks): ...@@ -682,9 +682,10 @@ def dash_R(the_module, test, indirect_test, huntrleaks):
deltas.append(sys.gettotalrefcount() - rc - 2) deltas.append(sys.gettotalrefcount() - rc - 2)
print >> sys.stderr print >> sys.stderr
if any(deltas): if any(deltas):
print >> sys.stderr, test, 'leaked', deltas, 'references' msg = '%s leaked %s references, sum=%s' % (test, deltas, sum(deltas))
print >> sys.stderr, msg
refrep = open(fname, "a") refrep = open(fname, "a")
print >> refrep, test, 'leaked', deltas, 'references' print >> refrep, msg
refrep.close() refrep.close()
def dash_R_cleanup(fs, ps, pic): def dash_R_cleanup(fs, ps, pic):
......
...@@ -192,7 +192,7 @@ if [ $err = 0 -a "$BUILD_DISABLED" != "yes" ]; then ...@@ -192,7 +192,7 @@ if [ $err = 0 -a "$BUILD_DISABLED" != "yes" ]; then
## ensure that the reflog exists so the grep doesn't fail ## ensure that the reflog exists so the grep doesn't fail
touch $REFLOG touch $REFLOG
$PYTHON $REGRTEST_ARGS -R 4:3:$REFLOG -u network $LEAKY_SKIPS >& build/$F $PYTHON $REGRTEST_ARGS -R 4:3:$REFLOG -u network $LEAKY_SKIPS >& build/$F
NUM_FAILURES=`egrep -vc "$LEAKY_TESTS" $REFLOG` NUM_FAILURES=`egrep -vc "($LEAKY_TESTS|sum=0)" $REFLOG`
update_status "Testing refleaks ($NUM_FAILURES failures)" "$F" $start update_status "Testing refleaks ($NUM_FAILURES failures)" "$F" $start
mail_on_failure "refleak" $REFLOG mail_on_failure "refleak" $REFLOG
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment