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
============================= test session starts ==============================
platform darwin -- Python 2.7.18[pypy-8.0.0-alpha], 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
collected 1207 items
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 .................................................................................................................................................................................................................................................................F....................................................................
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 ..........................
pypy/module/pypyjit/test_pypy_c/test_containers.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_jitlogparser.py F
pypy/module/pypyjit/test_pypy_c/test_math.py ..s..
pypy/module/pypyjit/test_pypy_c/test_micronumpy.py ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssFFFFFFFF
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 ................
pypy/module/pypyjit/test_pypy_c/test_struct.py ......
pypy/module/pypyjit/test_pypy_c/test_thread.py ...
pypy/module/pypyjit/test_pypy_c/test_weakref.py .
=================================== FAILURES ===================================
____________ TestBoolRewrite.test_boolrewrite_allcases_reflex[111] _____________
self = <pypy.module.pypyjit.test_pypy_c.test_boolrewrite.TestBoolRewrite object at 0x00000001085a27c8>
src = '\n def main():\n sa = 0\n i = 0.0\n ... sa += 20000\n i += 0.25\n return sa\n '
args = [], jitopts = {}
def run_and_check(self, src, args=[], **jitopts):
> log1 = self.run(src, args, threshold=-1) # without the JIT
pypy/module/pypyjit/test_pypy_c/test_00_model.py:101:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pypy/module/pypyjit/test_pypy_c/test_00_model.py:67: in run
stderr=subprocess.PIPE)
lib-python/2.7/subprocess.py:409: in __init__
errread, errwrite)
lib-python/2.7/subprocess.py:958: in _execute_child
errpipe_read, errpipe_write = self.pipe_cloexec()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <subprocess.Popen object at 0x000000010878bbe8>
def pipe_cloexec(self):
"""Create a pipe with FDs set CLOEXEC."""
# Pipes' FDs are set CLOEXEC by default because we don't want them
# to be inherited by other subprocesses: the CLOEXEC flag is removed
# from the child's FDs by _dup2(), between fork() and exec().
# This is not atomic: we would need the pipe2() syscall for that.
> r, w = os.pipe()
E OSError: [Errno 24] Too many open files
lib-python/2.7/subprocess.py:895: OSError
______________________________ TestLogParser.test ______________________________
self = <pypy.module.pypyjit.test_pypy_c.test_jitlogparser.TestLogParser object at 0x000000013086b9f0>
def test(self):
def fn_with_bridges(N):
def is_prime(x):
for y in xrange(2, x):
if x % y == 0:
return False
return True
result = 0
for x in xrange(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 = {}
lib_re = re.compile("file '.*lib-python.*'")
for loop in loops:
if hasattr(loop, 'force_asm'):
try:
> loop.force_asm()
pypy/module/pypyjit/test_pypy_c/test_jitlogparser.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
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\...xf0\x87\xa0\xf20\x00\xc0\xf2\xb0\x13\x00\xf9\x10\x00\x88\xd2\xf0\x87\xa0\xf20\x00\xc0\xf2\x10\x00\xe0\xf2\x00\x02?\xd6'
originaddr = 4366226800L, 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/pypy-c...
3 symbols found
----------------------------- Captured stderr call -----------------------------
0%..loaded
____________________ TestMicroNumPy.test_reduce_logical_xor ____________________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x0000000138f28330>
def test_reduce_logical_xor(self):
def main():
import _numpypy.multiarray as np
import _numpypy.umath as um
arr = np.array([1.0] * 1500)
return um.logical_xor.reduce(arr)
> log = self.run(main, [])
pypy/module/pypyjit/test_pypy_c/test_micronumpy.py:146:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x0000000138f28330>
func_or_src = <function main at 0x0000000108fb49f8>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x0000000108a1c6b0>, funcname = 'main'
arglist = ''
f = <closed file '/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_reduce_logical_xor.py', mode 'w' at 0x0000000108fb4a70>
logfile = local('/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_reduce_logical_xor.log')
cmdline = ['/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/pypy/goal/pypy-c', '-S', '--jit', 'threshold=200,disable_unrolling=9999', '/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_reduce_logical_xor.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)
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 = [sys.executable]
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 stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy/module/pypyjit/test_pypy_c/test_00_model.py:88: SyntaxError
----------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_reduce_logical_xor.py", line 8, in <module>
print main()
File "/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_reduce_logical_xor.py", line 4, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
____________________ TestMicroNumPy.test_reduce_logical_and ____________________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x0000000108cef9f0>
def test_reduce_logical_and(self):
def main():
import _numpypy.multiarray as np
import _numpypy.umath as um
arr = np.array([1.0] * 1500)
return um.logical_and.reduce(arr)
> log = self.run(main, [])
pypy/module/pypyjit/test_pypy_c/test_micronumpy.py:206:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x0000000108cef9f0>
func_or_src = <function main at 0x0000000108fb2020>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x0000000108cefa98>, funcname = 'main'
arglist = ''
f = <closed file '/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_reduce_logical_and.py', mode 'w' at 0x0000000108fb2098>
logfile = local('/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_reduce_logical_and.log')
cmdline = ['/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/pypy/goal/pypy-c', '-S', '--jit', 'threshold=200,disable_unrolling=9999', '/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_reduce_logical_and.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)
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 = [sys.executable]
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 stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy/module/pypyjit/test_pypy_c/test_00_model.py:88: SyntaxError
----------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_reduce_logical_and.py", line 8, in <module>
print main()
File "/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_reduce_logical_and.py", line 4, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
___________________ TestMicroNumPy.test_array_getitem_basic ____________________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x00000001095264f0>
def test_array_getitem_basic(self):
def main():
import _numpypy.multiarray as np
arr = np.zeros((300, 300))
x = 150
y = 0
while y < 300:
a = arr[x, y]
y += 1
return a
> log = self.run(main, [])
pypy/module/pypyjit/test_pypy_c/test_micronumpy.py:262:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x00000001095264f0>
func_or_src = <function main at 0x0000000108fb3a60>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x0000000109526560>, funcname = 'main'
arglist = ''
f = <closed file '/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_getitem_basic.py', mode 'w' at 0x0000000108fb3ad8>
logfile = local('/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_getitem_basic.log')
cmdline = ['/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/pypy/goal/pypy-c', '-S', '--jit', 'threshold=200,disable_unrolling=9999', '/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_getitem_basic.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)
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 = [sys.executable]
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 stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy/module/pypyjit/test_pypy_c/test_00_model.py:88: SyntaxError
----------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_getitem_basic.py", line 12, in <module>
print main()
File "/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_getitem_basic.py", line 4, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
_________________ TestMicroNumPy.test_array_getitem_accumulate _________________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x0000000150620c60>
def test_array_getitem_accumulate(self):
"""Check that operations/ufuncs on array items are jitted correctly"""
def main():
import _numpypy.multiarray as np
arr = np.zeros((300, 300))
a = 0.0
x = 150
y = 0
while y < 300:
a += arr[x, y]
y += 1
return a
> log = self.run(main, [])
pypy/module/pypyjit/test_pypy_c/test_micronumpy.py:302:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x0000000150620c60>
func_or_src = <function main at 0x00000001190922f0>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x0000000150620c98>, funcname = 'main'
arglist = ''
f = <closed file '/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_getitem_accumulate.py', mode 'w' at 0x0000000119092368>
logfile = local('/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_getitem_accumulate.log')
cmdline = ['/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/pypy/goal/pypy-c', '-S', '--jit', 'threshold=200,disable_unrolling=9999', '/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_getitem_accumulate.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)
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 = [sys.executable]
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 stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy/module/pypyjit/test_pypy_c/test_00_model.py:88: SyntaxError
----------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_getitem_accumulate.py", line 13, in <module>
print main()
File "/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_getitem_accumulate.py", line 4, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
___________________ TestMicroNumPy.test_array_flatiter_next ____________________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x000000011959e838>
def test_array_flatiter_next(self):
def main():
import _numpypy.multiarray as np
arr = np.zeros((1024, 16)) + 42
ai = arr.flat
i = 0
while i < arr.size:
a = next(ai)
i += 1
return a
> log = self.run(main, [])
pypy/module/pypyjit/test_pypy_c/test_micronumpy.py:341:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x000000011959e838>
func_or_src = <function main at 0x00000001190f8638>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x000000011959e8a8>, funcname = 'main'
arglist = ''
f = <closed file '/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_flatiter_next.py', mode 'w' at 0x00000001190f86b0>
logfile = local('/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_flatiter_next.log')
cmdline = ['/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/pypy/goal/pypy-c', '-S', '--jit', 'threshold=200,disable_unrolling=9999', '/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_flatiter_next.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)
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 = [sys.executable]
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 stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy/module/pypyjit/test_pypy_c/test_00_model.py:88: SyntaxError
----------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_flatiter_next.py", line 12, in <module>
print main()
File "/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_flatiter_next.py", line 4, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
______________ TestMicroNumPy.test_array_flatiter_getitem_single _______________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x0000000131670058>
def test_array_flatiter_getitem_single(self):
def main():
import _numpypy.multiarray as np
arr = np.zeros((1024, 16)) + 42
ai = arr.flat
i = 0
while i < arr.size:
a = ai[i] # ID: getitem
i += 1
return a
> log = self.run(main, [])
pypy/module/pypyjit/test_pypy_c/test_micronumpy.py:373:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x0000000131670058>
func_or_src = <function main at 0x00000001190e0098>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x0000000119509ec0>, funcname = 'main'
arglist = ''
f = <closed file '/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_flatiter_getitem_single.py', mode 'w' at 0x00000001190e0638>
logfile = local('/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_flatiter_getitem_single.log')
cmdline = ['/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/pypy/goal/pypy-c', '-S', '--jit', 'threshold=200,disable_unrolling=9999', '/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_flatiter_getitem_single.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)
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 = [sys.executable]
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 stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy/module/pypyjit/test_pypy_c/test_00_model.py:88: SyntaxError
----------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_flatiter_getitem_single.py", line 12, in <module>
print main()
File "/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_flatiter_getitem_single.py", line 4, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
______________ TestMicroNumPy.test_array_flatiter_setitem_single _______________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x0000000118e303a0>
def test_array_flatiter_setitem_single(self):
def main():
import _numpypy.multiarray as np
arr = np.empty((1024, 16))
ai = arr.flat
i = 0
while i < arr.size:
ai[i] = 42.0
i += 1
return ai[-1]
> log = self.run(main, [])
pypy/module/pypyjit/test_pypy_c/test_micronumpy.py:395:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x0000000118e303a0>
func_or_src = <function main at 0x00000001190e19e8>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x0000000118e303d8>, funcname = 'main'
arglist = ''
f = <closed file '/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_flatiter_setitem_single.py', mode 'w' at 0x00000001394ac458>
logfile = local('/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_flatiter_setitem_single.log')
cmdline = ['/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/pypy/goal/pypy-c', '-S', '--jit', 'threshold=200,disable_unrolling=9999', '/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_flatiter_setitem_single.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)
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 = [sys.executable]
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 stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy/module/pypyjit/test_pypy_c/test_00_model.py:88: SyntaxError
----------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_flatiter_setitem_single.py", line 12, in <module>
print main()
File "/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_array_flatiter_setitem_single.py", line 4, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
________________________ TestMicroNumPy.test_mixed_div _________________________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x00000001091937c0>
def test_mixed_div(self):
N = 1500
def main():
N = 1500
import _numpypy.multiarray as np
arr = np.zeros(N)
l = [arr[i]/2. for i in range(N)]
return l
> log = self.run(main, [])
pypy/module/pypyjit/test_pypy_c/test_micronumpy.py:427:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x00000001091937c0>
func_or_src = <function main at 0x000000013099a9f8>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x00000001091937f8>, funcname = 'main'
arglist = ''
f = <closed file '/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_mixed_div.py', mode 'w' at 0x000000013099aa70>
logfile = local('/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_mixed_div.log')
cmdline = ['/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/pypy/goal/pypy-c', '-S', '--jit', 'threshold=200,disable_unrolling=9999', '/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_mixed_div.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)
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 = [sys.executable]
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 stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy/module/pypyjit/test_pypy_c/test_00_model.py:88: SyntaxError
----------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_mixed_div.py", line 9, in <module>
print main()
File "/tmp/buildbot-arm64/usession-main-5959/test-pypy-jit/test_mixed_div.py", line 5, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
=========================== short test summary info ============================
FAIL pypy/module/pypyjit/test_pypy_c/test_boolrewrite.py::TestBoolRewrite::()::test_boolrewrite_allcases_reflex::[111]
FAIL pypy/module/pypyjit/test_pypy_c/test_jitlogparser.py::TestLogParser::()::test
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_reduce_logical_xor
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_reduce_logical_and
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_array_getitem_basic
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_array_getitem_accumulate
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_array_flatiter_next
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_array_flatiter_getitem_single
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_array_flatiter_setitem_single
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_mixed_div
============= 10 failed, 1044 passed, 153 skipped in 70.30 seconds =============
program finished with exit code 1
elapsedTime=70.618339