[Python-checkins] r55241 - in python/trunk: Lib/test/regrtest.py Misc/build.sh

neal.norwitz python-checkins at python.org
Fri May 11 07:55:16 CEST 2007


Author: neal.norwitz
Date: Fri May 11 07:55:15 2007
New Revision: 55241
Modified:
 python/trunk/Lib/test/regrtest.py
 python/trunk/Misc/build.sh
Log:
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.
Modified: python/trunk/Lib/test/regrtest.py
==============================================================================
--- python/trunk/Lib/test/regrtest.py	(original)
+++ python/trunk/Lib/test/regrtest.py	Fri May 11 07:55:15 2007
@@ -682,9 +682,10 @@
 deltas.append(sys.gettotalrefcount() - rc - 2)
 print >> sys.stderr
 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")
- print >> refrep, test, 'leaked', deltas, 'references'
+ print >> refrep, msg
 refrep.close()
 
 def dash_R_cleanup(fs, ps, pic):
Modified: python/trunk/Misc/build.sh
==============================================================================
--- python/trunk/Misc/build.sh	(original)
+++ python/trunk/Misc/build.sh	Fri May 11 07:55:15 2007
@@ -192,7 +192,7 @@
 ## ensure that the reflog exists so the grep doesn't fail
 touch $REFLOG
 $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
 mail_on_failure "refleak" $REFLOG
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /