python testrunner/pypyjit_tests.py in dir /build_dir/pypy-c-jit-linux-aarch64/build (timeout 4000 secs) watching logfiles {'pytestLog': 'pypyjit_new.log'} argv: ['python', 'testrunner/pypyjit_tests.py'] environment: AUDITWHEEL_ARCH=aarch64 AUDITWHEEL_PLAT=manylinux2014_aarch64 AUDITWHEEL_POLICY=manylinux2014 DEVTOOLSET_ROOTPATH=/opt/rh/devtoolset-10/root HOME=/home/buildslave HOSTNAME=530e0d063b5c LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8 LD_LIBRARY_PATH=/usr/local/lib:/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib:/opt/rh/devtoolset-10/root/usr/lib64/dyninst:/opt/rh/devtoolset-10/root/usr/lib/dyninst:/usr/local/lib64 LOGNAME=buildslave PATH=/python27_virt/bin:/opt/rh/devtoolset-10/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig PWD=/build_dir/pypy-c-jit-linux-aarch64/build PYPY_GC_NURSERY=16M PYPY_LOCALBASE=/usr/local PYPY_MAKE_PORTABLE=1 SHELL=/bin/bash SHLVL=2 SSL_CERT_FILE=/opt/_internal/certs.pem TERM=xterm TMPDIR=/tmp/pytest USER=buildslave _=/python27_virt/bin/buildslave using PTY: False ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/pypy-c-jit-linux-aarch64/build/.hypothesis/examples') pytest-2.9.2 from /build_dir/pypy-c-jit-linux-aarch64/build/pytest.pyc rootdir: /build_dir/pypy-c-jit-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.42.0 collected 1194 items / 1 skipped pypy/module/pypyjit/test_pypy_c/test_00_model.py ........................ pypy/module/pypyjit/test_pypy_c/test_alloc.py ................................................... pypy/module/pypyjit/test_pypy_c/test_array.py ....F... pypy/module/pypyjit/test_pypy_c/test_boolrewrite.py ...................................................................................................................................................................................................................................................................................................................................... pypy/module/pypyjit/test_pypy_c/test_buffers.py .. pypy/module/pypyjit/test_pypy_c/test_bug.py . pypy/module/pypyjit/test_pypy_c/test_call.py .........................s. pypy/module/pypyjit/test_pypy_c/test_capture_locals.py . pypy/module/pypyjit/test_pypy_c/test_cprofile.py . pypy/module/pypyjit/test_pypy_c/test_exception.py ..... pypy/module/pypyjit/test_pypy_c/test_ffi.py s..s...F.. pypy/module/pypyjit/test_pypy_c/test_generators.py ... pypy/module/pypyjit/test_pypy_c/test_getframe.py .. pypy/module/pypyjit/test_pypy_c/test_globals.py . pypy/module/pypyjit/test_pypy_c/test_import.py .... pypy/module/pypyjit/test_pypy_c/test_instance.py ...........F... pypy/module/pypyjit/test_pypy_c/test_intbound.py ................................................................................................................................................................................................................................................................................... pypy/module/pypyjit/test_pypy_c/test_itertools.py .. pypy/module/pypyjit/test_pypy_c/test_jitlogparser.py F pypy/module/pypyjit/test_pypy_c/test_math.py ..s.. pypy/module/pypyjit/test_pypy_c/test_micronumpy.py ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss pypy/module/pypyjit/test_pypy_c/test_min_max.py ... pypy/module/pypyjit/test_pypy_c/test_misc.py ....................... pypy/module/pypyjit/test_pypy_c/test_shift.py ........................................................................................................................................................................................................................... pypy/module/pypyjit/test_pypy_c/test_string.py ......x............ pypy/module/pypyjit/test_pypy_c/test_struct.py ...... pypy/module/pypyjit/test_pypy_c/test_thread.py ..F pypy/module/pypyjit/test_pypy_c/test_weakref.py . =================================== FAILURES =================================== ________________________ TestArray.test_array_of_floats ________________________ self = <pypy.module.pypyjit.test_pypy_c.test_array.TestArray object at 0xfffef830fc10> def test_array_of_floats(self): try: from __pypy__ import jit_backend_features if 'singlefloats' not in jit_backend_features: py.test.skip("test requres singlefloats support from the JIT backend") except ImportError: pass def main(): from array import array img = array('f', [21.5]*1000) i = 0 while i < 1000: img[i] += 20.5 assert img[i] == 42.0 i += 1 return 321 # log = self.run(main, []) assert log.result == 321 loop, = log.loops_by_filename(self.filepath) assert loop.match(""" i10 = int_lt(i6, 1000) guard_true(i10, descr=...) i11 = int_lt(i6, i7) guard_true(i11, descr=...) i13 = getarrayitem_raw_i(i8, i6, descr=<Array. 4>) f14 = cast_singlefloat_to_float(i13) f16 = float_add(f14, 20.500000) i17 = cast_float_to_singlefloat(f16) setarrayitem_raw(i8, i6,i17, descr=<Array. 4>) i18 = getarrayitem_raw_i(i8, i6, descr=<Array. 4>) f19 = cast_singlefloat_to_float(i18) i21 = float_eq(f19, 42.000000) guard_true(i21, descr=...) i23 = int_add(i6, 1) --TICK-- jump(..., descr=...) > """, ignore_ops=['guard_not_invalidated']) pypy/module/pypyjit/test_pypy_c/test_array.py:190: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pypy/module/pypyjit/test_pypy_c/model.py:177: in match return matcher.match(expected_src, **kwds) pypy/module/pypyjit/test_pypy_c/model.py:524: in match self.match_loop(expected_ops, ignore_ops) pypy/module/pypyjit/test_pypy_c/model.py:500: in match_loop self.match_op(op, exp_op) pypy/module/pypyjit/test_pypy_c/model.py:409: in match_op self._assert(op.name == exp_opname, "operation mismatch") _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.pypyjit.test_pypy_c.model.OpMatcher object at 0xfffef8a4b290> cond = False, message = 'operation mismatch' def _assert(self, cond, message): if not cond: > raise InvalidMatch(message, frame=sys._getframe(1)) E InvalidMatch: operation mismatch pypy/module/pypyjit/test_pypy_c/model.py:402: InvalidMatch ----------------------------- Captured stdout call ----------------------------- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Loops don't match ================= loop id = None ('operation mismatch',) <could not determine information> Ignore ops: ['guard_not_invalidated'] Got: i62 = int_lt(i56, 1000) guard_true(i62, descr=<Guard0xfffebe6d6bf0>) i63 = int_lt(i56, i44) guard_true(i63, descr=<Guard0xfffebe6f65f0>) ===== HERE ===== p66 = call_r(281469634086128, p10, i56, 0, descr=<Callr 8 rii EF=5>) guard_no_exception(descr=<Guard0xfffebe6d6c38>) guard_class(p66, ConstClass(W_FloatObject), descr=<Guard0xfffebe6f6620>) f68 = getfield_gc_f(p66, descr=<FieldF pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8 pure>) f70 = float_add(f68, 20.500000) p71 = force_token() p72 = new_with_vtable(descr=<SizeDescr 16>) p73 = new_with_vtable(descr=<SizeDescr 16>) setfield_gc(p73, f70, descr=<FieldF pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8 pure>) setfield_gc(p0, p71, descr=<FieldP pypy.interpreter.pyframe.PyFrame.vable_token 8>) setfield_gc(p72, i56, descr=<FieldS pypy.objspace.std.intobject.W_IntObject.inst_intval 8 pure>) call_may_force_n(281469634195424, p10, p72, p73, descr=<Callv 0 rrr EF=7>) guard_not_forced(descr=<Guard0xfffebe6e02a0>) guard_no_exception(descr=<Guard0xfffebe6f6650>) i76 = getfield_gc_i(p10, descr=<FieldS pypy.module.array.interp_array.W_ArrayBase.inst_len 32>) i78 = int_lt(i76, 0) guard_false(i78, descr=<Guard0xfffebe6f66b0>) i79 = int_lt(i56, i76) guard_true(i79, descr=<Guard0xfffebe6f6710>) p82 = call_r(281469634086128, p10, i56, 0, descr=<Callr 8 rii EF=5>) guard_no_exception(descr=<Guard0xfffebe6d6c80>) guard_class(p82, ConstClass(W_FloatObject), descr=<Guard0xfffebe6f6740>) f84 = getfield_gc_f(p82, descr=<FieldF pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8 pure>) i86 = float_eq(f84, 42.000000) guard_true(i86, descr=<Guard0xfffebe6f67a0>) i88 = int_add(i56, 1) guard_not_invalidated(descr=<Guard0xfffebe6f67d0>) i90 = getfield_raw_i(281469667895080, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i92 = int_lt(i90, 0) guard_false(i92, descr=<Guard0xfffebe6f6830>) jump(p0, p1, p8, p10, i88, i76, descr=TargetToken(281469581607520)) Expected: i10 = int_lt(i6, 1000) guard_true(i10, descr=...) i11 = int_lt(i6, i7) guard_true(i11, descr=...) i13 = getarrayitem_raw_i(i8, i6, descr=<Array. 4>) f14 = cast_singlefloat_to_float(i13) f16 = float_add(f14, 20.500000) i17 = cast_float_to_singlefloat(f16) setarrayitem_raw(i8, i6,i17, descr=<Array. 4>) i18 = getarrayitem_raw_i(i8, i6, descr=<Array. 4>) f19 = cast_singlefloat_to_float(i18) i21 = float_eq(f19, 42.000000) guard_true(i21, descr=...) i23 = int_add(i6, 1) guard_not_invalidated? ticker0 = getfield_raw_i(#, descr=<FieldS pypysig_long_struct_inner.c_value .*>) ticker_cond0 = int_lt(ticker0, 0) guard_false(ticker_cond0, descr=...) jump(..., descr=...) _______________ Test__ffi.test_cffi_call_guard_not_forced_fails ________________ self = <pypy.module.pypyjit.test_pypy_c.test_ffi.Test__ffi object at 0xfffef837c9d0> def test_cffi_call_guard_not_forced_fails(self): # this is the test_pypy_c equivalent of # rpython/jit/metainterp/test/test_fficall::test_guard_not_forced_fails # # it requires cffi to be installed for pypy in order to run def main(): import sys try: import cffi except ImportError: sys.stderr.write('SKIP: cannot import cffi\n') return 0 ffi = cffi.FFI() ffi.cdef(""" typedef void (*functype)(int); int foo(int n, functype func); """) lib = ffi.verify(""" #include <signal.h> typedef void (*functype)(int); int foo(int n, functype func) { if (n >= 2000) { func(n); } return n*2; } """) @ffi.callback("functype") def mycallback(n): if n < 5000: return # make sure that guard_not_forced fails d = {} f = sys._getframe() while f: d.update(f.f_locals) f = f.f_back n = 0 while n < 10000: res = lib.foo(n, mycallback) # ID: cfficall # this is the real point of the test: before the # refactor-call_release_gil branch, the assert failed when # res == 5000 assert res == n*2 n += 1 return n log = self.run(main, [], import_site=True, > discard_stdout_before_last_line=True) # <- for Win32 pypy/module/pypyjit/test_pypy_c/test_ffi.py:320: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.pypyjit.test_pypy_c.test_ffi.Test__ffi object at 0xfffef837c9d0> func_or_src = <function main at 0xfffef8bcd650>, args = [], import_site = True discard_stdout_before_last_line = True jitopts = {'disable_unrolling': 9999, 'threshold': 200} src = <py._code.source.Source object at 0xfffef837ca50>, funcname = 'main' arglist = '' f = <closed file '/tmp/pytest/usession-py3.12-517/test-pypy-jit/test_cffi_call_guard_not_forced_fails.py', mode 'w' at 0xfffef8bc46f0> logfile = local('/tmp/pytest/usession-py3.12-517/test-pypy-jit/test_cffi_call_guard_not_forced_fails.log') cmdline = ['/build_dir/pypy-c-jit-linux-aarch64/build/pypy/goal/pypy3.12-c', '--jit', 'threshold=200,disable_unrolling=9999', '/tmp/pytest/usession-py3.12-517/test-pypy-jit/test_cffi_call_guard_not_forced_fails.py'] key = 'disable_unrolling' def run(self, func_or_src, args=[], import_site=False, discard_stdout_before_last_line=False, **jitopts): jitopts.setdefault('threshold', 200) jitopts.setdefault('disable_unrolling', 9999) if self.pypy_c is None: py.test.skip("run with --pypy=PATH") src = py.code.Source(func_or_src) if isinstance(func_or_src, types.FunctionType): funcname = func_or_src.func_name else: funcname = 'main' # write the snippet arglist = ', '.join(map(repr, args)) with self.filepath.open("w") as f: # we don't want to see the small bridges created # by the checkinterval reaching the limit f.write("import sys\n") f.write("sys.setcheckinterval(10000000)\n") f.write(str(src) + "\n") f.write("print(%s(%s))\n" % (funcname, arglist)) # # run a child pypy-c with logging enabled logfile = self.filepath.new(ext='.log') # cmdline = [self.pypy_c] if not import_site: cmdline.append('-S') if jitopts: jitcmdline = ['%s=%s' % (key, value) for key, value in jitopts.items()] cmdline += ['--jit', ','.join(jitcmdline)] cmdline.append(str(self.filepath)) # env = os.environ.copy() # TODO old logging system env['PYPYLOG'] = self.log_string + ':' + str(logfile) jitlogfile = str(logfile) + '.jlog' env['JITLOG'] = str(jitlogfile) pipe = subprocess.Popen(cmdline, env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = pipe.communicate() if pipe.wait() < 0: raise IOError("subprocess was killed by signal %d" % ( pipe.returncode,)) if stderr.startswith('SKIP:'): py.test.skip(stderr) #if stderr.startswith('debug_alloc.h:'): # lldebug builds # stderr = '' #assert not stderr if not stdout: raise Exception("no stdout produced; stderr='''\n%s'''" > % (stderr,)) E Exception: no stdout produced; stderr=''' E Traceback (most recent call last): E File "/build_dir/pypy-c-jit-linux-aarch64/build/lib_pypy/cffi/_shimmed_dist_utils.py", line 12, in <module> E import setuptools E ModuleNotFoundError: No module named 'setuptools' E E The above exception was the direct cause of the following exception: E E Traceback (most recent call last): E File "/tmp/pytest/usession-py3.12-517/test-pypy-jit/test_cffi_call_guard_not_forced_fails.py", line 50, in <module> E print(main()) E ^^^^^^ E File "/tmp/pytest/usession-py3.12-517/test-pypy-jit/test_cffi_call_guard_not_forced_fails.py", line 18, in main E lib = ffi.verify(""" E ^^^^^^ E File "/build_dir/pypy-c-jit-linux-aarch64/build/lib_pypy/cffi/api.py", line 468, in verify E lib = self.verifier.load_library() E ^^^^^^^^^^^^ E File "/build_dir/pypy-c-jit-linux-aarch64/build/lib_pypy/cffi/verifier.py", line 105, in load_library E self._compile_module() E ^^^^^^^^^^^^^^^ E File "/build_dir/pypy-c-jit-linux-aarch64/build/lib_pypy/cffi/verifier.py", line 209, in _compile_module E output_rel_filename = ffiplatform.compile(tmpdir, self.get_extension()) E ^^^^^^^^^^^^^ E File "/build_dir/pypy-c-jit-linux-aarch64/build/lib_pypy/cffi/verifier.py", line 126, in get_extension E return ffiplatform.get_extension(sourcename, modname, **self.kwds) E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E File "/build_dir/pypy-c-jit-linux-aarch64/build/lib_pypy/cffi/ffiplatform.py", line 38, in get_extension E from cffi._shimmed_dist_utils import Extension E File "/build_dir/pypy-c-jit-linux-aarch64/build/lib_pypy/cffi/_shimmed_dist_utils.py", line 16, in <module> E raise Exception("This CFFI feature requires setuptools on Python >= 3.12. The setuptools module is missing or non-functional.") from ex E Exception: This CFFI feature requires setuptools on Python >= 3.12. The setuptools module is missing or non-functional. E ''' pypy/module/pypyjit/test_pypy_c/test_00_model.py:96: Exception __________________ TestInstance.test_namedtuple_construction ___________________ self = <pypy.module.pypyjit.test_pypy_c.test_instance.TestInstance object at 0xfffef893c250> def test_namedtuple_construction(self): def main(): from collections import namedtuple A = namedtuple("A", "x y") res = 0 i = 0 while i < 2000: res += A(i, 0).x i += 1 log = self.run(main, []) loop, = log.loops_by_filename(self.filepath) assert loop.match(""" i7 = int_lt(i5, 2000) guard_true(i7, descr=...) guard_not_invalidated(descr=...) p1 = force_token() p2 = force_token() i20 = int_add_ovf(i19, i5) guard_no_overflow(descr=...) i9 = int_add(i5, 1) --TICK-- jump(..., descr=...) > """) pypy/module/pypyjit/test_pypy_c/test_instance.py:401: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pypy/module/pypyjit/test_pypy_c/model.py:177: in match return matcher.match(expected_src, **kwds) pypy/module/pypyjit/test_pypy_c/model.py:524: in match self.match_loop(expected_ops, ignore_ops) pypy/module/pypyjit/test_pypy_c/model.py:500: in match_loop self.match_op(op, exp_op) pypy/module/pypyjit/test_pypy_c/model.py:409: in match_op self._assert(op.name == exp_opname, "operation mismatch") _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.pypyjit.test_pypy_c.model.OpMatcher object at 0xfffef88bc290> cond = False, message = 'operation mismatch' def _assert(self, cond, message): if not cond: > raise InvalidMatch(message, frame=sys._getframe(1)) E InvalidMatch: operation mismatch pypy/module/pypyjit/test_pypy_c/model.py:402: InvalidMatch ----------------------------- Captured stdout call ----------------------------- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Loops don't match ================= loop id = None ('operation mismatch',) <could not determine information> Ignore ops: [] Got: i77 = int_lt(i71, 2000) guard_true(i77, descr=<Guard0xffff46c3e020>) guard_not_invalidated(descr=<Guard0xffff46c32e00>) p78 = force_token() ===== HERE ===== p81 = new_with_vtable(descr=<SizeDescr 32>) setfield_gc(p81, ConstPtr(ptr82), descr=<FieldP pypy.objspace.std.unicodeobject.W_UnicodeObject.inst__utf8 24 pure>) i86 = call_i(ConstClass(ll_call_lookup_function_trampoline__v2300___simple_call__function_), p46, p81, -4436955624434978777, 0, descr=<Calli 8 rrii EF=5 OS=4>) setfield_gc(p81, ConstPtr(null), descr=<FieldP pypy.objspace.std.unicodeobject.W_UnicodeObject.inst__index_storage 8>) setfield_gc(p81, 10, descr=<FieldS pypy.objspace.std.unicodeobject.W_UnicodeObject.inst__length 16 pure>) guard_no_exception(descr=<Guard0xffff46ed6de8>) i90 = int_lt(i86, 0) guard_false(i90, descr=<Guard0xffff46c5d790>) p91 = getinteriorfield_gc_r(p57, i86, descr=<InteriorFieldDescr <FieldP odictentry.value 8>>) guard_value(p91, ConstPtr(ptr92), descr=<Guard0xffff46c3ed58>) p94 = force_token() i98 = int_add_ovf(i69, i71) guard_no_overflow(descr=<Guard0xffff46c5d7c0>) i100 = int_add(i71, 1) i102 = getfield_raw_i(281471957985064, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i104 = int_lt(i102, 0) guard_false(i104, descr=<Guard0xffff46c5d820>) jump(p0, p1, p8, i98, i100, p33, p46, p34, p57, descr=TargetToken(281471869022496)) Expected: i7 = int_lt(i5, 2000) guard_true(i7, descr=...) guard_not_invalidated(descr=...) p1 = force_token() p2 = force_token() i20 = int_add_ovf(i19, i5) guard_no_overflow(descr=...) i9 = int_add(i5, 1) guard_not_invalidated? ticker0 = getfield_raw_i(#, descr=<FieldS pypysig_long_struct_inner.c_value .*>) ticker_cond0 = int_lt(ticker0, 0) guard_false(ticker_cond0, descr=...) jump(..., descr=...) ______________________________ TestLogParser.test ______________________________ self = <pypy.module.pypyjit.test_pypy_c.test_jitlogparser.TestLogParser object at 0xfffef88a55d0> def test(self): def fn_with_bridges(N): def is_prime(x): for y in range(2, x): if x % y == 0: return False return True result = 0 for x in range(N): if x % 3 == 0: result += 5 elif x % 5 == 0: result += 3 elif is_prime(x): result += x elif x == 99: result *= 2 return result # N = 10000 _log = self.run(fn_with_bridges, [N]) log, loops = import_log(_log.logfile) parse_log_counts(extract_category(log, 'jit-backend-count'), loops) is_prime_loops = [] fn_with_bridges_loops = [] bridges = {} for loop in loops: if hasattr(loop, 'force_asm'): try: > loop.force_asm() pypy/module/pypyjit/test_pypy_c/test_jitlogparser.py:45: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ rpython/tool/jitlogparser/parser.py:472: in <lambda> dump_start=start_ofs)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <rpython.tool.jitlogparser.parser.SimpleParser object at 0xfffef8d0e850> loop = <rpython.jit.tool.oparser_model.ExtendedTreeLoop object at 0xfffef8400150> backend_dump = '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...76bcf2b0ffdff21000e0f200023fd6d0dfff58b00b00f910a282d25076bcf2b0ffdff2b01300f9100080d25076bcf2b0ffdff21000e0f200023fd6' backend_tp = 'arm', dump_start = 281465911907616L def postprocess(self, loop, backend_dump=None, backend_tp=None, dump_start=0): if backend_dump is not None: raw_asm = self._asm_disassemble(backend_dump.decode('hex'), backend_tp, dump_start) # additional mess: if the backend_dump starts with a series # of zeros, raw_asm's first regular line is *after* that, # after a line saying "...". So we assume that start==dump_start # if this parameter was passed. asm = [] start = dump_start for elem in raw_asm: if len(elem.split("\t")) < 3: continue e = elem.split("\t") adr = e[0] v = elem # --- more compactly: " ".join(e[2:]) if not start: # only if 'dump_start' is left at 0 start = int(adr.strip(":"), 16) ofs = int(adr.strip(":"), 16) - start if ofs >= 0: asm.append((ofs, v.strip("\n"))) asm_index = 0 for i, op in enumerate(loop.operations): end = 0 j = i + 1 while end == 0: if j == len(loop.operations): end = loop.last_offset break if loop.operations[j].offset is None: j += 1 else: end = loop.operations[j].offset if op.offset is not None: > while asm[asm_index][0] < op.offset: E IndexError: list index out of range rpython/tool/jitlogparser/parser.py:141: IndexError ----------------------------- Captured stdout call ----------------------------- loading symbols from /build_dir/pypy-c-jit-linux-aarch64/build/pypy/goal/pypy3.12-c... 22 symbols found ----------------------------- Captured stderr call ----------------------------- 0%..loaded _____________________ TestThread.test_lock_acquire_release _____________________ self = <pypy.module.pypyjit.test_pypy_c.test_thread.TestThread object at 0xfffef8715910> def test_lock_acquire_release(self): def main(n): import threading lock = threading.Lock() while n > 0: with lock: n -= 1 log = self.run(main, [500]) assert log.result == main(500) loop, = log.loops_by_filename(self.filepath) assert loop.match(""" i56 = int_gt(i44, 0) guard_true(i56, descr=...) p57 = force_token() setfield_gc(p0, p57, descr=<FieldP pypy.interpreter.pyframe.PyFrame.vable_token 8>) i58 = call_may_force_i(ConstClass(acquire_timed), p31, -1, descr=<Calli . ri EF=7>) guard_not_forced(descr=...) guard_no_exception(descr=...) i99 = int_eq(i58, 1) guard_true(i99, descr=...) i58 = int_add(i44, -1) guard_not_invalidated? i59 = call_i(ConstClass(RPyThreadReleaseLock), i37, descr=<Calli . i EF=2>) i60 = int_is_true(i59) guard_false(i60, descr=...) --TICK-- jump(..., descr=...) > """) pypy/module/pypyjit/test_pypy_c/test_thread.py:86: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pypy/module/pypyjit/test_pypy_c/model.py:177: in match return matcher.match(expected_src, **kwds) pypy/module/pypyjit/test_pypy_c/model.py:524: in match self.match_loop(expected_ops, ignore_ops) pypy/module/pypyjit/test_pypy_c/model.py:500: in match_loop self.match_op(op, exp_op) pypy/module/pypyjit/test_pypy_c/model.py:409: in match_op self._assert(op.name == exp_opname, "operation mismatch") _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.pypyjit.test_pypy_c.model.OpMatcher object at 0xfffef8417110> cond = False, message = 'operation mismatch' def _assert(self, cond, message): if not cond: > raise InvalidMatch(message, frame=sys._getframe(1)) E InvalidMatch: operation mismatch pypy/module/pypyjit/test_pypy_c/model.py:402: InvalidMatch ----------------------------- Captured stdout call ----------------------------- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Loops don't match ================= loop id = None ('operation mismatch',) <could not determine information> Ignore ops: [] Got: i50 = int_gt(i40, 0) guard_true(i50, descr=<Guard0xffff74811340>) ===== HERE ===== guard_not_invalidated(descr=<Guard0xffff746ba620>) p51 = force_token() setfield_gc(p0, p51, descr=<FieldP pypy.interpreter.pyframe.PyFrame.vable_token 8>) i54 = call_may_force_i(ConstClass(acquire_timed), p32, -1, descr=<Calli 8 ri EF=7>) guard_not_forced(descr=<Guard0xffff747f5740>) guard_no_exception(descr=<Guard0xffff746ba650>) i56 = int_eq(i54, 1) guard_true(i56, descr=<Guard0xffff746ba6b0>) i58 = int_add(i40, -1) guard_not_invalidated(descr=<Guard0xffff746ba6e0>) i60 = call_i(ConstClass(RPyThreadReleaseLock), i41, descr=<Calli 8 i EF=2>) i61 = int_is_true(i60) guard_false(i61, descr=<Guard0xffff74811388>) i64 = getfield_raw_i(281472725739304, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i66 = int_lt(i64, 0) guard_false(i66, descr=<Guard0xffff746ba770>) jump(p0, p1, i58, p10, p12, p22, p24, p32, i41, descr=TargetToken(281472636329184)) Expected: i56 = int_gt(i44, 0) guard_true(i56, descr=...) p57 = force_token() setfield_gc(p0, p57, descr=<FieldP pypy.interpreter.pyframe.PyFrame.vable_token 8>) i58 = call_may_force_i(ConstClass(acquire_timed), p31, -1, descr=<Calli . ri EF=7>) guard_not_forced(descr=...) guard_no_exception(descr=...) i99 = int_eq(i58, 1) guard_true(i99, descr=...) i58 = int_add(i44, -1) guard_not_invalidated? i59 = call_i(ConstClass(RPyThreadReleaseLock), i37, descr=<Calli . i EF=2>) i60 = int_is_true(i59) guard_false(i60, descr=...) guard_not_invalidated? ticker0 = getfield_raw_i(#, descr=<FieldS pypysig_long_struct_inner.c_value .*>) ticker_cond0 = int_lt(ticker0, 0) guard_false(ticker_cond0, descr=...) jump(..., descr=...) =========================== short test summary info ============================ FAIL pypy/module/pypyjit/test_pypy_c/test_array.py::TestArray::()::test_array_of_floats FAIL pypy/module/pypyjit/test_pypy_c/test_ffi.py::Test__ffi::()::test_cffi_call_guard_not_forced_fails FAIL pypy/module/pypyjit/test_pypy_c/test_instance.py::TestInstance::()::test_namedtuple_construction FAIL pypy/module/pypyjit/test_pypy_c/test_jitlogparser.py::TestLogParser::()::test FAIL pypy/module/pypyjit/test_pypy_c/test_thread.py::TestThread::()::test_lock_acquire_release ======= 5 failed, 1028 passed, 161 skipped, 1 xfailed in 203.17 seconds ======== program finished with exit code 1 elapsedTime=204.008090