pypy/module/pypyjit/test_pypy_c/test_globals.py::TestGlobals::()::test_load_builtin
self = <pypy.module.pypyjit.test_pypy_c.test_globals.TestGlobals object at 0x000000002cf67de0>
def test_load_builtin(self):
def main(n):
import pypyjit
i = 0
while i < n:
l = len # ID: loadglobal
i += pypyjit.residual_call(l, "a")
return i
#
log = self.run(main, [500])
assert log.result == 500
loop, = log.loops_by_filename(self.filepath)
> assert loop.match_by_id("loadglobal", """
guard_not_invalidated(descr=...)
""")
pypy/module/pypyjit/test_pypy_c/test_globals.py:18:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
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:408: in match_op
self._assert(op != '--end--', 'got less ops than expected')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.model.OpMatcher object at 0x000000002dc0d670>
cond = False, message = 'got less ops than expected'
def _assert(self, cond, message):
if not cond:
> raise InvalidMatch(message, frame=sys._getframe(1))
E InvalidMatch: got less ops than expected
pypy/module/pypyjit/test_pypy_c/model.py:402: InvalidMatch
---------- Captured stdout call ----------
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Loops don't match
=================
loop id = 'loadglobal'
('got less ops than expected',)
<could not determine information>
Ignore ops: []
Got:
===== HERE =====
Expected:
guard_not_invalidated(descr=...)
builder: pypy-c-jit-linux-aarch64 build #3041+
test: pypy/module/pypyjit/test_pypy_c/test_globals.py::TestGlobals::()::test_load_builtin