python testrunner/pypyjit_tests.py in dir /Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build (timeout 4000 secs) watching logfiles {'pytestLog': 'pypyjit_new.log'} argv: ['python', 'testrunner/pypyjit_tests.py'] environment: HOME=/Users/matti HOMEBREW_CELLAR=/opt/homebrew/Cellar HOMEBREW_PREFIX=/opt/homebrew HOMEBREW_REPOSITORY=/opt/homebrew INFOPATH=/opt/homebrew/share/info: LANG=en_US.UTF-8 LC_ADDRESS=en_AU.UTF-8 LC_IDENTIFICATION=en_AU.UTF-8 LC_MEASUREMENT=en_AU.UTF-8 LC_MONETARY=en_AU.UTF-8 LC_NAME=en_AU.UTF-8 LC_NUMERIC=en_AU.UTF-8 LC_PAPER=en_AU.UTF-8 LC_TELEPHONE=en_AU.UTF-8 LC_TIME=en_AU.UTF-8 LOGNAME=matti OLDPWD=/Users/matti PATH=/Users/matti/oss/pypy-arm64-buildbot/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.11/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin PKG_CONFIG_PATH=/opt/homebrew/Cellar/openssl@1.1/1.1.1t/lib/pkgconfig PWD=/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build PYPY_USESSION_DIR=/tmp/buildbot-arm64 SHELL=/bin/zsh SHLVL=2 SSH_CLIENT=10.0.0.17 36602 22 SSH_CONNECTION=10.0.0.17 36602 10.0.0.16 22 SSH_TTY=/dev/ttys000 TERM=xterm-256color TMPDIR=/tmp/buildbot-arm64/pytest USER=matti _=/Users/matti/oss/pypy-arm64-buildbot/bin/buildslave using PTY: False /Users/matti/oss/pypy-arm64-buildbot/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 darwin -- Python 2.7.18[pypy-7.3.17-final], pytest-2.9.2, py-1.4.29, pluggy-0.3.1 pytest-2.9.2 from /Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/pytest.pyc rootdir: /Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/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 ....s... 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 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...... 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 ............... 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 =================================== ______________________________ TestLogParser.test ______________________________ self = <pypy.module.pypyjit.test_pypy_c.test_jitlogparser.TestLogParser object at 0x000000016648afe0> 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)) rpython/tool/jitlogparser/parser.py:110: in postprocess backend_tp, dump_start) rpython/tool/jitlogparser/parser.py:151: in _asm_disassemble return list(machine_code_dump(d, origin_addr, tp)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ data = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\...2\xd2\xf0_\xa0\xf20\x00\xc0\xf2\xb0\x13\x00\xf9\x10\x00\x90\xd2\xf0_\xa0\xf20\x00\xc0\xf2\x10\x00\xe0\xf2\x00\x02?\xd6' originaddr = 4345271904L, backend_name = 'arm', label_list = None def machine_code_dump(data, originaddr, backend_name, label_list=None): objdump_machine_option = { 'x86': 'i386', 'x86-without-sse2': 'i386', 'x86_32': 'i386', 'x86_64': 'i386:x86-64', 'x86-64': 'i386:x86-64', 'i386': 'i386', 'arm': 'arm', 'arm_32': 'arm', 'aarch64': 'aarch64', 'ppc' : 'powerpc:common64', 'ppc-64' : 'powerpc:common64', 'riscv64': 'riscv:rv64', 's390x': 's390:64-bit', } machine_endianness = { # default value: 'little' 'ppc' : sys.byteorder, # i.e. same as the running machine... 'ppc-64' : sys.byteorder, # i.e. same as the running machine... 's390x' : sys.byteorder, # i.e. same as the running machine... } cmd = find_objdump() objdump = ('%(command)s -b binary -m %(machine)s ' '--endian=%(endianness)s ' '--disassembler-options=intel-mnemonics ' '--adjust-vma=%(origin)d -D %(file)s') # f = open(tmpfile, 'wb') f.write(data) f.close() p = subprocess.Popen(objdump % { 'command': cmd, 'file': tmpfile, 'origin': originaddr, 'machine': objdump_machine_option[backend_name], 'endianness': machine_endianness.get(backend_name, 'little'), }, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = p.communicate() assert not p.returncode, ('Encountered an error running objdump: %s' % > stderr) E AssertionError: Encountered an error running objdump: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: error: unknown argument '-b' rpython/jit/backend/tool/viewcode.py:82: AssertionError ----------------------------- Captured stdout call ----------------------------- loading symbols from /Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/pypy/goal/pypy3.11-c... 3 symbols found ----------------------------- Captured stderr call ----------------------------- 0%..loaded _____________________ TestThread.test_lock_acquire_release _____________________ self = <pypy.module.pypyjit.test_pypy_c.test_thread.TestThread object at 0x0000000154b38058> 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:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x00000001538fed78> 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=<Guard0x1183d7418>) ===== HERE ===== guard_not_invalidated(descr=<Guard0x1300595b0>) 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=<Guard0x130023380>) guard_no_exception(descr=<Guard0x1300595e0>) i56 = int_eq(i54, 1) guard_true(i56, descr=<Guard0x130059640>) i58 = int_add(i40, -1) guard_not_invalidated(descr=<Guard0x130059670>) i60 = call_i(ConstClass(RPyThreadReleaseLock), i41, descr=<Calli 8 i EF=2>) i61 = int_is_true(i60) guard_false(i61, descr=<Guard0x1183d7460>) i64 = getfield_raw_i(4464215320, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i66 = int_lt(i64, 0) guard_false(i66, descr=<Guard0x130059700>) jump(p0, p1, i58, p10, p12, p22, p24, p32, i41, descr=TargetToken(5100631584)) 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_jitlogparser.py::TestLogParser::()::test FAIL pypy/module/pypyjit/test_pypy_c/test_thread.py::TestThread::()::test_lock_acquire_release ======= 2 failed, 1029 passed, 163 skipped, 1 xfailed in 101.67 seconds ======== program finished with exit code 1 elapsedTime=102.203952