python testrunner/pypyjit_tests.py in dir d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build (timeout 4000 secs) watching logfiles {'pytestLog': 'pypyjit_new.log'} argv: ['python', 'testrunner/pypyjit_tests.py'] environment: ALLUSERSPROFILE=C:\ProgramData APPDATA=C:\Users\matti\AppData\Roaming ASL.LOG=Destination=file CHOCOLATEYINSTALL=C:\ProgramData\chocolatey CHOCOLATEYLASTPATHUPDATE=133185086718935289 CHOCOLATEYTOOLSLOCATION=C:\tools CLINK_DIR=C:\Program Files (x86)\clink\0.4.9 COMMONPROGRAMFILES=C:\Program Files (x86)\Common Files COMMONPROGRAMFILES(X86)=C:\Program Files (x86)\Common Files COMMONPROGRAMW6432=C:\Program Files\Common Files COMPUTERNAME=DESKTOP-RYZEN COMSPEC=C:\WINDOWS\system32\cmd.exe CONDA_BAT=d:\miniconda\condabin\conda.bat CONDA_EXE=d:\miniconda\Scripts\conda.exe CONDA_SHLVL=0 CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7 CUDA_PATH_V11_7=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7 DRIVERDATA=C:\Windows\System32\Drivers\DriverData LOCALAPPDATA=C:\Users\matti\AppData\Local NUMBER_OF_PROCESSORS=2 NVTOOLSEXT_PATH=C:\Program Files\NVIDIA Corporation\NvToolsExt\ OS=Windows_NT PATH=d:\CPython27\lib\site-packages\pywin32_system32;d:\pypy_stuff\pypy\externals\bin;D:\CPython27;D:\pypy_stuff\pypy2.7-v7.3.18\Scripts;D:\pypy_stuff\pypy2.7-v7.3.18;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseHg\;C:\Program Files\Git\cmd;C:\ProgramData\chocolatey\bin;C:\WINDOWS\System32\OpenSSH PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC PROCESSOR_ARCHITECTURE=x86 PROCESSOR_ARCHITEW6432=AMD64 PROCESSOR_IDENTIFIER=AMD64 Family 23 Model 113 Stepping 0, AuthenticAMD PROCESSOR_LEVEL=23 PROCESSOR_REVISION=7100 PROGRAMDATA=C:\ProgramData PROGRAMFILES=C:\Program Files (x86) PROGRAMFILES(X86)=C:\Program Files (x86) PROGRAMW6432=C:\Program Files PROMPT=$P$G PSMODULEPATH=%ProgramFiles%\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules PUBLIC=C:\Users\Public PWD=d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build PYPY_ENABLE_WINCONSOLEIO=1 PYTEST_XDIST_AUTO_NUM_WORKERS=4 RTOOLS40_HOME=C:\rtools40 RTOOLS43_HOME=C:\rtools43 RTOOLS44_HOME=C:\rtools44 SYSTEMDRIVE=C: SYSTEMROOT=C:\WINDOWS TEMP=D:\SystemTemp TMP=D:\SystemTemp TMPDIR=d:\systemtemp\pytest USERDOMAIN=DESKTOP-RYZEN USERNAME=matti USERPROFILE=C:\Users\matti VS140COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\ WINDIR=C:\WINDOWS using PTY: False D:\pypy_stuff\pypy2.7-v7.3.18\site-packages\hypothesis\extra\pytestplugin.py:61: HypothesisWarning: You are using Pytest version 2.9.2. Hypothesis tests work with any test runner, but our Pytest plugin requires Pytest 4.3 or newer. Note that the Pytest developers no longer support this version either! Disabling the Hypothesis pytest plugin... warnings.warn(PYTEST_TOO_OLD_MESSAGE % (pytest.__version__,), HypothesisWarning) ============================= test session starts ============================= platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1 pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\pytest.pyc rootdir: d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build, inifile: pytest.ini plugins: hypothesis-4.57.1 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 ........ pypy\module\pypyjit\test_pypy_c\test_boolrewrite.py ...................................................................................................................................................................................................................................................................................................................................... pypy\module\pypyjit\test_pypy_c\test_buffers.py F. pypy\module\pypyjit\test_pypy_c\test_bug.py s 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.ssF.. 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 s pypy\module\pypyjit\test_pypy_c\test_math.py FFs.. 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 ....F. pypy\module\pypyjit\test_pypy_c\test_thread.py ... pypy\module\pypyjit\test_pypy_c\test_weakref.py . ================================== FAILURES =================================== __________________________ TestBuffers.test_re_match __________________________ self = <pypy.module.pypyjit.test_pypy_c.test_buffers.TestBuffers object at 0x0000021010403b78> def test_re_match(self): def main(n): import re import array p = re.compile(b'.+') a = array.array('B', b'test' * 1000) i = 0 while i < n: i += 1 p.match(a) # ID: match return i log = self.run(main, [1000]) assert log.result == 1000 loop, = log.loops_by_filename(self.filepath) > assert loop.match_by_id('match', """ guard_not_invalidated(descr=...) p71 = getfield_gc_r(p15, descr=...) # check that the pattern is not None and a W_BytesObject guard_nonnull_class(p71, ConstClass(W_BytesObject), descr=...) i74 = instance_ptr_eq(_, p71) guard_false(i74, descr=...) i65 = getfield_gc_i(p18, descr=...) i67 = int_gt(0, i65) guard_false(i67, descr=...) i69 = int_gt(#, i65) guard_true(i69, descr=...) --TICK-- """) pypy\module\pypyjit\test_pypy_c\test_buffers.py:19: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pypy\module\pypyjit\test_pypy_c\model.py:182: in match_by_id return matcher.match(expected_src, ignore_ops=ignore_ops) 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 0x0000021010c18138> 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 = 'match' ('operation mismatch',) <could not determine information> Ignore ops: [] Got: guard_not_invalidated(descr=<Guard0x28215e99460>) p73 = getfield_gc_r(p14, descr=<FieldP pypy.module._sre.interp_sre.W_SRE_Pattern.inst_w_pattern 56>) guard_nonnull_class(p73, ConstClass(W_BytesObject), descr=<Guard0x28215e15bb0>) i76 = instance_ptr_eq(ConstPtr(ptr75), p73) guard_false(i76, descr=<Guard0x28215e994c0>) i77 = getfield_gc_i(p16, descr=<FieldS pypy.module.array.interp_array.W_ArrayBase.inst__exports 16>) ===== HERE ===== i79 = int_add(i77, 1) i80 = getfield_gc_i(p16, descr=<FieldS pypy.module.array.interp_array.W_ArrayBase.inst_len 40>) i82 = int_gt(0, i80) guard_false(i82, descr=<Guard0x28215e99520>) i84 = int_gt(9223372036854775807, i80) guard_true(i84, descr=<Guard0x28215e99580>) guard_not_invalidated(descr=<Guard0x28215e99640>) i98 = getfield_raw_i(140709974046736, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i100 = int_lt(i98, 0) guard_false(i100, descr=<Guard0x28215e996a0>) Expected: guard_not_invalidated(descr=...) p71 = getfield_gc_r(p15, descr=...) # check that the pattern is not None and a W_BytesObject guard_nonnull_class(p71, ConstClass(W_BytesObject), descr=...) i74 = instance_ptr_eq(_, p71) guard_false(i74, descr=...) i65 = getfield_gc_i(p18, descr=...) i67 = int_gt(0, i65) guard_false(i67, descr=...) i69 = int_gt(#, i65) guard_true(i69, 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=...) _______________ Test__ffi.test_cffi_call_guard_not_forced_fails _______________ self = <pypy.module.pypyjit.test_pypy_c.test_ffi.Test__ffi object at 0x0000021013060720> 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 0x0000021013060720> func_or_src = <function main at 0x0000021015612f98>, args = [] import_site = True, discard_stdout_before_last_line = True jitopts = {'disable_unrolling': 9999, 'threshold': 200} src = <py._code.source.Source object at 0x00000210130605d0>, funcname = 'main' arglist = '' f = <closed file 'd:\\systemtemp\\pytest\\usession-py3.12-736\\test-pypy-jit\\test_cffi_call_guard_not_forced_fails.py', mode 'w' at 0x0000021015613808> logfile = local('d:\\systemtemp\\pytest\\usession-py3.12-736\\test-pypy-jit\\test_cffi_call_guard_not_forced_fails.log') cmdline = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\pypy\\goal\\pypy3.12-c.exe', '--jit', 'threshold=20...nrolling=9999', 'd:\\systemtemp\\pytest\\usession-py3.12-736\\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 "d:\systemtemp\pytest\usession-py3.12-736\test-pypy-jit\test_cffi_call_guard_not_forced_fails.py", line 50, in <module> E print(main()) E ^^^^^^ E File "d:\systemtemp\pytest\usession-py3.12-736\test-pypy-jit\test_cffi_call_guard_not_forced_fails.py", line 18, in main E lib = ffi.verify(""" E ^^^^^^ E File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib_pypy\cffi\api.py", line 468, in verify E lib = self.verifier.load_library() E ^^^^^^^^^^^^ E File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib_pypy\cffi\verifier.py", line 105, in load_library E self._compile_module() E ^^^^^^^^^^^^^^^ E File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib_pypy\cffi\verifier.py", line 209, in _compile_module E output_rel_filename = ffiplatform.compile(tmpdir, self.get_extension()) E ^^^^^^^ E File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib_pypy\cffi\ffiplatform.py", line 48, in compile E outputfilename = backend.build(ext, tmpdir, compiler_verbose, debug) E ^^^^^ E File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib_pypy\pypy_tools\_cffi_compile.py", line 226, in build E return _build_msvc(ext, compiler_verbose) E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib_pypy\pypy_tools\_cffi_compile.py", line 201, in _build_msvc E _run(args, verbose) E File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib_pypy\pypy_tools\_cffi_compile.py", line 104, in _run E proc = subprocess.Popen(args, stdout=subprocess.PIPE, E ^^^^^ E File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\subprocess.py", line 1026, in __init__ E self._execute_child(args, executable, preexec_fn, close_fds, E ^^^^^^^^^^^^^^ E File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\subprocess.py", line 1551, in _execute_child E hp, ht, pid, tid = _winapi.CreateProcess(executable, args, E ^^^^^^^^^^^^^ E File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib_pypy\_winapi.py", line 307, in CreateProcess E raise_WinError() E File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib_pypy\_winapi.py", line 36, in raise_WinError E raise excep E FileNotFoundError: [WinError 2] The system cannot find the file specified 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 0x00000210107d66e8> 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:390: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000021010ff13d0> 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=<Guard0x19079fdbad8>) guard_not_invalidated(descr=<Guard0x1907a036830>) 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__v2069___simple_call__function_), p46, p81, 8910321749650588344, 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=<Guard0x19079fdbb20>) i90 = int_lt(i86, 0) guard_false(i90, descr=<Guard0x1907a036890>) p91 = getinteriorfield_gc_r(p57, i86, descr=<InteriorFieldDescr <FieldP odictentry.value 8>>) guard_value(p91, ConstPtr(ptr92), descr=<Guard0x19079fdbb68>) p94 = force_token() i98 = int_add_ovf(i69, i71) guard_no_overflow(descr=<Guard0x1907a0368c0>) i100 = int_add(i71, 1) i102 = getfield_raw_i(140709974046736, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i104 = int_lt(i102, 0) guard_false(i104, descr=<Guard0x1907a036920>) jump(p0, p1, p8, i98, i100, p33, p46, p34, p57, descr=TargetToken(1720033705120)) 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=...) ______________________________ TestMath.test_log ______________________________ self = <pypy.module.pypyjit.test_pypy_c.test_math.TestMath object at 0x00000210125006e8> def test_log(self): def main(n): import math i = 1 s = 0.0 while i < n: s += math.log(i) - math.log10(i) i += 1 return s log = self.run(main, [500]) assert round(log.result, 6) == round(main(500), 6) loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i2 = int_lt(i0, i1) guard_true(i2, descr=...) guard_not_invalidated(descr=...) f1 = cast_int_to_float(i0) i3 = float_le(f1, 0.0) guard_false(i3, descr=...) f2 = call_f(ConstClass(log), f1, descr=<Callf . f EF=2>) f3 = call_f(ConstClass(log10), f1, descr=<Callf . f EF=2>) f4 = float_sub(f2, f3) f5 = float_add(f0, f4) i4 = int_add(i0, 1) --TICK-- jump(..., descr=...) """) pypy\module\pypyjit\test_pypy_c\test_math.py:19: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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:417: in match_op self._assert(self.match_var(arg, exp_arg), "variable mismatch: %r instead of %r" % (arg, exp_arg)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.pypyjit.test_pypy_c.model.OpMatcher object at 0x00000210145fa480> cond = False message = "variable mismatch: 'ConstClass(ccall_log)' instead of 'ConstClass(log)'" def _assert(self, cond, message): if not cond: > raise InvalidMatch(message, frame=sys._getframe(1)) E InvalidMatch: variable mismatch: 'ConstClass(ccall_log)' instead of 'ConstClass(log)' pypy\module\pypyjit\test_pypy_c\model.py:402: InvalidMatch ---------------------------- Captured stdout call ----------------------------- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Loops don't match ================= loop id = None ("variable mismatch: 'ConstClass(ccall_log)' instead of 'ConstClass(log)'",) <could not determine information> Ignore ops: [] Got: i55 = int_lt(i50, i29) guard_true(i55, descr=<Guard0x1741a311f58>) guard_not_invalidated(descr=<Guard0x1741a37c170>) f56 = cast_int_to_float(i50) i58 = float_le(f56, 0.000000) guard_false(i58, descr=<Guard0x1741a37c1d0>) ===== HERE ===== f60 = call_f(ConstClass(ccall_log), f56, descr=<Callf 8 f EF=2>) f62 = call_f(ConstClass(ccall_log10), f56, descr=<Callf 8 f EF=2>) f63 = float_sub(f60, f62) f64 = float_add(f48, f63) i66 = int_add(i50, 1) i68 = getfield_raw_i(140709974046736, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i70 = int_lt(i68, 0) guard_false(i70, descr=<Guard0x1741a311fa0>) jump(p0, p1, p8, p10, i66, f64, i29, descr=TargetToken(1598167479392)) Expected: i2 = int_lt(i0, i1) guard_true(i2, descr=...) guard_not_invalidated(descr=...) f1 = cast_int_to_float(i0) i3 = float_le(f1, 0.0) guard_false(i3, descr=...) f2 = call_f(ConstClass(log), f1, descr=<Callf . f EF=2>) f3 = call_f(ConstClass(log10), f1, descr=<Callf . f EF=2>) f4 = float_sub(f2, f3) f5 = float_add(f0, f4) i4 = int_add(i0, 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=...) ____________________________ TestMath.test_sin_cos ____________________________ self = <pypy.module.pypyjit.test_pypy_c.test_math.TestMath object at 0x00000210104ce170> def test_sin_cos(self): def main(n): import math i = 1 s = 0.0 while i < n: s += math.sin(i) - math.cos(i) i += 1 return s log = self.run(main, [500]) assert round(log.result, 6) == round(main(500), 6) loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i2 = int_lt(i0, i1) guard_true(i2, descr=...) guard_not_invalidated(descr=...) f1 = cast_int_to_float(i0) i6 = --ISINF--(f1) guard_false(i6, descr=...) f2 = call_f(ConstClass(sin), f1, descr=<Callf . f EF=0>) f3 = call_f(ConstClass(cos), f1, descr=<Callf . f EF=0>) f4 = float_sub(f2, f3) f5 = float_add(f0, f4) i7 = int_add(i0, 1) --TICK-- jump(..., descr=) """) pypy\module\pypyjit\test_pypy_c\test_math.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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:417: in match_op self._assert(self.match_var(arg, exp_arg), "variable mismatch: %r instead of %r" % (arg, exp_arg)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.pypyjit.test_pypy_c.model.OpMatcher object at 0x0000021010cae020> cond = False message = "variable mismatch: 'ConstClass(ccall_sin)' instead of 'ConstClass(sin)'" def _assert(self, cond, message): if not cond: > raise InvalidMatch(message, frame=sys._getframe(1)) E InvalidMatch: variable mismatch: 'ConstClass(ccall_sin)' instead of 'ConstClass(sin)' pypy\module\pypyjit\test_pypy_c\model.py:402: InvalidMatch ---------------------------- Captured stdout call ----------------------------- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Loops don't match ================= loop id = None ("variable mismatch: 'ConstClass(ccall_sin)' instead of 'ConstClass(sin)'",) <could not determine information> Ignore ops: [] Got: i56 = int_lt(i51, i29) guard_true(i56, descr=<Guard0x2186dfbffa0>) guard_not_invalidated(descr=<Guard0x2186e01fee0>) f57 = cast_int_to_float(i51) f59 = float_add(f57, 11235582092889474423308157442431404585112356118389416079589380072358292237843810195794279832650471001320007117491962084853674360550901038905802964414967132773610493339054092829768888725077880882465817684505312860552384417646403930092119569408801702322709406917786643639996702871154982269052209770601514008576.000000) i60 = float_eq(f59, f57) guard_false(i60, descr=<Guard0x2186e01ff40>) ===== HERE ===== f62 = call_f(ConstClass(ccall_sin), f57, descr=<Callf 8 f EF=2>) f64 = call_f(ConstClass(ccall_cos), f57, descr=<Callf 8 f EF=2>) f65 = float_sub(f62, f64) f66 = float_add(f49, f65) i68 = int_add(i51, 1) i70 = getfield_raw_i(140709974046736, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i72 = int_lt(i70, 0) guard_false(i72, descr=<Guard0x2186e02c020>) jump(p0, p1, p8, p10, i68, f66, i29, descr=TargetToken(2303947928736)) Expected: i2 = int_lt(i0, i1) guard_true(i2, descr=...) guard_not_invalidated(descr=...) f1 = cast_int_to_float(i0) f1\B999 = float_add(f1, ...) i6 = float_eq(f1\B999, f1) guard_false(i6, descr=...) f2 = call_f(ConstClass(sin), f1, descr=<Callf . f EF=0>) f3 = call_f(ConstClass(cos), f1, descr=<Callf . f EF=0>) f4 = float_sub(f2, f3) f5 = float_add(f0, f4) i7 = int_add(i0, 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=) ____________________ TestStruct.test_pack_into_raw_buffer _____________________ self = <pypy.module.pypyjit.test_pypy_c.test_struct.TestStruct object at 0x0000021016c04918> def test_pack_into_raw_buffer(self): def main(n): import array import struct buf = array.array('b', b'\x00'*8) i = 1 while i < n: struct.pack_into("h", buf, 4, i) # ID: pack_into i += 1 return i log = self.run(main, [1000]) assert log.result == main(1000) loop, = log.loops_by_filename(self.filepath) > assert loop.match_by_id('pack_into', """\ guard_not_invalidated(descr=...) i65 = int_le(i58, 32767) guard_true(i65, descr=...) raw_store(i55, 4, i58, descr=<ArrayS 2>) """) pypy\module\pypyjit\test_pypy_c\test_struct.py:175: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pypy\module\pypyjit\test_pypy_c\model.py:182: in match_by_id return matcher.match(expected_src, ignore_ops=ignore_ops) 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 0x0000021014c580c8> 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 = 'pack_into' ('operation mismatch',) <could not determine information> Ignore ops: [] Got: guard_not_invalidated(descr=<Guard0x10dc897c380>) ===== HERE ===== setfield_gc(p14, i45, descr=<FieldS pypy.module.array.interp_array.W_ArrayBase.inst__exports 16>) i65 = int_le(i58, 32767) guard_true(i65, descr=<Guard0x10dc8980068>) raw_store(i55, 4, i58, descr=<ArrayS 2>) Expected: guard_not_invalidated(descr=...) i65 = int_le(i58, 32767) guard_true(i65, descr=...) raw_store(i55, 4, i58, descr=<ArrayS 2>) =========================== short test summary info =========================== FAIL pypy/module/pypyjit/test_pypy_c/test_buffers.py::TestBuffers::()::test_re_match 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_math.py::TestMath::()::test_log FAIL pypy/module/pypyjit/test_pypy_c/test_math.py::TestMath::()::test_sin_cos FAIL pypy/module/pypyjit/test_pypy_c/test_struct.py::TestStruct::()::test_pack_into_raw_buffer ======= 6 failed, 1023 passed, 165 skipped, 1 xfailed in 198.07 seconds ======= program finished with exit code 1 elapsedTime=199.550000