[pypy-commit] pypy default: Improve the test (still failing)

arigo noreply at buildbot.pypy.org
Thu Apr 4 23:09:44 CEST 2013


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r63022:001750ff2866
Date: 2013-04-04 21:57 +0200
http://bitbucket.org/pypy/pypy/changeset/001750ff2866/

Log:	Improve the test (still failing)

diff --git a/rpython/jit/backend/x86/test/test_zrpy_releasegil.py b/rpython/jit/backend/x86/test/test_zrpy_releasegil.py
--- a/rpython/jit/backend/x86/test/test_zrpy_releasegil.py
+++ b/rpython/jit/backend/x86/test/test_zrpy_releasegil.py
@@ -68,10 +68,12 @@
         c_qsort = rffi.llexternal('qsort', [rffi.VOIDP, rffi.SIZE_T,
                                             rffi.SIZE_T, CALLBACK], lltype.Void)
         #
-        def f42():
+        def f42(n):
             length = len(glob.lst)
             raw = alloc1()
             fn = llhelper(CALLBACK, rffi._make_wrapper_for(CALLBACK, callback))
+            if n & 1:    # to create a loop and a bridge, and also
+                pass     # to run the qsort() call in the blackhole interp
             c_qsort(rffi.cast(rffi.VOIDP, raw), rffi.cast(rffi.SIZE_T, 2),
                     rffi.cast(rffi.SIZE_T, 8), fn)
             free1(raw)
@@ -85,7 +87,7 @@
                     None, None, None, None, None, None)
         #
         def f(n, x, *args):
-            f42()
+            f42(n)
             n -= 1
             return (n, x) + args
         return before, f, None


More information about the pypy-commit mailing list