virt_test/bin/python testrunner/runner.py --logfile=testrun.log --config=pypy/testrunner_cfg.py '--config=~/machine_cfg.py' --root=pypy --timeout=4000 in dir /build_dir/own-linux-x86-64/build (timeout 4000 secs) watching logfiles {'pytestLog': 'testrun.log'} argv: ['virt_test/bin/python', 'testrunner/runner.py', '--logfile=testrun.log', '--config=pypy/testrunner_cfg.py', '--config=~/machine_cfg.py', '--root=pypy', '--timeout=4000'] environment: AUDITWHEEL_ARCH=x86_64 AUDITWHEEL_PLAT=manylinux2014_x86_64 AUDITWHEEL_POLICY=manylinux2014 DEVTOOLSET_ROOTPATH=/opt/rh/devtoolset-10/root HOME=/home/buildslave HOSTNAME=a58a84039819 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/own-linux-x86-64/build PYPYCHERRYPICK= PYPY_LOCALBASE=/usr/local PYPY_MAKE_PORTABLE=1 PYPY_USESSION_DIR=/tmp/pytest PYTHONPATH=.: SHELL=/bin/bash SHLVL=2 SSL_CERT_FILE=/opt/_internal/certs.pem TERM=xterm TMPDIR=/tmp/pytest USER=buildslave USE_CURL=1 _=/python27_virt/bin/buildslave using PTY: False using config pypy/testrunner_cfg.py using config /home/buildslave/machine_cfg.py running 4 parallel test workers setting MAKEFLAGS to ' ' (space) -- config/test -- interpreter/astcompiler/test -- interpreter/pyparser/test -- interpreter/test -- module/__builtin__/test -- module/__pypy__/test -- module/_ast/test -- module/_cffi_backend/test -- module/_codecs/test -- module/_continuation/test -- module/_cppyy/test -- module/_csv/test -- module/_demo/test -- module/_file/test -- module/_io/test -- module/_jitlog/test -- module/_locale/test -- module/_lsprof/test -- module/_md5/test -- module/_minimal_curses/test -- module/_multibytecodec/test -- module/_multiprocessing/test -- module/_pypyjson/test -- module/_random/test -- module/_rawffi/alt/test -- module/_rawffi/test -- module/_sha/test -- module/_socket/test -- module/_sre/test -- module/_vmprof/test -- module/_warnings/test -- module/_weakref/test -- module/_winreg/test -- module/array/test -- module/binascii/test -- module/bz2/test -- module/cStringIO/test -- module/cmath/test -- module/cpyext/test/test_abstract.py -- module/cpyext/test/test_api.py -- module/cpyext/test/test_arraymodule.py -- module/cpyext/test/test_boolobject.py -- module/cpyext/test/test_borrow.py -- module/cpyext/test/test_bufferobject.py -- module/cpyext/test/test_bytearrayobject.py -- module/cpyext/test/test_bytesobject.py -- module/cpyext/test/test_capsule.py -- module/cpyext/test/test_cell.py -- module/cpyext/test/test_classobject.py -- module/cpyext/test/test_codecs.py -- module/cpyext/test/test_complexobject.py -- module/cpyext/test/test_cpyext.py -- module/cpyext/test/test_datetime.py -- module/cpyext/test/test_dictobject.py -- module/cpyext/test/test_eval.py -- module/cpyext/test/test_fileobject.py -- module/cpyext/test/test_floatobject.py -- module/cpyext/test/test_frameobject.py -- module/cpyext/test/test_funcobject.py -- module/cpyext/test/test_genobject.py -- module/cpyext/test/test_getargs.py -- module/cpyext/test/test_import.py -- module/cpyext/test/test_intobject.py -- module/cpyext/test/test_iterator.py -- module/cpyext/test/test_listobject.py -- module/cpyext/test/test_longobject.py -- module/cpyext/test/test_mapping.py -- module/cpyext/test/test_marshal.py -- module/cpyext/test/test_memoryobject.py -- module/cpyext/test/test_methodobject.py -- module/cpyext/test/test_misc.py -- module/cpyext/test/test_module.py -- module/cpyext/test/test_ndarrayobject.py -- module/cpyext/test/test_number.py -- module/cpyext/test/test_object.py -- module/cpyext/test/test_pycobject.py -- module/cpyext/test/test_pyerrors.py -- module/cpyext/test/test_pyfile.py -- module/cpyext/test/test_pysignals.py -- module/cpyext/test/test_pystate.py -- module/cpyext/test/test_pystrtod.py -- module/cpyext/test/test_sequence.py -- module/cpyext/test/test_setobject.py -- module/cpyext/test/test_sliceobject.py -- module/cpyext/test/test_structseq.py -- module/cpyext/test/test_sysmodule.py -- module/cpyext/test/test_thread.py -- module/cpyext/test/test_traceback.py -- module/cpyext/test/test_translate.py -- module/cpyext/test/test_tupleobject.py -- module/cpyext/test/test_typeobject.py -- module/cpyext/test/test_unicodeobject.py -- module/cpyext/test/test_userslots.py -- module/cpyext/test/test_version.py -- module/cpyext/test/test_weakref.py -- module/crypt/test -- module/errno/test -- module/exceptions/test -- module/faulthandler/test -- module/fcntl/test -- module/gc/test -- module/imp/test -- module/itertools/test -- module/marshal/test -- module/math/test -- module/micronumpy/test -- module/mmap/test -- module/operator/test -- module/parser/test -- module/posix/test -- module/pwd/test -- module/pyexpat/test -- module/pypyjit/test -- module/select/test -- module/signal/test -- module/struct/test -- module/sys/test -- module/termios/test -- module/test_lib_pypy -- module/thread/test -- module/time/test -- module/unicodedata/test -- module/zipimport/test -- module/zlib/test -- objspace/fake/test -- objspace/std/test -- objspace/test -- sandbox/test -- tool/bench/test -- tool/memusage/test -- tool/pytest/test -- tool/release/test -- tool/test -- total: 133 to run ++ 22:00:18 starting config/test [1 started in total] ++ 22:00:18 starting interpreter/astcompiler/test [2 started in total] ++ 22:00:18 starting interpreter/pyparser/test [3 started in total] ++ 22:00:18 starting interpreter/test [4 started in total] __ interpreter/pyparser/test [1 done in total, somefailed=True] _______________ ============================= 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/own-linux-x86-64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-x86-64/build/pytest.pyc rootdir: /build_dir/own-linux-x86-64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 119 items interpreter/pyparser/test/test_automata.py ... interpreter/pyparser/test/test_future.py ..................................... interpreter/pyparser/test/test_gendfa.py . interpreter/pyparser/test/test_metaparser.py EEEEEEEEEEEEEEE interpreter/pyparser/test/test_parser.py .EEEEEEEEEEEE interpreter/pyparser/test/test_parsestring.py EEEEEEEEE interpreter/pyparser/test/test_pyparse.py EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE interpreter/pyparser/test/test_pytokenizer.py EEEEE ==================================== ERRORS ==================================== __________ ERROR at setup of TestParserGenerator.test_multiple_rules ___________ item = <Function 'test_multiple_rules'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_76.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_76.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_76.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_76.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_76.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_76.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_76.c:143: E /tmp/pytest/usession-main-22713/platcheck_76.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_76.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_76.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_76.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_76.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_76.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_76.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_76.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_76.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_76.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_76.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestParserGenerator.test_simple _______________ item = <Function 'test_simple'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_77.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_77.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_77.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_77.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_77.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_77.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_77.c:143: E /tmp/pytest/usession-main-22713/platcheck_77.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_77.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_77.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_77.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_77.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_77.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_77.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_77.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_77.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_77.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_77.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______ ERROR at setup of TestParserGenerator.test_load_python_grammars ________ item = <Function 'test_load_python_grammars'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_78.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_78.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_78.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_78.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_78.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_78.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_78.c:143: E /tmp/pytest/usession-main-22713/platcheck_78.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_78.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_78.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_78.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_78.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_78.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_78.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_78.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_78.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_78.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_78.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestParserGenerator.test_items _______________ item = <Function 'test_items'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_79.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_79.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_79.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_79.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_79.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_79.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_79.c:143: E /tmp/pytest/usession-main-22713/platcheck_79.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_79.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_79.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_79.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_79.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_79.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_79.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_79.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_79.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_79.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_79.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestParserGenerator.test_alternatives ____________ item = <Function 'test_alternatives'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_80.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_80.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_80.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_80.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_80.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_80.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_80.c:143: E /tmp/pytest/usession-main-22713/platcheck_80.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_80.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_80.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_80.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_80.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_80.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_80.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_80.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_80.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_80.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_80.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestParserGenerator.test_optional ______________ item = <Function 'test_optional'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_81.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_81.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_81.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_81.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_81.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_81.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_81.c:143: E /tmp/pytest/usession-main-22713/platcheck_81.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_81.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_81.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_81.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_81.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_81.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_81.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_81.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_81.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_81.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_81.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of TestParserGenerator.test_optional_repeater _________ item = <Function 'test_optional_repeater'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_82.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_82.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_82.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_82.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_82.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_82.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_82.c:143: E /tmp/pytest/usession-main-22713/platcheck_82.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_82.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_82.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_82.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_82.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_82.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_82.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_82.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_82.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_82.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_82.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestParserGenerator.test_grouping ______________ item = <Function 'test_grouping'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_83.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_83.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_83.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_83.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_83.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_83.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_83.c:143: E /tmp/pytest/usession-main-22713/platcheck_83.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_83.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_83.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_83.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_83.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_83.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_83.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_83.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_83.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_83.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_83.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestParserGenerator.test_keyword ______________ item = <Function 'test_keyword'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_84.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_84.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_84.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_84.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_84.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_84.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_84.c:143: E /tmp/pytest/usession-main-22713/platcheck_84.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_84.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_84.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_84.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_84.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_84.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_84.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_84.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_84.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_84.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_84.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestParserGenerator.test_token _______________ item = <Function 'test_token'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_85.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_85.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_85.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_85.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_85.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_85.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_85.c:143: E /tmp/pytest/usession-main-22713/platcheck_85.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_85.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_85.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_85.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_85.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_85.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_85.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_85.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_85.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_85.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_85.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestParserGenerator.test_operator ______________ item = <Function 'test_operator'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_86.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_86.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_86.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_86.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_86.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_86.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_86.c:143: E /tmp/pytest/usession-main-22713/platcheck_86.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_86.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_86.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_86.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_86.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_86.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_86.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_86.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_86.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_86.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_86.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestParserGenerator.test_symbol _______________ item = <Function 'test_symbol'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_87.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_87.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_87.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_87.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_87.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_87.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_87.c:143: E /tmp/pytest/usession-main-22713/platcheck_87.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_87.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_87.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_87.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_87.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_87.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_87.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_87.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_87.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_87.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_87.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestParserGenerator.test_repeaters _____________ item = <Function 'test_repeaters'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_88.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_88.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_88.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_88.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_88.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_88.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_88.c:143: E /tmp/pytest/usession-main-22713/platcheck_88.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_88.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_88.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_88.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_88.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_88.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_88.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_88.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_88.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_88.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_88.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestParserGenerator.test_error _______________ item = <Function 'test_error'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_89.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_89.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_89.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_89.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_89.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_89.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_89.c:143: E /tmp/pytest/usession-main-22713/platcheck_89.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_89.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_89.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_89.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_89.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_89.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_89.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_89.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_89.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_89.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_89.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______ ERROR at setup of TestParserGenerator.test_comments_and_whitespace ______ item = <Function 'test_comments_and_whitespace'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_90.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_90.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_90.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_90.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_90.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_90.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_90.c:143: E /tmp/pytest/usession-main-22713/platcheck_90.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_90.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_90.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_90.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_90.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_90.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_90.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_90.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_90.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_90.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_90.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestParser.test_multiple_rules _______________ item = <Function 'test_multiple_rules'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_91.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_91.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_91.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_91.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_91.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_91.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_91.c:143: E /tmp/pytest/usession-main-22713/platcheck_91.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_91.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_91.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_91.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_91.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_91.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_91.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_91.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_91.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_91.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_91.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestParser.test_recursive_rule _______________ item = <Function 'test_recursive_rule'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_92.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_92.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_92.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_92.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_92.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_92.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_92.c:143: E /tmp/pytest/usession-main-22713/platcheck_92.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_92.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_92.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_92.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_92.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_92.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_92.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_92.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_92.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_92.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_92.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________________ ERROR at setup of TestParser.test_symbol ___________________ item = <Function 'test_symbol'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_93.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_93.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_93.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_93.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_93.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_93.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_93.c:143: E /tmp/pytest/usession-main-22713/platcheck_93.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_93.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_93.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_93.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_93.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_93.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_93.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_93.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_93.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_93.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_93.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________________ ERROR at setup of TestParser.test_token ____________________ item = <Function 'test_token'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_94.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_94.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_94.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_94.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_94.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_94.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_94.c:143: E /tmp/pytest/usession-main-22713/platcheck_94.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_94.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_94.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_94.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_94.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_94.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_94.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_94.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_94.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_94.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_94.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestParser.test_optional __________________ item = <Function 'test_optional'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_95.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_95.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_95.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_95.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_95.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_95.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_95.c:143: E /tmp/pytest/usession-main-22713/platcheck_95.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_95.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_95.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_95.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_95.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_95.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_95.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_95.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_95.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_95.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_95.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestParser.test_grouping __________________ item = <Function 'test_grouping'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_96.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_96.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_96.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_96.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_96.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_96.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_96.c:143: E /tmp/pytest/usession-main-22713/platcheck_96.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_96.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_96.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_96.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_96.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_96.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_96.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_96.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_96.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_96.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_96.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestParser.test_alternative _________________ item = <Function 'test_alternative'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_97.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_97.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_97.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_97.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_97.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_97.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_97.c:143: E /tmp/pytest/usession-main-22713/platcheck_97.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_97.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_97.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_97.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_97.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_97.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_97.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_97.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_97.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_97.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_97.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestParser.test_keyword ___________________ item = <Function 'test_keyword'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_98.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_98.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_98.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_98.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_98.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_98.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_98.c:143: E /tmp/pytest/usession-main-22713/platcheck_98.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_98.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_98.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_98.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_98.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_98.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_98.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_98.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_98.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_98.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_98.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestParser.test_repeaters __________________ item = <Function 'test_repeaters'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_99.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_99.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_99.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_99.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_99.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_99.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_99.c:143: E /tmp/pytest/usession-main-22713/platcheck_99.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_99.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_99.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_99.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_99.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_99.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_99.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_99.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_99.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_99.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_99.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestParser.test_optimized_terminal _____________ item = <Function 'test_optimized_terminal'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_100.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_100.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_100.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_100.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_100.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_100.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_100.c:143: E /tmp/pytest/usession-main-22713/platcheck_100.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_100.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_100.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_100.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_100.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_100.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_100.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_100.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_100.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_100.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_100.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestParser.test_error_string ________________ item = <Function 'test_error_string'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_101.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_101.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_101.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_101.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_101.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_101.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_101.c:143: E /tmp/pytest/usession-main-22713/platcheck_101.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_101.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_101.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_101.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_101.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_101.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_101.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_101.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_101.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_101.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_101.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of TestParser.test_line_attached_to_terminal __________ item = <Function 'test_line_attached_to_terminal'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_102.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_102.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_102.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_102.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_102.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_102.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_102.c:143: E /tmp/pytest/usession-main-22713/platcheck_102.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_102.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_102.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_102.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_102.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_102.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_102.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_102.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_102.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_102.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_102.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestParsetring.test_simple _________________ item = <Function 'test_simple'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_103.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_103.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_103.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_103.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_103.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_103.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_103.c:143: E /tmp/pytest/usession-main-22713/platcheck_103.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_103.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_103.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_103.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_103.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_103.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_103.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_103.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_103.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_103.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_103.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestParsetring.test_unicode _________________ item = <Function 'test_unicode'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_104.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_104.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_104.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_104.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_104.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_104.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_104.c:143: E /tmp/pytest/usession-main-22713/platcheck_104.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_104.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_104.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_104.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_104.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_104.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_104.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_104.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_104.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_104.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_104.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of TestParsetring.test_unicode_literals ____________ item = <Function 'test_unicode_literals'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_105.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_105.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_105.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_105.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_105.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_105.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_105.c:143: E /tmp/pytest/usession-main-22713/platcheck_105.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_105.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_105.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_105.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_105.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_105.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_105.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_105.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_105.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_105.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_105.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestParsetring.test_bytes __________________ item = <Function 'test_bytes'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_106.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_106.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_106.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_106.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_106.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_106.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_106.c:143: E /tmp/pytest/usession-main-22713/platcheck_106.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_106.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_106.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_106.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_106.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_106.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_106.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_106.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_106.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_106.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_106.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestParsetring.test_simple_enc_roundtrip __________ item = <Function 'test_simple_enc_roundtrip'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_107.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_107.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_107.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_107.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_107.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_107.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_107.c:143: E /tmp/pytest/usession-main-22713/platcheck_107.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_107.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_107.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_107.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_107.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_107.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_107.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_107.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_107.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_107.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_107.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ERROR at setup of TestParsetring.test_multiline_unicode_strings_with_backslash item = <Function 'test_multiline_unicode_strings_with_backslash'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_108.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_108.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_108.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_108.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_108.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_108.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_108.c:143: E /tmp/pytest/usession-main-22713/platcheck_108.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_108.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_108.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_108.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_108.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_108.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_108.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_108.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_108.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_108.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_108.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestParsetring.test_bug1 __________________ item = <Function 'test_bug1'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_109.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_109.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_109.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_109.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_109.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_109.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_109.c:143: E /tmp/pytest/usession-main-22713/platcheck_109.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_109.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_109.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_109.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_109.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_109.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_109.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_109.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_109.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_109.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_109.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of TestParsetring.test_wide_unicode_in_source _________ item = <Function 'test_wide_unicode_in_source'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_110.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_110.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_110.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_110.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_110.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_110.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_110.c:143: E /tmp/pytest/usession-main-22713/platcheck_110.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_110.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_110.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_110.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_110.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_110.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_110.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_110.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_110.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_110.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_110.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestParsetring.test_decode_unicode_utf8 ___________ item = <Function 'test_decode_unicode_utf8'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_111.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_111.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_111.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_111.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_111.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_111.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_111.c:143: E /tmp/pytest/usession-main-22713/platcheck_111.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_111.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_111.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_111.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_111.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_111.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_111.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_111.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_111.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_111.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_111.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestPythonParser.test_with_and_as ______________ item = <Function 'test_with_and_as'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_112.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_112.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_112.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_112.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_112.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_112.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_112.c:143: E /tmp/pytest/usession-main-22713/platcheck_112.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_112.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_112.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_112.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_112.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_112.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_112.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_112.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_112.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_112.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_112.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestPythonParser.test_dont_imply_dedent ___________ item = <Function 'test_dont_imply_dedent'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_113.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_113.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_113.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_113.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_113.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_113.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_113.c:143: E /tmp/pytest/usession-main-22713/platcheck_113.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_113.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_113.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_113.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_113.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_113.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_113.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_113.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_113.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_113.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_113.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestPythonParser.test_clear_state ______________ item = <Function 'test_clear_state'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_114.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_114.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_114.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_114.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_114.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_114.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_114.c:143: E /tmp/pytest/usession-main-22713/platcheck_114.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_114.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_114.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_114.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_114.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_114.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_114.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_114.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_114.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_114.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_114.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestPythonParser.test_encoding _______________ item = <Function 'test_encoding'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_115.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_115.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_115.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_115.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_115.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_115.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_115.c:143: E /tmp/pytest/usession-main-22713/platcheck_115.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_115.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_115.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_115.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_115.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_115.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_115.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_115.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_115.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_115.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_115.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestPythonParser.test_non_unicode_codec ___________ item = <Function 'test_non_unicode_codec'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_116.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_116.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_116.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_116.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_116.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_116.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_116.c:143: E /tmp/pytest/usession-main-22713/platcheck_116.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_116.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_116.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_116.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_116.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_116.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_116.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_116.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_116.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_116.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_116.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestPythonParser.test_syntax_error _____________ item = <Function 'test_syntax_error'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_117.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_117.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_117.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_117.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_117.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_117.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_117.c:143: E /tmp/pytest/usession-main-22713/platcheck_117.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_117.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_117.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_117.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_117.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_117.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_117.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_117.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_117.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_117.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_117.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestPythonParser.test_is __________________ item = <Function 'test_is'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_118.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_118.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_118.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_118.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_118.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_118.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_118.c:143: E /tmp/pytest/usession-main-22713/platcheck_118.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_118.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_118.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_118.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_118.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_118.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_118.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_118.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_118.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_118.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_118.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestPythonParser.test_indentation_error ___________ item = <Function 'test_indentation_error'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_119.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_119.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_119.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_119.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_119.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_119.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_119.c:143: E /tmp/pytest/usession-main-22713/platcheck_119.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_119.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_119.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_119.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_119.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_119.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_119.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_119.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_119.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_119.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_119.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestPythonParser.test_mac_newline ______________ item = <Function 'test_mac_newline'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_120.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_120.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_120.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_120.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_120.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_120.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_120.c:143: E /tmp/pytest/usession-main-22713/platcheck_120.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_120.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_120.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_120.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_120.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_120.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_120.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_120.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_120.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_120.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_120.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestPythonParser.test_mode _________________ item = <Function 'test_mode'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_121.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_121.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_121.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_121.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_121.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_121.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_121.c:143: E /tmp/pytest/usession-main-22713/platcheck_121.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_121.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_121.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_121.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_121.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_121.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_121.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_121.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_121.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_121.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_121.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestPythonParser.test_multiline_string ___________ item = <Function 'test_multiline_string'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_122.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_122.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_122.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_122.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_122.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_122.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_122.c:143: E /tmp/pytest/usession-main-22713/platcheck_122.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_122.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_122.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_122.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_122.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_122.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_122.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_122.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_122.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_122.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_122.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of TestPythonParser.test_bytes_literal _____________ item = <Function 'test_bytes_literal'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_123.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_123.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_123.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_123.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_123.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_123.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_123.c:143: E /tmp/pytest/usession-main-22713/platcheck_123.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_123.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_123.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_123.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_123.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_123.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_123.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_123.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_123.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_123.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_123.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestPythonParser.test_new_octal_literal ___________ item = <Function 'test_new_octal_literal'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_124.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_124.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_124.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_124.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_124.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_124.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_124.c:143: E /tmp/pytest/usession-main-22713/platcheck_124.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_124.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_124.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_124.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_124.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_124.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_124.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_124.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_124.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_124.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_124.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestPythonParser.test_new_binary_literal __________ item = <Function 'test_new_binary_literal'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_125.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_125.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_125.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_125.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_125.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_125.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_125.c:143: E /tmp/pytest/usession-main-22713/platcheck_125.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_125.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_125.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_125.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_125.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_125.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_125.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_125.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_125.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_125.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_125.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of TestPythonParser.test_print_function ____________ item = <Function 'test_print_function'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_126.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_126.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_126.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_126.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_126.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_126.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_126.c:143: E /tmp/pytest/usession-main-22713/platcheck_126.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_126.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_126.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_126.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_126.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_126.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_126.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_126.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_126.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_126.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_126.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestPythonParser.test_universal_newlines __________ item = <Function 'test_universal_newlines'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_127.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_127.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_127.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_127.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_127.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_127.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_127.c:143: E /tmp/pytest/usession-main-22713/platcheck_127.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_127.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_127.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_127.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_127.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_127.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_127.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_127.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_127.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_127.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_127.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestPythonParser.test_revdb_dollar_num ___________ item = <Function 'test_revdb_dollar_num'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_128.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_128.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_128.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_128.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_128.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_128.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_128.c:143: E /tmp/pytest/usession-main-22713/platcheck_128.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_128.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_128.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_128.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_128.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_128.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_128.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_128.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_128.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_128.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_128.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________ ERROR at setup of TestPythonParser.test_error_forgotten_chars _________ item = <Function 'test_error_forgotten_chars'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_129.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_129.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_129.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_129.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_129.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_129.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_129.c:143: E /tmp/pytest/usession-main-22713/platcheck_129.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_129.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_129.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_129.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_129.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_129.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_129.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_129.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_129.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_129.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_129.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestPythonParserRevDB.test_with_and_as ___________ item = <Function 'test_with_and_as'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:625: in make_builtins self.exceptions_module = Module(self, w_name) interpreter/mixedmodule.py:23: in __init__ Module.__init__(self, space, w_name) interpreter/module.py:24: in __init__ space.setitem(w_dict, space.new_interned_str('__name__'), w_name) interpreter/baseobjspace.py:890: in new_interned_str if self._side_effects_ok(): interpreter/baseobjspace.py:920: in _side_effects_ok return self._revdb_standard_code() interpreter/baseobjspace.py:901: in _revdb_standard_code from pypy.interpreter.reverse_debugging import dbstate interpreter/reverse_debugging.py:9: in <module> from pypy.module.marshal import interp_marshal module/marshal/interp_marshal.py:5: in <module> from pypy.module._file.interp_file import W_File module/_file/interp_file.py:5: in <module> from rpython.rlib import streamio ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_130.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_130.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_130.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_130.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_130.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_130.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_130.c:143: E /tmp/pytest/usession-main-22713/platcheck_130.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_130.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_130.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_130.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_130.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_130.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_130.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_130.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_130.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_130.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_130.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________ ERROR at setup of TestPythonParserRevDB.test_dont_imply_dedent ________ item = <Function 'test_dont_imply_dedent'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:625: in make_builtins self.exceptions_module = Module(self, w_name) interpreter/mixedmodule.py:23: in __init__ Module.__init__(self, space, w_name) interpreter/module.py:24: in __init__ space.setitem(w_dict, space.new_interned_str('__name__'), w_name) interpreter/baseobjspace.py:890: in new_interned_str if self._side_effects_ok(): interpreter/baseobjspace.py:920: in _side_effects_ok return self._revdb_standard_code() interpreter/baseobjspace.py:901: in _revdb_standard_code from pypy.interpreter.reverse_debugging import dbstate interpreter/reverse_debugging.py:9: in <module> from pypy.module.marshal import interp_marshal module/marshal/interp_marshal.py:5: in <module> from pypy.module._file.interp_file import W_File module/_file/interp_file.py:5: in <module> from rpython.rlib import streamio ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_131.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_131.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_131.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_131.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_131.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_131.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_131.c:143: E /tmp/pytest/usession-main-22713/platcheck_131.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_131.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_131.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_131.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_131.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_131.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_131.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_131.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_131.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_131.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_131.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestPythonParserRevDB.test_clear_state ___________ item = <Function 'test_clear_state'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:625: in make_builtins self.exceptions_module = Module(self, w_name) interpreter/mixedmodule.py:23: in __init__ Module.__init__(self, space, w_name) interpreter/module.py:24: in __init__ space.setitem(w_dict, space.new_interned_str('__name__'), w_name) interpreter/baseobjspace.py:890: in new_interned_str if self._side_effects_ok(): interpreter/baseobjspace.py:920: in _side_effects_ok return self._revdb_standard_code() interpreter/baseobjspace.py:901: in _revdb_standard_code from pypy.interpreter.reverse_debugging import dbstate interpreter/reverse_debugging.py:9: in <module> from pypy.module.marshal import interp_marshal module/marshal/interp_marshal.py:5: in <module> from pypy.module._file.interp_file import W_File module/_file/interp_file.py:5: in <module> from rpython.rlib import streamio ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_132.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_132.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_132.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_132.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_132.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_132.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_132.c:143: E /tmp/pytest/usession-main-22713/platcheck_132.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_132.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_132.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_132.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_132.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_132.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_132.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_132.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_132.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_132.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_132.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of TestPythonParserRevDB.test_encoding _____________ item = <Function 'test_encoding'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:625: in make_builtins self.exceptions_module = Module(self, w_name) interpreter/mixedmodule.py:23: in __init__ Module.__init__(self, space, w_name) interpreter/module.py:24: in __init__ space.setitem(w_dict, space.new_interned_str('__name__'), w_name) interpreter/baseobjspace.py:890: in new_interned_str if self._side_effects_ok(): interpreter/baseobjspace.py:920: in _side_effects_ok return self._revdb_standard_code() interpreter/baseobjspace.py:901: in _revdb_standard_code from pypy.interpreter.reverse_debugging import dbstate interpreter/reverse_debugging.py:9: in <module> from pypy.module.marshal import interp_marshal module/marshal/interp_marshal.py:5: in <module> from pypy.module._file.interp_file import W_File module/_file/interp_file.py:5: in <module> from rpython.rlib import streamio ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_133.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_133.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_133.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_133.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_133.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_133.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_133.c:143: E /tmp/pytest/usession-main-22713/platcheck_133.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_133.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_133.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_133.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_133.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_133.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_133.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_133.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_133.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_133.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_133.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________ ERROR at setup of TestPythonParserRevDB.test_non_unicode_codec ________ item = <Function 'test_non_unicode_codec'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:625: in make_builtins self.exceptions_module = Module(self, w_name) interpreter/mixedmodule.py:23: in __init__ Module.__init__(self, space, w_name) interpreter/module.py:24: in __init__ space.setitem(w_dict, space.new_interned_str('__name__'), w_name) interpreter/baseobjspace.py:890: in new_interned_str if self._side_effects_ok(): interpreter/baseobjspace.py:920: in _side_effects_ok return self._revdb_standard_code() interpreter/baseobjspace.py:901: in _revdb_standard_code from pypy.interpreter.reverse_debugging import dbstate interpreter/reverse_debugging.py:9: in <module> from pypy.module.marshal import interp_marshal module/marshal/interp_marshal.py:5: in <module> from pypy.module._file.interp_file import W_File module/_file/interp_file.py:5: in <module> from rpython.rlib import streamio ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_134.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_134.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_134.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_134.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_134.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_134.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_134.c:143: E /tmp/pytest/usession-main-22713/platcheck_134.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_134.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_134.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_134.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_134.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_134.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_134.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_134.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_134.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_134.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_134.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestPythonParserRevDB.test_syntax_error ___________ item = <Function 'test_syntax_error'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:625: in make_builtins self.exceptions_module = Module(self, w_name) interpreter/mixedmodule.py:23: in __init__ Module.__init__(self, space, w_name) interpreter/module.py:24: in __init__ space.setitem(w_dict, space.new_interned_str('__name__'), w_name) interpreter/baseobjspace.py:890: in new_interned_str if self._side_effects_ok(): interpreter/baseobjspace.py:920: in _side_effects_ok return self._revdb_standard_code() interpreter/baseobjspace.py:901: in _revdb_standard_code from pypy.interpreter.reverse_debugging import dbstate interpreter/reverse_debugging.py:9: in <module> from pypy.module.marshal import interp_marshal module/marshal/interp_marshal.py:5: in <module> from pypy.module._file.interp_file import W_File module/_file/interp_file.py:5: in <module> from rpython.rlib import streamio ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_135.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_135.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_135.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_135.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_135.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_135.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_135.c:143: E /tmp/pytest/usession-main-22713/platcheck_135.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_135.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_135.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_135.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_135.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_135.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_135.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_135.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_135.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_135.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_135.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestPythonParserRevDB.test_is ________________ item = <Function 'test_is'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:625: in make_builtins self.exceptions_module = Module(self, w_name) interpreter/mixedmodule.py:23: in __init__ Module.__init__(self, space, w_name) interpreter/module.py:24: in __init__ space.setitem(w_dict, space.new_interned_str('__name__'), w_name) interpreter/baseobjspace.py:890: in new_interned_str if self._side_effects_ok(): interpreter/baseobjspace.py:920: in _side_effects_ok return self._revdb_standard_code() interpreter/baseobjspace.py:901: in _revdb_standard_code from pypy.interpreter.reverse_debugging import dbstate interpreter/reverse_debugging.py:9: in <module> from pypy.module.marshal import interp_marshal module/marshal/interp_marshal.py:5: in <module> from pypy.module._file.interp_file import W_File module/_file/interp_file.py:5: in <module> from rpython.rlib import streamio ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_136.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_136.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_136.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_136.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_136.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_136.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_136.c:143: E /tmp/pytest/usession-main-22713/platcheck_136.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_136.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_136.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_136.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_136.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_136.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_136.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_136.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_136.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_136.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_136.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________ ERROR at setup of TestPythonParserRevDB.test_indentation_error ________ item = <Function 'test_indentation_error'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:625: in make_builtins self.exceptions_module = Module(self, w_name) interpreter/mixedmodule.py:23: in __init__ Module.__init__(self, space, w_name) interpreter/module.py:24: in __init__ space.setitem(w_dict, space.new_interned_str('__name__'), w_name) interpreter/baseobjspace.py:890: in new_interned_str if self._side_effects_ok(): interpreter/baseobjspace.py:920: in _side_effects_ok return self._revdb_standard_code() interpreter/baseobjspace.py:901: in _revdb_standard_code from pypy.interpreter.reverse_debugging import dbstate interpreter/reverse_debugging.py:9: in <module> from pypy.module.marshal import interp_marshal module/marshal/interp_marshal.py:5: in <module> from pypy.module._file.interp_file import W_File module/_file/interp_file.py:5: in <module> from rpython.rlib import streamio ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_137.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_137.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_137.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_137.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_137.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_137.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_137.c:143: E /tmp/pytest/usession-main-22713/platcheck_137.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_137.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_137.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_137.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_137.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_137.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_137.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_137.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_137.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_137.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_137.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestPythonParserRevDB.test_mac_newline ___________ item = <Function 'test_mac_newline'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:625: in make_builtins self.exceptions_module = Module(self, w_name) interpreter/mixedmodule.py:23: in __init__ Module.__init__(self, space, w_name) interpreter/module.py:24: in __init__ space.setitem(w_dict, space.new_interned_str('__name__'), w_name) interpreter/baseobjspace.py:890: in new_interned_str if self._side_effects_ok(): interpreter/baseobjspace.py:920: in _side_effects_ok return self._revdb_standard_code() interpreter/baseobjspace.py:901: in _revdb_standard_code from pypy.interpreter.reverse_debugging import dbstate interpreter/reverse_debugging.py:9: in <module> from pypy.module.marshal import interp_marshal module/marshal/interp_marshal.py:5: in <module> from pypy.module._file.interp_file import W_File module/_file/interp_file.py:5: in <module> from rpython.rlib import streamio ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_138.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_138.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_138.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_138.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_138.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_138.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_138.c:143: E /tmp/pytest/usession-main-22713/platcheck_138.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_138.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_138.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_138.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_138.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_138.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_138.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_138.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_138.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_138.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_138.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestPythonParserRevDB.test_mode _______________ item = <Function 'test_mode'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:625: in make_builtins self.exceptions_module = Module(self, w_name) interpreter/mixedmodule.py:23: in __init__ Module.__init__(self, space, w_name) interpreter/module.py:24: in __init__ space.setitem(w_dict, space.new_interned_str('__name__'), w_name) interpreter/baseobjspace.py:890: in new_interned_str if self._side_effects_ok(): interpreter/baseobjspace.py:920: in _side_effects_ok return self._revdb_standard_code() interpreter/baseobjspace.py:901: in _revdb_standard_code from pypy.interpreter.reverse_debugging import dbstate interpreter/reverse_debugging.py:9: in <module> from pypy.module.marshal import interp_marshal module/marshal/interp_marshal.py:5: in <module> from pypy.module._file.interp_file import W_File module/_file/interp_file.py:5: in <module> from rpython.rlib import streamio ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_139.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_139.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_139.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_139.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_139.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_139.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_139.c:143: E /tmp/pytest/usession-main-22713/platcheck_139.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_139.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_139.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_139.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_139.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_139.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_139.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_139.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_139.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_139.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_139.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________ ERROR at setup of TestPythonParserRevDB.test_multiline_string _________ item = <Function 'test_multiline_string'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:625: in make_builtins self.exceptions_module = Module(self, w_name) interpreter/mixedmodule.py:23: in __init__ Module.__init__(self, space, w_name) interpreter/module.py:24: in __init__ space.setitem(w_dict, space.new_interned_str('__name__'), w_name) interpreter/baseobjspace.py:890: in new_interned_str if self._side_effects_ok(): interpreter/baseobjspace.py:920: in _side_effects_ok return self._revdb_standard_code() interpreter/baseobjspace.py:901: in _revdb_standard_code from pypy.interpreter.reverse_debugging import dbstate interpreter/reverse_debugging.py:9: in <module> from pypy.module.marshal import interp_marshal module/marshal/interp_marshal.py:5: in <module> from pypy.module._file.interp_file import W_File module/_file/interp_file.py:5: in <module> from rpython.rlib import streamio ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_140.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_140.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_140.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_140.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_140.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_140.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_140.c:143: E /tmp/pytest/usession-main-22713/platcheck_140.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_140.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_140.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_140.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_140.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_140.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_140.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_140.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_140.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_140.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_140.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestPythonParserRevDB.test_bytes_literal __________ item = <Function 'test_bytes_literal'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:625: in make_builtins self.exceptions_module = Module(self, w_name) interpreter/mixedmodule.py:23: in __init__ Module.__init__(self, space, w_name) interpreter/module.py:24: in __init__ space.setitem(w_dict, space.new_interned_str('__name__'), w_name) interpreter/baseobjspace.py:890: in new_interned_str if self._side_effects_ok(): interpreter/baseobjspace.py:920: in _side_effects_ok return self._revdb_standard_code() interpreter/baseobjspace.py:901: in _revdb_standard_code from pypy.interpreter.reverse_debugging import dbstate interpreter/reverse_debugging.py:9: in <module> from pypy.module.marshal import interp_marshal module/marshal/interp_marshal.py:5: in <module> from pypy.module._file.interp_file import W_File module/_file/interp_file.py:5: in <module> from rpython.rlib import streamio ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_141.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_141.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_141.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_141.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_141.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_141.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_141.c:143: E /tmp/pytest/usession-main-22713/platcheck_141.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_141.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_141.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_141.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_141.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_141.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_141.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_141.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_141.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_141.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_141.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________ ERROR at setup of TestPythonParserRevDB.test_new_octal_literal ________ item = <Function 'test_new_octal_literal'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:625: in make_builtins self.exceptions_module = Module(self, w_name) interpreter/mixedmodule.py:23: in __init__ Module.__init__(self, space, w_name) interpreter/module.py:24: in __init__ space.setitem(w_dict, space.new_interned_str('__name__'), w_name) interpreter/baseobjspace.py:890: in new_interned_str if self._side_effects_ok(): interpreter/baseobjspace.py:920: in _side_effects_ok return self._revdb_standard_code() interpreter/baseobjspace.py:901: in _revdb_standard_code from pypy.interpreter.reverse_debugging import dbstate interpreter/reverse_debugging.py:9: in <module> from pypy.module.marshal import interp_marshal module/marshal/interp_marshal.py:5: in <module> from pypy.module._file.interp_file import W_File module/_file/interp_file.py:5: in <module> from rpython.rlib import streamio ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_142.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_142.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_142.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_142.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_142.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_142.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_142.c:143: E /tmp/pytest/usession-main-22713/platcheck_142.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_142.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_142.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_142.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_142.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_142.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_142.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_142.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_142.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_142.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_142.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______ ERROR at setup of TestPythonParserRevDB.test_new_binary_literal ________ item = <Function 'test_new_binary_literal'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:625: in make_builtins self.exceptions_module = Module(self, w_name) interpreter/mixedmodule.py:23: in __init__ Module.__init__(self, space, w_name) interpreter/module.py:24: in __init__ space.setitem(w_dict, space.new_interned_str('__name__'), w_name) interpreter/baseobjspace.py:890: in new_interned_str if self._side_effects_ok(): interpreter/baseobjspace.py:920: in _side_effects_ok return self._revdb_standard_code() interpreter/baseobjspace.py:901: in _revdb_standard_code from pypy.interpreter.reverse_debugging import dbstate interpreter/reverse_debugging.py:9: in <module> from pypy.module.marshal import interp_marshal module/marshal/interp_marshal.py:5: in <module> from pypy.module._file.interp_file import W_File module/_file/interp_file.py:5: in <module> from rpython.rlib import streamio ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_143.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_143.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_143.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_143.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_143.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_143.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_143.c:143: E /tmp/pytest/usession-main-22713/platcheck_143.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_143.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_143.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_143.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_143.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_143.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_143.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_143.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_143.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_143.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_143.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of TestPythonParserRevDB.test_print_function __________ item = <Function 'test_print_function'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:625: in make_builtins self.exceptions_module = Module(self, w_name) interpreter/mixedmodule.py:23: in __init__ Module.__init__(self, space, w_name) interpreter/module.py:24: in __init__ space.setitem(w_dict, space.new_interned_str('__name__'), w_name) interpreter/baseobjspace.py:890: in new_interned_str if self._side_effects_ok(): interpreter/baseobjspace.py:920: in _side_effects_ok return self._revdb_standard_code() interpreter/baseobjspace.py:901: in _revdb_standard_code from pypy.interpreter.reverse_debugging import dbstate interpreter/reverse_debugging.py:9: in <module> from pypy.module.marshal import interp_marshal module/marshal/interp_marshal.py:5: in <module> from pypy.module._file.interp_file import W_File module/_file/interp_file.py:5: in <module> from rpython.rlib import streamio ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_144.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_144.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_144.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_144.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_144.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_144.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_144.c:143: E /tmp/pytest/usession-main-22713/platcheck_144.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_144.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_144.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_144.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_144.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_144.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_144.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_144.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_144.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_144.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_144.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______ ERROR at setup of TestPythonParserRevDB.test_universal_newlines ________ item = <Function 'test_universal_newlines'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:625: in make_builtins self.exceptions_module = Module(self, w_name) interpreter/mixedmodule.py:23: in __init__ Module.__init__(self, space, w_name) interpreter/module.py:24: in __init__ space.setitem(w_dict, space.new_interned_str('__name__'), w_name) interpreter/baseobjspace.py:890: in new_interned_str if self._side_effects_ok(): interpreter/baseobjspace.py:920: in _side_effects_ok return self._revdb_standard_code() interpreter/baseobjspace.py:901: in _revdb_standard_code from pypy.interpreter.reverse_debugging import dbstate interpreter/reverse_debugging.py:9: in <module> from pypy.module.marshal import interp_marshal module/marshal/interp_marshal.py:5: in <module> from pypy.module._file.interp_file import W_File module/_file/interp_file.py:5: in <module> from rpython.rlib import streamio ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_145.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_145.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_145.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_145.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_145.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_145.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_145.c:143: E /tmp/pytest/usession-main-22713/platcheck_145.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_145.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_145.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_145.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_145.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_145.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_145.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_145.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_145.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_145.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_145.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______ ERROR at setup of TestPythonParserRevDB.test_error_forgotten_chars ______ item = <Function 'test_error_forgotten_chars'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:625: in make_builtins self.exceptions_module = Module(self, w_name) interpreter/mixedmodule.py:23: in __init__ Module.__init__(self, space, w_name) interpreter/module.py:24: in __init__ space.setitem(w_dict, space.new_interned_str('__name__'), w_name) interpreter/baseobjspace.py:890: in new_interned_str if self._side_effects_ok(): interpreter/baseobjspace.py:920: in _side_effects_ok return self._revdb_standard_code() interpreter/baseobjspace.py:901: in _revdb_standard_code from pypy.interpreter.reverse_debugging import dbstate interpreter/reverse_debugging.py:9: in <module> from pypy.module.marshal import interp_marshal module/marshal/interp_marshal.py:5: in <module> from pypy.module._file.interp_file import W_File module/_file/interp_file.py:5: in <module> from rpython.rlib import streamio ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_146.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_146.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_146.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_146.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_146.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_146.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_146.c:143: E /tmp/pytest/usession-main-22713/platcheck_146.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_146.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_146.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_146.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_146.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_146.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_146.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_146.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_146.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_146.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_146.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________ ERROR at setup of TestPythonParserRevDB.test_revdb_dollar_num _________ item = <Function 'test_revdb_dollar_num'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:625: in make_builtins self.exceptions_module = Module(self, w_name) interpreter/mixedmodule.py:23: in __init__ Module.__init__(self, space, w_name) interpreter/module.py:24: in __init__ space.setitem(w_dict, space.new_interned_str('__name__'), w_name) interpreter/baseobjspace.py:890: in new_interned_str if self._side_effects_ok(): interpreter/baseobjspace.py:920: in _side_effects_ok return self._revdb_standard_code() interpreter/baseobjspace.py:901: in _revdb_standard_code from pypy.interpreter.reverse_debugging import dbstate interpreter/reverse_debugging.py:9: in <module> from pypy.module.marshal import interp_marshal module/marshal/interp_marshal.py:5: in <module> from pypy.module._file.interp_file import W_File module/_file/interp_file.py:5: in <module> from rpython.rlib import streamio ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_147.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_147.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_147.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_147.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_147.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_147.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_147.c:143: E /tmp/pytest/usession-main-22713/platcheck_147.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_147.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_147.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_147.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_147.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_147.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_147.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_147.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_147.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_147.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_147.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestTokenizer.test_simple __________________ item = <Function 'test_simple'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_148.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_148.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_148.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_148.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_148.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_148.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_148.c:143: E /tmp/pytest/usession-main-22713/platcheck_148.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_148.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_148.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_148.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_148.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_148.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_148.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_148.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_148.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_148.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_148.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of TestTokenizer.test_error_parenthesis ____________ item = <Function 'test_error_parenthesis'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_149.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_149.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_149.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_149.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_149.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_149.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_149.c:143: E /tmp/pytest/usession-main-22713/platcheck_149.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_149.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_149.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_149.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_149.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_149.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_149.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_149.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_149.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_149.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_149.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestTokenizer.test_unknown_char _______________ item = <Function 'test_unknown_char'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_150.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_150.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_150.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_150.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_150.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_150.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_150.c:143: E /tmp/pytest/usession-main-22713/platcheck_150.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_150.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_150.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_150.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_150.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_150.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_150.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_150.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_150.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_150.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_150.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestTokenizer.test_eol_string ________________ item = <Function 'test_eol_string'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_151.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_151.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_151.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_151.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_151.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_151.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_151.c:143: E /tmp/pytest/usession-main-22713/platcheck_151.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_151.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_151.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_151.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_151.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_151.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_151.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_151.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_151.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_151.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_151.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of TestTokenizer.test_eof_triple_quoted ____________ item = <Function 'test_eof_triple_quoted'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22713/platcheck_152.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22713/platcheck_152.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22713/platcheck_152.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22713/platcheck_152.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_152.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22713/platcheck_152.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22713/platcheck_152.c:143: E /tmp/pytest/usession-main-22713/platcheck_152.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_152.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22713/platcheck_152.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22713/platcheck_152.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_152.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_152.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_152.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22713/platcheck_152.c:143:\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_152.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_152.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22713/platcheck_152.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ===================== 42 passed, 77 error in 33.53 seconds ===================== ++ 22:00:56 starting module/__builtin__/test [5 started in total] __ interpreter/astcompiler/test [2 done in total, somefailed=True] ____________ ============================= 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/own-linux-x86-64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-x86-64/build/pytest.py rootdir: /build_dir/own-linux-x86-64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 446 items / 1 errors interpreter/astcompiler/test/test_ast.py EEEEEEE interpreter/astcompiler/test/test_astbuilder.py EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE interpreter/astcompiler/test/test_compiler.py EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE interpreter/astcompiler/test/test_misc.py . interpreter/astcompiler/test/test_symtable.py EEEEEEEEEEEEEEEEEEEEEEE ==================================== ERRORS ==================================== ______ ERROR collecting pypy/interpreter/astcompiler/test/apptest_misc.py ______ tool/pytest/apptest2.py:25: in collect space = objspace.gettestobjspace(**spaceconfig) tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:155: in _handle_error raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_76.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_76.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_76.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_76.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_76.c:143: E /tmp/pytest/usession-main-22714/platcheck_76.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_76.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_76.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ------------------------------- Captured stderr -------------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_76.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_76.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_76.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_76.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_76.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_76.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_76.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_76.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstToObject.test_types _________________ item = <Function 'test_types'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_77.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_77.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_77.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_77.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_77.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_77.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_77.c:143: E /tmp/pytest/usession-main-22714/platcheck_77.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_77.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_77.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_77.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_77.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_77.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_77.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_77.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_77.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_77.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_77.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestAstToObject.test_num __________________ item = <Function 'test_num'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_78.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_78.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_78.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_78.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_78.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_78.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_78.c:143: E /tmp/pytest/usession-main-22714/platcheck_78.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_78.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_78.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_78.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_78.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_78.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_78.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_78.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_78.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_78.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_78.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstToObject.test_expr __________________ item = <Function 'test_expr'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_79.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_79.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_79.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_79.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_79.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_79.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_79.c:143: E /tmp/pytest/usession-main-22714/platcheck_79.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_79.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_79.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_79.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_79.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_79.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_79.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_79.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_79.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_79.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_79.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestAstToObject.test_operation _______________ item = <Function 'test_operation'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_80.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_80.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_80.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_80.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_80.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_80.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_80.c:143: E /tmp/pytest/usession-main-22714/platcheck_80.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_80.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_80.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_80.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_80.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_80.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_80.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_80.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_80.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_80.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_80.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestAstToObject.test_from_object ______________ item = <Function 'test_from_object'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_81.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_81.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_81.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_81.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_81.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_81.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_81.c:143: E /tmp/pytest/usession-main-22714/platcheck_81.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_81.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_81.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_81.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_81.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_81.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_81.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_81.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_81.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_81.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_81.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestAstToObject.test_fields _________________ item = <Function 'test_fields'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_82.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_82.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_82.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_82.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_82.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_82.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_82.c:143: E /tmp/pytest/usession-main-22714/platcheck_82.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_82.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_82.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_82.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_82.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_82.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_82.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_82.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_82.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_82.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_82.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestAstToObject.test_attributes _______________ item = <Function 'test_attributes'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_83.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_83.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_83.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_83.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_83.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_83.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_83.c:143: E /tmp/pytest/usession-main-22714/platcheck_83.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_83.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_83.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_83.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_83.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_83.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_83.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_83.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_83.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_83.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_83.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestAstBuilder.test_top_level ________________ item = <Function 'test_top_level'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_84.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_84.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_84.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_84.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_84.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_84.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_84.c:143: E /tmp/pytest/usession-main-22714/platcheck_84.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_84.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_84.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_84.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_84.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_84.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_84.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_84.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_84.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_84.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_84.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstBuilder.test_print __________________ item = <Function 'test_print'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_85.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_85.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_85.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_85.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_85.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_85.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_85.c:143: E /tmp/pytest/usession-main-22714/platcheck_85.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_85.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_85.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_85.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_85.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_85.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_85.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_85.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_85.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_85.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_85.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestAstBuilder.test_del ___________________ item = <Function 'test_del'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_86.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_86.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_86.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_86.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_86.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_86.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_86.c:143: E /tmp/pytest/usession-main-22714/platcheck_86.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_86.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_86.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_86.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_86.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_86.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_86.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_86.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_86.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_86.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_86.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstBuilder.test_break __________________ item = <Function 'test_break'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_87.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_87.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_87.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_87.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_87.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_87.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_87.c:143: E /tmp/pytest/usession-main-22714/platcheck_87.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_87.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_87.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_87.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_87.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_87.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_87.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_87.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_87.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_87.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_87.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestAstBuilder.test_continue ________________ item = <Function 'test_continue'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_88.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_88.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_88.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_88.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_88.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_88.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_88.c:143: E /tmp/pytest/usession-main-22714/platcheck_88.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_88.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_88.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_88.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_88.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_88.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_88.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_88.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_88.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_88.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_88.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstBuilder.test_return _________________ item = <Function 'test_return'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_89.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_89.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_89.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_89.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_89.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_89.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_89.c:143: E /tmp/pytest/usession-main-22714/platcheck_89.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_89.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_89.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_89.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_89.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_89.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_89.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_89.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_89.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_89.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_89.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstBuilder.test_raise __________________ item = <Function 'test_raise'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_90.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_90.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_90.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_90.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_90.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_90.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_90.c:143: E /tmp/pytest/usession-main-22714/platcheck_90.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_90.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_90.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_90.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_90.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_90.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_90.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_90.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_90.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_90.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_90.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstBuilder.test_import _________________ item = <Function 'test_import'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_91.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_91.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_91.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_91.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_91.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_91.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_91.c:143: E /tmp/pytest/usession-main-22714/platcheck_91.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_91.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_91.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_91.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_91.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_91.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_91.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_91.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_91.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_91.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_91.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestAstBuilder.test_from_import _______________ item = <Function 'test_from_import'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_92.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_92.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_92.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_92.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_92.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_92.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_92.c:143: E /tmp/pytest/usession-main-22714/platcheck_92.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_92.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_92.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_92.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_92.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_92.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_92.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_92.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_92.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_92.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_92.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstBuilder.test_global _________________ item = <Function 'test_global'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_93.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_93.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_93.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_93.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_93.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_93.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_93.c:143: E /tmp/pytest/usession-main-22714/platcheck_93.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_93.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_93.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_93.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_93.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_93.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_93.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_93.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_93.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_93.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_93.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestAstBuilder.test_exec __________________ item = <Function 'test_exec'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_94.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_94.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_94.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_94.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_94.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_94.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_94.c:143: E /tmp/pytest/usession-main-22714/platcheck_94.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_94.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_94.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_94.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_94.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_94.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_94.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_94.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_94.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_94.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_94.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstBuilder.test_assert _________________ item = <Function 'test_assert'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_95.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_95.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_95.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_95.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_95.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_95.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_95.c:143: E /tmp/pytest/usession-main-22714/platcheck_95.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_95.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_95.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_95.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_95.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_95.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_95.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_95.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_95.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_95.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_95.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstBuilder.test_suite __________________ item = <Function 'test_suite'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_96.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_96.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_96.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_96.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_96.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_96.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_96.c:143: E /tmp/pytest/usession-main-22714/platcheck_96.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_96.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_96.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_96.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_96.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_96.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_96.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_96.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_96.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_96.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_96.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________________ ERROR at setup of TestAstBuilder.test_if ___________________ item = <Function 'test_if'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_97.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_97.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_97.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_97.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_97.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_97.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_97.c:143: E /tmp/pytest/usession-main-22714/platcheck_97.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_97.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_97.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_97.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_97.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_97.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_97.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_97.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_97.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_97.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_97.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestAstBuilder.test_elif_pos_bug ______________ item = <Function 'test_elif_pos_bug'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_98.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_98.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_98.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_98.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_98.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_98.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_98.c:143: E /tmp/pytest/usession-main-22714/platcheck_98.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_98.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_98.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_98.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_98.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_98.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_98.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_98.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_98.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_98.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_98.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstBuilder.test_while __________________ item = <Function 'test_while'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_99.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_99.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_99.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_99.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_99.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_99.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_99.c:143: E /tmp/pytest/usession-main-22714/platcheck_99.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_99.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_99.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_99.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_99.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_99.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_99.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_99.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_99.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_99.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_99.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestAstBuilder.test_for ___________________ item = <Function 'test_for'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_100.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_100.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_100.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_100.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_100.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_100.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_100.c:143: E /tmp/pytest/usession-main-22714/platcheck_100.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_100.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_100.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_100.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_100.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_100.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_100.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_100.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_100.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_100.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_100.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestAstBuilder.test_try ___________________ item = <Function 'test_try'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_101.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_101.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_101.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_101.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_101.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_101.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_101.c:143: E /tmp/pytest/usession-main-22714/platcheck_101.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_101.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_101.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_101.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_101.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_101.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_101.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_101.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_101.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_101.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_101.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestAstBuilder.test_with __________________ item = <Function 'test_with'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_102.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_102.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_102.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_102.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_102.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_102.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_102.c:143: E /tmp/pytest/usession-main-22714/platcheck_102.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_102.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_102.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_102.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_102.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_102.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_102.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_102.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_102.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_102.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_102.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstBuilder.test_class __________________ item = <Function 'test_class'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_103.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_103.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_103.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_103.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_103.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_103.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_103.c:143: E /tmp/pytest/usession-main-22714/platcheck_103.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_103.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_103.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_103.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_103.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_103.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_103.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_103.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_103.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_103.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_103.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestAstBuilder.test_function ________________ item = <Function 'test_function'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_104.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_104.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_104.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_104.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_104.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_104.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_104.c:143: E /tmp/pytest/usession-main-22714/platcheck_104.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_104.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_104.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_104.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_104.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_104.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_104.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_104.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_104.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_104.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_104.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestAstBuilder.test_decorators _______________ item = <Function 'test_decorators'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_105.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_105.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_105.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_105.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_105.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_105.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_105.c:143: E /tmp/pytest/usession-main-22714/platcheck_105.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_105.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_105.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_105.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_105.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_105.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_105.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_105.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_105.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_105.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_105.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestAstBuilder.test_augassign ________________ item = <Function 'test_augassign'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_106.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_106.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_106.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_106.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_106.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_106.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_106.c:143: E /tmp/pytest/usession-main-22714/platcheck_106.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_106.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_106.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_106.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_106.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_106.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_106.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_106.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_106.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_106.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_106.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstBuilder.test_assign _________________ item = <Function 'test_assign'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_107.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_107.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_107.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_107.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_107.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_107.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_107.c:143: E /tmp/pytest/usession-main-22714/platcheck_107.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_107.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_107.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_107.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_107.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_107.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_107.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_107.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_107.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_107.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_107.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestAstBuilder.test_name __________________ item = <Function 'test_name'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_108.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_108.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_108.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_108.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_108.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_108.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_108.c:143: E /tmp/pytest/usession-main-22714/platcheck_108.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_108.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_108.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_108.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_108.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_108.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_108.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_108.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_108.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_108.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_108.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstBuilder.test_tuple __________________ item = <Function 'test_tuple'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_109.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_109.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_109.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_109.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_109.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_109.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_109.c:143: E /tmp/pytest/usession-main-22714/platcheck_109.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_109.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_109.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_109.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_109.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_109.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_109.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_109.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_109.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_109.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_109.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestAstBuilder.test_list __________________ item = <Function 'test_list'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_110.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_110.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_110.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_110.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_110.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_110.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_110.c:143: E /tmp/pytest/usession-main-22714/platcheck_110.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_110.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_110.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_110.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_110.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_110.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_110.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_110.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_110.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_110.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_110.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestAstBuilder.test_dict __________________ item = <Function 'test_dict'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_111.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_111.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_111.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_111.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_111.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_111.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_111.c:143: E /tmp/pytest/usession-main-22714/platcheck_111.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_111.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_111.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_111.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_111.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_111.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_111.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_111.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_111.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_111.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_111.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestAstBuilder.test_set ___________________ item = <Function 'test_set'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_112.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_112.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_112.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_112.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_112.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_112.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_112.c:143: E /tmp/pytest/usession-main-22714/platcheck_112.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_112.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_112.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_112.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_112.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_112.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_112.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_112.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_112.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_112.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_112.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestAstBuilder.test_set_context _______________ item = <Function 'test_set_context'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_113.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_113.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_113.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_113.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_113.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_113.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_113.c:143: E /tmp/pytest/usession-main-22714/platcheck_113.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_113.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_113.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_113.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_113.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_113.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_113.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_113.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_113.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_113.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_113.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____ ERROR at setup of TestAstBuilder.test_assignment_to_forbidden_names ______ item = <Function 'test_assignment_to_forbidden_names'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_114.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_114.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_114.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_114.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_114.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_114.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_114.c:143: E /tmp/pytest/usession-main-22714/platcheck_114.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_114.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_114.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_114.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_114.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_114.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_114.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_114.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_114.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_114.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_114.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstBuilder.test_lambda _________________ item = <Function 'test_lambda'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_115.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_115.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_115.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_115.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_115.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_115.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_115.c:143: E /tmp/pytest/usession-main-22714/platcheck_115.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_115.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_115.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_115.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_115.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_115.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_115.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_115.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_115.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_115.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_115.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstBuilder.test_ifexp __________________ item = <Function 'test_ifexp'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_116.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_116.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_116.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_116.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_116.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_116.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_116.c:143: E /tmp/pytest/usession-main-22714/platcheck_116.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_116.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_116.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_116.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_116.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_116.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_116.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_116.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_116.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_116.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_116.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstBuilder.test_boolop _________________ item = <Function 'test_boolop'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_117.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_117.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_117.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_117.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_117.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_117.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_117.c:143: E /tmp/pytest/usession-main-22714/platcheck_117.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_117.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_117.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_117.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_117.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_117.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_117.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_117.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_117.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_117.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_117.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestAstBuilder.test_not ___________________ item = <Function 'test_not'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_118.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_118.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_118.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_118.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_118.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_118.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_118.c:143: E /tmp/pytest/usession-main-22714/platcheck_118.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_118.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_118.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_118.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_118.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_118.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_118.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_118.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_118.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_118.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_118.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestAstBuilder.test_comparison _______________ item = <Function 'test_comparison'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_119.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_119.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_119.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_119.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_119.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_119.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_119.c:143: E /tmp/pytest/usession-main-22714/platcheck_119.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_119.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_119.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_119.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_119.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_119.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_119.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_119.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_119.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_119.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_119.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstBuilder.test_binop __________________ item = <Function 'test_binop'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_120.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_120.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_120.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_120.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_120.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_120.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_120.c:143: E /tmp/pytest/usession-main-22714/platcheck_120.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_120.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_120.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_120.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_120.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_120.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_120.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_120.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_120.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_120.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_120.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstBuilder.test_yield __________________ item = <Function 'test_yield'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_121.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_121.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_121.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_121.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_121.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_121.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_121.c:143: E /tmp/pytest/usession-main-22714/platcheck_121.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_121.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_121.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_121.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_121.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_121.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_121.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_121.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_121.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_121.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_121.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestAstBuilder.test_unaryop _________________ item = <Function 'test_unaryop'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_122.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_122.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_122.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_122.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_122.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_122.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_122.c:143: E /tmp/pytest/usession-main-22714/platcheck_122.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_122.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_122.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_122.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_122.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_122.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_122.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_122.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_122.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_122.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_122.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstBuilder.test_power __________________ item = <Function 'test_power'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_123.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_123.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_123.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_123.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_123.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_123.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_123.c:143: E /tmp/pytest/usession-main-22714/platcheck_123.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_123.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_123.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_123.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_123.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_123.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_123.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_123.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_123.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_123.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_123.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestAstBuilder.test_call __________________ item = <Function 'test_call'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_124.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_124.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_124.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_124.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_124.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_124.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_124.c:143: E /tmp/pytest/usession-main-22714/platcheck_124.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_124.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_124.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_124.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_124.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_124.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_124.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_124.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_124.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_124.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_124.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestAstBuilder.test_attribute ________________ item = <Function 'test_attribute'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_125.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_125.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_125.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_125.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_125.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_125.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_125.c:143: E /tmp/pytest/usession-main-22714/platcheck_125.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_125.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_125.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_125.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_125.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_125.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_125.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_125.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_125.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_125.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_125.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestAstBuilder.test_subscript_and_slices __________ item = <Function 'test_subscript_and_slices'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_126.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_126.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_126.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_126.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_126.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_126.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_126.c:143: E /tmp/pytest/usession-main-22714/platcheck_126.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_126.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_126.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_126.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_126.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_126.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_126.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_126.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_126.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_126.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_126.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestAstBuilder.test_repr __________________ item = <Function 'test_repr'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_127.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_127.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_127.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_127.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_127.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_127.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_127.c:143: E /tmp/pytest/usession-main-22714/platcheck_127.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_127.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_127.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_127.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_127.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_127.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_127.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_127.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_127.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_127.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_127.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstBuilder.test_string _________________ item = <Function 'test_string'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_128.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_128.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_128.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_128.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_128.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_128.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_128.c:143: E /tmp/pytest/usession-main-22714/platcheck_128.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_128.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_128.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_128.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_128.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_128.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_128.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_128.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_128.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_128.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_128.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestAstBuilder.test_string_bug _______________ item = <Function 'test_string_bug'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_129.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_129.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_129.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_129.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_129.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_129.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_129.c:143: E /tmp/pytest/usession-main-22714/platcheck_129.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_129.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_129.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_129.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_129.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_129.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_129.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_129.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_129.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_129.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_129.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstBuilder.test_number _________________ item = <Function 'test_number'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_130.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_130.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_130.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_130.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_130.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_130.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_130.c:143: E /tmp/pytest/usession-main-22714/platcheck_130.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_130.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_130.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_130.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_130.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_130.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_130.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_130.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_130.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_130.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_130.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestAstBuilder.test_genexp _________________ item = <Function 'test_genexp'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_131.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_131.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_131.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_131.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_131.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_131.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_131.c:143: E /tmp/pytest/usession-main-22714/platcheck_131.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_131.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_131.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_131.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_131.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_131.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_131.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_131.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_131.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_131.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_131.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestAstBuilder.test_listcomp ________________ item = <Function 'test_listcomp'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_132.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_132.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_132.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_132.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_132.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_132.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_132.c:143: E /tmp/pytest/usession-main-22714/platcheck_132.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_132.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_132.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_132.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_132.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_132.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_132.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_132.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_132.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_132.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_132.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestAstBuilder.test_setcomp _________________ item = <Function 'test_setcomp'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_133.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_133.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_133.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_133.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_133.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_133.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_133.c:143: E /tmp/pytest/usession-main-22714/platcheck_133.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_133.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_133.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_133.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_133.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_133.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_133.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_133.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_133.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_133.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_133.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestAstBuilder.test_dictcomp ________________ item = <Function 'test_dictcomp'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_134.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_134.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_134.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_134.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_134.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_134.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_134.c:143: E /tmp/pytest/usession-main-22714/platcheck_134.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_134.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_134.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_134.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_134.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_134.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_134.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_134.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_134.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_134.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_134.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____ ERROR at setup of TestAstBuilder.test_decode_error_in_string_literal _____ item = <Function 'test_decode_error_in_string_literal'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_135.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_135.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_135.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_135.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_135.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_135.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_135.c:143: E /tmp/pytest/usession-main-22714/platcheck_135.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_135.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_135.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_135.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_135.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_135.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_135.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_135.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_135.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_135.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_135.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ERROR at setup of TestAstBuilder.test_decode_error_in_string_literal_correct_line item = <Function 'test_decode_error_in_string_literal_correct_line'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_136.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_136.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_136.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_136.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_136.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_136.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_136.c:143: E /tmp/pytest/usession-main-22714/platcheck_136.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_136.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_136.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_136.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_136.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_136.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_136.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_136.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_136.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_136.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_136.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_issue_713[0] _______________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_137.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_137.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_137.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_137.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_137.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_137.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_137.c:143: E /tmp/pytest/usession-main-22714/platcheck_137.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_137.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_137.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_137.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_137.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_137.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_137.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_137.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_137.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_137.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_137.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_long_jump[0] _______________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_138.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_138.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_138.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_138.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_138.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_138.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_138.c:143: E /tmp/pytest/usession-main-22714/platcheck_138.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_138.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_138.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_138.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_138.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_138.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_138.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_138.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_138.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_138.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_138.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_long_jump[1] _______________ item = <Function '[1]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_139.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_139.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_139.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_139.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_139.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_139.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_139.c:143: E /tmp/pytest/usession-main-22714/platcheck_139.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_139.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_139.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_139.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_139.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_139.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_139.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_139.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_139.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_139.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_139.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_argtuple[0] ________________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_140.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_140.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_140.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_140.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_140.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_140.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_140.c:143: E /tmp/pytest/usession-main-22714/platcheck_140.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_140.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_140.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_140.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_140.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_140.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_140.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_140.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_140.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_140.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_140.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_argtuple[1] ________________ item = <Function '[1]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_141.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_141.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_141.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_141.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_141.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_141.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_141.c:143: E /tmp/pytest/usession-main-22714/platcheck_141.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_141.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_141.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_141.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_141.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_141.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_141.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_141.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_141.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_141.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_141.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_argtuple[2] ________________ item = <Function '[2]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_142.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_142.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_142.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_142.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_142.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_142.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_142.c:143: E /tmp/pytest/usession-main-22714/platcheck_142.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_142.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_142.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_142.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_142.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_142.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_142.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_142.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_142.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_142.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_142.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_constants[0] _______________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_143.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_143.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_143.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_143.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_143.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_143.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_143.c:143: E /tmp/pytest/usession-main-22714/platcheck_143.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_143.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_143.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_143.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_143.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_143.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_143.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_143.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_143.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_143.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_143.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_constants[1] _______________ item = <Function '[1]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_144.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_144.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_144.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_144.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_144.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_144.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_144.c:143: E /tmp/pytest/usession-main-22714/platcheck_144.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_144.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_144.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_144.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_144.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_144.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_144.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_144.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_144.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_144.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_144.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_constants[2] _______________ item = <Function '[2]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_145.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_145.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_145.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_145.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_145.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_145.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_145.c:143: E /tmp/pytest/usession-main-22714/platcheck_145.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_145.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_145.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_145.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_145.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_145.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_145.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_145.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_145.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_145.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_145.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_constants[3] _______________ item = <Function '[3]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_146.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_146.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_146.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_146.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_146.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_146.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_146.c:143: E /tmp/pytest/usession-main-22714/platcheck_146.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_146.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_146.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_146.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_146.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_146.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_146.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_146.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_146.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_146.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_146.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_constants[4] _______________ item = <Function '[4]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_147.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_147.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_147.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_147.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_147.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_147.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_147.c:143: E /tmp/pytest/usession-main-22714/platcheck_147.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_147.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_147.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_147.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_147.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_147.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_147.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_147.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_147.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_147.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_147.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_constants[5] _______________ item = <Function '[5]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_148.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_148.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_148.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_148.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_148.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_148.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_148.c:143: E /tmp/pytest/usession-main-22714/platcheck_148.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_148.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_148.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_148.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_148.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_148.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_148.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_148.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_148.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_148.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_148.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_constants[6] _______________ item = <Function '[6]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_149.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_149.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_149.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_149.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_149.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_149.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_149.c:143: E /tmp/pytest/usession-main-22714/platcheck_149.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_149.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_149.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_149.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_149.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_149.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_149.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_149.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_149.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_149.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_149.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_constants[7] _______________ item = <Function '[7]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_150.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_150.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_150.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_150.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_150.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_150.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_150.c:143: E /tmp/pytest/usession-main-22714/platcheck_150.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_150.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_150.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_150.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_150.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_150.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_150.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_150.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_150.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_150.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_150.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_constants[8] _______________ item = <Function '[8]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_151.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_151.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_151.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_151.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_151.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_151.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_151.c:143: E /tmp/pytest/usession-main-22714/platcheck_151.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_151.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_151.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_151.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_151.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_151.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_151.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_151.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_151.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_151.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_151.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_constants[9] _______________ item = <Function '[9]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_152.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_152.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_152.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_152.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_152.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_152.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_152.c:143: E /tmp/pytest/usession-main-22714/platcheck_152.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_152.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_152.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_152.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_152.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_152.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_152.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_152.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_152.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_152.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_152.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_constants[10] _______________ item = <Function '[10]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_153.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_153.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_153.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_153.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_153.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_153.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_153.c:143: E /tmp/pytest/usession-main-22714/platcheck_153.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_153.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_153.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_153.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_153.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_153.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_153.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_153.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_153.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_153.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_153.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_constants[11] _______________ item = <Function '[11]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_154.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_154.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_154.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_154.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_154.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_154.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_154.c:143: E /tmp/pytest/usession-main-22714/platcheck_154.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_154.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_154.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_154.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_154.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_154.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_154.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_154.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_154.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_154.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_154.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_constants[12] _______________ item = <Function '[12]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_155.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_155.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_155.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_155.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_155.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_155.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_155.c:143: E /tmp/pytest/usession-main-22714/platcheck_155.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_155.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_155.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_155.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_155.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_155.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_155.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_155.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_155.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_155.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_155.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_neg_sys_maxint ______________ item = <Function 'test_neg_sys_maxint'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_156.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_156.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_156.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_156.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_156.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_156.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_156.c:143: E /tmp/pytest/usession-main-22714/platcheck_156.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_156.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_156.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_156.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_156.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_156.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_156.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_156.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_156.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_156.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_156.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_tuple_assign[0] ______________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_157.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_157.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_157.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_157.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_157.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_157.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_157.c:143: E /tmp/pytest/usession-main-22714/platcheck_157.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_157.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_157.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_157.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_157.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_157.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_157.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_157.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_157.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_157.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_157.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_tuple_assign[1] ______________ item = <Function '[1]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_158.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_158.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_158.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_158.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_158.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_158.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_158.c:143: E /tmp/pytest/usession-main-22714/platcheck_158.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_158.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_158.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_158.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_158.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_158.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_158.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_158.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_158.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_158.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_158.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_tuple_assign[2] ______________ item = <Function '[2]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_159.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_159.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_159.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_159.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_159.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_159.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_159.c:143: E /tmp/pytest/usession-main-22714/platcheck_159.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_159.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_159.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_159.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_159.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_159.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_159.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_159.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_159.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_159.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_159.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_tuple_assign[3] ______________ item = <Function '[3]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_160.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_160.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_160.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_160.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_160.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_160.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_160.c:143: E /tmp/pytest/usession-main-22714/platcheck_160.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_160.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_160.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_160.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_160.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_160.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_160.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_160.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_160.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_160.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_160.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_tuple_assign[4] ______________ item = <Function '[4]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_161.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_161.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_161.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_161.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_161.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_161.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_161.c:143: E /tmp/pytest/usession-main-22714/platcheck_161.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_161.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_161.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_161.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_161.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_161.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_161.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_161.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_161.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_161.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_161.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_tuple_assign[5] ______________ item = <Function '[5]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_162.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_162.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_162.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_162.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_162.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_162.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_162.c:143: E /tmp/pytest/usession-main-22714/platcheck_162.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_162.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_162.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_162.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_162.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_162.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_162.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_162.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_162.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_162.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_162.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_tuple_assign[6] ______________ item = <Function '[6]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_163.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_163.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_163.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_163.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_163.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_163.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_163.c:143: E /tmp/pytest/usession-main-22714/platcheck_163.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_163.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_163.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_163.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_163.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_163.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_163.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_163.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_163.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_163.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_163.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_tuple_assign[7] ______________ item = <Function '[7]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_164.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_164.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_164.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_164.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_164.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_164.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_164.c:143: E /tmp/pytest/usession-main-22714/platcheck_164.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_164.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_164.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_164.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_164.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_164.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_164.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_164.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_164.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_164.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_164.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_tuple_assign[8] ______________ item = <Function '[8]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_165.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_165.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_165.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_165.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_165.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_165.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_165.c:143: E /tmp/pytest/usession-main-22714/platcheck_165.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_165.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_165.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_165.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_165.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_165.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_165.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_165.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_165.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_165.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_165.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_tuple_assign[9] ______________ item = <Function '[9]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_166.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_166.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_166.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_166.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_166.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_166.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_166.c:143: E /tmp/pytest/usession-main-22714/platcheck_166.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_166.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_166.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_166.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_166.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_166.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_166.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_166.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_166.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_166.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_166.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_tuple_assign[10] _____________ item = <Function '[10]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_167.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_167.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_167.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_167.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_167.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_167.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_167.c:143: E /tmp/pytest/usession-main-22714/platcheck_167.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_167.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_167.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_167.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_167.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_167.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_167.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_167.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_167.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_167.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_167.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_tuple_assign[11] _____________ item = <Function '[11]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_168.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_168.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_168.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_168.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_168.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_168.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_168.c:143: E /tmp/pytest/usession-main-22714/platcheck_168.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_168.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_168.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_168.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_168.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_168.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_168.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_168.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_168.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_168.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_168.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestCompiler.test_tuple_assign_order[0] ___________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_169.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_169.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_169.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_169.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_169.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_169.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_169.c:143: E /tmp/pytest/usession-main-22714/platcheck_169.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_169.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_169.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_169.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_169.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_169.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_169.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_169.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_169.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_169.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_169.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestCompiler.test_tuple_assign_order[1] ___________ item = <Function '[1]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_170.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_170.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_170.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_170.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_170.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_170.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_170.c:143: E /tmp/pytest/usession-main-22714/platcheck_170.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_170.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_170.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_170.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_170.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_170.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_170.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_170.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_170.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_170.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_170.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestCompiler.test_tuple_assign_order[2] ___________ item = <Function '[2]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_171.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_171.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_171.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_171.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_171.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_171.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_171.c:143: E /tmp/pytest/usession-main-22714/platcheck_171.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_171.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_171.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_171.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_171.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_171.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_171.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_171.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_171.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_171.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_171.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestCompiler.test_tuple_assign_order[3] ___________ item = <Function '[3]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_172.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_172.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_172.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_172.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_172.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_172.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_172.c:143: E /tmp/pytest/usession-main-22714/platcheck_172.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_172.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_172.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_172.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_172.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_172.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_172.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_172.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_172.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_172.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_172.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestCompiler.test_tuple_assign_order[4] ___________ item = <Function '[4]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_173.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_173.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_173.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_173.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_173.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_173.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_173.c:143: E /tmp/pytest/usession-main-22714/platcheck_173.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_173.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_173.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_173.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_173.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_173.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_173.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_173.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_173.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_173.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_173.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestCompiler.test_tuple_assign_order[5] ___________ item = <Function '[5]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_174.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_174.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_174.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_174.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_174.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_174.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_174.c:143: E /tmp/pytest/usession-main-22714/platcheck_174.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_174.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_174.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_174.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_174.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_174.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_174.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_174.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_174.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_174.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_174.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestCompiler.test_tuple_assign_order[6] ___________ item = <Function '[6]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_175.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_175.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_175.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_175.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_175.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_175.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_175.c:143: E /tmp/pytest/usession-main-22714/platcheck_175.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_175.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_175.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_175.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_175.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_175.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_175.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_175.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_175.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_175.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_175.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestCompiler.test_tuple_assign_order[7] ___________ item = <Function '[7]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_176.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_176.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_176.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_176.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_176.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_176.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_176.c:143: E /tmp/pytest/usession-main-22714/platcheck_176.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_176.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_176.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_176.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_176.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_176.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_176.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_176.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_176.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_176.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_176.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of TestCompiler.test_binary_operator[0] ____________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_177.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_177.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_177.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_177.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_177.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_177.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_177.c:143: E /tmp/pytest/usession-main-22714/platcheck_177.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_177.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_177.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_177.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_177.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_177.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_177.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_177.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_177.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_177.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_177.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of TestCompiler.test_binary_operator[1] ____________ item = <Function '[1]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_178.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_178.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_178.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_178.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_178.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_178.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_178.c:143: E /tmp/pytest/usession-main-22714/platcheck_178.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_178.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_178.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_178.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_178.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_178.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_178.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_178.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_178.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_178.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_178.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of TestCompiler.test_binary_operator[2] ____________ item = <Function '[2]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_179.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_179.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_179.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_179.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_179.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_179.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_179.c:143: E /tmp/pytest/usession-main-22714/platcheck_179.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_179.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_179.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_179.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_179.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_179.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_179.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_179.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_179.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_179.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_179.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of TestCompiler.test_binary_operator[3] ____________ item = <Function '[3]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_180.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_180.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_180.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_180.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_180.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_180.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_180.c:143: E /tmp/pytest/usession-main-22714/platcheck_180.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_180.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_180.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_180.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_180.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_180.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_180.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_180.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_180.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_180.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_180.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of TestCompiler.test_binary_operator[4] ____________ item = <Function '[4]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_181.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_181.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_181.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_181.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_181.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_181.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_181.c:143: E /tmp/pytest/usession-main-22714/platcheck_181.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_181.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_181.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_181.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_181.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_181.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_181.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_181.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_181.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_181.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_181.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of TestCompiler.test_binary_operator[5] ____________ item = <Function '[5]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_182.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_182.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_182.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_182.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_182.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_182.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_182.c:143: E /tmp/pytest/usession-main-22714/platcheck_182.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_182.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_182.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_182.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_182.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_182.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_182.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_182.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_182.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_182.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_182.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of TestCompiler.test_binary_operator[6] ____________ item = <Function '[6]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_183.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_183.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_183.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_183.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_183.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_183.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_183.c:143: E /tmp/pytest/usession-main-22714/platcheck_183.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_183.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_183.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_183.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_183.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_183.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_183.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_183.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_183.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_183.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_183.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of TestCompiler.test_binary_operator[7] ____________ item = <Function '[7]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_184.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_184.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_184.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_184.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_184.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_184.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_184.c:143: E /tmp/pytest/usession-main-22714/platcheck_184.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_184.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_184.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_184.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_184.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_184.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_184.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_184.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_184.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_184.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_184.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of TestCompiler.test_binary_operator[8] ____________ item = <Function '[8]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_185.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_185.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_185.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_185.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_185.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_185.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_185.c:143: E /tmp/pytest/usession-main-22714/platcheck_185.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_185.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_185.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_185.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_185.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_185.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_185.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_185.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_185.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_185.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_185.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of TestCompiler.test_binary_operator[9] ____________ item = <Function '[9]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_186.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_186.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_186.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_186.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_186.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_186.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_186.c:143: E /tmp/pytest/usession-main-22714/platcheck_186.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_186.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_186.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_186.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_186.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_186.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_186.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_186.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_186.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_186.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_186.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[10] ____________ item = <Function '[10]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_187.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_187.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_187.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_187.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_187.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_187.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_187.c:143: E /tmp/pytest/usession-main-22714/platcheck_187.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_187.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_187.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_187.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_187.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_187.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_187.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_187.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_187.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_187.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_187.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[11] ____________ item = <Function '[11]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_188.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_188.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_188.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_188.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_188.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_188.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_188.c:143: E /tmp/pytest/usession-main-22714/platcheck_188.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_188.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_188.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_188.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_188.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_188.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_188.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_188.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_188.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_188.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_188.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[12] ____________ item = <Function '[12]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_189.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_189.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_189.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_189.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_189.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_189.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_189.c:143: E /tmp/pytest/usession-main-22714/platcheck_189.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_189.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_189.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_189.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_189.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_189.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_189.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_189.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_189.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_189.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_189.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[13] ____________ item = <Function '[13]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_190.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_190.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_190.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_190.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_190.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_190.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_190.c:143: E /tmp/pytest/usession-main-22714/platcheck_190.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_190.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_190.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_190.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_190.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_190.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_190.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_190.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_190.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_190.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_190.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[14] ____________ item = <Function '[14]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_191.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_191.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_191.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_191.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_191.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_191.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_191.c:143: E /tmp/pytest/usession-main-22714/platcheck_191.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_191.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_191.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_191.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_191.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_191.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_191.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_191.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_191.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_191.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_191.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[15] ____________ item = <Function '[15]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_192.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_192.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_192.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_192.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_192.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_192.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_192.c:143: E /tmp/pytest/usession-main-22714/platcheck_192.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_192.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_192.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_192.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_192.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_192.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_192.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_192.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_192.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_192.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_192.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[16] ____________ item = <Function '[16]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_193.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_193.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_193.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_193.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_193.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_193.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_193.c:143: E /tmp/pytest/usession-main-22714/platcheck_193.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_193.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_193.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_193.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_193.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_193.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_193.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_193.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_193.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_193.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_193.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[17] ____________ item = <Function '[17]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_194.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_194.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_194.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_194.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_194.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_194.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_194.c:143: E /tmp/pytest/usession-main-22714/platcheck_194.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_194.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_194.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_194.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_194.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_194.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_194.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_194.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_194.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_194.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_194.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[18] ____________ item = <Function '[18]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_195.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_195.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_195.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_195.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_195.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_195.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_195.c:143: E /tmp/pytest/usession-main-22714/platcheck_195.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_195.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_195.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_195.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_195.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_195.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_195.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_195.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_195.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_195.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_195.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[19] ____________ item = <Function '[19]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_196.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_196.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_196.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_196.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_196.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_196.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_196.c:143: E /tmp/pytest/usession-main-22714/platcheck_196.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_196.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_196.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_196.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_196.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_196.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_196.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_196.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_196.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_196.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_196.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[20] ____________ item = <Function '[20]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_197.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_197.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_197.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_197.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_197.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_197.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_197.c:143: E /tmp/pytest/usession-main-22714/platcheck_197.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_197.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_197.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_197.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_197.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_197.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_197.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_197.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_197.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_197.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_197.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[21] ____________ item = <Function '[21]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_198.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_198.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_198.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_198.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_198.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_198.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_198.c:143: E /tmp/pytest/usession-main-22714/platcheck_198.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_198.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_198.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_198.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_198.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_198.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_198.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_198.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_198.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_198.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_198.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[22] ____________ item = <Function '[22]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_199.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_199.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_199.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_199.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_199.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_199.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_199.c:143: E /tmp/pytest/usession-main-22714/platcheck_199.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_199.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_199.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_199.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_199.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_199.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_199.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_199.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_199.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_199.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_199.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[23] ____________ item = <Function '[23]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_200.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_200.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_200.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_200.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_200.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_200.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_200.c:143: E /tmp/pytest/usession-main-22714/platcheck_200.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_200.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_200.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_200.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_200.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_200.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_200.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_200.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_200.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_200.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_200.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[24] ____________ item = <Function '[24]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_201.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_201.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_201.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_201.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_201.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_201.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_201.c:143: E /tmp/pytest/usession-main-22714/platcheck_201.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_201.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_201.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_201.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_201.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_201.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_201.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_201.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_201.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_201.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_201.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[25] ____________ item = <Function '[25]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_202.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_202.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_202.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_202.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_202.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_202.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_202.c:143: E /tmp/pytest/usession-main-22714/platcheck_202.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_202.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_202.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_202.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_202.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_202.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_202.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_202.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_202.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_202.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_202.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[26] ____________ item = <Function '[26]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_203.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_203.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_203.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_203.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_203.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_203.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_203.c:143: E /tmp/pytest/usession-main-22714/platcheck_203.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_203.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_203.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_203.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_203.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_203.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_203.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_203.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_203.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_203.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_203.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[27] ____________ item = <Function '[27]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_204.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_204.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_204.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_204.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_204.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_204.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_204.c:143: E /tmp/pytest/usession-main-22714/platcheck_204.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_204.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_204.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_204.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_204.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_204.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_204.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_204.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_204.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_204.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_204.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[28] ____________ item = <Function '[28]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_205.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_205.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_205.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_205.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_205.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_205.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_205.c:143: E /tmp/pytest/usession-main-22714/platcheck_205.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_205.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_205.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_205.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_205.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_205.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_205.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_205.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_205.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_205.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_205.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[29] ____________ item = <Function '[29]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_206.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_206.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_206.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_206.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_206.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_206.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_206.c:143: E /tmp/pytest/usession-main-22714/platcheck_206.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_206.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_206.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_206.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_206.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_206.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_206.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_206.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_206.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_206.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_206.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[30] ____________ item = <Function '[30]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_207.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_207.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_207.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_207.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_207.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_207.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_207.c:143: E /tmp/pytest/usession-main-22714/platcheck_207.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_207.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_207.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_207.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_207.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_207.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_207.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_207.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_207.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_207.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_207.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[31] ____________ item = <Function '[31]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_208.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_208.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_208.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_208.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_208.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_208.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_208.c:143: E /tmp/pytest/usession-main-22714/platcheck_208.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_208.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_208.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_208.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_208.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_208.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_208.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_208.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_208.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_208.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_208.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[32] ____________ item = <Function '[32]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_209.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_209.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_209.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_209.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_209.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_209.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_209.c:143: E /tmp/pytest/usession-main-22714/platcheck_209.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_209.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_209.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_209.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_209.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_209.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_209.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_209.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_209.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_209.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_209.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[33] ____________ item = <Function '[33]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_210.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_210.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_210.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_210.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_210.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_210.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_210.c:143: E /tmp/pytest/usession-main-22714/platcheck_210.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_210.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_210.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_210.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_210.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_210.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_210.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_210.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_210.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_210.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_210.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[34] ____________ item = <Function '[34]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_211.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_211.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_211.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_211.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_211.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_211.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_211.c:143: E /tmp/pytest/usession-main-22714/platcheck_211.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_211.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_211.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_211.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_211.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_211.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_211.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_211.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_211.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_211.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_211.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[35] ____________ item = <Function '[35]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_212.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_212.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_212.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_212.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_212.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_212.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_212.c:143: E /tmp/pytest/usession-main-22714/platcheck_212.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_212.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_212.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_212.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_212.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_212.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_212.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_212.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_212.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_212.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_212.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[36] ____________ item = <Function '[36]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_213.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_213.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_213.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_213.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_213.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_213.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_213.c:143: E /tmp/pytest/usession-main-22714/platcheck_213.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_213.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_213.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_213.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_213.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_213.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_213.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_213.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_213.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_213.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_213.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_binary_operator[37] ____________ item = <Function '[37]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_214.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_214.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_214.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_214.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_214.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_214.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_214.c:143: E /tmp/pytest/usession-main-22714/platcheck_214.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_214.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_214.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_214.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_214.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_214.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_214.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_214.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_214.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_214.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_214.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_compare[0] ________________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_215.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_215.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_215.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_215.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_215.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_215.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_215.c:143: E /tmp/pytest/usession-main-22714/platcheck_215.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_215.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_215.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_215.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_215.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_215.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_215.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_215.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_215.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_215.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_215.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of TestCompiler.test_augmented_assignment[0] __________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_216.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_216.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_216.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_216.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_216.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_216.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_216.c:143: E /tmp/pytest/usession-main-22714/platcheck_216.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_216.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_216.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_216.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_216.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_216.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_216.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_216.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_216.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_216.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_216.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of TestCompiler.test_augmented_assignment[1] __________ item = <Function '[1]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_217.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_217.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_217.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_217.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_217.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_217.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_217.c:143: E /tmp/pytest/usession-main-22714/platcheck_217.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_217.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_217.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_217.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_217.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_217.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_217.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_217.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_217.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_217.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_217.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of TestCompiler.test_augmented_assignment[2] __________ item = <Function '[2]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_218.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_218.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_218.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_218.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_218.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_218.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_218.c:143: E /tmp/pytest/usession-main-22714/platcheck_218.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_218.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_218.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_218.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_218.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_218.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_218.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_218.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_218.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_218.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_218.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of TestCompiler.test_augmented_assignment[3] __________ item = <Function '[3]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_219.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_219.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_219.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_219.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_219.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_219.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_219.c:143: E /tmp/pytest/usession-main-22714/platcheck_219.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_219.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_219.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_219.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_219.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_219.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_219.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_219.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_219.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_219.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_219.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of TestCompiler.test_augmented_assignment[4] __________ item = <Function '[4]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_220.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_220.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_220.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_220.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_220.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_220.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_220.c:143: E /tmp/pytest/usession-main-22714/platcheck_220.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_220.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_220.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_220.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_220.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_220.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_220.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_220.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_220.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_220.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_220.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of TestCompiler.test_augmented_assignment[5] __________ item = <Function '[5]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_221.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_221.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_221.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_221.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_221.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_221.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_221.c:143: E /tmp/pytest/usession-main-22714/platcheck_221.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_221.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_221.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_221.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_221.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_221.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_221.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_221.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_221.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_221.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_221.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of TestCompiler.test_augmented_assignment[6] __________ item = <Function '[6]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_222.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_222.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_222.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_222.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_222.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_222.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_222.c:143: E /tmp/pytest/usession-main-22714/platcheck_222.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_222.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_222.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_222.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_222.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_222.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_222.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_222.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_222.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_222.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_222.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of TestCompiler.test_augmented_assignment[7] __________ item = <Function '[7]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_223.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_223.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_223.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_223.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_223.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_223.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_223.c:143: E /tmp/pytest/usession-main-22714/platcheck_223.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_223.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_223.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_223.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_223.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_223.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_223.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_223.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_223.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_223.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_223.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of TestCompiler.test_augmented_assignment[8] __________ item = <Function '[8]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_224.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_224.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_224.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_224.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_224.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_224.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_224.c:143: E /tmp/pytest/usession-main-22714/platcheck_224.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_224.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_224.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_224.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_224.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_224.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_224.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_224.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_224.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_224.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_224.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of TestCompiler.test_augmented_assignment[9] __________ item = <Function '[9]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_225.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_225.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_225.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_225.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_225.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_225.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_225.c:143: E /tmp/pytest/usession-main-22714/platcheck_225.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_225.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_225.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_225.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_225.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_225.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_225.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_225.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_225.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_225.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_225.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of TestCompiler.test_augmented_assignment[10] _________ item = <Function '[10]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_226.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_226.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_226.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_226.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_226.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_226.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_226.c:143: E /tmp/pytest/usession-main-22714/platcheck_226.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_226.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_226.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_226.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_226.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_226.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_226.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_226.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_226.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_226.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_226.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_subscript[0] _______________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_227.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_227.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_227.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_227.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_227.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_227.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_227.c:143: E /tmp/pytest/usession-main-22714/platcheck_227.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_227.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_227.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_227.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_227.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_227.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_227.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_227.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_227.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_227.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_227.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_subscript[1] _______________ item = <Function '[1]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_228.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_228.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_228.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_228.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_228.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_228.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_228.c:143: E /tmp/pytest/usession-main-22714/platcheck_228.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_228.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_228.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_228.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_228.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_228.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_228.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_228.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_228.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_228.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_228.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_subscript[2] _______________ item = <Function '[2]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_229.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_229.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_229.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_229.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_229.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_229.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_229.c:143: E /tmp/pytest/usession-main-22714/platcheck_229.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_229.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_229.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_229.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_229.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_229.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_229.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_229.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_229.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_229.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_229.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_subscript[3] _______________ item = <Function '[3]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_230.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_230.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_230.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_230.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_230.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_230.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_230.c:143: E /tmp/pytest/usession-main-22714/platcheck_230.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_230.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_230.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_230.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_230.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_230.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_230.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_230.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_230.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_230.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_230.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_attribute[0] _______________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_231.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_231.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_231.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_231.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_231.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_231.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_231.c:143: E /tmp/pytest/usession-main-22714/platcheck_231.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_231.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_231.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_231.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_231.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_231.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_231.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_231.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_231.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_231.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_231.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestCompiler.test_slice[0] _________________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_232.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_232.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_232.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_232.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_232.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_232.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_232.c:143: E /tmp/pytest/usession-main-22714/platcheck_232.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_232.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_232.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_232.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_232.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_232.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_232.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_232.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_232.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_232.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_232.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestCompiler.test_slice[1] _________________ item = <Function '[1]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_233.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_233.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_233.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_233.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_233.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_233.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_233.c:143: E /tmp/pytest/usession-main-22714/platcheck_233.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_233.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_233.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_233.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_233.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_233.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_233.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_233.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_233.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_233.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_233.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestCompiler.test_slice[2] _________________ item = <Function '[2]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_234.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_234.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_234.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_234.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_234.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_234.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_234.c:143: E /tmp/pytest/usession-main-22714/platcheck_234.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_234.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_234.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_234.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_234.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_234.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_234.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_234.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_234.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_234.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_234.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestCompiler.test_slice[3] _________________ item = <Function '[3]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_235.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_235.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_235.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_235.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_235.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_235.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_235.c:143: E /tmp/pytest/usession-main-22714/platcheck_235.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_235.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_235.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_235.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_235.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_235.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_235.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_235.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_235.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_235.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_235.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestCompiler.test_slice[4] _________________ item = <Function '[4]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_236.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_236.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_236.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_236.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_236.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_236.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_236.c:143: E /tmp/pytest/usession-main-22714/platcheck_236.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_236.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_236.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_236.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_236.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_236.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_236.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_236.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_236.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_236.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_236.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestCompiler.test_slice[5] _________________ item = <Function '[5]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_237.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_237.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_237.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_237.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_237.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_237.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_237.c:143: E /tmp/pytest/usession-main-22714/platcheck_237.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_237.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_237.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_237.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_237.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_237.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_237.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_237.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_237.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_237.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_237.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestCompiler.test_slice[6] _________________ item = <Function '[6]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_238.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_238.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_238.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_238.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_238.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_238.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_238.c:143: E /tmp/pytest/usession-main-22714/platcheck_238.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_238.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_238.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_238.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_238.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_238.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_238.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_238.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_238.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_238.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_238.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestCompiler.test_slice[7] _________________ item = <Function '[7]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_239.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_239.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_239.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_239.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_239.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_239.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_239.c:143: E /tmp/pytest/usession-main-22714/platcheck_239.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_239.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_239.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_239.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_239.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_239.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_239.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_239.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_239.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_239.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_239.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestCompiler.test_slice[8] _________________ item = <Function '[8]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_240.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_240.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_240.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_240.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_240.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_240.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_240.c:143: E /tmp/pytest/usession-main-22714/platcheck_240.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_240.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_240.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_240.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_240.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_240.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_240.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_240.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_240.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_240.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_240.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestCompiler.test_slice[9] _________________ item = <Function '[9]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_241.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_241.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_241.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_241.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_241.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_241.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_241.c:143: E /tmp/pytest/usession-main-22714/platcheck_241.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_241.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_241.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_241.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_241.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_241.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_241.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_241.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_241.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_241.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_241.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[10] _________________ item = <Function '[10]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_242.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_242.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_242.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_242.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_242.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_242.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_242.c:143: E /tmp/pytest/usession-main-22714/platcheck_242.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_242.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_242.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_242.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_242.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_242.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_242.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_242.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_242.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_242.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_242.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[11] _________________ item = <Function '[11]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_243.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_243.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_243.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_243.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_243.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_243.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_243.c:143: E /tmp/pytest/usession-main-22714/platcheck_243.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_243.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_243.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_243.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_243.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_243.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_243.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_243.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_243.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_243.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_243.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[12] _________________ item = <Function '[12]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_244.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_244.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_244.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_244.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_244.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_244.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_244.c:143: E /tmp/pytest/usession-main-22714/platcheck_244.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_244.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_244.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_244.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_244.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_244.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_244.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_244.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_244.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_244.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_244.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[13] _________________ item = <Function '[13]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_245.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_245.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_245.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_245.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_245.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_245.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_245.c:143: E /tmp/pytest/usession-main-22714/platcheck_245.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_245.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_245.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_245.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_245.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_245.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_245.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_245.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_245.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_245.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_245.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[14] _________________ item = <Function '[14]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_246.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_246.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_246.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_246.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_246.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_246.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_246.c:143: E /tmp/pytest/usession-main-22714/platcheck_246.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_246.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_246.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_246.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_246.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_246.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_246.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_246.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_246.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_246.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_246.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[15] _________________ item = <Function '[15]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_247.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_247.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_247.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_247.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_247.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_247.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_247.c:143: E /tmp/pytest/usession-main-22714/platcheck_247.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_247.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_247.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_247.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_247.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_247.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_247.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_247.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_247.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_247.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_247.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[16] _________________ item = <Function '[16]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_248.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_248.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_248.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_248.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_248.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_248.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_248.c:143: E /tmp/pytest/usession-main-22714/platcheck_248.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_248.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_248.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_248.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_248.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_248.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_248.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_248.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_248.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_248.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_248.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[17] _________________ item = <Function '[17]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_249.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_249.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_249.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_249.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_249.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_249.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_249.c:143: E /tmp/pytest/usession-main-22714/platcheck_249.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_249.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_249.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_249.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_249.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_249.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_249.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_249.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_249.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_249.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_249.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[18] _________________ item = <Function '[18]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_250.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_250.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_250.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_250.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_250.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_250.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_250.c:143: E /tmp/pytest/usession-main-22714/platcheck_250.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_250.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_250.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_250.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_250.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_250.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_250.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_250.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_250.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_250.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_250.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[19] _________________ item = <Function '[19]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_251.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_251.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_251.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_251.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_251.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_251.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_251.c:143: E /tmp/pytest/usession-main-22714/platcheck_251.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_251.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_251.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_251.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_251.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_251.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_251.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_251.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_251.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_251.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_251.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[20] _________________ item = <Function '[20]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_252.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_252.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_252.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_252.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_252.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_252.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_252.c:143: E /tmp/pytest/usession-main-22714/platcheck_252.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_252.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_252.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_252.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_252.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_252.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_252.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_252.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_252.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_252.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_252.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[21] _________________ item = <Function '[21]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_253.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_253.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_253.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_253.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_253.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_253.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_253.c:143: E /tmp/pytest/usession-main-22714/platcheck_253.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_253.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_253.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_253.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_253.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_253.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_253.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_253.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_253.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_253.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_253.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[22] _________________ item = <Function '[22]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_254.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_254.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_254.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_254.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_254.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_254.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_254.c:143: E /tmp/pytest/usession-main-22714/platcheck_254.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_254.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_254.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_254.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_254.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_254.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_254.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_254.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_254.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_254.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_254.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[23] _________________ item = <Function '[23]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_255.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_255.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_255.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_255.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_255.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_255.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_255.c:143: E /tmp/pytest/usession-main-22714/platcheck_255.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_255.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_255.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_255.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_255.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_255.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_255.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_255.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_255.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_255.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_255.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[24] _________________ item = <Function '[24]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_256.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_256.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_256.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_256.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_256.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_256.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_256.c:143: E /tmp/pytest/usession-main-22714/platcheck_256.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_256.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_256.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_256.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_256.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_256.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_256.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_256.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_256.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_256.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_256.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[25] _________________ item = <Function '[25]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_257.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_257.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_257.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_257.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_257.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_257.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_257.c:143: E /tmp/pytest/usession-main-22714/platcheck_257.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_257.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_257.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_257.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_257.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_257.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_257.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_257.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_257.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_257.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_257.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[26] _________________ item = <Function '[26]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_258.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_258.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_258.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_258.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_258.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_258.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_258.c:143: E /tmp/pytest/usession-main-22714/platcheck_258.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_258.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_258.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_258.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_258.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_258.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_258.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_258.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_258.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_258.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_258.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[27] _________________ item = <Function '[27]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_259.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_259.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_259.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_259.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_259.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_259.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_259.c:143: E /tmp/pytest/usession-main-22714/platcheck_259.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_259.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_259.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_259.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_259.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_259.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_259.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_259.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_259.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_259.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_259.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[28] _________________ item = <Function '[28]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_260.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_260.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_260.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_260.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_260.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_260.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_260.c:143: E /tmp/pytest/usession-main-22714/platcheck_260.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_260.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_260.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_260.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_260.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_260.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_260.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_260.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_260.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_260.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_260.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[29] _________________ item = <Function '[29]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_261.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_261.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_261.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_261.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_261.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_261.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_261.c:143: E /tmp/pytest/usession-main-22714/platcheck_261.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_261.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_261.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_261.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_261.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_261.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_261.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_261.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_261.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_261.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_261.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[30] _________________ item = <Function '[30]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_262.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_262.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_262.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_262.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_262.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_262.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_262.c:143: E /tmp/pytest/usession-main-22714/platcheck_262.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_262.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_262.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_262.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_262.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_262.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_262.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_262.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_262.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_262.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_262.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[31] _________________ item = <Function '[31]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_263.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_263.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_263.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_263.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_263.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_263.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_263.c:143: E /tmp/pytest/usession-main-22714/platcheck_263.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_263.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_263.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_263.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_263.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_263.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_263.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_263.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_263.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_263.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_263.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[32] _________________ item = <Function '[32]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_264.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_264.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_264.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_264.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_264.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_264.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_264.c:143: E /tmp/pytest/usession-main-22714/platcheck_264.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_264.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_264.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_264.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_264.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_264.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_264.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_264.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_264.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_264.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_264.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[33] _________________ item = <Function '[33]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_265.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_265.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_265.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_265.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_265.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_265.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_265.c:143: E /tmp/pytest/usession-main-22714/platcheck_265.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_265.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_265.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_265.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_265.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_265.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_265.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_265.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_265.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_265.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_265.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[34] _________________ item = <Function '[34]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_266.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_266.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_266.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_266.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_266.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_266.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_266.c:143: E /tmp/pytest/usession-main-22714/platcheck_266.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_266.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_266.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_266.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_266.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_266.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_266.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_266.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_266.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_266.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_266.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[35] _________________ item = <Function '[35]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_267.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_267.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_267.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_267.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_267.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_267.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_267.c:143: E /tmp/pytest/usession-main-22714/platcheck_267.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_267.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_267.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_267.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_267.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_267.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_267.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_267.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_267.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_267.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_267.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[36] _________________ item = <Function '[36]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_268.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_268.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_268.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_268.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_268.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_268.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_268.c:143: E /tmp/pytest/usession-main-22714/platcheck_268.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_268.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_268.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_268.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_268.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_268.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_268.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_268.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_268.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_268.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_268.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[37] _________________ item = <Function '[37]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_269.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_269.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_269.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_269.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_269.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_269.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_269.c:143: E /tmp/pytest/usession-main-22714/platcheck_269.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_269.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_269.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_269.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_269.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_269.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_269.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_269.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_269.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_269.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_269.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[38] _________________ item = <Function '[38]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_270.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_270.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_270.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_270.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_270.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_270.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_270.c:143: E /tmp/pytest/usession-main-22714/platcheck_270.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_270.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_270.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_270.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_270.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_270.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_270.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_270.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_270.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_270.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_270.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[39] _________________ item = <Function '[39]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_271.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_271.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_271.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_271.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_271.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_271.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_271.c:143: E /tmp/pytest/usession-main-22714/platcheck_271.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_271.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_271.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_271.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_271.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_271.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_271.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_271.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_271.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_271.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_271.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[40] _________________ item = <Function '[40]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_272.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_272.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_272.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_272.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_272.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_272.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_272.c:143: E /tmp/pytest/usession-main-22714/platcheck_272.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_272.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_272.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_272.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_272.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_272.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_272.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_272.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_272.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_272.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_272.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[41] _________________ item = <Function '[41]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_273.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_273.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_273.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_273.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_273.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_273.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_273.c:143: E /tmp/pytest/usession-main-22714/platcheck_273.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_273.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_273.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_273.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_273.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_273.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_273.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_273.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_273.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_273.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_273.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[42] _________________ item = <Function '[42]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_274.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_274.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_274.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_274.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_274.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_274.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_274.c:143: E /tmp/pytest/usession-main-22714/platcheck_274.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_274.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_274.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_274.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_274.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_274.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_274.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_274.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_274.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_274.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_274.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[43] _________________ item = <Function '[43]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_275.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_275.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_275.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_275.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_275.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_275.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_275.c:143: E /tmp/pytest/usession-main-22714/platcheck_275.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_275.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_275.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_275.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_275.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_275.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_275.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_275.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_275.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_275.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_275.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[44] _________________ item = <Function '[44]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_276.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_276.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_276.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_276.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_276.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_276.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_276.c:143: E /tmp/pytest/usession-main-22714/platcheck_276.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_276.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_276.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_276.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_276.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_276.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_276.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_276.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_276.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_276.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_276.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[45] _________________ item = <Function '[45]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_277.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_277.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_277.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_277.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_277.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_277.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_277.c:143: E /tmp/pytest/usession-main-22714/platcheck_277.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_277.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_277.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_277.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_277.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_277.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_277.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_277.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_277.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_277.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_277.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[46] _________________ item = <Function '[46]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_278.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_278.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_278.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_278.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_278.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_278.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_278.c:143: E /tmp/pytest/usession-main-22714/platcheck_278.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_278.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_278.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_278.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_278.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_278.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_278.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_278.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_278.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_278.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_278.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[47] _________________ item = <Function '[47]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_279.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_279.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_279.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_279.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_279.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_279.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_279.c:143: E /tmp/pytest/usession-main-22714/platcheck_279.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_279.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_279.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_279.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_279.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_279.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_279.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_279.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_279.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_279.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_279.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[48] _________________ item = <Function '[48]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_280.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_280.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_280.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_280.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_280.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_280.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_280.c:143: E /tmp/pytest/usession-main-22714/platcheck_280.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_280.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_280.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_280.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_280.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_280.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_280.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_280.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_280.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_280.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_280.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[49] _________________ item = <Function '[49]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_281.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_281.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_281.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_281.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_281.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_281.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_281.c:143: E /tmp/pytest/usession-main-22714/platcheck_281.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_281.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_281.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_281.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_281.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_281.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_281.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_281.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_281.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_281.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_281.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[50] _________________ item = <Function '[50]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_282.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_282.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_282.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_282.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_282.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_282.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_282.c:143: E /tmp/pytest/usession-main-22714/platcheck_282.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_282.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_282.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_282.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_282.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_282.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_282.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_282.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_282.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_282.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_282.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[51] _________________ item = <Function '[51]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_283.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_283.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_283.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_283.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_283.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_283.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_283.c:143: E /tmp/pytest/usession-main-22714/platcheck_283.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_283.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_283.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_283.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_283.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_283.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_283.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_283.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_283.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_283.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_283.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[52] _________________ item = <Function '[52]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_284.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_284.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_284.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_284.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_284.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_284.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_284.c:143: E /tmp/pytest/usession-main-22714/platcheck_284.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_284.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_284.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_284.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_284.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_284.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_284.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_284.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_284.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_284.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_284.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[53] _________________ item = <Function '[53]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_285.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_285.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_285.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_285.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_285.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_285.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_285.c:143: E /tmp/pytest/usession-main-22714/platcheck_285.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_285.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_285.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_285.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_285.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_285.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_285.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_285.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_285.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_285.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_285.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[54] _________________ item = <Function '[54]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_286.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_286.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_286.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_286.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_286.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_286.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_286.c:143: E /tmp/pytest/usession-main-22714/platcheck_286.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_286.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_286.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_286.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_286.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_286.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_286.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_286.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_286.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_286.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_286.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[55] _________________ item = <Function '[55]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_287.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_287.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_287.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_287.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_287.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_287.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_287.c:143: E /tmp/pytest/usession-main-22714/platcheck_287.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_287.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_287.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_287.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_287.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_287.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_287.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_287.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_287.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_287.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_287.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[56] _________________ item = <Function '[56]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_288.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_288.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_288.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_288.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_288.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_288.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_288.c:143: E /tmp/pytest/usession-main-22714/platcheck_288.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_288.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_288.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_288.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_288.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_288.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_288.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_288.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_288.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_288.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_288.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[57] _________________ item = <Function '[57]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_289.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_289.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_289.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_289.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_289.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_289.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_289.c:143: E /tmp/pytest/usession-main-22714/platcheck_289.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_289.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_289.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_289.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_289.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_289.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_289.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_289.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_289.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_289.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_289.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[58] _________________ item = <Function '[58]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_290.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_290.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_290.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_290.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_290.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_290.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_290.c:143: E /tmp/pytest/usession-main-22714/platcheck_290.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_290.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_290.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_290.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_290.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_290.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_290.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_290.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_290.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_290.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_290.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[59] _________________ item = <Function '[59]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_291.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_291.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_291.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_291.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_291.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_291.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_291.c:143: E /tmp/pytest/usession-main-22714/platcheck_291.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_291.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_291.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_291.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_291.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_291.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_291.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_291.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_291.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_291.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_291.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[60] _________________ item = <Function '[60]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_292.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_292.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_292.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_292.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_292.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_292.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_292.c:143: E /tmp/pytest/usession-main-22714/platcheck_292.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_292.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_292.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_292.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_292.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_292.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_292.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_292.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_292.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_292.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_292.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[61] _________________ item = <Function '[61]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_293.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_293.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_293.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_293.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_293.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_293.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_293.c:143: E /tmp/pytest/usession-main-22714/platcheck_293.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_293.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_293.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_293.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_293.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_293.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_293.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_293.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_293.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_293.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_293.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[62] _________________ item = <Function '[62]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_294.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_294.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_294.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_294.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_294.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_294.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_294.c:143: E /tmp/pytest/usession-main-22714/platcheck_294.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_294.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_294.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_294.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_294.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_294.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_294.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_294.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_294.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_294.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_294.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[63] _________________ item = <Function '[63]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_295.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_295.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_295.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_295.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_295.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_295.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_295.c:143: E /tmp/pytest/usession-main-22714/platcheck_295.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_295.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_295.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_295.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_295.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_295.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_295.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_295.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_295.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_295.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_295.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[64] _________________ item = <Function '[64]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_296.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_296.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_296.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_296.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_296.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_296.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_296.c:143: E /tmp/pytest/usession-main-22714/platcheck_296.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_296.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_296.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_296.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_296.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_296.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_296.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_296.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_296.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_296.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_296.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[65] _________________ item = <Function '[65]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_297.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_297.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_297.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_297.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_297.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_297.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_297.c:143: E /tmp/pytest/usession-main-22714/platcheck_297.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_297.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_297.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_297.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_297.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_297.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_297.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_297.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_297.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_297.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_297.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[66] _________________ item = <Function '[66]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_298.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_298.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_298.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_298.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_298.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_298.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_298.c:143: E /tmp/pytest/usession-main-22714/platcheck_298.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_298.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_298.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_298.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_298.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_298.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_298.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_298.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_298.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_298.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_298.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[67] _________________ item = <Function '[67]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_299.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_299.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_299.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_299.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_299.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_299.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_299.c:143: E /tmp/pytest/usession-main-22714/platcheck_299.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_299.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_299.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_299.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_299.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_299.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_299.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_299.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_299.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_299.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_299.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[68] _________________ item = <Function '[68]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_300.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_300.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_300.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_300.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_300.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_300.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_300.c:143: E /tmp/pytest/usession-main-22714/platcheck_300.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_300.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_300.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_300.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_300.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_300.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_300.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_300.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_300.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_300.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_300.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[69] _________________ item = <Function '[69]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_301.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_301.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_301.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_301.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_301.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_301.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_301.c:143: E /tmp/pytest/usession-main-22714/platcheck_301.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_301.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_301.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_301.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_301.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_301.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_301.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_301.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_301.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_301.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_301.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[70] _________________ item = <Function '[70]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_302.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_302.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_302.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_302.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_302.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_302.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_302.c:143: E /tmp/pytest/usession-main-22714/platcheck_302.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_302.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_302.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_302.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_302.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_302.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_302.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_302.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_302.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_302.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_302.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[71] _________________ item = <Function '[71]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_303.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_303.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_303.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_303.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_303.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_303.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_303.c:143: E /tmp/pytest/usession-main-22714/platcheck_303.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_303.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_303.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_303.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_303.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_303.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_303.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_303.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_303.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_303.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_303.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[72] _________________ item = <Function '[72]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_304.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_304.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_304.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_304.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_304.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_304.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_304.c:143: E /tmp/pytest/usession-main-22714/platcheck_304.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_304.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_304.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_304.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_304.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_304.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_304.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_304.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_304.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_304.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_304.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[73] _________________ item = <Function '[73]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_305.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_305.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_305.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_305.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_305.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_305.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_305.c:143: E /tmp/pytest/usession-main-22714/platcheck_305.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_305.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_305.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_305.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_305.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_305.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_305.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_305.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_305.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_305.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_305.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[74] _________________ item = <Function '[74]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_306.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_306.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_306.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_306.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_306.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_306.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_306.c:143: E /tmp/pytest/usession-main-22714/platcheck_306.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_306.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_306.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_306.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_306.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_306.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_306.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_306.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_306.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_306.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_306.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[75] _________________ item = <Function '[75]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_307.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_307.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_307.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_307.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_307.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_307.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_307.c:143: E /tmp/pytest/usession-main-22714/platcheck_307.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_307.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_307.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_307.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_307.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_307.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_307.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_307.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_307.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_307.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_307.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[76] _________________ item = <Function '[76]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_308.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_308.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_308.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_308.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_308.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_308.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_308.c:143: E /tmp/pytest/usession-main-22714/platcheck_308.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_308.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_308.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_308.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_308.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_308.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_308.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_308.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_308.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_308.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_308.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[77] _________________ item = <Function '[77]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_309.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_309.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_309.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_309.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_309.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_309.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_309.c:143: E /tmp/pytest/usession-main-22714/platcheck_309.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_309.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_309.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_309.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_309.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_309.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_309.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_309.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_309.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_309.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_309.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[78] _________________ item = <Function '[78]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_310.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_310.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_310.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_310.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_310.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_310.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_310.c:143: E /tmp/pytest/usession-main-22714/platcheck_310.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_310.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_310.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_310.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_310.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_310.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_310.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_310.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_310.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_310.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_310.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[79] _________________ item = <Function '[79]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_311.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_311.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_311.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_311.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_311.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_311.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_311.c:143: E /tmp/pytest/usession-main-22714/platcheck_311.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_311.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_311.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_311.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_311.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_311.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_311.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_311.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_311.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_311.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_311.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[80] _________________ item = <Function '[80]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_312.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_312.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_312.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_312.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_312.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_312.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_312.c:143: E /tmp/pytest/usession-main-22714/platcheck_312.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_312.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_312.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_312.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_312.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_312.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_312.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_312.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_312.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_312.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_312.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[81] _________________ item = <Function '[81]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_313.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_313.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_313.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_313.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_313.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_313.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_313.c:143: E /tmp/pytest/usession-main-22714/platcheck_313.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_313.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_313.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_313.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_313.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_313.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_313.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_313.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_313.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_313.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_313.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[82] _________________ item = <Function '[82]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_314.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_314.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_314.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_314.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_314.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_314.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_314.c:143: E /tmp/pytest/usession-main-22714/platcheck_314.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_314.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_314.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_314.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_314.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_314.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_314.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_314.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_314.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_314.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_314.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[83] _________________ item = <Function '[83]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_315.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_315.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_315.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_315.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_315.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_315.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_315.c:143: E /tmp/pytest/usession-main-22714/platcheck_315.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_315.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_315.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_315.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_315.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_315.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_315.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_315.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_315.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_315.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_315.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[84] _________________ item = <Function '[84]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_316.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_316.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_316.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_316.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_316.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_316.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_316.c:143: E /tmp/pytest/usession-main-22714/platcheck_316.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_316.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_316.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_316.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_316.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_316.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_316.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_316.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_316.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_316.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_316.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[85] _________________ item = <Function '[85]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_317.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_317.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_317.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_317.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_317.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_317.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_317.c:143: E /tmp/pytest/usession-main-22714/platcheck_317.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_317.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_317.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_317.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_317.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_317.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_317.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_317.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_317.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_317.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_317.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[86] _________________ item = <Function '[86]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_318.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_318.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_318.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_318.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_318.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_318.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_318.c:143: E /tmp/pytest/usession-main-22714/platcheck_318.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_318.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_318.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_318.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_318.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_318.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_318.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_318.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_318.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_318.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_318.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[87] _________________ item = <Function '[87]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_319.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_319.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_319.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_319.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_319.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_319.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_319.c:143: E /tmp/pytest/usession-main-22714/platcheck_319.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_319.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_319.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_319.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_319.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_319.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_319.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_319.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_319.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_319.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_319.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[88] _________________ item = <Function '[88]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_320.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_320.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_320.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_320.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_320.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_320.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_320.c:143: E /tmp/pytest/usession-main-22714/platcheck_320.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_320.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_320.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_320.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_320.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_320.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_320.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_320.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_320.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_320.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_320.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[89] _________________ item = <Function '[89]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_321.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_321.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_321.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_321.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_321.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_321.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_321.c:143: E /tmp/pytest/usession-main-22714/platcheck_321.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_321.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_321.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_321.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_321.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_321.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_321.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_321.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_321.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_321.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_321.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[90] _________________ item = <Function '[90]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_322.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_322.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_322.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_322.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_322.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_322.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_322.c:143: E /tmp/pytest/usession-main-22714/platcheck_322.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_322.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_322.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_322.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_322.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_322.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_322.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_322.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_322.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_322.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_322.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[91] _________________ item = <Function '[91]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_323.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_323.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_323.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_323.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_323.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_323.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_323.c:143: E /tmp/pytest/usession-main-22714/platcheck_323.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_323.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_323.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_323.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_323.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_323.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_323.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_323.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_323.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_323.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_323.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[92] _________________ item = <Function '[92]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_324.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_324.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_324.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_324.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_324.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_324.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_324.c:143: E /tmp/pytest/usession-main-22714/platcheck_324.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_324.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_324.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_324.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_324.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_324.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_324.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_324.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_324.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_324.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_324.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[93] _________________ item = <Function '[93]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_325.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_325.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_325.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_325.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_325.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_325.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_325.c:143: E /tmp/pytest/usession-main-22714/platcheck_325.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_325.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_325.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_325.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_325.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_325.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_325.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_325.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_325.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_325.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_325.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[94] _________________ item = <Function '[94]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_326.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_326.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_326.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_326.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_326.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_326.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_326.c:143: E /tmp/pytest/usession-main-22714/platcheck_326.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_326.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_326.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_326.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_326.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_326.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_326.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_326.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_326.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_326.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_326.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[95] _________________ item = <Function '[95]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_327.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_327.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_327.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_327.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_327.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_327.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_327.c:143: E /tmp/pytest/usession-main-22714/platcheck_327.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_327.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_327.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_327.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_327.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_327.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_327.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_327.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_327.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_327.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_327.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[96] _________________ item = <Function '[96]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_328.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_328.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_328.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_328.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_328.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_328.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_328.c:143: E /tmp/pytest/usession-main-22714/platcheck_328.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_328.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_328.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_328.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_328.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_328.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_328.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_328.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_328.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_328.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_328.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[97] _________________ item = <Function '[97]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_329.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_329.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_329.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_329.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_329.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_329.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_329.c:143: E /tmp/pytest/usession-main-22714/platcheck_329.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_329.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_329.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_329.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_329.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_329.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_329.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_329.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_329.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_329.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_329.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[98] _________________ item = <Function '[98]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_330.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_330.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_330.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_330.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_330.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_330.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_330.c:143: E /tmp/pytest/usession-main-22714/platcheck_330.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_330.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_330.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_330.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_330.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_330.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_330.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_330.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_330.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_330.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_330.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[99] _________________ item = <Function '[99]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_331.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_331.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_331.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_331.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_331.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_331.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_331.c:143: E /tmp/pytest/usession-main-22714/platcheck_331.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_331.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_331.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_331.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_331.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_331.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_331.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_331.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_331.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_331.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_331.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[100] ________________ item = <Function '[100]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_332.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_332.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_332.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_332.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_332.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_332.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_332.c:143: E /tmp/pytest/usession-main-22714/platcheck_332.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_332.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_332.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_332.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_332.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_332.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_332.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_332.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_332.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_332.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_332.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[101] ________________ item = <Function '[101]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_333.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_333.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_333.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_333.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_333.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_333.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_333.c:143: E /tmp/pytest/usession-main-22714/platcheck_333.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_333.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_333.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_333.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_333.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_333.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_333.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_333.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_333.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_333.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_333.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[102] ________________ item = <Function '[102]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_334.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_334.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_334.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_334.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_334.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_334.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_334.c:143: E /tmp/pytest/usession-main-22714/platcheck_334.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_334.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_334.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_334.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_334.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_334.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_334.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_334.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_334.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_334.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_334.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[103] ________________ item = <Function '[103]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_335.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_335.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_335.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_335.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_335.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_335.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_335.c:143: E /tmp/pytest/usession-main-22714/platcheck_335.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_335.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_335.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_335.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_335.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_335.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_335.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_335.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_335.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_335.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_335.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[104] ________________ item = <Function '[104]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_336.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_336.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_336.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_336.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_336.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_336.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_336.c:143: E /tmp/pytest/usession-main-22714/platcheck_336.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_336.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_336.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_336.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_336.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_336.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_336.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_336.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_336.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_336.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_336.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[105] ________________ item = <Function '[105]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_337.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_337.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_337.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_337.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_337.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_337.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_337.c:143: E /tmp/pytest/usession-main-22714/platcheck_337.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_337.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_337.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_337.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_337.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_337.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_337.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_337.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_337.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_337.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_337.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[106] ________________ item = <Function '[106]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_338.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_338.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_338.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_338.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_338.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_338.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_338.c:143: E /tmp/pytest/usession-main-22714/platcheck_338.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_338.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_338.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_338.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_338.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_338.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_338.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_338.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_338.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_338.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_338.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_slice[107] ________________ item = <Function '[107]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_339.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_339.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_339.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_339.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_339.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_339.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_339.c:143: E /tmp/pytest/usession-main-22714/platcheck_339.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_339.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_339.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_339.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_339.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_339.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_339.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_339.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_339.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_339.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_339.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_funccalls[0] _______________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_340.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_340.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_340.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_340.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_340.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_340.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_340.c:143: E /tmp/pytest/usession-main-22714/platcheck_340.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_340.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_340.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_340.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_340.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_340.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_340.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_340.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_340.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_340.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_340.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_funccalls[1] _______________ item = <Function '[1]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_341.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_341.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_341.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_341.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_341.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_341.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_341.c:143: E /tmp/pytest/usession-main-22714/platcheck_341.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_341.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_341.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_341.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_341.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_341.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_341.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_341.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_341.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_341.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_341.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_funccalls[2] _______________ item = <Function '[2]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_342.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_342.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_342.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_342.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_342.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_342.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_342.c:143: E /tmp/pytest/usession-main-22714/platcheck_342.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_342.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_342.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_342.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_342.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_342.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_342.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_342.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_342.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_342.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_342.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_funccalls[3] _______________ item = <Function '[3]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_343.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_343.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_343.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_343.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_343.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_343.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_343.c:143: E /tmp/pytest/usession-main-22714/platcheck_343.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_343.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_343.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_343.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_343.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_343.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_343.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_343.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_343.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_343.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_343.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_funccalls[4] _______________ item = <Function '[4]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_344.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_344.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_344.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_344.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_344.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_344.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_344.c:143: E /tmp/pytest/usession-main-22714/platcheck_344.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_344.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_344.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_344.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_344.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_344.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_344.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_344.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_344.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_344.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_344.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_funccalls[5] _______________ item = <Function '[5]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_345.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_345.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_345.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_345.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_345.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_345.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_345.c:143: E /tmp/pytest/usession-main-22714/platcheck_345.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_345.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_345.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_345.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_345.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_345.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_345.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_345.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_345.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_345.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_345.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_listmakers[0] _______________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_346.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_346.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_346.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_346.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_346.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_346.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_346.c:143: E /tmp/pytest/usession-main-22714/platcheck_346.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_346.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_346.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_346.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_346.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_346.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_346.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_346.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_346.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_346.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_346.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_genexprs[0] ________________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_347.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_347.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_347.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_347.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_347.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_347.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_347.c:143: E /tmp/pytest/usession-main-22714/platcheck_347.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_347.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_347.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_347.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_347.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_347.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_347.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_347.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_347.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_347.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_347.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_comparisons[0] ______________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_348.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_348.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_348.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_348.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_348.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_348.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_348.c:143: E /tmp/pytest/usession-main-22714/platcheck_348.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_348.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_348.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_348.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_348.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_348.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_348.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_348.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_348.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_348.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_348.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_comparisons[1] ______________ item = <Function '[1]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_349.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_349.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_349.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_349.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_349.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_349.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_349.c:143: E /tmp/pytest/usession-main-22714/platcheck_349.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_349.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_349.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_349.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_349.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_349.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_349.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_349.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_349.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_349.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_349.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_comparisons[2] ______________ item = <Function '[2]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_350.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_350.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_350.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_350.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_350.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_350.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_350.c:143: E /tmp/pytest/usession-main-22714/platcheck_350.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_350.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_350.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_350.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_350.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_350.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_350.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_350.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_350.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_350.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_350.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_comparisons[3] ______________ item = <Function '[3]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_351.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_351.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_351.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_351.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_351.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_351.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_351.c:143: E /tmp/pytest/usession-main-22714/platcheck_351.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_351.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_351.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_351.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_351.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_351.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_351.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_351.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_351.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_351.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_351.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_comparisons[4] ______________ item = <Function '[4]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_352.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_352.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_352.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_352.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_352.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_352.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_352.c:143: E /tmp/pytest/usession-main-22714/platcheck_352.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_352.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_352.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_352.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_352.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_352.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_352.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_352.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_352.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_352.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_352.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_comparisons[5] ______________ item = <Function '[5]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_353.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_353.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_353.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_353.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_353.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_353.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_353.c:143: E /tmp/pytest/usession-main-22714/platcheck_353.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_353.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_353.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_353.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_353.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_353.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_353.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_353.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_353.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_353.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_353.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_comparisons[6] ______________ item = <Function '[6]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_354.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_354.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_354.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_354.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_354.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_354.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_354.c:143: E /tmp/pytest/usession-main-22714/platcheck_354.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_354.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_354.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_354.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_354.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_354.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_354.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_354.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_354.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_354.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_354.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_comparisons[7] ______________ item = <Function '[7]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_355.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_355.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_355.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_355.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_355.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_355.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_355.c:143: E /tmp/pytest/usession-main-22714/platcheck_355.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_355.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_355.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_355.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_355.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_355.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_355.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_355.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_355.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_355.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_355.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_comparisons[8] ______________ item = <Function '[8]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_356.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_356.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_356.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_356.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_356.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_356.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_356.c:143: E /tmp/pytest/usession-main-22714/platcheck_356.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_356.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_356.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_356.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_356.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_356.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_356.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_356.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_356.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_356.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_356.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_comparisons[9] ______________ item = <Function '[9]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_357.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_357.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_357.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_357.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_357.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_357.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_357.c:143: E /tmp/pytest/usession-main-22714/platcheck_357.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_357.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_357.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_357.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_357.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_357.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_357.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_357.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_357.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_357.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_357.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_comparisons[10] ______________ item = <Function '[10]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_358.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_358.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_358.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_358.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_358.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_358.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_358.c:143: E /tmp/pytest/usession-main-22714/platcheck_358.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_358.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_358.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_358.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_358.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_358.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_358.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_358.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_358.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_358.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_358.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_comparisons[11] ______________ item = <Function '[11]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_359.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_359.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_359.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_359.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_359.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_359.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_359.c:143: E /tmp/pytest/usession-main-22714/platcheck_359.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_359.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_359.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_359.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_359.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_359.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_359.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_359.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_359.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_359.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_359.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_comparisons[12] ______________ item = <Function '[12]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_360.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_360.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_360.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_360.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_360.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_360.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_360.c:143: E /tmp/pytest/usession-main-22714/platcheck_360.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_360.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_360.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_360.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_360.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_360.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_360.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_360.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_360.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_360.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_360.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_comparisons[13] ______________ item = <Function '[13]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_361.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_361.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_361.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_361.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_361.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_361.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_361.c:143: E /tmp/pytest/usession-main-22714/platcheck_361.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_361.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_361.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_361.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_361.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_361.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_361.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_361.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_361.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_361.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_361.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_comparisons[14] ______________ item = <Function '[14]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_362.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_362.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_362.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_362.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_362.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_362.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_362.c:143: E /tmp/pytest/usession-main-22714/platcheck_362.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_362.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_362.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_362.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_362.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_362.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_362.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_362.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_362.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_362.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_362.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_comparisons[15] ______________ item = <Function '[15]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_363.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_363.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_363.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_363.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_363.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_363.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_363.c:143: E /tmp/pytest/usession-main-22714/platcheck_363.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_363.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_363.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_363.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_363.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_363.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_363.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_363.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_363.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_363.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_363.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_comparisons[16] ______________ item = <Function '[16]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_364.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_364.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_364.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_364.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_364.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_364.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_364.c:143: E /tmp/pytest/usession-main-22714/platcheck_364.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_364.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_364.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_364.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_364.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_364.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_364.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_364.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_364.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_364.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_364.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_comparisons[17] ______________ item = <Function '[17]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_365.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_365.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_365.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_365.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_365.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_365.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_365.c:143: E /tmp/pytest/usession-main-22714/platcheck_365.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_365.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_365.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_365.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_365.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_365.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_365.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_365.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_365.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_365.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_365.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_comparisons[18] ______________ item = <Function '[18]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_366.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_366.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_366.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_366.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_366.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_366.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_366.c:143: E /tmp/pytest/usession-main-22714/platcheck_366.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_366.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_366.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_366.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_366.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_366.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_366.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_366.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_366.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_366.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_366.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_comparisons[19] ______________ item = <Function '[19]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_367.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_367.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_367.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_367.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_367.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_367.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_367.c:143: E /tmp/pytest/usession-main-22714/platcheck_367.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_367.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_367.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_367.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_367.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_367.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_367.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_367.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_367.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_367.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_367.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_comparisons[20] ______________ item = <Function '[20]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_368.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_368.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_368.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_368.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_368.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_368.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_368.c:143: E /tmp/pytest/usession-main-22714/platcheck_368.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_368.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_368.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_368.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_368.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_368.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_368.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_368.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_368.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_368.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_368.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_comparisons[21] ______________ item = <Function '[21]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_369.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_369.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_369.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_369.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_369.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_369.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_369.c:143: E /tmp/pytest/usession-main-22714/platcheck_369.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_369.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_369.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_369.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_369.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_369.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_369.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_369.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_369.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_369.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_369.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_comparisons[22] ______________ item = <Function '[22]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_370.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_370.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_370.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_370.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_370.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_370.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_370.c:143: E /tmp/pytest/usession-main-22714/platcheck_370.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_370.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_370.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_370.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_370.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_370.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_370.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_370.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_370.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_370.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_370.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_comparisons[23] ______________ item = <Function '[23]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_371.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_371.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_371.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_371.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_371.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_371.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_371.c:143: E /tmp/pytest/usession-main-22714/platcheck_371.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_371.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_371.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_371.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_371.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_371.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_371.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_371.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_371.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_371.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_371.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_comparisons[24] ______________ item = <Function '[24]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_372.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_372.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_372.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_372.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_372.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_372.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_372.c:143: E /tmp/pytest/usession-main-22714/platcheck_372.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_372.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_372.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_372.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_372.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_372.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_372.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_372.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_372.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_372.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_372.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_comparisons[25] ______________ item = <Function '[25]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_373.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_373.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_373.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_373.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_373.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_373.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_373.c:143: E /tmp/pytest/usession-main-22714/platcheck_373.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_373.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_373.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_373.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_373.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_373.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_373.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_373.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_373.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_373.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_373.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_comparisons[26] ______________ item = <Function '[26]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_374.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_374.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_374.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_374.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_374.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_374.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_374.c:143: E /tmp/pytest/usession-main-22714/platcheck_374.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_374.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_374.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_374.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_374.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_374.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_374.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_374.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_374.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_374.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_374.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_comparisons[27] ______________ item = <Function '[27]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_375.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_375.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_375.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_375.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_375.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_375.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_375.c:143: E /tmp/pytest/usession-main-22714/platcheck_375.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_375.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_375.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_375.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_375.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_375.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_375.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_375.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_375.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_375.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_375.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_multiexpr[0] _______________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_376.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_376.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_376.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_376.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_376.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_376.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_376.c:143: E /tmp/pytest/usession-main-22714/platcheck_376.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_376.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_376.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_376.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_376.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_376.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_376.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_376.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_376.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_376.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_376.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_imports[0] ________________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_377.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_377.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_377.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_377.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_377.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_377.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_377.c:143: E /tmp/pytest/usession-main-22714/platcheck_377.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_377.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_377.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_377.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_377.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_377.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_377.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_377.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_377.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_377.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_377.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_imports[1] ________________ item = <Function '[1]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_378.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_378.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_378.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_378.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_378.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_378.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_378.c:143: E /tmp/pytest/usession-main-22714/platcheck_378.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_378.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_378.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_378.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_378.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_378.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_378.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_378.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_378.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_378.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_378.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_imports[2] ________________ item = <Function '[2]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_379.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_379.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_379.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_379.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_379.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_379.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_379.c:143: E /tmp/pytest/usession-main-22714/platcheck_379.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_379.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_379.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_379.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_379.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_379.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_379.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_379.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_379.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_379.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_379.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_imports[3] ________________ item = <Function '[3]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_380.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_380.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_380.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_380.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_380.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_380.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_380.c:143: E /tmp/pytest/usession-main-22714/platcheck_380.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_380.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_380.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_380.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_380.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_380.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_380.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_380.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_380.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_380.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_380.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_imports[4] ________________ item = <Function '[4]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_381.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_381.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_381.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_381.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_381.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_381.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_381.c:143: E /tmp/pytest/usession-main-22714/platcheck_381.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_381.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_381.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_381.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_381.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_381.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_381.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_381.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_381.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_381.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_381.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_imports[5] ________________ item = <Function '[5]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_382.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_382.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_382.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_382.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_382.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_382.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_382.c:143: E /tmp/pytest/usession-main-22714/platcheck_382.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_382.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_382.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_382.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_382.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_382.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_382.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_382.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_382.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_382.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_382.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_imports[6] ________________ item = <Function '[6]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_383.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_383.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_383.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_383.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_383.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_383.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_383.c:143: E /tmp/pytest/usession-main-22714/platcheck_383.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_383.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_383.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_383.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_383.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_383.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_383.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_383.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_383.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_383.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_383.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_imports[7] ________________ item = <Function '[7]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_384.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_384.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_384.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_384.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_384.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_384.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_384.c:143: E /tmp/pytest/usession-main-22714/platcheck_384.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_384.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_384.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_384.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_384.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_384.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_384.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_384.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_384.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_384.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_384.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_imports[8] ________________ item = <Function '[8]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_385.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_385.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_385.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_385.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_385.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_385.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_385.c:143: E /tmp/pytest/usession-main-22714/platcheck_385.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_385.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_385.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_385.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_385.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_385.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_385.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_385.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_385.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_385.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_385.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_imports[9] ________________ item = <Function '[9]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_386.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_386.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_386.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_386.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_386.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_386.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_386.c:143: E /tmp/pytest/usession-main-22714/platcheck_386.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_386.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_386.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_386.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_386.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_386.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_386.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_386.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_386.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_386.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_386.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_imports[10] ________________ item = <Function '[10]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_387.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_387.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_387.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_387.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_387.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_387.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_387.c:143: E /tmp/pytest/usession-main-22714/platcheck_387.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_387.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_387.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_387.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_387.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_387.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_387.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_387.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_387.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_387.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_387.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_imports[11] ________________ item = <Function '[11]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_388.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_388.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_388.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_388.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_388.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_388.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_388.c:143: E /tmp/pytest/usession-main-22714/platcheck_388.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_388.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_388.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_388.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_388.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_388.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_388.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_388.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_388.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_388.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_388.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_imports[12] ________________ item = <Function '[12]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_389.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_389.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_389.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_389.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_389.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_389.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_389.c:143: E /tmp/pytest/usession-main-22714/platcheck_389.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_389.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_389.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_389.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_389.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_389.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_389.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_389.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_389.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_389.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_389.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_if_stmts[0] ________________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_390.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_390.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_390.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_390.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_390.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_390.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_390.c:143: E /tmp/pytest/usession-main-22714/platcheck_390.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_390.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_390.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_390.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_390.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_390.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_390.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_390.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_390.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_390.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_390.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_if_stmts[1] ________________ item = <Function '[1]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_391.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_391.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_391.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_391.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_391.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_391.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_391.c:143: E /tmp/pytest/usession-main-22714/platcheck_391.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_391.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_391.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_391.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_391.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_391.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_391.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_391.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_391.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_391.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_391.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_if_stmts[2] ________________ item = <Function '[2]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_392.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_392.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_392.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_392.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_392.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_392.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_392.c:143: E /tmp/pytest/usession-main-22714/platcheck_392.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_392.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_392.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_392.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_392.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_392.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_392.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_392.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_392.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_392.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_392.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_if_stmts[3] ________________ item = <Function '[3]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_393.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_393.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_393.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_393.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_393.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_393.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_393.c:143: E /tmp/pytest/usession-main-22714/platcheck_393.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_393.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_393.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_393.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_393.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_393.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_393.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_393.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_393.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_393.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_393.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_if_stmts[4] ________________ item = <Function '[4]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_394.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_394.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_394.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_394.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_394.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_394.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_394.c:143: E /tmp/pytest/usession-main-22714/platcheck_394.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_394.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_394.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_394.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_394.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_394.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_394.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_394.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_394.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_394.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_394.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_if_stmts[5] ________________ item = <Function '[5]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_395.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_395.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_395.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_395.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_395.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_395.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_395.c:143: E /tmp/pytest/usession-main-22714/platcheck_395.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_395.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_395.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_395.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_395.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_395.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_395.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_395.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_395.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_395.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_395.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_docstrings[0] _______________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_396.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_396.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_396.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_396.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_396.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_396.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_396.c:143: E /tmp/pytest/usession-main-22714/platcheck_396.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_396.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_396.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_396.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_396.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_396.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_396.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_396.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_396.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_396.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_396.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_docstrings[1] _______________ item = <Function '[1]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_397.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_397.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_397.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_397.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_397.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_397.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_397.c:143: E /tmp/pytest/usession-main-22714/platcheck_397.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_397.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_397.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_397.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_397.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_397.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_397.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_397.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_397.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_397.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_397.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_docstrings[2] _______________ item = <Function '[2]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_398.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_398.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_398.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_398.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_398.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_398.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_398.c:143: E /tmp/pytest/usession-main-22714/platcheck_398.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_398.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_398.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_398.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_398.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_398.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_398.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_398.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_398.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_398.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_398.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_docstrings[3] _______________ item = <Function '[3]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_399.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_399.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_399.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_399.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_399.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_399.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_399.c:143: E /tmp/pytest/usession-main-22714/platcheck_399.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_399.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_399.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_399.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_399.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_399.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_399.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_399.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_399.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_399.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_399.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_docstrings[4] _______________ item = <Function '[4]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_400.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_400.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_400.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_400.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_400.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_400.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_400.c:143: E /tmp/pytest/usession-main-22714/platcheck_400.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_400.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_400.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_400.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_400.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_400.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_400.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_400.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_400.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_400.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_400.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_docstrings[5] _______________ item = <Function '[5]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_401.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_401.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_401.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_401.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_401.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_401.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_401.c:143: E /tmp/pytest/usession-main-22714/platcheck_401.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_401.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_401.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_401.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_401.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_401.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_401.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_401.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_401.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_401.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_401.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_docstrings[6] _______________ item = <Function '[6]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_402.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_402.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_402.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_402.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_402.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_402.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_402.c:143: E /tmp/pytest/usession-main-22714/platcheck_402.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_402.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_402.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_402.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_402.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_402.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_402.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_402.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_402.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_402.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_402.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_docstrings[7] _______________ item = <Function '[7]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_403.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_403.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_403.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_403.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_403.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_403.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_403.c:143: E /tmp/pytest/usession-main-22714/platcheck_403.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_403.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_403.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_403.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_403.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_403.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_403.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_403.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_403.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_403.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_403.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_docstrings[8] _______________ item = <Function '[8]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_404.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_404.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_404.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_404.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_404.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_404.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_404.c:143: E /tmp/pytest/usession-main-22714/platcheck_404.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_404.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_404.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_404.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_404.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_404.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_404.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_404.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_404.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_404.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_404.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_docstrings[9] _______________ item = <Function '[9]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_405.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_405.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_405.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_405.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_405.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_405.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_405.c:143: E /tmp/pytest/usession-main-22714/platcheck_405.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_405.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_405.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_405.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_405.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_405.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_405.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_405.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_405.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_405.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_405.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestCompiler.test_in[0] ___________________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_406.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_406.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_406.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_406.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_406.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_406.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_406.c:143: E /tmp/pytest/usession-main-22714/platcheck_406.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_406.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_406.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_406.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_406.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_406.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_406.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_406.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_406.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_406.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_406.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestCompiler.test_in[1] ___________________ item = <Function '[1]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_407.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_407.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_407.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_407.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_407.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_407.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_407.c:143: E /tmp/pytest/usession-main-22714/platcheck_407.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_407.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_407.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_407.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_407.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_407.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_407.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_407.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_407.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_407.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_407.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestCompiler.test_in[2] ___________________ item = <Function '[2]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_408.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_408.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_408.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_408.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_408.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_408.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_408.c:143: E /tmp/pytest/usession-main-22714/platcheck_408.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_408.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_408.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_408.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_408.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_408.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_408.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_408.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_408.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_408.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_408.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestCompiler.test_in[3] ___________________ item = <Function '[3]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_409.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_409.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_409.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_409.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_409.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_409.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_409.c:143: E /tmp/pytest/usession-main-22714/platcheck_409.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_409.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_409.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_409.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_409.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_409.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_409.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_409.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_409.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_409.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_409.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestCompiler.test_in[4] ___________________ item = <Function '[4]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_410.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_410.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_410.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_410.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_410.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_410.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_410.c:143: E /tmp/pytest/usession-main-22714/platcheck_410.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_410.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_410.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_410.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_410.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_410.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_410.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_410.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_410.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_410.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_410.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestCompiler.test_in[5] ___________________ item = <Function '[5]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_411.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_411.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_411.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_411.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_411.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_411.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_411.c:143: E /tmp/pytest/usession-main-22714/platcheck_411.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_411.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_411.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_411.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_411.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_411.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_411.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_411.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_411.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_411.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_411.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestCompiler.test_in[6] ___________________ item = <Function '[6]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_412.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_412.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_412.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_412.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_412.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_412.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_412.c:143: E /tmp/pytest/usession-main-22714/platcheck_412.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_412.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_412.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_412.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_412.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_412.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_412.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_412.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_412.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_412.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_412.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________________ ERROR at setup of TestCompiler.test_in[7] ___________________ item = <Function '[7]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_413.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_413.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_413.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_413.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_413.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_413.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_413.c:143: E /tmp/pytest/usession-main-22714/platcheck_413.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_413.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_413.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_413.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_413.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_413.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_413.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_413.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_413.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_413.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_413.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_for_loops[0] _______________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_414.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_414.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_414.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_414.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_414.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_414.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_414.c:143: E /tmp/pytest/usession-main-22714/platcheck_414.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_414.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_414.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_414.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_414.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_414.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_414.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_414.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_414.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_414.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_414.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_for_loops[1] _______________ item = <Function '[1]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_415.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_415.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_415.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_415.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_415.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_415.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_415.c:143: E /tmp/pytest/usession-main-22714/platcheck_415.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_415.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_415.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_415.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_415.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_415.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_415.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_415.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_415.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_415.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_415.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_for_loops[2] _______________ item = <Function '[2]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_416.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_416.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_416.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_416.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_416.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_416.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_416.c:143: E /tmp/pytest/usession-main-22714/platcheck_416.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_416.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_416.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_416.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_416.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_416.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_416.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_416.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_416.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_416.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_416.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_for_loops[3] _______________ item = <Function '[3]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_417.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_417.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_417.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_417.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_417.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_417.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_417.c:143: E /tmp/pytest/usession-main-22714/platcheck_417.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_417.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_417.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_417.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_417.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_417.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_417.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_417.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_417.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_417.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_417.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_for_loops[4] _______________ item = <Function '[4]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_418.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_418.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_418.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_418.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_418.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_418.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_418.c:143: E /tmp/pytest/usession-main-22714/platcheck_418.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_418.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_418.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_418.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_418.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_418.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_418.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_418.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_418.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_418.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_418.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_for_loops[5] _______________ item = <Function '[5]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_419.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_419.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_419.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_419.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_419.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_419.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_419.c:143: E /tmp/pytest/usession-main-22714/platcheck_419.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_419.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_419.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_419.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_419.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_419.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_419.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_419.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_419.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_419.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_419.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_for_loops[6] _______________ item = <Function '[6]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_420.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_420.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_420.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_420.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_420.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_420.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_420.c:143: E /tmp/pytest/usession-main-22714/platcheck_420.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_420.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_420.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_420.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_420.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_420.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_420.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_420.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_420.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_420.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_420.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_for_loops[7] _______________ item = <Function '[7]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_421.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_421.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_421.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_421.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_421.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_421.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_421.c:143: E /tmp/pytest/usession-main-22714/platcheck_421.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_421.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_421.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_421.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_421.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_421.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_421.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_421.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_421.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_421.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_421.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_for_loops[8] _______________ item = <Function '[8]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_422.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_422.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_422.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_422.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_422.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_422.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_422.c:143: E /tmp/pytest/usession-main-22714/platcheck_422.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_422.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_422.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_422.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_422.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_422.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_422.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_422.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_422.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_422.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_422.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_for_loops[9] _______________ item = <Function '[9]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_423.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_423.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_423.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_423.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_423.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_423.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_423.c:143: E /tmp/pytest/usession-main-22714/platcheck_423.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_423.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_423.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_423.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_423.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_423.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_423.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_423.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_423.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_423.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_423.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_for_loops[10] _______________ item = <Function '[10]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_424.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_424.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_424.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_424.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_424.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_424.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_424.c:143: E /tmp/pytest/usession-main-22714/platcheck_424.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_424.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_424.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_424.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_424.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_424.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_424.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_424.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_424.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_424.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_424.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_closure[0] ________________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_425.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_425.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_425.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_425.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_425.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_425.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_425.c:143: E /tmp/pytest/usession-main-22714/platcheck_425.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_425.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_425.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_425.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_425.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_425.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_425.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_425.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_425.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_425.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_425.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_closure[1] ________________ item = <Function '[1]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_426.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_426.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_426.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_426.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_426.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_426.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_426.c:143: E /tmp/pytest/usession-main-22714/platcheck_426.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_426.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_426.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_426.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_426.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_426.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_426.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_426.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_426.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_426.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_426.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_closure[2] ________________ item = <Function '[2]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_427.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_427.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_427.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_427.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_427.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_427.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_427.c:143: E /tmp/pytest/usession-main-22714/platcheck_427.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_427.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_427.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_427.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_427.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_427.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_427.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_427.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_427.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_427.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_427.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_closure_error _______________ item = <Function 'test_closure_error'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_428.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_428.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_428.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_428.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_428.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_428.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_428.c:143: E /tmp/pytest/usession-main-22714/platcheck_428.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_428.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_428.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_428.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_428.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_428.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_428.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_428.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_428.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_428.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_428.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestCompiler.test_try_except_finally[0] ___________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_429.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_429.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_429.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_429.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_429.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_429.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_429.c:143: E /tmp/pytest/usession-main-22714/platcheck_429.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_429.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_429.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_429.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_429.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_429.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_429.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_429.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_429.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_429.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_429.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_while_loop[0] _______________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_430.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_430.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_430.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_430.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_430.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_430.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_430.c:143: E /tmp/pytest/usession-main-22714/platcheck_430.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_430.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_430.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_430.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_430.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_430.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_430.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_430.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_430.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_430.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_430.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_while_loop[1] _______________ item = <Function '[1]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_431.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_431.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_431.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_431.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_431.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_431.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_431.c:143: E /tmp/pytest/usession-main-22714/platcheck_431.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_431.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_431.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_431.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_431.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_431.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_431.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_431.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_431.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_431.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_431.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_return_lineno[0] _____________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_432.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_432.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_432.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_432.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_432.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_432.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_432.c:143: E /tmp/pytest/usession-main-22714/platcheck_432.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_432.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_432.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_432.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_432.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_432.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_432.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_432.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_432.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_432.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_432.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_type_of_constants[0] ___________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_433.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_433.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_433.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_433.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_433.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_433.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_433.c:143: E /tmp/pytest/usession-main-22714/platcheck_433.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_433.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_433.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_433.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_433.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_433.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_433.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_433.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_433.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_433.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_433.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_type_of_constants[1] ___________ item = <Function '[1]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_434.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_434.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_434.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_434.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_434.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_434.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_434.c:143: E /tmp/pytest/usession-main-22714/platcheck_434.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_434.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_434.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_434.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_434.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_434.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_434.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_434.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_434.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_434.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_434.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_type_of_constants[2] ___________ item = <Function '[2]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_435.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_435.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_435.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_435.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_435.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_435.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_435.c:143: E /tmp/pytest/usession-main-22714/platcheck_435.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_435.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_435.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_435.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_435.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_435.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_435.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_435.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_435.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_435.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_435.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_pprint[0] _________________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_436.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_436.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_436.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_436.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_436.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_436.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_436.c:143: E /tmp/pytest/usession-main-22714/platcheck_436.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_436.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_436.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_436.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_436.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_436.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_436.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_436.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_436.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_436.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_436.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_mapping_test[0] ______________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_437.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_437.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_437.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_437.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_437.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_437.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_437.c:143: E /tmp/pytest/usession-main-22714/platcheck_437.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_437.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_437.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_437.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_437.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_437.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_437.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_437.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_437.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_437.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_437.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of TestCompiler.test_stack_depth_bug[0] ____________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_438.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_438.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_438.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_438.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_438.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_438.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_438.c:143: E /tmp/pytest/usession-main-22714/platcheck_438.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_438.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_438.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_438.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_438.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_438.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_438.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_438.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_438.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_438.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_438.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of TestCompiler.test_indentation_error _____________ item = <Function 'test_indentation_error'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_439.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_439.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_439.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_439.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_439.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_439.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_439.c:143: E /tmp/pytest/usession-main-22714/platcheck_439.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_439.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_439.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_439.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_439.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_439.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_439.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_439.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_439.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_439.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_439.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_no_indent _________________ item = <Function 'test_no_indent'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_440.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_440.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_440.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_440.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_440.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_440.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_440.c:143: E /tmp/pytest/usession-main-22714/platcheck_440.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_440.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_440.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_440.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_440.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_440.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_440.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_440.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_440.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_440.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_440.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestCompiler.test_indent_error_filename ___________ item = <Function 'test_indent_error_filename'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_441.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_441.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_441.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_441.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_441.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_441.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_441.c:143: E /tmp/pytest/usession-main-22714/platcheck_441.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_441.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_441.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_441.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_441.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_441.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_441.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_441.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_441.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_441.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_441.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestCompiler.test_kwargs_last ________________ item = <Function 'test_kwargs_last'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_442.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_442.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_442.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_442.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_442.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_442.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_442.c:143: E /tmp/pytest/usession-main-22714/platcheck_442.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_442.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_442.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_442.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_442.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_442.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_442.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_442.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_442.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_442.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_442.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_crap_after_starargs ____________ item = <Function 'test_crap_after_starargs'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_443.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_443.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_443.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_443.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_443.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_443.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_443.c:143: E /tmp/pytest/usession-main-22714/platcheck_443.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_443.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_443.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_443.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_443.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_443.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_443.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_443.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_443.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_443.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_443.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_not_a_name ________________ item = <Function 'test_not_a_name'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_444.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_444.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_444.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_444.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_444.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_444.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_444.c:143: E /tmp/pytest/usession-main-22714/platcheck_444.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_444.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_444.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_444.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_444.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_444.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_444.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_444.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_444.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_444.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_444.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of TestCompiler.test_assignment_to_call_func __________ item = <Function 'test_assignment_to_call_func'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_445.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_445.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_445.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_445.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_445.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_445.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_445.c:143: E /tmp/pytest/usession-main-22714/platcheck_445.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_445.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_445.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_445.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_445.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_445.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_445.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_445.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_445.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_445.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_445.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_augassig_to_sequence ___________ item = <Function 'test_augassig_to_sequence'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_446.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_446.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_446.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_446.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_446.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_446.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_446.c:143: E /tmp/pytest/usession-main-22714/platcheck_446.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_446.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_446.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_446.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_446.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_446.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_446.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_446.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_446.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_446.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_446.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_broken_setups _______________ item = <Function 'test_broken_setups'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_447.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_447.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_447.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_447.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_447.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_447.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_447.c:143: E /tmp/pytest/usession-main-22714/platcheck_447.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_447.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_447.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_447.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_447.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_447.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_447.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_447.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_447.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_447.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_447.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestCompiler.test_bare_except_not_last ___________ item = <Function 'test_bare_except_not_last'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_448.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_448.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_448.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_448.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_448.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_448.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_448.c:143: E /tmp/pytest/usession-main-22714/platcheck_448.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_448.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_448.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_448.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_448.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_448.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_448.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_448.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_448.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_448.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_448.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of TestCompiler.test_unpack_singletuple ____________ item = <Function 'test_unpack_singletuple'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_449.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_449.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_449.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_449.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_449.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_449.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_449.c:143: E /tmp/pytest/usession-main-22714/platcheck_449.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_449.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_449.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_449.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_449.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_449.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_449.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_449.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_449.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_449.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_449.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of TestCompiler.test_unpack_wrong_stackeffect _________ item = <Function 'test_unpack_wrong_stackeffect'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_450.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_450.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_450.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_450.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_450.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_450.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_450.c:143: E /tmp/pytest/usession-main-22714/platcheck_450.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_450.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_450.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_450.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_450.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_450.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_450.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_450.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_450.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_450.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_450.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_stackeffect_bug3 _____________ item = <Function 'test_stackeffect_bug3'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_451.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_451.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_451.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_451.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_451.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_451.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_451.c:143: E /tmp/pytest/usession-main-22714/platcheck_451.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_451.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_451.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_451.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_451.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_451.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_451.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_451.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_451.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_451.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_451.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_stackeffect_bug4 _____________ item = <Function 'test_stackeffect_bug4'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_452.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_452.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_452.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_452.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_452.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_452.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_452.c:143: E /tmp/pytest/usession-main-22714/platcheck_452.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_452.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_452.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_452.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_452.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_452.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_452.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_452.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_452.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_452.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_452.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_stackeffect_bug5 _____________ item = <Function 'test_stackeffect_bug5'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_453.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_453.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_453.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_453.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_453.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_453.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_453.c:143: E /tmp/pytest/usession-main-22714/platcheck_453.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_453.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_453.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_453.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_453.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_453.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_453.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_453.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_453.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_453.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_453.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_stackeffect_bug6 _____________ item = <Function 'test_stackeffect_bug6'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_454.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_454.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_454.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_454.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_454.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_454.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_454.c:143: E /tmp/pytest/usession-main-22714/platcheck_454.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_454.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_454.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_454.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_454.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_454.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_454.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_454.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_454.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_454.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_454.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_stackeffect_bug7 _____________ item = <Function 'test_stackeffect_bug7'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_455.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_455.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_455.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_455.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_455.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_455.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_455.c:143: E /tmp/pytest/usession-main-22714/platcheck_455.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_455.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_455.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_455.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_455.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_455.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_455.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_455.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_455.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_455.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_455.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestCompiler.test_lambda[0] _________________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_456.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_456.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_456.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_456.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_456.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_456.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_456.c:143: E /tmp/pytest/usession-main-22714/platcheck_456.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_456.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_456.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_456.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_456.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_456.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_456.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_456.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_456.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_456.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_456.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of TestCompiler.test_backquote_repr[0] _____________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_457.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_457.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_457.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_457.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_457.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_457.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_457.c:143: E /tmp/pytest/usession-main-22714/platcheck_457.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_457.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_457.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_457.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_457.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_457.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_457.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_457.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_457.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_457.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_457.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestCompiler.test_deleting_attributes[0] __________ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_458.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_458.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_458.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_458.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_458.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_458.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_458.c:143: E /tmp/pytest/usession-main-22714/platcheck_458.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_458.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_458.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_458.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_458.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_458.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_458.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_458.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_458.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_458.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_458.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestCompiler.test_lots_of_loops _______________ item = <Function 'test_lots_of_loops'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_459.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_459.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_459.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_459.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_459.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_459.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_459.c:143: E /tmp/pytest/usession-main-22714/platcheck_459.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_459.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_459.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_459.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_459.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_459.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_459.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_459.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_459.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_459.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_459.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestCompiler.test_assign_to_empty_list_1 __________ item = <Function 'test_assign_to_empty_list_1'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_460.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_460.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_460.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_460.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_460.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_460.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_460.c:143: E /tmp/pytest/usession-main-22714/platcheck_460.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_460.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_460.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_460.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_460.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_460.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_460.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_460.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_460.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_460.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_460.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestCompiler.test_assign_to_empty_list_2 __________ item = <Function 'test_assign_to_empty_list_2'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_461.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_461.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_461.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_461.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_461.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_461.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_461.c:143: E /tmp/pytest/usession-main-22714/platcheck_461.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_461.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_461.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_461.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_461.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_461.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_461.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_461.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_461.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_461.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_461.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____ ERROR at setup of TestCompiler.test_remove_docstring[0f1.__doc__-None] ____ item = <Function 'test_remove_docstring[0f1.__doc__-None]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_462.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_462.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_462.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_462.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_462.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_462.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_462.c:143: E /tmp/pytest/usession-main-22714/platcheck_462.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_462.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_462.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_462.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_462.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_462.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_462.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_462.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_462.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_462.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_462.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _ ERROR at setup of TestCompiler.test_remove_docstring[1f2.__doc__-docstring] __ item = <Function 'test_remove_docstring[1f2.__doc__-docstring]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_463.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_463.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_463.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_463.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_463.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_463.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_463.c:143: E /tmp/pytest/usession-main-22714/platcheck_463.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_463.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_463.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_463.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_463.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_463.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_463.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_463.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_463.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_463.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_463.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____ ERROR at setup of TestCompiler.test_remove_docstring[2f2()-docstring] _____ item = <Function 'test_remove_docstring[2f2()-docstring]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_464.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_464.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_464.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_464.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_464.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_464.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_464.c:143: E /tmp/pytest/usession-main-22714/platcheck_464.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_464.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_464.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_464.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_464.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_464.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_464.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_464.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_464.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_464.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_464.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____ ERROR at setup of TestCompiler.test_remove_docstring[3f3.__doc__-None] ____ item = <Function 'test_remove_docstring[3f3.__doc__-None]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_465.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_465.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_465.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_465.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_465.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_465.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_465.c:143: E /tmp/pytest/usession-main-22714/platcheck_465.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_465.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_465.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_465.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_465.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_465.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_465.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_465.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_465.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_465.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_465.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______ ERROR at setup of TestCompiler.test_remove_docstring[4f3()-bar] ________ item = <Function 'test_remove_docstring[4f3()-bar]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_466.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_466.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_466.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_466.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_466.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_466.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_466.c:143: E /tmp/pytest/usession-main-22714/platcheck_466.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_466.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_466.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_466.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_466.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_466.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_466.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_466.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_466.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_466.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_466.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____ ERROR at setup of TestCompiler.test_remove_docstring[5C1.__doc__-None] ____ item = <Function 'test_remove_docstring[5C1.__doc__-None]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_467.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_467.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_467.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_467.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_467.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_467.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_467.c:143: E /tmp/pytest/usession-main-22714/platcheck_467.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_467.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_467.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_467.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_467.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_467.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_467.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_467.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_467.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_467.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_467.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _ ERROR at setup of TestCompiler.test_remove_docstring[6C2.__doc__-docstring] __ item = <Function 'test_remove_docstring[6C2.__doc__-docstring]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_468.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_468.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_468.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_468.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_468.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_468.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_468.c:143: E /tmp/pytest/usession-main-22714/platcheck_468.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_468.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_468.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_468.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_468.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_468.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_468.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_468.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_468.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_468.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_468.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ERROR at setup of TestCompiler.test_remove_docstring[7C3.field-not docstring] _ item = <Function 'test_remove_docstring[7C3.field-not docstring]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_469.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_469.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_469.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_469.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_469.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_469.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_469.c:143: E /tmp/pytest/usession-main-22714/platcheck_469.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_469.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_469.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_469.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_469.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_469.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_469.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_469.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_469.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_469.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_469.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __ ERROR at setup of TestCompiler.test_remove_docstring[8C4.field-docstring] ___ item = <Function 'test_remove_docstring[8C4.field-docstring]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_470.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_470.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_470.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_470.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_470.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_470.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_470.c:143: E /tmp/pytest/usession-main-22714/platcheck_470.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_470.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_470.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_470.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_470.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_470.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_470.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_470.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_470.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_470.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_470.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _ ERROR at setup of TestCompiler.test_remove_docstring[9C4.__doc__-docstring] __ item = <Function 'test_remove_docstring[9C4.__doc__-docstring]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_471.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_471.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_471.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_471.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_471.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_471.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_471.c:143: E /tmp/pytest/usession-main-22714/platcheck_471.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_471.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_471.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_471.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_471.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_471.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_471.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_471.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_471.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_471.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_471.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _ ERROR at setup of TestCompiler.test_remove_docstring[10C4.__doc__-docstring] _ item = <Function 'test_remove_docstring[10C4.__doc__-docstring]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_472.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_472.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_472.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_472.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_472.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_472.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_472.c:143: E /tmp/pytest/usession-main-22714/platcheck_472.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_472.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_472.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_472.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_472.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_472.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_472.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_472.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_472.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_472.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_472.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____ ERROR at setup of TestCompiler.test_remove_docstring[11__doc__-None] _____ item = <Function 'test_remove_docstring[11__doc__-None]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_473.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_473.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_473.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_473.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_473.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_473.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_473.c:143: E /tmp/pytest/usession-main-22714/platcheck_473.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_473.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_473.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_473.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_473.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_473.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_473.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_473.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_473.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_473.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_473.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestCompiler.test_assert_skipping ______________ item = <Function 'test_assert_skipping'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_474.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_474.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_474.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_474.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_474.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_474.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_474.c:143: E /tmp/pytest/usession-main-22714/platcheck_474.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_474.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_474.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_474.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_474.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_474.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_474.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_474.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_474.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_474.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_474.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____ ERROR at setup of TestCompiler.test_dont_fold_equal_code_objects[0] ______ item = <Function '[0]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_475.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_475.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_475.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_475.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_475.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_475.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_475.c:143: E /tmp/pytest/usession-main-22714/platcheck_475.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_475.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_475.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_475.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_475.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_475.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_475.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_475.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_475.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_475.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_475.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____ ERROR at setup of TestCompiler.test_dont_fold_equal_code_objects[1] ______ item = <Function '[1]'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_476.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_476.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_476.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_476.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_476.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_476.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_476.c:143: E /tmp/pytest/usession-main-22714/platcheck_476.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_476.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_476.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_476.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_476.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_476.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_476.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_476.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_476.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_476.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_476.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of TestCompilerRevDB.test_revdb_metavar ____________ item = <Function 'test_revdb_metavar'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:625: in make_builtins self.exceptions_module = Module(self, w_name) interpreter/mixedmodule.py:23: in __init__ Module.__init__(self, space, w_name) interpreter/module.py:24: in __init__ space.setitem(w_dict, space.new_interned_str('__name__'), w_name) interpreter/baseobjspace.py:890: in new_interned_str if self._side_effects_ok(): interpreter/baseobjspace.py:920: in _side_effects_ok return self._revdb_standard_code() interpreter/baseobjspace.py:901: in _revdb_standard_code from pypy.interpreter.reverse_debugging import dbstate interpreter/reverse_debugging.py:9: in <module> from pypy.module.marshal import interp_marshal module/marshal/interp_marshal.py:5: in <module> from pypy.module._file.interp_file import W_File module/_file/interp_file.py:5: in <module> from rpython.rlib import streamio ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_477.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_477.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_477.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_477.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_477.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_477.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_477.c:143: E /tmp/pytest/usession-main-22714/platcheck_477.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_477.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_477.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_477.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_477.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_477.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_477.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_477.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_477.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_477.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_477.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of AppTestCompiler.test_docstring_not_loaded __________ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22714/platcheck_478.c: In functi...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f8f28b1c2d0>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_docstring_not_loaded'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_docstring_not_loaded'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f8f2eeb0e90> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f8f2c7671e0>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f8f2d9d58c0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f8f2d99fd20>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_docstring_not_loaded'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_docstring_not_loaded'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f8f2c7671e0>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f8f2d9d58c0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f8f2d99fd20>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_docstring_not_loaded'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_docstring_not_loaded'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_docstring_not_loaded'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f8f287380a0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...not_loaded'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f8f28738460> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f8f28738460> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...not_loaded'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_docstring_not_loaded'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_docstring_not_loaded'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f8f29208dd0> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f8f29208dd0> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f8f29208dd0> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f8f29208dd0> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f8f2901a310> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f8f2a37c550> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f8f2972fb40> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f8f29df7ad0>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f8f2a171d90>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f8f29b3d990>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22714/platcheck_478.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22714/platcheck_478.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22714/platcheck_478.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22714/platcheck_478.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22714/platcheck_478.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22714/platcheck_478.o') cwd = '/tmp/pytest/usession-main-22714' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_478.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_478.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_478.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_478.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_478.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_478.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_478.c:143: E /tmp/pytest/usession-main-22714/platcheck_478.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_478.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_478.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_478.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_478.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_478.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_478.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_478.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_478.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_478.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_478.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of AppTestCompiler.test_print_to ________________ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22714/platcheck_479.c: In functi...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f8f28a7f5d0>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_print_to'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_print_to'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f8f2eeb0e90> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f8f2c7671e0>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f8f2d9d58c0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f8f2d99fd20>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_print_to'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_print_to'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f8f2c7671e0>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f8f2d9d58c0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f8f2d99fd20>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_print_to'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_print_to'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_print_to'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f8f286d0f00> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...t_print_to'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f8f286d0b40> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f8f286d0b40> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...t_print_to'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_print_to'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_print_to'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f8f2913fbd0> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f8f2913fbd0> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f8f2913fbd0> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f8f2913fbd0> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f8f2933c850> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f8f2a37c550> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f8f287d6bb0> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f8f29a302d0>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f8f2917e410>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f8f28b772d0>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22714/platcheck_479.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22714/platcheck_479.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22714/platcheck_479.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22714/platcheck_479.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22714/platcheck_479.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22714/platcheck_479.o') cwd = '/tmp/pytest/usession-main-22714' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_479.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_479.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_479.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_479.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_479.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_479.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_479.c:143: E /tmp/pytest/usession-main-22714/platcheck_479.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_479.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_479.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_479.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_479.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_479.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_479.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_479.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_479.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_479.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_479.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of AppTestCompiler.test_assert_with_tuple_arg _________ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22714/platcheck_480.c: In functi...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f8f28c82c50>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_assert_with_tuple_arg'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_assert_with_tuple_arg'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f8f2eeb0e90> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f8f2c7671e0>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f8f2d9d58c0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f8f2d99fd20>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_assert_with_tuple_arg'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_assert_with_tuple_arg'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f8f2c7671e0>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f8f2d9d58c0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f8f2d99fd20>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_assert_with_tuple_arg'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_assert_with_tuple_arg'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_assert_with_tuple_arg'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f8f28c9d910> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._tuple_arg'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f8f28c9ddc0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f8f28c9ddc0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._tuple_arg'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_assert_with_tuple_arg'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_assert_with_tuple_arg'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f8f2a490410> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f8f2a490410> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f8f2a490410> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f8f2a490410> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f8f29ab2b10> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f8f2a37c550> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f8f290c8e50> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f8f299a2dd0>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f8f288ee810>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f8f29edbd50>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22714/platcheck_480.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22714/platcheck_480.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22714/platcheck_480.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22714/platcheck_480.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22714/platcheck_480.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22714/platcheck_480.o') cwd = '/tmp/pytest/usession-main-22714' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_480.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_480.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_480.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_480.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_480.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_480.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_480.c:143: E /tmp/pytest/usession-main-22714/platcheck_480.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_480.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_480.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_480.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_480.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_480.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_480.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_480.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_480.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_480.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_480.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____ ERROR at setup of AppTestCompiler.test_build_list_from_arg_length_hint ____ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22714/platcheck_481.c: In functi...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f8f29af1c50>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_build_list_from_arg_length_hint...ll__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_build_list_from_arg_length_hint'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f8f2eeb0e90> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f8f2c7671e0>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f8f2d9d58c0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f8f2d99fd20>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_build_list_from_arg_length_hint...ll__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_build_list_from_arg_length_hint'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f8f2c7671e0>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f8f2d9d58c0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f8f2d99fd20>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_build_list_from_arg_length_hint...ll__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_build_list_from_arg_length_hint'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_build_list_from_arg_length_hint'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f8f2895cb40> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...ength_hint'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f8f2895cb90> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f8f2895cb90> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...ength_hint'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_build_list_from_arg_length_hint'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_build_list_from_arg_length_hint'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f8f292aa890> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f8f292aa890> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f8f292aa890> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f8f292aa890> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f8f2959efd0> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f8f2a37c550> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f8f2858cec0> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f8f289c7e50>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f8f291b0fd0>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f8f28727490>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22714/platcheck_481.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22714/platcheck_481.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22714/platcheck_481.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22714/platcheck_481.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22714/platcheck_481.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22714/platcheck_481.o') cwd = '/tmp/pytest/usession-main-22714' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_481.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_481.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_481.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_481.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_481.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_481.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_481.c:143: E /tmp/pytest/usession-main-22714/platcheck_481.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_481.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_481.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_481.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_481.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_481.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_481.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_481.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_481.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_481.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_481.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of AppTestCompiler.test_unicode_in_source ___________ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22714/platcheck_482.c: In functi...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f8f28bd7ed0>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_unicode_in_source'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_unicode_in_source'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f8f2eeb0e90> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f8f2c7671e0>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f8f2d9d58c0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f8f2d99fd20>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_unicode_in_source'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_unicode_in_source'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f8f2c7671e0>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f8f2d9d58c0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f8f2d99fd20>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_unicode_in_source'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_unicode_in_source'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_unicode_in_source'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f8f2a1c38c0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._in_source'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f8f2a1c3780> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f8f2a1c3780> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._in_source'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_unicode_in_source'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_unicode_in_source'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f8f296e9a50> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f8f296e9a50> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f8f296e9a50> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f8f296e9a50> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f8f29748990> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f8f2a37c550> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f8f28c92750> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f8f29fb61d0>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f8f29dec890>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f8f29695950>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22714/platcheck_482.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22714/platcheck_482.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22714/platcheck_482.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22714/platcheck_482.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22714/platcheck_482.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22714/platcheck_482.o') cwd = '/tmp/pytest/usession-main-22714' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_482.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_482.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_482.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_482.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_482.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_482.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_482.c:143: E /tmp/pytest/usession-main-22714/platcheck_482.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_482.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_482.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_482.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_482.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_482.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_482.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_482.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_482.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_482.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_482.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of TestOptimizations.test_elim_jump_to_return _________ item = <Function 'test_elim_jump_to_return'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_483.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_483.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_483.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_483.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_483.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_483.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_483.c:143: E /tmp/pytest/usession-main-22714/platcheck_483.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_483.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_483.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_483.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_483.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_483.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_483.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_483.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_483.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_483.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_483.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestOptimizations.test_const_fold_subscr __________ item = <Function 'test_const_fold_subscr'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_484.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_484.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_484.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_484.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_484.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_484.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_484.c:143: E /tmp/pytest/usession-main-22714/platcheck_484.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_484.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_484.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_484.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_484.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_484.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_484.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_484.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_484.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_484.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_484.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______ ERROR at setup of TestOptimizations.test_const_fold_unicode_subscr ______ item = <Function 'test_const_fold_unicode_subscr'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_485.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_485.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_485.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_485.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_485.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_485.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_485.c:143: E /tmp/pytest/usession-main-22714/platcheck_485.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_485.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_485.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_485.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_485.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_485.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_485.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_485.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_485.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_485.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_485.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestOptimizations.test_remove_dead_code ___________ item = <Function 'test_remove_dead_code'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_486.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_486.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_486.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_486.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_486.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_486.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_486.c:143: E /tmp/pytest/usession-main-22714/platcheck_486.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_486.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_486.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_486.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_486.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_486.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_486.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_486.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_486.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_486.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_486.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____ ERROR at setup of TestOptimizations.test_remove_dead_code_after_raise _____ item = <Function 'test_remove_dead_code_after_raise'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_487.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_487.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_487.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_487.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_487.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_487.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_487.c:143: E /tmp/pytest/usession-main-22714/platcheck_487.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_487.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_487.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_487.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_487.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_487.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_487.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_487.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_487.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_487.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_487.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____ ERROR at setup of TestOptimizations.test_remove_dead_jump_after_return ____ item = <Function 'test_remove_dead_jump_after_return'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_488.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_488.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_488.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_488.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_488.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_488.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_488.c:143: E /tmp/pytest/usession-main-22714/platcheck_488.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_488.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_488.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_488.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_488.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_488.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_488.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_488.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_488.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_488.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_488.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestOptimizations.test_remove_dead_yield __________ item = <Function 'test_remove_dead_yield'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_489.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_489.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_489.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_489.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_489.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_489.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_489.c:143: E /tmp/pytest/usession-main-22714/platcheck_489.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_489.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_489.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_489.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_489.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_489.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_489.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_489.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_489.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_489.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_489.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of TestOptimizations.test_list_comprehension __________ item = <Function 'test_list_comprehension'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_490.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_490.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_490.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_490.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_490.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_490.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_490.c:143: E /tmp/pytest/usession-main-22714/platcheck_490.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_490.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_490.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_490.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_490.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_490.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_490.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_490.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_490.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_490.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_490.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______ ERROR at setup of TestOptimizations.test_folding_of_list_constants ______ item = <Function 'test_folding_of_list_constants'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_491.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_491.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_491.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_491.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_491.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_491.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_491.c:143: E /tmp/pytest/usession-main-22714/platcheck_491.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_491.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_491.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_491.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_491.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_491.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_491.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_491.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_491.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_491.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_491.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______ ERROR at setup of TestOptimizations.test_folding_of_set_constants _______ item = <Function 'test_folding_of_set_constants'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_492.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_492.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_492.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_492.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_492.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_492.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_492.c:143: E /tmp/pytest/usession-main-22714/platcheck_492.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_492.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_492.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_492.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_492.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_492.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_492.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_492.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_492.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_492.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_492.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________ ERROR at setup of TestOptimizations.test_dont_fold_huge_powers ________ item = <Function 'test_dont_fold_huge_powers'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_493.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_493.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_493.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_493.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_493.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_493.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_493.c:143: E /tmp/pytest/usession-main-22714/platcheck_493.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_493.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_493.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_493.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_493.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_493.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_493.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_493.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_493.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_493.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_493.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestOptimizations.test_constant_tuples ___________ item = <Function 'test_constant_tuples'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_494.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_494.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_494.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_494.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_494.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_494.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_494.c:143: E /tmp/pytest/usession-main-22714/platcheck_494.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_494.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_494.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_494.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_494.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_494.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_494.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_494.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_494.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_494.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_494.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestHugeStackDepths.test_tuple _______________ item = <Function 'test_tuple'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_495.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_495.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_495.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_495.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_495.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_495.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_495.c:143: E /tmp/pytest/usession-main-22714/platcheck_495.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_495.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_495.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_495.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_495.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_495.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_495.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_495.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_495.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_495.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_495.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestHugeStackDepths.test_list ________________ item = <Function 'test_list'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_496.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_496.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_496.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_496.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_496.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_496.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_496.c:143: E /tmp/pytest/usession-main-22714/platcheck_496.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_496.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_496.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_496.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_496.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_496.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_496.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_496.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_496.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_496.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_496.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestHugeStackDepths.test_list_unpacking ___________ item = <Function 'test_list_unpacking'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_497.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_497.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_497.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_497.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_497.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_497.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_497.c:143: E /tmp/pytest/usession-main-22714/platcheck_497.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_497.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_497.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_497.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_497.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_497.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_497.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_497.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_497.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_497.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_497.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestHugeStackDepths.test_set ________________ item = <Function 'test_set'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_498.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_498.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_498.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_498.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_498.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_498.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_498.c:143: E /tmp/pytest/usession-main-22714/platcheck_498.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_498.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_498.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_498.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_498.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_498.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_498.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_498.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_498.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_498.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_498.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestSymbolTable.test_toplevel ________________ item = <Function 'test_toplevel'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_499.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_499.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_499.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_499.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_499.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_499.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_499.c:143: E /tmp/pytest/usession-main-22714/platcheck_499.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_499.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_499.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_499.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_499.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_499.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_499.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_499.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_499.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_499.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_499.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestSymbolTable.test_duplicate_argument ___________ item = <Function 'test_duplicate_argument'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_500.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_500.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_500.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_500.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_500.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_500.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_500.c:143: E /tmp/pytest/usession-main-22714/platcheck_500.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_500.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_500.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_500.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_500.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_500.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_500.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_500.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_500.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_500.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_500.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestSymbolTable.test_function_defaults ___________ item = <Function 'test_function_defaults'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_501.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_501.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_501.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_501.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_501.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_501.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_501.c:143: E /tmp/pytest/usession-main-22714/platcheck_501.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_501.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_501.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_501.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_501.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_501.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_501.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_501.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_501.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_501.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_501.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestSymbolTable.test_genexp _________________ item = <Function 'test_genexp'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_502.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_502.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_502.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_502.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_502.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_502.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_502.c:143: E /tmp/pytest/usession-main-22714/platcheck_502.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_502.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_502.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_502.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_502.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_502.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_502.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_502.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_502.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_502.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_502.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestSymbolTable.test_setcomp ________________ item = <Function 'test_setcomp'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_503.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_503.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_503.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_503.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_503.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_503.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_503.c:143: E /tmp/pytest/usession-main-22714/platcheck_503.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_503.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_503.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_503.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_503.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_503.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_503.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_503.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_503.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_503.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_503.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestSymbolTable.test_dictcomp ________________ item = <Function 'test_dictcomp'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_504.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_504.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_504.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_504.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_504.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_504.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_504.c:143: E /tmp/pytest/usession-main-22714/platcheck_504.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_504.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_504.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_504.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_504.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_504.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_504.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_504.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_504.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_504.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_504.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestSymbolTable.test_arguments _______________ item = <Function 'test_arguments'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_505.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_505.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_505.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_505.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_505.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_505.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_505.c:143: E /tmp/pytest/usession-main-22714/platcheck_505.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_505.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_505.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_505.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_505.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_505.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_505.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_505.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_505.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_505.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_505.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestSymbolTable.test_function ________________ item = <Function 'test_function'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_506.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_506.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_506.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_506.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_506.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_506.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_506.c:143: E /tmp/pytest/usession-main-22714/platcheck_506.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_506.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_506.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_506.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_506.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_506.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_506.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_506.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_506.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_506.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_506.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestSymbolTable.test_nested_scopes _____________ item = <Function 'test_nested_scopes'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_507.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_507.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_507.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_507.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_507.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_507.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_507.c:143: E /tmp/pytest/usession-main-22714/platcheck_507.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_507.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_507.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_507.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_507.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_507.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_507.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_507.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_507.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_507.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_507.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestSymbolTable.test_class _________________ item = <Function 'test_class'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_508.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_508.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_508.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_508.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_508.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_508.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_508.c:143: E /tmp/pytest/usession-main-22714/platcheck_508.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_508.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_508.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_508.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_508.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_508.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_508.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_508.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_508.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_508.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_508.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestSymbolTable.test_lambda _________________ item = <Function 'test_lambda'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_509.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_509.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_509.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_509.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_509.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_509.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_509.c:143: E /tmp/pytest/usession-main-22714/platcheck_509.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_509.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_509.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_509.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_509.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_509.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_509.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_509.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_509.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_509.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_509.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestSymbolTable.test_import _________________ item = <Function 'test_import'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_510.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_510.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_510.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_510.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_510.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_510.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_510.c:143: E /tmp/pytest/usession-main-22714/platcheck_510.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_510.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_510.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_510.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_510.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_510.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_510.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_510.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_510.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_510.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_510.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______________ ERROR at setup of TestSymbolTable.test_from_import ______________ item = <Function 'test_from_import'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_511.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_511.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_511.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_511.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_511.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_511.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_511.c:143: E /tmp/pytest/usession-main-22714/platcheck_511.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_511.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_511.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_511.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_511.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_511.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_511.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_511.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_511.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_511.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_511.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestSymbolTable.test_global _________________ item = <Function 'test_global'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_512.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_512.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_512.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_512.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_512.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_512.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_512.c:143: E /tmp/pytest/usession-main-22714/platcheck_512.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_512.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_512.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_512.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_512.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_512.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_512.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_512.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_512.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_512.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_512.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of TestSymbolTable.test_optimization ______________ item = <Function 'test_optimization'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_513.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_513.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_513.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_513.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_513.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_513.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_513.c:143: E /tmp/pytest/usession-main-22714/platcheck_513.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_513.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_513.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_513.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_513.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_513.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_513.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_513.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_513.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_513.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_513.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___ ERROR at setup of TestSymbolTable.test_unoptimization_with_nested_scopes ___ item = <Function 'test_unoptimization_with_nested_scopes'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_514.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_514.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_514.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_514.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_514.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_514.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_514.c:143: E /tmp/pytest/usession-main-22714/platcheck_514.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_514.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_514.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_514.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_514.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_514.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_514.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_514.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_514.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_514.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_514.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestSymbolTable.test_importstar_warning ___________ item = <Function 'test_importstar_warning'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_515.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_515.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_515.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_515.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_515.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_515.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_515.c:143: E /tmp/pytest/usession-main-22714/platcheck_515.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_515.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_515.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_515.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_515.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_515.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_515.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_515.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_515.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_515.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_515.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestSymbolTable.test_exec __________________ item = <Function 'test_exec'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_516.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_516.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_516.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_516.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_516.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_516.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_516.c:143: E /tmp/pytest/usession-main-22714/platcheck_516.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_516.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_516.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_516.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_516.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_516.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_516.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_516.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_516.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_516.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_516.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of TestSymbolTable.test_yield _________________ item = <Function 'test_yield'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_517.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_517.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_517.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_517.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_517.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_517.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_517.c:143: E /tmp/pytest/usession-main-22714/platcheck_517.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_517.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_517.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_517.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_517.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_517.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_517.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_517.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_517.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_517.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_517.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestSymbolTable.test_yield_inside_try ____________ item = <Function 'test_yield_inside_try'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_518.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_518.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_518.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_518.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_518.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_518.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_518.c:143: E /tmp/pytest/usession-main-22714/platcheck_518.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_518.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_518.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_518.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_518.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_518.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_518.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_518.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_518.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_518.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_518.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestSymbolTable.test_yield_outside_try ___________ item = <Function 'test_yield_outside_try'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_519.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_519.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_519.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_519.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_519.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_519.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_519.c:143: E /tmp/pytest/usession-main-22714/platcheck_519.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_519.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_519.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_519.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_519.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_519.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_519.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_519.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_519.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_519.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_519.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________________ ERROR at setup of TestSymbolTable.test_return _________________ item = <Function 'test_return'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_520.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_520.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_520.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_520.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_520.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_520.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_520.c:143: E /tmp/pytest/usession-main-22714/platcheck_520.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_520.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_520.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_520.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_520.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_520.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_520.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_520.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_520.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_520.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_520.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of TestSymbolTable.test_tmpnames ________________ item = <Function 'test_tmpnames'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22714/platcheck_521.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/u...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22714/platcheck_521.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22714/platcheck_521.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22714/platcheck_521.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_521.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22714/platcheck_521.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22714/platcheck_521.c:143: E /tmp/pytest/usession-main-22714/platcheck_521.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_521.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22714/platcheck_521.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22714/platcheck_521.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_521.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_521.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_521.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22714/platcheck_521.c:143:\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_521.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_521.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22714/platcheck_521.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ==================== 1 passed, 446 error in 159.67 seconds ===================== ++ 22:03:05 starting module/__pypy__/test [6 started in total] __ module/__builtin__/test [3 done in total, somefailed=True] _________________ ============================= 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/own-linux-x86-64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-x86-64/build/pytest.pyc rootdir: /build_dir/own-linux-x86-64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 297 items / 1 errors module/__builtin__/test/test_abstractinst.py EEEEEEEEEEEE module/__builtin__/test/test_apply.py EEE module/__builtin__/test/test_builtin.py EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE module/__builtin__/test/test_classobj.py EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE module/__builtin__/test/test_descriptor.py EEEEEEEEEEEEEEEEEEEEEEEEEE module/__builtin__/test/test_filter.py EEEEEEEEEEE module/__builtin__/test/test_functional.py EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE module/__builtin__/test/test_minmax.py EEEEEEEEEEEEEEEEEEEEEEEEEE module/__builtin__/test/test_range.py EEEEEEEEEEEEEEEEEEEEEEEE module/__builtin__/test/test_rawinput.py EEE module/__builtin__/test/test_reduce.py EEEE module/__builtin__/test/test_vars.py EEE module/__builtin__/test/test_zip.py EEEEEEEEE ==================================== ERRORS ==================================== _______ ERROR collecting pypy/module/__builtin__/test/apptest_compile.py _______ tool/pytest/apptest2.py:25: in collect space = objspace.gettestobjspace(**spaceconfig) tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:155: in _handle_error raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22716/platcheck_76.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22716/platcheck_76.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_76.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_76.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22716/platcheck_76.c:143: E /tmp/pytest/usession-main-22716/platcheck_76.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_76.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_76.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ------------------------------- Captured stderr -------------------------------- [platform:Error] /tmp/pytest/usession-main-22716/platcheck_76.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_76.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_76.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_76.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22716/platcheck_76.c:143:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_76.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_76.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_76.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ___________ ERROR at setup of TestAbstractInst.test_abstract_isclass ___________ item = <Function 'test_abstract_isclass'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22716/platcheck_77.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22716/platcheck_77.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22716/platcheck_77.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22716/platcheck_77.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_77.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_77.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22716/platcheck_77.c:143: E /tmp/pytest/usession-main-22716/platcheck_77.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_77.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_77.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22716/platcheck_77.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_77.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_77.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_77.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22716/platcheck_77.c:143:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_77.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_77.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_77.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __________ ERROR at setup of TestAbstractInst.test_abstract_getclass ___________ item = <Function 'test_abstract_getclass'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tool/pytest/objspace.py:25: in gettestobjspace space = maketestobjspace(config) tool/pytest/objspace.py:35: in maketestobjspace space = make_objspace(config) tool/option.py:33: in make_objspace return StdObjSpace(config) interpreter/baseobjspace.py:467: in __init__ self.initialize() objspace/std/objspace.py:112: in initialize self.make_builtins() interpreter/baseobjspace.py:630: in make_builtins mod = Module(self, w_name) module/imp/moduledef.py:48: in __init__ from pypy.module.imp import interp_imp module/imp/interp_imp.py:1: in <module> from pypy.module.imp import importing module/imp/importing.py:14: in <module> from pypy.interpreter.streamutil import wrap_streamerror interpreter/streamutil.py:1: in <module> from rpython.rlib.streamio import StreamError ../rpython/rlib/streamio.py:40: in <module> from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/_rsocket_rffi.py:1222: in <module> cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rtyper/tool/rffi_platform.py:216: in configure for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:241: in configure_entries writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:745: in run_example_code output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/tool/gcc_cache.py:28: in build_executable_cache result = platform.execute(platform.compile(c_files, eci)) ../rpython/translator/platform/__init__.py:57: in compile ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:79: in _compile_o_files ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/posix.py:44: in _compile_c_file cwd=str(cfile.dirpath())) ../rpython/translator/platform/__init__.py:143: in _execute_c_compiler self._handle_error(returncode, stdout, stderr, outname) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22716/platcheck_78.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22716/platcheck_78.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22716/platcheck_78.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22716/platcheck_78.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_78.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_78.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22716/platcheck_78.c:143: E /tmp/pytest/usession-main-22716/platcheck_78.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_78.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_78.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22716/platcheck_78.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_78.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_78.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_78.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22716/platcheck_78.c:143:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_78.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_78.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_78.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________ ERROR at setup of AppTestAbstractInst.test_abstract_isinstance ________ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22716/platcheck_79.c: In functio...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f2a67af8cd0>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_abstract_isinstance'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_abstract_isinstance'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f2a6c841f50> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_abstract_isinstance'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_abstract_isinstance'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_abstract_isinstance'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_abstract_isinstance'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_abstract_isinstance'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f2a67918f50> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...isinstance'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a679185a0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a679185a0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...isinstance'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_abstract_isinstance'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_abstract_isinstance'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f2a67935710> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a67935710> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a67935710> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f2a67935710> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f2a670b3610> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f2a67c79750> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f2a670c41a0> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a67948750>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f2a6793ead0>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a67956bd0>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22716/platcheck_79.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22716/platcheck_79.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_79.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_79.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22716/platcheck_79.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22716/platcheck_79.o') cwd = '/tmp/pytest/usession-main-22716' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22716/platcheck_79.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22716/platcheck_79.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22716/platcheck_79.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22716/platcheck_79.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_79.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_79.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22716/platcheck_79.c:143: E /tmp/pytest/usession-main-22716/platcheck_79.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_79.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_79.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22716/platcheck_79.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_79.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_79.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_79.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22716/platcheck_79.c:143:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_79.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_79.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_79.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ________ ERROR at setup of AppTestAbstractInst.test_abstract_issubclass ________ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22716/platcheck_80.c: In functio...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f2a676d6b50>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_abstract_issubclass'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_abstract_issubclass'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f2a6c841f50> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_abstract_issubclass'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_abstract_issubclass'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_abstract_issubclass'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_abstract_issubclass'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_abstract_issubclass'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f2a66c2a0f0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...issubclass'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a66c2a0a0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a66c2a0a0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...issubclass'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_abstract_issubclass'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_abstract_issubclass'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f2a670e7c90> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a670e7c90> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a670e7c90> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f2a670e7c90> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f2a6767bcd0> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f2a67c79750> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f2a670e3bb0> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a67028c90>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f2a6701dc90>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a67017e90>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22716/platcheck_80.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22716/platcheck_80.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_80.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_80.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22716/platcheck_80.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22716/platcheck_80.o') cwd = '/tmp/pytest/usession-main-22716' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22716/platcheck_80.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22716/platcheck_80.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22716/platcheck_80.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22716/platcheck_80.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_80.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_80.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22716/platcheck_80.c:143: E /tmp/pytest/usession-main-22716/platcheck_80.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_80.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_80.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22716/platcheck_80.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_80.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_80.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_80.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22716/platcheck_80.c:143:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_80.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_80.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_80.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of AppTestAbstractInst.test_overriding _____________ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22716/platcheck_81.c: In functio...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f2a67781a50>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_overriding'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_overriding'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f2a6c841f50> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_overriding'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_overriding'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_overriding'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_overriding'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_overriding'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f2a6745f0f0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...overriding'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a6745f410> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a6745f410> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...overriding'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_overriding'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_overriding'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f2a67a1ac90> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a67a1ac90> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a67a1ac90> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f2a67a1ac90> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f2a677848d0> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f2a67c79750> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f2a6700b4b0> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a67683410>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f2a67546850>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a67688950>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22716/platcheck_81.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22716/platcheck_81.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_81.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_81.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22716/platcheck_81.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22716/platcheck_81.o') cwd = '/tmp/pytest/usession-main-22716' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22716/platcheck_81.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22716/platcheck_81.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22716/platcheck_81.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22716/platcheck_81.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_81.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_81.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22716/platcheck_81.c:143: E /tmp/pytest/usession-main-22716/platcheck_81.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_81.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_81.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22716/platcheck_81.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_81.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_81.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_81.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22716/platcheck_81.c:143:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_81.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_81.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_81.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _ ERROR at setup of AppTestAbstractInst.test_dont_call_instancecheck_fast_path _ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22716/platcheck_82.c: In functio...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f2a670c7c50>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_dont_call_instancecheck_fast_pa...__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_dont_call_instancecheck_fast_path'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f2a6c841f50> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_dont_call_instancecheck_fast_pa...__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_dont_call_instancecheck_fast_path'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_dont_call_instancecheck_fast_pa...__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_dont_call_instancecheck_fast_path'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_dont_call_instancecheck_fast_path'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f2a66a895f0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._fast_path'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a66a893c0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a66a893c0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._fast_path'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_dont_call_instancecheck_fast_path'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_dont_call_instancecheck_fast_path'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f2a6783ec10> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a6783ec10> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a6783ec10> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f2a6783ec10> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f2a67b14650> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f2a67c79750> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f2a6769cd70> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a67679e10>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f2a67679410>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a6769e510>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22716/platcheck_82.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22716/platcheck_82.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_82.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_82.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22716/platcheck_82.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22716/platcheck_82.o') cwd = '/tmp/pytest/usession-main-22716' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22716/platcheck_82.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22716/platcheck_82.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22716/platcheck_82.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22716/platcheck_82.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_82.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_82.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22716/platcheck_82.c:143: E /tmp/pytest/usession-main-22716/platcheck_82.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_82.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_82.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22716/platcheck_82.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_82.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_82.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_82.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22716/platcheck_82.c:143:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_82.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_82.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_82.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _ ERROR at setup of AppTestAbstractInst.test_instancecheck_exception_not_eaten _ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22716/platcheck_83.c: In functio...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f2a6767ce50>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_instancecheck_exception_not_eat...__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_instancecheck_exception_not_eaten'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f2a6c841f50> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_instancecheck_exception_not_eat...__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_instancecheck_exception_not_eaten'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_instancecheck_exception_not_eat...__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_instancecheck_exception_not_eaten'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_instancecheck_exception_not_eaten'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f2a67289870> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._not_eaten'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a672892d0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a672892d0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._not_eaten'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_instancecheck_exception_not_eaten'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_instancecheck_exception_not_eaten'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f2a67721f90> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a67721f90> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a67721f90> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f2a67721f90> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f2a6744a050> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f2a67c79750> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f2a6700b130> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a674dfb90>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f2a674df190>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a6783b950>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22716/platcheck_83.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22716/platcheck_83.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_83.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_83.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22716/platcheck_83.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22716/platcheck_83.o') cwd = '/tmp/pytest/usession-main-22716' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22716/platcheck_83.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22716/platcheck_83.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22716/platcheck_83.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22716/platcheck_83.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_83.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_83.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22716/platcheck_83.c:143: E /tmp/pytest/usession-main-22716/platcheck_83.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_83.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_83.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22716/platcheck_83.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_83.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_83.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_83.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22716/platcheck_83.c:143:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_83.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_83.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_83.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ __ ERROR at setup of AppTestAbstractInst.test_issubclass_exception_not_eaten ___ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22716/platcheck_84.c: In functio...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f2a67820e50>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_issubclass_exception_not_eaten'...all__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_issubclass_exception_not_eaten'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f2a6c841f50> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_issubclass_exception_not_eaten'...all__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_issubclass_exception_not_eaten'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_issubclass_exception_not_eaten'...all__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_issubclass_exception_not_eaten'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_issubclass_exception_not_eaten'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f2a67ab4730> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._not_eaten'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a67ab4550> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a67ab4550> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._not_eaten'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_issubclass_exception_not_eaten'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_issubclass_exception_not_eaten'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f2a67533590> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a67533590> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a67533590> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f2a67533590> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f2a66d1dfd0> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f2a67c79750> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f2a67096f30> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a67b144d0>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f2a67327e50>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a6769a6d0>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22716/platcheck_84.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22716/platcheck_84.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_84.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_84.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22716/platcheck_84.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22716/platcheck_84.o') cwd = '/tmp/pytest/usession-main-22716' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22716/platcheck_84.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22716/platcheck_84.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22716/platcheck_84.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22716/platcheck_84.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_84.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_84.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22716/platcheck_84.c:143: E /tmp/pytest/usession-main-22716/platcheck_84.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_84.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_84.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22716/platcheck_84.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_84.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_84.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_84.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22716/platcheck_84.c:143:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_84.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_84.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_84.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ______ ERROR at setup of AppTestAbstractInst.test_issubclass_no_fallback _______ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22716/platcheck_85.c: In functio...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f2a670dd550>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_issubclass_no_fallback'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_issubclass_no_fallback'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f2a6c841f50> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_issubclass_no_fallback'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_issubclass_no_fallback'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_issubclass_no_fallback'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_issubclass_no_fallback'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_issubclass_no_fallback'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f2a66d7af00> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...o_fallback'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a66d7ad20> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a66d7ad20> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...o_fallback'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_issubclass_no_fallback'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_issubclass_no_fallback'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f2a66c1e550> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a66c1e550> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a66c1e550> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f2a66c1e550> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f2a66ff57d0> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f2a67c79750> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f2a6794ff30> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a67688b10>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f2a67688110>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a67679210>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22716/platcheck_85.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22716/platcheck_85.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_85.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_85.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22716/platcheck_85.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22716/platcheck_85.o') cwd = '/tmp/pytest/usession-main-22716' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22716/platcheck_85.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22716/platcheck_85.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22716/platcheck_85.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22716/platcheck_85.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_85.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_85.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22716/platcheck_85.c:143: E /tmp/pytest/usession-main-22716/platcheck_85.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_85.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_85.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22716/platcheck_85.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_85.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_85.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_85.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22716/platcheck_85.c:143:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_85.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_85.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_85.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ERROR at setup of AppTestAbstractInst.test_exception_match_calls_subclasscheck self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22716/platcheck_86.c: In functio...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f2a67946cd0>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_exception_match_calls_subclassc...': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_exception_match_calls_subclasscheck'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f2a6c841f50> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_exception_match_calls_subclassc...': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_exception_match_calls_subclasscheck'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_exception_match_calls_subclassc...': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_exception_match_calls_subclasscheck'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_exception_match_calls_subclasscheck'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f2a66e04280> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...classcheck'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a66e04a50> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a66e04a50> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...classcheck'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_exception_match_calls_subclasscheck'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_exception_match_calls_subclasscheck'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f2a67010810> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a67010810> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a67010810> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f2a67010810> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f2a671e1a10> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f2a67c79750> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f2a678221a0> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a66d1d910>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f2a66d1dd50>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a6752cb10>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22716/platcheck_86.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22716/platcheck_86.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_86.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_86.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22716/platcheck_86.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22716/platcheck_86.o') cwd = '/tmp/pytest/usession-main-22716' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22716/platcheck_86.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22716/platcheck_86.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22716/platcheck_86.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22716/platcheck_86.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_86.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_86.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22716/platcheck_86.c:143: E /tmp/pytest/usession-main-22716/platcheck_86.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_86.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_86.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22716/platcheck_86.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_86.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_86.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_86.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22716/platcheck_86.c:143:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_86.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_86.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_86.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ERROR at setup of AppTestAbstractInst.test_exception_raising_calls_subclasscheck self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22716/platcheck_87.c: In functio...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f2a676e15d0>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_exception_raising_calls_subclas... <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_exception_raising_calls_subclasscheck'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f2a6c841f50> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_exception_raising_calls_subclas... <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_exception_raising_calls_subclasscheck'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_exception_raising_calls_subclas... <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_exception_raising_calls_subclasscheck'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_exception_raising_calls_subclasscheck'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f2a67512280> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...classcheck'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a67512910> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a67512910> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...classcheck'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_exception_raising_calls_subclasscheck'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_exception_raising_calls_subclasscheck'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f2a66f20f90> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a66f20f90> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a66f20f90> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f2a66f20f90> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f2a6766d390> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f2a67c79750> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f2a66a68a60> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a67af24d0>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f2a67af2e10>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a67b2cbd0>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22716/platcheck_87.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22716/platcheck_87.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_87.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_87.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22716/platcheck_87.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22716/platcheck_87.o') cwd = '/tmp/pytest/usession-main-22716' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22716/platcheck_87.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22716/platcheck_87.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22716/platcheck_87.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22716/platcheck_87.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_87.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_87.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22716/platcheck_87.c:143: E /tmp/pytest/usession-main-22716/platcheck_87.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_87.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_87.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22716/platcheck_87.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_87.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_87.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_87.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22716/platcheck_87.c:143:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_87.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_87.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_87.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____ ERROR at setup of AppTestAbstractInst.test_exception_bad_subclasscheck ____ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22716/platcheck_88.c: In functio...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f2a6793ec50>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_exception_bad_subclasscheck'>, ...ticall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_exception_bad_subclasscheck'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f2a6c841f50> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_exception_bad_subclasscheck'>, ...ticall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_exception_bad_subclasscheck'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_exception_bad_subclasscheck'>, ...ticall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_exception_bad_subclasscheck'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_exception_bad_subclasscheck'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f2a676d8690> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...classcheck'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a676d8c30> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a676d8c30> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...classcheck'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_exception_bad_subclasscheck'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_exception_bad_subclasscheck'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f2a66afa550> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a66afa550> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a66afa550> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f2a66afa550> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f2a66f27b50> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f2a67c79750> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f2a66b164b0> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a67327b50>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f2a6720e950>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a67478910>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22716/platcheck_88.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22716/platcheck_88.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_88.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_88.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22716/platcheck_88.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22716/platcheck_88.o') cwd = '/tmp/pytest/usession-main-22716' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22716/platcheck_88.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22716/platcheck_88.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22716/platcheck_88.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22716/platcheck_88.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_88.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_88.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22716/platcheck_88.c:143: E /tmp/pytest/usession-main-22716/platcheck_88.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_88.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_88.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22716/platcheck_88.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_88.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_88.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_88.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22716/platcheck_88.c:143:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_88.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_88.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_88.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of AppTestApply.test_trivial_listonly _____________ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22716/platcheck_89.c: In functio...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f2a675a6ad0>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_trivial_listonly'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_trivial_listonly'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f2a6c841f50> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_trivial_listonly'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_trivial_listonly'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_trivial_listonly'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_trivial_listonly'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_trivial_listonly'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f2a66f6ba50> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...l_listonly'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a66f6b7d0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a66f6b7d0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...l_listonly'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_trivial_listonly'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_trivial_listonly'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f2a66bc58d0> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a66bc58d0> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a66bc58d0> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f2a66bc58d0> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f2a6753c090> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f2a67c79750> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f2a67035d70> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a6729d290>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f2a66e07a50>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a67769510>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22716/platcheck_89.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22716/platcheck_89.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_89.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_89.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22716/platcheck_89.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22716/platcheck_89.o') cwd = '/tmp/pytest/usession-main-22716' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22716/platcheck_89.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22716/platcheck_89.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22716/platcheck_89.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22716/platcheck_89.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_89.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_89.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22716/platcheck_89.c:143: E /tmp/pytest/usession-main-22716/platcheck_89.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_89.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_89.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22716/platcheck_89.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_89.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_89.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_89.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22716/platcheck_89.c:143:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_89.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_89.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_89.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of AppTestApply.test_trivial_dictonly _____________ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22716/platcheck_90.c: In functio...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f2a670cd3d0>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_trivial_dictonly'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_trivial_dictonly'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f2a6c841f50> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_trivial_dictonly'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_trivial_dictonly'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_trivial_dictonly'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_trivial_dictonly'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_trivial_dictonly'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f2a6723f820> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...l_dictonly'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a6723f690> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a6723f690> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...l_dictonly'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_trivial_dictonly'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_trivial_dictonly'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f2a67850590> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a67850590> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a67850590> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f2a67850590> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f2a66ee99d0> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f2a67c79750> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f2a669e3670> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a676a3a90>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f2a676a3e50>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a67afaa90>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22716/platcheck_90.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22716/platcheck_90.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_90.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_90.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22716/platcheck_90.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22716/platcheck_90.o') cwd = '/tmp/pytest/usession-main-22716' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22716/platcheck_90.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22716/platcheck_90.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22716/platcheck_90.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22716/platcheck_90.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_90.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_90.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22716/platcheck_90.c:143: E /tmp/pytest/usession-main-22716/platcheck_90.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_90.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_90.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22716/platcheck_90.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_90.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_90.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_90.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22716/platcheck_90.c:143:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_90.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_90.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_90.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of AppTestApply.test_trivial __________________ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22716/platcheck_91.c: In functio...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f2a66f62650>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_trivial'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_trivial'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f2a6c841f50> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_trivial'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_trivial'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_trivial'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_trivial'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_trivial'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f2a66ffd730> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...st_trivial'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a66ffd5f0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a66ffd5f0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...st_trivial'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_trivial'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_trivial'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f2a66b5f050> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a66b5f050> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a66b5f050> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f2a66b5f050> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f2a674b9850> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f2a67c79750> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f2a67024f30> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a676d2410>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f2a676d2810>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a66e07e90>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22716/platcheck_91.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22716/platcheck_91.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_91.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_91.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22716/platcheck_91.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22716/platcheck_91.o') cwd = '/tmp/pytest/usession-main-22716' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22716/platcheck_91.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22716/platcheck_91.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22716/platcheck_91.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22716/platcheck_91.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_91.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_91.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22716/platcheck_91.c:143: E /tmp/pytest/usession-main-22716/platcheck_91.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_91.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_91.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22716/platcheck_91.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_91.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_91.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_91.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22716/platcheck_91.c:143:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_91.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_91.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_91.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ ____________ ERROR at setup of AppTestBuiltinApp.test_builtin_names ____________ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22716/platcheck_92.c: In functio...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f2a670b0550>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_builtin_names'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_builtin_names'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f2a6c841f50> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_builtin_names'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_builtin_names'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_builtin_names'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_builtin_names'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_builtin_names'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f2a66e506e0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...ltin_names'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a66e500f0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a66e500f0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...ltin_names'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_builtin_names'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_builtin_names'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f2a6733e2d0> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a6733e2d0> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a6733e2d0> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f2a6733e2d0> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f2a66b53210> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f2a67c79750> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f2a6691a8a0> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a66b32f90>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f2a674b6b90>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a66ba87d0>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22716/platcheck_92.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22716/platcheck_92.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_92.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_92.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22716/platcheck_92.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22716/platcheck_92.o') cwd = '/tmp/pytest/usession-main-22716' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22716/platcheck_92.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22716/platcheck_92.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22716/platcheck_92.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22716/platcheck_92.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_92.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_92.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22716/platcheck_92.c:143: E /tmp/pytest/usession-main-22716/platcheck_92.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_92.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_92.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22716/platcheck_92.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_92.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_92.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_92.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22716/platcheck_92.c:143:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_92.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_92.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_92.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _____________ ERROR at setup of AppTestBuiltinApp.test_bytes_alias _____________ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22716/platcheck_93.c: In functio...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f2a676b3450>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_bytes_alias'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_bytes_alias'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f2a6c841f50> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_bytes_alias'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_bytes_alias'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_bytes_alias'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_bytes_alias'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_bytes_alias'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f2a66f3c410> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...ytes_alias'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a66f3c640> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a66f3c640> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...ytes_alias'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_bytes_alias'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_bytes_alias'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f2a67a82990> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a67a82990> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a67a82990> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f2a67a82990> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f2a67a08990> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f2a67c79750> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f2a67538130> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a67727850>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f2a67ac9d10>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a671b0e90>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22716/platcheck_93.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22716/platcheck_93.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_93.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_93.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22716/platcheck_93.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22716/platcheck_93.o') cwd = '/tmp/pytest/usession-main-22716' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22716/platcheck_93.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22716/platcheck_93.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22716/platcheck_93.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22716/platcheck_93.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_93.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_93.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22716/platcheck_93.c:143: E /tmp/pytest/usession-main-22716/platcheck_93.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_93.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_93.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22716/platcheck_93.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_93.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_93.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_93.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22716/platcheck_93.c:143:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_93.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_93.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_93.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________ ERROR at setup of AppTestBuiltinApp.test_eval_adds_builtins __________ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22716/platcheck_94.c: In functio...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f2a66ba14d0>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_eval_adds_builtins'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_eval_adds_builtins'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f2a6c841f50> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_eval_adds_builtins'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_eval_adds_builtins'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_eval_adds_builtins'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_eval_adds_builtins'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_eval_adds_builtins'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f2a66f1dfa0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...s_builtins'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a678f2c80> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a678f2c80> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...s_builtins'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_eval_adds_builtins'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_eval_adds_builtins'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f2a679b83d0> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a679b83d0> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a679b83d0> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f2a679b83d0> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f2a676d2c90> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f2a67c79750> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f2a6746a9f0> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a66b321d0>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f2a66b32a90>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a66904350>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22716/platcheck_94.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22716/platcheck_94.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_94.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_94.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22716/platcheck_94.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22716/platcheck_94.o') cwd = '/tmp/pytest/usession-main-22716' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22716/platcheck_94.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22716/platcheck_94.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22716/platcheck_94.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22716/platcheck_94.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_94.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_94.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22716/platcheck_94.c:143: E /tmp/pytest/usession-main-22716/platcheck_94.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_94.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_94.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22716/platcheck_94.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_94.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_94.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_94.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22716/platcheck_94.c:143:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_94.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_94.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_94.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _______________ ERROR at setup of AppTestBuiltinApp.test_import ________________ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22716/platcheck_95.c: In functio...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f2a6742de50>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_import'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_import'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f2a6c841f50> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_import'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_import'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_import'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_import'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_import'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f2a668faeb0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...est_import'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a668fac80> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a668fac80> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...est_import'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_import'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_import'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f2a66913fd0> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a66913fd0> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a66913fd0> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f2a66913fd0> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f2a6722d550> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f2a67c79750> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f2a679392f0> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a67327050>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f2a66e200d0>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a679c2410>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22716/platcheck_95.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22716/platcheck_95.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_95.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_95.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22716/platcheck_95.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22716/platcheck_95.o') cwd = '/tmp/pytest/usession-main-22716' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22716/platcheck_95.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22716/platcheck_95.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22716/platcheck_95.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22716/platcheck_95.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_95.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_95.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22716/platcheck_95.c:143: E /tmp/pytest/usession-main-22716/platcheck_95.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_95.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_95.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22716/platcheck_95.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_95.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_95.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_95.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22716/platcheck_95.c:143:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_95.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_95.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_95.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of AppTestBuiltinApp.test_chr _________________ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22716/platcheck_96.c: In functio...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f2a66ca0ed0>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_chr'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_chr'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f2a6c841f50> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_chr'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_chr'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_chr'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_chr'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_chr'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f2a669cd870> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i... 'test_chr'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a669cd8c0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a669cd8c0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i... 'test_chr'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_chr'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_chr'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f2a67a44c90> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a67a44c90> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a67a44c90> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f2a67a44c90> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f2a678f3dd0> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f2a67c79750> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop #endif if (space < cmsg_len_end) space = cmsg_len_end; cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; return (cmsg_offset <= (size_t)-1 - space && cmsg_offset + space <= msg->msg_controllen); } #endif // Taken from CPython. #ifdef CMSG_LEN /* If pointer CMSG_DATA(cmsgh) is in buffer msg->msg_control, set *space to number of bytes following it in the buffer and return true; otherwise, return false. Assumes cmsgh, msg->msg_control and msg->msg_controllen are valid. */ static int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) { size_t data_offset; char *data_ptr; if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) return 0; data_offset = data_ptr - (char *)msg->msg_control; if (data_offset > msg->msg_controllen) return 0; *space = msg->msg_controllen - data_offset; return 1; } // Taken from CPython. /* If cmsgh is invalid or not contained in the buffer pointed to by msg->msg_control, return -1. If cmsgh is valid and its associated data is entirely contained in the buffer, set *data_len to the length of the associated data and return 0. If only part of the associated data is contained in the buffer but cmsgh is otherwise valid, set *data_len to the length contained in the buffer and return 1. */ static int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) { size_t space, cmsg_data_len; if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || cmsgh->cmsg_len < CMSG_LEN(0)) return -1; cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); if (!get_cmsg_data_space(msg, cmsgh, &space)) return -1; if (space >= cmsg_data_len) { *data_len = cmsg_data_len; return 0; } *data_len = space; return 1; } #endif /* CMSG_LEN */ /* Structure meant to hold the information received after a recvmsg is performed. Essentially it holds: the address, the message, the ancillary data and the return flags. I use this structure for 2 main reasons: - keep things ordered - some of the ancillary parameters need to be int not long (rffi SignedP is actually long*), therefore I cannot use the parameters directly */ struct recvmsg_info { struct sockaddr* address; // address fields socklen_t addrlen; int size_of_ancillary; // ancillary fields int* levels; int* types; char** file_descr; int* descr_per_ancillary; int retflag; // return flag field }; /* Wrapper function over recvmsg. Since it returns a lot of data, in a structure that is hard to parse in rffi, it was implemented in C. All the parameters, save the socket fd, message_size, ancillary_size will be malloc'd and/or modified. */ RPY_EXTERN int recvmsg_implementation( int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* retflag) { struct sockaddr* recvd_address; socklen_t recvd_addrlen; struct msghdr msg = {0}; void *controlbuf = NULL; struct cmsghdr *cmsgh; int cmsg_status; struct recvmsg_info* retinfo; int error_flag = 0; // variable to be set in case of special errors. int cmsgdatalen = 0; size_t i; // variables that are set to 1, if the message charp has been allocated // and if the ancillary variables have been allocated. To be used in case of failure. int iov_alloc = 0; int anc_alloc = 0; retinfo = (struct recvmsg_info*) malloc(sizeof(struct recvmsg_info)); if (ancillary_size > SOCKLEN_T_LIMIT){ error_flag = BAD_ANC_SIZE_GIVEN; goto fail; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0) { iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); for (i=0; i < no_of_messages; i++) { iovs[i].iov_base = messages[i]; iovs[i].iov_len = message_lengths[i]; } } // Setup the ancillary buffer memory controlbuf = malloc(ancillary_size); // Setup the recv address memory recvd_addrlen = sizeof(struct sockaddr_storage); recvd_address = (struct sockaddr*) malloc(recvd_addrlen); memset(recvd_address, 0,recvd_addrlen); // Setup the msghdr struct msg.msg_name = recvd_address; msg.msg_namelen = recvd_addrlen; msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; msg.msg_control = controlbuf; msg.msg_controllen = ancillary_size; // Link my structure to the msghdr fields retinfo->address = msg.msg_name; iov_alloc = 1; ssize_t bytes_recvd = 0; bytes_recvd = recvmsg(socket_fd, &msg, flags); if (bytes_recvd < 0){ goto fail; } retinfo->addrlen = (socklen_t) msg.msg_namelen; // Count the ancillary items & allocate the memory int anc_counter = 0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { anc_counter++; } retinfo->size_of_ancillary = anc_counter; retinfo->file_descr = (char**) malloc (anc_counter * sizeof(char*)); retinfo->levels = (int*) malloc(anc_counter * sizeof(int)); retinfo->types = (int*) malloc(anc_counter * sizeof(int)); retinfo->descr_per_ancillary = (int*) malloc(anc_counter * sizeof(int)); anc_alloc = 1; // Extract the ancillary items i=0; for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t local_size = 0; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &local_size); if (cmsg_status !=0 ){ error_flag = MAL_ANC; goto err_closefds; } retinfo->file_descr[i] = (char*) malloc(local_size); memcpy(retinfo->file_descr[i], CMSG_DATA(cmsgh), local_size); retinfo->levels[i] = cmsgh->cmsg_level; retinfo->types[i] = cmsgh->cmsg_type; retinfo->descr_per_ancillary[i] =local_size; i++; } retinfo->retflag = msg.msg_flags; // Set the parameters of address memcpy(address,retinfo->address,retinfo->addrlen); *addrlen = retinfo->addrlen; // Set the parameters of message size_of_ancillary[0] = retinfo->size_of_ancillary; // Set the parameters of ancillary *levels = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *types = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); *descr_per_ancillary = (long*) malloc (sizeof(long) * retinfo->size_of_ancillary); int counter = 0; for (i=0; i < retinfo->size_of_ancillary; i++){ counter += retinfo->descr_per_ancillary[i]; // Convert the int* to long* levels[0][i] = (long) retinfo->levels[i]; types[0][i] = (long) retinfo->types[i]; descr_per_ancillary[0][i] = (long) retinfo->descr_per_ancillary[i]; } *file_descr = (char*) malloc (sizeof(char) * counter); memset(*file_descr, 0, sizeof(char) * counter); counter = 0; for (i=0; i<retinfo->size_of_ancillary; i++){ memcpy(*file_descr+counter,retinfo->file_descr[i], retinfo->descr_per_ancillary[i]); counter += retinfo->descr_per_ancillary[i]; } // Set the retflag retflag[0] = retinfo->retflag; // Free the memory free(retinfo->address); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); for (i = 0; i < retinfo->size_of_ancillary; i++) free(retinfo->file_descr[i]); free(retinfo->file_descr); free(retinfo); free(controlbuf); if (iovs != NULL) free(iovs); return bytes_recvd; fail: if (anc_alloc){ free(retinfo->file_descr); free(retinfo->levels); free(retinfo->types); free(retinfo->descr_per_ancillary); free(retinfo->address); free(retinfo); free(controlbuf); }else{ if (iov_alloc){ free(retinfo->address); free(controlbuf); free(retinfo); } } if (iovs != NULL) free(iovs); if (error_flag==0) error_flag = -1; return error_flag; err_closefds: // Special case for UNIX sockets. In case file descriptors are received, they need to be closed. // Taken from CPython #ifdef SCM_RIGHTS /* Close all descriptors coming from SCM_RIGHTS, so they don't leak. */ for (cmsgh = ((msg.msg_controllen > 0) ? CMSG_FIRSTHDR(&msg) : NULL); cmsgh != NULL; cmsgh = CMSG_NXTHDR(&msg, cmsgh)) { size_t dataleng; cmsg_status = get_cmsg_data_len(&msg, cmsgh, &dataleng); cmsgdatalen = (int) dataleng; if (cmsg_status < 0) break; if (cmsgh->cmsg_level == SOL_SOCKET && cmsgh->cmsg_type == SCM_RIGHTS) { size_t numfds; int *fdp; numfds = cmsgdatalen / sizeof(int); fdp = (int *)CMSG_DATA(cmsgh); while (numfds-- > 0) close(*fdp++); } if (cmsg_status != 0) break; } #endif /* SCM_RIGHTS */ goto fail; } // ########################################################################## // Sendmsg implementation and associated functions #ifdef CMSG_LEN static int get_CMSG_LEN(size_t length, size_t *result) { size_t tmp; if (length > (SOCKLEN_T_LIMIT - CMSG_LEN(0))) return 0; tmp = CMSG_LEN(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif #ifdef CMSG_SPACE /* If length is in range, set *result to CMSG_SPACE(length) and return true; otherwise, return false. */ static int get_CMSG_SPACE(size_t length, size_t *result) { size_t tmp; /* Use CMSG_SPACE(1) here in order to take account of the padding necessary before *and* after the data. */ if (length > (SOCKLEN_T_LIMIT - CMSG_SPACE(1))) return 0; tmp = CMSG_SPACE(length); if ((tmp > SOCKLEN_T_LIMIT) || (tmp < length)) return 0; *result = tmp; return 1; } #endif /* sendmsg_implementation is a wrapper over sendmsg of the API. It was inspired from the way CPython did their implementation of this. The main reason that it was written in C, is the struct msghdr, which contains the ancillary data in a linked list of cmsghdr structures. It was simpler to use it in C, and then push the simpler types of data via rffi. */ RPY_EXTERN int sendmsg_implementation (int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag ) { struct msghdr msg = {0}; struct cmsghdr *cmsg; void* controlbuf = NULL; int retval; size_t i; // Prepare the msghdr structure for the send: // Add the address if (address != NULL) { msg.msg_name = address; msg.msg_namelen = addrlen; } // Add the message struct iovec *iovs = NULL; if (no_of_messages > 0){ iovs = (struct iovec*) malloc(no_of_messages * sizeof(struct iovec)); memset(iovs, 0, no_of_messages * sizeof(struct iovec)); msg.msg_iov = iovs; msg.msg_iovlen = no_of_messages; for (i=0; i < no_of_messages; i++){ iovs[i].iov_base = messages[i]; iovs[i].iov_len = length_of_messages[i]; } } // Add the ancillary #ifndef CMSG_SPACE if (control_length > 1){ free(iovs); return MUL_MSGS_NOT_SUP; } #endif if (control_length > 0){ //compute the total size of the ancillary //getting the exact amount of space can be tricky and os dependent. size_t total_size_of_ancillary = 0; size_t space; size_t controllen = 0, controllen_last = 0; for (i = 0; i< control_length; i++){ total_size_of_ancillary = no_of_fds[i]; #ifdef CMSG_SPACE if (!get_CMSG_SPACE(total_size_of_ancillary, &space)) { #else if (!get_CMSG_LEN(total_size_of_ancillary, &space)) { #endif if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGE; } controllen +=space; if ((controllen > SOCKLEN_T_LIMIT) || (controllen < controllen_last)) { if (iovs != NULL) free(iovs); return ANC_DATA_TOO_LARGEX; } controllen_last = controllen; } controlbuf = malloc(controllen); msg.msg_control = controlbuf; msg.msg_controllen = controllen; // memset controlbuf to 0 to avoid trash in the ancillary memset(controlbuf, 0, controllen); cmsg = NULL; for (i = 0; i < control_length; i++) { cmsg = (i == 0) ? CMSG_FIRSTHDR(&msg) : CMSG_NXTHDR(&msg, cmsg); cmsg->cmsg_level = (int) levels[i]; cmsg->cmsg_type = (int) types[i]; cmsg->cmsg_len = CMSG_LEN(sizeof(char) * no_of_fds[i]); memcpy(CMSG_DATA(cmsg), file_descriptors[i], sizeof(char) * no_of_fds[i]); } } // Add the flags msg.msg_flags = flag; // Send the data retval = sendmsg(socket, &msg, flag); // free everything that was allocated here, and we would not need in rsocket if (iovs != NULL) free(iovs); if (controlbuf !=NULL) free(controlbuf); return retval; } // ############################################################################ // Wrappers for CMSG_SPACE and CMSG_LEN /* These 2 functions are wrappers over sys/socket.h's CMSG_SPACE and CMSG_LEN. They are identical to CPython's. */ #ifdef CMSG_SPACE RPY_EXTERN size_t CMSG_SPACE_wrapper(size_t desired_space){ size_t result; if (!get_CMSG_SPACE(desired_space, &result)){ return 0; } return result; } #endif #ifdef CMSG_LEN RPY_EXTERN size_t CMSG_LEN_wrapper(size_t desired_len){ size_t result; if (!get_CMSG_LEN(desired_len, &result)){ return 0; } return result; } #endif // ########################################################################### // Extra functions that I needed /* This function is used to memcpy from a char* at an offset. Could not get rffi.c_memcpy to do it at an offset, so I made my own. */ RPY_EXTERN int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size){ *stringto = memcpy(*stringto, stringfrom + offset, size); return 0; } /* These functions free memory that was allocated in C (sendmsg or recvmsg) was used in rsocket and now needs cleanup */ RPY_EXTERN int free_pointer_to_signedp(long** ptrtofree){ free(*ptrtofree); return 0; } RPY_EXTERN int free_ptr_to_charp(char** ptrtofree){ free(*ptrtofree); return 0; } ''',] post_include_bits +=[ "RPY_EXTERN " "int sendmsg_implementation(int socket, struct sockaddr* address, socklen_t addrlen, long* length_of_messages, char** messages, int no_of_messages, long* levels, long* types, char** file_descriptors, long* no_of_fds, int control_length, int flag );\n" "RPY_EXTERN " "int recvmsg_implementation(int socket_fd, int ancillary_size, int flags, struct sockaddr* address, socklen_t* addrlen, int* message_lengths, char** messages, int no_of_messages, long* size_of_ancillary, long** levels, long** types, char** file_descr, long** descr_per_ancillary, long* flag);\n" "static " "int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space);\n" "static " "int get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space);\n" "static " "int get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len);\n" "static " "int get_CMSG_LEN(size_t length, size_t *result);\n" "static " "int get_CMSG_SPACE(size_t length, size_t *result);\n" "RPY_EXTERN " "size_t CMSG_LEN_wrapper(size_t desired_len);\n" "RPY_EXTERN " "size_t CMSG_SPACE_wrapper(size_t desired_space);\n" "RPY_EXTERN " "int memcpy_from_CCHARP_at_offset_and_size(char* stringfrom, char** stringto, int offset, int size);\n" "RPY_EXTERN " "int free_pointer_to_signedp(long** ptrtofree);\n" "RPY_EXTERN " "int free_ptr_to_charp(char** ptrtofree);\n" ] if _WIN32: CConfig.WSAEVENT = platform.SimpleType('WSAEVENT', rffi.VOIDP) CConfig.WSANETWORKEVENTS = platform.Struct( 'struct _WSANETWORKEVENTS', [('lNetworkEvents', rffi.LONG), ('iErrorCode', rffi.CFixedArray(rffi.INT, 10)), #FD_MAX_EVENTS ]) CConfig.WSAPROTOCOL_INFO = platform.Struct( 'WSAPROTOCOL_INFOA', []) # Struct is just passed between functions CConfig.FROM_PROTOCOL_INFO = platform.DefinedConstantInteger( 'FROM_PROTOCOL_INFO') post_include_bits +=[dedent("""\ struct if_nameindex { unsigned int if_index; char * if_name; }; RPY_EXTERN struct if_nameindex * if_nameindex(void); RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr); """)] separate_module_sources += [dedent("""\ #include <Iphlpapi.h> #include <stdlib.h> RPY_EXTERN struct if_nameindex * if_nameindex(void) { PMIB_IF_TABLE2 tbl; int ret; if (GetIfTable2Ex(MibIfTableRaw, &tbl) != NO_ERROR) { return NULL; } size_t memsize = sizeof(struct if_nameindex) * (tbl->NumEntries + 1); struct if_nameindex *out = malloc(memsize); if (out == NULL) { return NULL; } ULONG i = 0; for (i; i < tbl->NumEntries; i++) { MIB_IF_ROW2 r = tbl->Table[i]; WCHAR buf[NDIS_IF_MAX_STRING_SIZE + 1]; if ((ret = ConvertInterfaceLuidToNameW(&r.InterfaceLuid, buf, NDIS_IF_MAX_STRING_SIZE))) { FreeMibTable(tbl); for (ULONG j=0; j<i; j++) { free(out[j].if_name); } free(out); return NULL; } /* convert from wchar_t to char */ size_t origsize = wcslen(buf) + 1; size_t newsize = origsize * 2 + 2; size_t convertedChars = 0; out[i].if_name = malloc(newsize); out[i].if_name[0] = '\\0'; wcstombs_s(&convertedChars, out[i].if_name, newsize, buf, newsize - 1); out[i].if_index = r.InterfaceIndex; } out[i].if_name = NULL; out[i].if_index = 0; return out; } RPY_EXTERN void if_freenameindex(struct if_nameindex *ptr) { if (ptr == NULL) return; int index = 0; while (1) { if (ptr[index].if_name == NULL) break; free(ptr[index].if_name); index += 1; } free(ptr); }""")] compilation_info = eci.merge(ExternalCompilationInfo( includes=includes, separate_module_sources=separate_module_sources, post_include_bits=post_include_bits, )) CConfig.timeval = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) fd_set = rffi.COpaquePtr('fd_set', compilation_info=eci) if _WIN32: CConfig.WSAData = platform.Struct('struct WSAData', [('wVersion', rffi.USHORT), ('wHighVersion', rffi.USHORT), ('szDescription', rffi.CFixedArray(lltype.Char, 1)), # (WSADESCRIPTION_LEN+1) ('szSystemStatus', rffi.CFixedArray(lltype.Char, 1)), # (WSASYS_STATUS_LEN+1) ('iMaxSockets', rffi.USHORT), ('iMaxUdpDg', rffi.USHORT), ('lpVendorInfo', CCHARP)]) CConfig.tcp_keepalive = platform.Struct( 'struct tcp_keepalive', [('onoff', rffi.ULONG), ('keepalivetime', rffi.ULONG), ('keepaliveinterval', rffi.ULONG)]) CConfig.GUID = platform.Struct( 'struct _GUID', [('Data1', rffi.UINT), ('Data2', rffi.UINT), ('Data3', rffi.UINT), ('Data4', rffi.CFixedArray(rffi.UCHAR, 8)) ]) CConfig.WSAPROTOCOLCHAIN = platform.Struct( 'struct _WSAPROTOCOLCHAIN', [('ChainLen', rffi.INT), ('ChainEntries', rffi.CFixedArray(rffi.UINT, 7))]) WSAPROTOCOLCHAIN = CConfig.WSAPROTOCOLCHAIN GUID = CConfig.GUID CConfig.WSAPROTOCOL_INFOW = platform.Struct( 'struct _WSAPROTOCOL_INFOW', [('dwServiceFlags1', rffi.UINT), ('dwServiceFlags2', rffi.UINT), ('dwServiceFlags3', rffi.UINT), ('dwServiceFlags4', rffi.UINT), ('dwProviderFlags', rffi.UINT), ('ProviderId', GUID), ('dwCatalogEntryId', rffi.UINT), ('ProtocolChain', WSAPROTOCOLCHAIN), ('iVersion', rffi.INT), ('iAddressFamily', rffi.INT), ('iMaxSockAddr', rffi.INT), ('iMinSockAddr', rffi.INT), ('iSocketType', rffi.INT), ('iProtocol', rffi.INT), ('iProtocolMaxOffset', rffi.INT), ('iNetworkByteOrder', rffi.INT), ('iSecurityScheme', rffi.INT), ('dwMessageSize', rffi.UINT), ('dwProviderReserved', rffi.UINT), ('szProtocol', rffi.CFixedArray(rffi.UCHAR, 256))]) class cConfig: pass > cConfig.__dict__.update(platform.configure(CConfig)) ../rpython/rlib/_rsocket_rffi.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CConfig = <class rpython.rlib._rsocket_rffi.CConfig at 0x7f2a66c6fbb0> ignore_errors = False def configure(CConfig, ignore_errors=False): """Examine the local system by running the C compiler. The CConfig class contains CConfigEntry attribues that describe what should be inspected; configure() returns a dict mapping names to the results. """ for attr in ['_includes_', '_libraries_', '_sources_', '_library_dirs_', '_include_dirs_', '_header_']: assert not hasattr(CConfig, attr), \ "Found legacy attribute %s on CConfig" % attr eci = CConfig._compilation_info_ entries = {} for key in dir(CConfig): value = getattr(CConfig, key) if isinstance(value, CConfigEntry): entries[key] = value res = {} if entries: # can be empty if there are only CConfigSingleEntries results = configure_entries( entries.values(), eci, ignore_errors=ignore_errors) > for name, result in zip(entries, results): ../rpython/rtyper/tool/rffi_platform.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ entries = [<rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a66a02850>, <rpython.rtyper.tool.rffi_platfo...er object at 0x7f2a66a02e50>, <rpython.rtyper.tool.rffi_platform.DefinedConstantInteger object at 0x7f2a66d07e10>, ...] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def configure_entries(entries, eci, ignore_errors=False): writer = _CWriter(eci) writer.write_header() for i, entry in enumerate(entries): writer.write_entry(str(i), entry) writer.start_main() for i, entry in enumerate(entries): writer.write_entry_main(str(i)) writer.close() infolist = list(run_example_code( > writer.path, eci, ignore_errors=ignore_errors)) ../rpython/rtyper/tool/rffi_platform.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filepath = local('/tmp/pytest/usession-main-22716/platcheck_96.c') eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def run_example_code(filepath, eci, ignore_errors=False): eci = eci.convert_sources_to_files() files = [filepath] > output = build_executable_cache(files, eci, ignore_errors=ignore_errors) ../rpython/rtyper/tool/rffi_platform.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c_files = [local('/tmp/pytest/usession-main-22716/platcheck_96.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> ignore_errors = False def build_executable_cache(c_files, eci, ignore_errors=False): "Builds and run a program; caches the result" # Import 'platform' every time, the compiler may have been changed from rpython.translator.platform import platform path = cache_file_path(c_files, eci, 'build_executable_cache') try: return path.read() except py.error.Error: _previous = platform.log_errors try: if ignore_errors: platform.log_errors = False > result = platform.execute(platform.compile(c_files, eci)) ../rpython/tool/gcc_cache.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_96.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> outputfilename = None, standalone = True def compile(self, cfiles, eci, outputfilename=None, standalone=True): > ofiles = self._compile_o_files(cfiles, eci, standalone) ../rpython/translator/platform/__init__.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc> cfiles = [local('/tmp/pytest/usession-main-22716/platcheck_96.c')] eci = <ExternalCompilationInfo (pre_include_bits=(), includes=('sys/types.h', 'sys/s...iles=(), testonly_libraries=(), use_cpp_linker=False, platform=<Linux cc=gcc>)> standalone = True def _compile_o_files(self, cfiles, eci, standalone=True): cfiles = self._all_cfiles(cfiles, eci) compile_args = self._compile_args_from_eci(eci, standalone) ofiles = [] for cfile in cfiles: # Windows hack: use masm for files ending in .asm if str(cfile).lower().endswith('.asm'): ofiles.append(self._compile_c_file(self.masm, cfile, [])) else: > ofiles.append(self._compile_c_file(self.cc, cfile, compile_args)) ../rpython/translator/platform/__init__.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' cfile = local('/tmp/pytest/usession-main-22716/platcheck_96.c') compile_args = ['-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', '-Wno-address', ...] def _compile_c_file(self, cc, cfile, compile_args): oname = self._make_o_file(cfile, ext='o') args = ['-c'] + compile_args + [str(cfile), '-o', str(oname)] self._execute_c_compiler(cc, args, oname, > cwd=str(cfile.dirpath())) ../rpython/translator/platform/posix.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, cc = 'gcc' args = ['-c', '-O3', '-pthread', '-fomit-frame-pointer', '-Wall', '-Wno-unused', ...] outname = local('/tmp/pytest/usession-main-22716/platcheck_96.o') cwd = '/tmp/pytest/usession-main-22716' def _execute_c_compiler(self, cc, args, outname, cwd=None): #log.execute(cc + ' ' + ' '.join(args)) # 'cc' can also contain some options for the C compiler; # e.g. it can be "gcc -m32". We handle it by splitting on ' '. cclist = cc.split() cc = cclist[0] args = cclist[1:] + args returncode, stdout, stderr = _run_subprocess(cc, args, self.c_environ, cwd) > self._handle_error(returncode, stdout, stderr, outname) ../rpython/translator/platform/__init__.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Linux cc=gcc>, returncode = 1, stdout = '' stderr = '/tmp/pytest/usession-main-22716/platcheck_96.c: In function \xe2\x80\x98dump_section_447\xe2\x80\x99:\n/tmp/pytest/us...x80\x99}\n 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n | ^~~~~~~~\n' outname = local('/tmp/pytest/usession-main-22716/platcheck_96.o') def _handle_error(self, returncode, stdout, stderr, outname): if returncode != 0: errorfile = outname.new(ext='errors') errorfile.write(stderr, 'wb') if self.log_errors: stderrlines = stderr.splitlines() for line in stderrlines: log.Error(line) # ^^^ don't use ERROR, because it might actually be fine. # Also, ERROR confuses lib-python/conftest.py. > raise CompilationError(stdout, stderr) E CompilationError: CompilationError(err=""" E /tmp/pytest/usession-main-22716/platcheck_96.c: In function ‘dump_section_447’: E /tmp/pytest/usession-main-22716/platcheck_96.c:6933:18: error: field ‘s’ has incomplete type E 6933 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_96.c:6936:14: error: storage size of ‘s’ isn’t known E 6936 | platcheck_t s; E | ^ E /tmp/pytest/usession-main-22716/platcheck_96.c:6939:23: error: invalid application of ‘sizeof’ to incomplete type ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6939 | dump("size", sizeof(platcheck_t)); E | ^~~~~~~~~~~ E In file included from /tmp/pytest/usession-main-22716/platcheck_96.c:143: E /tmp/pytest/usession-main-22716/platcheck_96.c:6940:27: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_96.c:6944:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node)); E | ^~~~~~~~ E /tmp/pytest/usession-main-22716/platcheck_96.c:6948:25: error: invalid use of incomplete typedef ‘platcheck_t’ {aka ‘struct sockaddr_qrtr’} E 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); E | ^~~~~~~~ E """) ../rpython/translator/platform/__init__.py:155: CompilationError ---------------------------- Captured stderr setup ----------------------------- [platform:Error] /tmp/pytest/usession-main-22716/platcheck_96.c: In function \u2018dump_section_447\u2019:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_96.c:6933:18: error: field \u2018s\u2019 has incomplete type\n[platform:Error] 6933 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_96.c:6936:14: error: storage size of \u2018s\u2019 isn\u2019t known\n[platform:Error] 6936 | platcheck_t s;\n[platform:Error] | ^\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_96.c:6939:23: error: invalid application of \u2018sizeof\u2019 to incomplete type \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6939 | dump("size", sizeof(platcheck_t));\n[platform:Error] | ^~~~~~~~~~~\n[platform:Error] In file included from /tmp/pytest/usession-main-22716/platcheck_96.c:143:\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_96.c:6940:27: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6940 | dump("fldofs sq_family", offsetof(platcheck_t, sq_family));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_96.c:6944:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6944 | dump("fldofs sq_node", offsetof(platcheck_t, sq_node));\n[platform:Error] | ^~~~~~~~\n[platform:Error] /tmp/pytest/usession-main-22716/platcheck_96.c:6948:25: error: invalid use of incomplete typedef \u2018platcheck_t\u2019 {aka \u2018struct sockaddr_qrtr\u2019}\n[platform:Error] 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port));\n[platform:Error] | ^~~~~~~~ _________________ ERROR at setup of AppTestBuiltinApp.test_bin _________________ self = <CallInfo when='setup' exception: CompilationError(err=""" /tmp/pytest/usession-main-22716/platcheck_97.c: In functio...’} 6948 | dump("fldofs sq_port", offsetof(platcheck_t, sq_port)); | ^~~~~~~~ """)> func = <function <lambda> at 0x7f2a66ca1ed0>, when = 'setup' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_setup'> kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_bin'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_bin'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f2a6c841f50> hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_bin'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_bin'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_setup'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6a0da780>, <_pytest.vendored_packages.pluggy.HookImpl in...es.pluggy.HookImpl instance at 0x7f2a6aec47d0>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x7f2a6ae9a960>] kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_bin'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_bin'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_bin'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_setup at 0x7f2a670ab960> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i... 'test_bin'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a670ab4b0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x7f2a670ab4b0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i... 'test_bin'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_bin'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_bin'> @pytest.hookimpl(tryfirst=True) def pytest_runtest_setup(item): if isinstance(item, py.test.collect.Function): config = item.config appdirect = (config.getoption('runappdirect') or config.getoption('direct_apptest')) if (get_marker(item, name='pypy_only') and appdirect and not '__pypy__' in sys.builtin_module_names): pytest.skip('PyPy-specific test') appclass = item.getparent(py.test.Class) if appclass is not None: from pypy.tool.pytest.objspace import gettestobjspace # Make cls.space and cls.runappdirect available in tests. spaceconfig = getattr(appclass.obj, 'spaceconfig', {}) if not appdirect: spaceconfig.setdefault('objspace.std.reinterpretasserts', True) > appclass.obj.space = gettestobjspace(**spaceconfig) conftest.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ kwds = {'objspace.std.reinterpretasserts': True} config = <rpython.config.config.Config object at 0x7f2a67a93f90> key = (((False, True, False, False, False, False, ...), True, None, False, False, None, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...)) def gettestobjspace(**kwds): """ helper for instantiating and caching spaces for testing. """ try: config = make_config(option, **kwds) except ConflictConfigError as e: # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) if getattr(option, 'runappdirect', None): skip_on_incompatible_interpreter(kwds) return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: > space = maketestobjspace(config) tool/pytest/objspace.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a67a93f90> def maketestobjspace(config=None): if config is None: config = make_config(option) if config.objspace.usemodules.thread: config.translation.thread = True config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest' > space = make_objspace(config) tool/pytest/objspace.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <rpython.config.config.Config object at 0x7f2a67a93f90> def make_objspace(config): from pypy.objspace.std.objspace import StdObjSpace > return StdObjSpace(config) tool/option.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace config = <rpython.config.config.Config object at 0x7f2a67a93f90> @not_rpython def __init__(self, config=None): "Basic initialization of objects." self.fromcache = InternalSpaceCache(self).getorbuild self.threadlocals = ThreadLocals() # set recursion limit # sets all the internal descriptors if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=False) self.config = config self.reverse_debugging = config.translation.reverse_debugger self.builtin_modules = {} self.reloading_modules = {} self.interned_strings = make_weak_value_dictionary(self, str, W_Root) self.actionflag = ActionFlag() # changed by the signal module self.check_signal_action = None # changed by the signal module make_finalizer_queue(W_Root, self) self._code_of_sys_exc_info = None self._builtin_functions_by_identifier = {'': None} # can be overridden to a subclass > self.initialize() interpreter/baseobjspace.py:467: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def initialize(self): """only for initializing the space Setup all the object types and implementations. """ setup_prebuilt(self) self.FrameClass = frame.build_frame(self) self.StringObjectCls = W_BytesObject self.UnicodeObjectCls = W_UnicodeObject self.IntObjectCls = W_IntObject self.FloatObjectCls = W_FloatObject # singletons self.w_None = W_NoneObject.w_None self.w_False = W_BoolObject.w_False self.w_True = W_BoolObject.w_True self.w_NotImplemented = self.wrap(special.NotImplemented()) self.w_Ellipsis = self.wrap(special.Ellipsis()) # types builtin_type_classes = { W_BoolObject.typedef: W_BoolObject, W_Buffer.typedef: W_Buffer, W_BytearrayObject.typedef: W_BytearrayObject, W_BytesObject.typedef: W_BytesObject, W_ComplexObject.typedef: W_ComplexObject, W_DictMultiObject.typedef: W_DictMultiObject, W_FloatObject.typedef: W_FloatObject, W_IntObject.typedef: W_IntObject, W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject, W_ListObject.typedef: W_ListObject, W_LongObject.typedef: W_LongObject, W_MemoryView.typedef: W_MemoryView, W_NoneObject.typedef: W_NoneObject, W_ObjectObject.typedef: W_ObjectObject, W_SetObject.typedef: W_SetObject, W_FrozensetObject.typedef: W_FrozensetObject, W_SliceObject.typedef: W_SliceObject, W_TupleObject.typedef: W_TupleObject, W_TypeObject.typedef: W_TypeObject, W_UnicodeObject.typedef: W_UnicodeObject, } self.builtin_types = {} self._interplevel_classes = {} for typedef, cls in builtin_type_classes.items(): w_type = self.gettypeobject(typedef) self.builtin_types[typedef.name] = w_type name = typedef.name # we don't expose 'space.w_str' at all, to avoid confusion # with Python 3. Instead, in Python 2, it becomes # space.w_bytes (or space.w_text). if name == 'str': name = 'bytes' setattr(self, 'w_' + name, w_type) self._interplevel_classes[w_type] = cls self.w_text = self.w_bytes # 'space.w_text' is w_unicode on Py3 self.w_dict.flag_map_or_seq = 'M' from pypy.objspace.std import dictproxyobject dictproxyobject._set_flag_map_or_seq(self) self.w_list.flag_map_or_seq = 'S' self.w_tuple.flag_map_or_seq = 'S' self.builtin_types["NotImplemented"] = self.w_NotImplemented self.builtin_types["Ellipsis"] = self.w_Ellipsis self.w_basestring = self.builtin_types['basestring'] = \ self.gettypeobject(basestring_typedef) # exceptions & builtins > self.make_builtins() objspace/std/objspace.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace @not_rpython def make_builtins(self): "only for initializing the space." from pypy.module.exceptions.moduledef import Module w_name = self.newtext('exceptions') self.exceptions_module = Module(self, w_name) self.exceptions_module.install() from pypy.module.imp.moduledef import Module w_name = self.newtext('imp') > mod = Module(self, w_name) interpreter/baseobjspace.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.imp.moduledef.Module object at 0x7f2a671e17d0> space = StdObjSpace, args = (W_BytesObject('imp'),) add_fork_hook = <function add_fork_hook at 0x7f2a67c79750> def __init__(self, space, *args): "NOT_RPYTHON" MixedModule.__init__(self, space, *args) from pypy.module.posix.interp_posix import add_fork_hook > from pypy.module.imp import interp_imp module/imp/moduledef.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from pypy.module.imp import importing module/imp/interp_imp.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ import sys, os, stat from pypy.interpreter.module import Module from pypy.interpreter.gateway import interp2app, unwrap_spec from pypy.interpreter.typedef import TypeDef, generic_new_descr from pypy.interpreter.error import OperationError, oefmt, wrap_oserror from pypy.interpreter.baseobjspace import W_Root, CannotHaveLock from pypy.interpreter.eval import Code from pypy.interpreter.pycode import PyCode > from pypy.interpreter.streamutil import wrap_streamerror module/imp/importing.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from rpython.rlib.streamio import StreamError interpreter/streamutil.py:1: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # File offsets are all 'r_longlong', but a single read or write cannot # transfer more data that fits in an RPython 'int' (because that would not # fit in a single string anyway). This module needs to be careful about # where r_longlong values end up: as argument to seek() and truncate() and # return value of tell(), but not as argument to read(). import os, sys, errno from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib.rarithmetic import r_longlong, intmask > from rpython.rlib import rposix, nonconst, _rsocket_rffi as _c ../rpython/rlib/streamio.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.rtyper.lltypesystem import rffi from rpython.rtyper.lltypesystem import lltype from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem.rffi import CCHARP, CONST_CCHARP from rpython.rlib import jit from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.translator.platform import platform as target_platform from rpython.rlib.rarithmetic import intmask, r_uint, widen import os,sys from textwrap import dedent _POSIX = os.name == "posix" _WIN32 = sys.platform == "win32" _MSVC = target_platform.name == "msvc" _MINGW = target_platform.name == "mingw32" _SOLARIS = sys.platform == "sunos5" _MACOSX = sys.platform == "darwin" _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now if _POSIX: includes = ('sys/types.h', 'sys/socket.h', 'sys/un.h', 'poll.h', 'sys/select.h', 'sys/types.h', 'netinet/in.h', 'netinet/tcp.h', 'unistd.h', 'fcntl.h', 'stdio.h', 'netdb.h', 'arpa/inet.h', 'stdint.h', 'errno.h', 'limits.h', 'net/if.h', ) if _HAS_AF_PACKET: includes += ('netpacket/packet.h', 'sys/ioctl.h', ) cond_includes = [('AF_NETLINK', 'linux/netlink.h')] cond_includes += [('AF_ALG', 'linux/if_alg.h')] cond_includes += [('AF_QIPCRTR', 'linux/qrtr.h')] libraries = () calling_conv = 'c' HEADER = ''.join(['#include <%s>\n' % filename for filename in includes]) COND_HEADER = ''.join(['#ifdef %s\n#include <%s>\n#endif\n' % cond_include for cond_include in cond_includes]) if _SOLARIS: libraries = libraries + ('socket', 'nsl') if _WIN32: includes = () libraries = ('ws2_32', 'Iphlpapi') calling_conv = 'win' header_lines = [ '#include <WinSock2.h>', '#include <WS2tcpip.h>', # winsock2 defines AF_UNIX, but not sockaddr_un '#undef AF_UNIX', ] if _MSVC: header_lines.extend([ '#include <Mstcpip.h>', # these types do not exist on microsoft compilers '#ifdef _WIN64', 'typedef long long ssize_t;', 'typedef unsigned long long size_t;', '#else', 'typedef int ssize_t;', 'typedef unsigned int size_t;', '#endif', 'typedef unsigned __int16 uint16_t;', 'typedef unsigned __int32 uint32_t;', ]) else: # MINGW includes = ('stdint.h',) header_lines.extend([ '''\ #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif''', '#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)', '#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)', '#define RCVALL_OFF 0', '#define RCVALL_ON 1', '#define RCVALL_SOCKETLEVELONLY 2', '''\ #ifndef __MINGW32__ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; }; #endif ''' ]) HEADER = '\n'.join(header_lines) COND_HEADER = '' constants = {} eci = ExternalCompilationInfo( post_include_bits = [HEADER, COND_HEADER], includes = includes, libraries = libraries, ) class CConfig: _compilation_info_ = eci # constants linux = platform.Defined('linux') WIN32 = platform.Defined('_WIN32') O_RDONLY = platform.DefinedConstantInteger('O_RDONLY') O_WRONLY = platform.DefinedConstantInteger('O_WRONLY') O_RDWR = platform.DefinedConstantInteger('O_RDWR') O_NONBLOCK = platform.DefinedConstantInteger('O_NONBLOCK') F_GETFL = platform.DefinedConstantInteger('F_GETFL') F_SETFL = platform.DefinedConstantInteger('F_SETFL') FIONBIO = platform.DefinedConstantInteger('FIONBIO') PIPE_BUF = platform.DefinedConstantInteger('PIPE_BUF') INVALID_SOCKET = platform.DefinedConstantInteger('INVALID_SOCKET') INET_ADDRSTRLEN = platform.DefinedConstantInteger('INET_ADDRSTRLEN') INET6_ADDRSTRLEN= platform.DefinedConstantInteger('INET6_ADDRSTRLEN') EINTR = platform.DefinedConstantInteger('EINTR') WSAEINTR = platform.DefinedConstantInteger('WSAEINTR') EINPROGRESS = platform.DefinedConstantInteger('EINPROGRESS') WSAEINPROGRESS = platform.DefinedConstantInteger('WSAEINPROGRESS') EWOULDBLOCK = platform.DefinedConstantInteger('EWOULDBLOCK') WSAEWOULDBLOCK = platform.DefinedConstantInteger('WSAEWOULDBLOCK') EAFNOSUPPORT = platform.DefinedConstantInteger('EAFNOSUPPORT') WSAEAFNOSUPPORT = platform.DefinedConstantInteger('WSAEAFNOSUPPORT') EISCONN = platform.DefinedConstantInteger('EISCONN') WSAEISCONN = platform.DefinedConstantInteger('WSAEISCONN') constant_names = ''' AF_AAL5 AF_ALG AF_APPLETALK AF_ASH AF_ATMPVC AF_ATMSVC AF_AX25 AF_BLUETOOTH AF_BRIDGE AF_CAN AD_DECnet AF_DEC AF_DECnet AF_DIVERT AF_ECONET AF_HYPERV AF_INET AF_INET6 AF_IPX AF_IRDA AF_KEY AF_LINK AF_LLC AF_NETBEUI AF_NETLINK AF_NETROM AF_PACKET AF_PPPOX AF_QIPCRTR AF_RDS AF_ROSE AF_ROUTE AF_SECURITY AF_SNA AF_SYSTEM AF_TIPC AF_UNIX AF_VSOCK AF_WANPIPE AF_X25 AF_UNSPEC AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_DEFAULT AI_MASK AI_NUMERICHOST AI_NUMERICSERV AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG BTPROTO_HCI BTPROTO_L2CAP BTPROTO_SCO BTPROTO_RFCOMM ALG_OP_DECRYPT ALG_OP_ENCRYPT ALG_OP_SIGN ALG_OP_VERIFY ALG_SET_AEAD_ASSOCLEN ALG_SET_AEAD_AUTHSIZE ALG_SET_IV ALG_SET_KEY ALG_SET_OP ALG_SET_PUBKEY SOL_ALG HCI_DATA_DIR HCI_FILTER HCI_TIME_STAMP HV_PROTOCOL_RAW HVSOCKET_ADDRESS_FLAG_PASSTHRU HVSOCKET_CONNECTED_SUSPEND HVSOCKET_CONNECT_TIMEOUT HVSOCKET_CONNECT_TIMEOUT_MAX INADDR_ALLHOSTS_GROUP INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_MAX_LOCAL_GROUP INADDR_NONE INADDR_UNSPEC_GROUP IOCTL_VM_SOCKETS_GET_LOCAL_CID EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_BADHINTS EAI_FAIL EAI_FAMILY EAI_MAX EAI_MEMORY EAI_NODATA EAI_NONAME EAI_OVERFLOW EAI_PROTOCOL EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM IPPROTO_AH IPPROTO_BIP IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_EON IPPROTO_ESP IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_GRE IPPROTO_HELLO IPPROTO_HOPOPTS IPPROTO_ICLFXBM IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGP IPPROTO_IGMP IPPROTO_IPCOMP IPPROTO_IPIP IPPROTO_IPV4 IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_MOBILE IPPROTO_ND IPPROTO_NONE IPPROTO_PGM IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_RSVP IPPROTO_MPTCP IPPROTO_ST IPPROTO_TCP IPPROTO_TP IPPROTO_UDPLITE IPPROTO_VRRP IPPROTO_XTP IPPROTO_SCTP IPV6_CHECKSUM IPV6_DONTFRAG IPV6_DSTOPTS IPV6_HOPLIMIT IPV6_HOPOPTS IPV6_JOIN_GROUP IPV6_LEAVE_GROUP IPV6_MULTICAST_HOPS IPV6_MULTICAST_IF IPV6_MULTICAST_LOOP IPV6_NEXTHOP IPV6_PATHMTU IPV6_PKTINFO IPV6_RECVDSTOPTS IPV6_RECVHOPLIMIT IPV6_RECVHOPOPTS IPV6_RECVPATHMTU IPV6_RECVPKTINFO IPV6_RECVRTHDR IPV6_RECVTCLASS IPV6_RTHDR IPV6_RTHDRDSTOPTS IPV6_RTHDR_TYPE_0 IPV6_TCLASS IPV6_UNICAST_HOPS IPV6_USE_MIN_MTU IPV6_V6ONLY IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_BIND_ADDRESS_NO_PORT IP_BLOCK_SOURCE IP_DEFAULT_MULTICAST_LOOP IP_DEFAULT_MULTICAST_TTL IP_DROP_MEMBERSHIP IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MAX_MEMBERSHIPS IP_MULTICAST_IF IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_OPTIONS IP_PKTINFO IP_RECVDSTADDR IP_RECVOPTS IP_RECVRETOPTS IP_RECVTOS IP_RETOPTS IP_TOS IP_TRANSPARENT IP_TTL IP_UNBLOCK_SOURCE MSG_BCAST MSG_BTAG MSG_CMSG_CLOEXEC MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOF MSG_ERRQUEUE MSG_EOR MSG_ETAG MSG_FASTOPEN MSG_MCAST MSG_MORE MSG_NOSIGNAL MSG_NOTIFICATION MSG_OOB MSG_PEEK MSG_TRUNC MSG_WAITALL NI_DGRAM NI_IDN NI_MAXHOST NI_MAXSERV NI_NAMEREQD NI_NOFQDN NI_NUMERICHOST NI_NUMERICSERV NETLINK_ARPD NETLINK_CRYPTO NETLINK_DNRTMSG NETLINK_FIREWALL NETLINK_IP6_FW NETLINK_NFLOG NETLINK_ROUTE NETLINK_ROUTE6 NETLINK_SKIP NETLINK_TAPBASE NETLINK_TCPDIAG NETLINK_USERSOCK NETLINK_W1 NETLINK_XFRM PACKET_HOST PACKET_BROADCAST PACKET_MULTICAST PACKET_OTHERHOST PACKET_OUTGOING PACKET_LOOPBACK PACKET_FASTROUTE PF_CAN PF_DIVERT PF_PACKET PF_RDS PF_SYSTEM RCVALL_IPLEVEL RCVALL_MAX RCVALL_OFF RCVALL_ON RCVALL_SOCKETLEVELONLY RDS_CANCEL_SENT_TO RDS_CMSG_RDMA_ARGS RDS_CMSG_RDMA_DEST RDS_CMSG_RDMA_MAP RDS_CMSG_RDMA_STATUS RDS_CMSG_RDMA_UPDATE RDS_CONG_MONITOR RDS_FREE_MR RDS_GET_MR RDS_GET_MR_FOR_DEST RDS_RDMA_DONTWAIT RDS_RDMA_FENCE RDS_RDMA_INVALIDATE RDS_RDMA_NOTIFY_ME RDS_RDMA_READWRITE RDS_RDMA_SILENT RDS_RDMA_USE_ONCE RDS_RECVERR SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK SOL_SOCKET SOL_IPX SOL_AX25 SOL_ATALK SOL_NETROM SOL_ROSE SO_ACCEPTCONN SO_BINDTODEVICE SO_BINDTOIFINDEX SO_BROADCAST SO_DEBUG SO_DOMAIN SO_DONTROUTE SO_ERROR SO_EXCLUSIVEADDRUSE SO_INCOMING_CPU SO_J1939_ERRQUEUE SO_J1939_FILTER SO_J1939_PROMISC SO_J1939_SEND_PRIO SO_KEEPALIVE SO_LINGER SO_MARK SO_OOBINLINE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RTABLE SO_SETFIB SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_USELOOPBACK SO_USER_COOKIE SO_VM_SOCKETS_BUFFER_MAX_SIZE SO_VM_SOCKETS_BUFFER_MIN_SIZE SO_VM_SOCKETS_BUFFER_SIZE SIO_KEEPALIVE_VALS SIO_LOOPBACK_FAST_PATH SIO_RCVALL SYSPROTO_CONTROL TCP_CC_INFO TCP_CONGESTION TCP_CONNECTION_INFO TCP_CORK TCP_DEFER_ACCEPT TCP_FASTOPEN TCP_FASTOPEN_CONNECT TCP_FASTOPEN_KEY TCP_FASTOPEN_NO_COOKIE TCP_INFO TCP_INQ TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL TCP_LINGER2 TCP_MAXSEG TCP_MD5SIG TCP_MD5SIG_EXT TCP_NODELAY TCP_NOTSENT_LOWAT TCP_QUEUE_SEQ TCP_QUICKACK TCP_REPAIR TCP_REPAIR_OPTIONS TCP_REPAIR_QUEUE TCP_REPAIR_WINDOW TCP_SAVED_SYN TCP_SAVE_SYN TCP_SYNCNT TCP_THIN_DUPACK TCP_THIN_LINEAR_TIMEOUTS TCP_TIMESTAMP TCP_TX_DELAY TCP_ULP TCP_USER_TIMEOUT TCP_WINDOW_CLAMP TCP_ZEROCOPY_RECEIVE IPX_TYPE LOCAL_CREDS LOCAL_CREDS_PERSISTENT LOCAL_PEERCRED SCM_CREDENTIALS SCM_CREDS SCM_CREDS2 SCM_J1939_DEST_ADDR SCM_J1939_DEST_NAME SCM_J1939_ERRQUEUE SCM_J1939_PRIO SCM_RIGHTS CAN_BCM CAN_BCM_CAN_FD_FRAME CAN_BCM_RX_ANNOUNCE_RESUME CAN_BCM_RX_CHANGED CAN_BCM_RX_CHECK_DLC CAN_BCM_RX_DELETE CAN_BCM_RX_FILTER_ID CAN_BCM_RX_NO_AUTOTIMER CAN_BCM_RX_READ CAN_BCM_RX_RTR_FRAME CAN_BCM_RX_SETUP CAN_BCM_RX_STATUS CAN_BCM_RX_TIMEOUT CAN_BCM_SETTIMER CAN_BCM_STARTTIMER CAN_BCM_TX_ANNOUNCE CAN_BCM_TX_COUNTEVT CAN_BCM_TX_CP_CAN_ID CAN_BCM_TX_DELETE CAN_BCM_TX_EXPIRED CAN_BCM_TX_READ CAN_BCM_TX_RESET_MULTI_IDX CAN_BCM_TX_SEND CAN_BCM_TX_SETUP CAN_BCM_TX_STATUS CAN_EFF_FLAG CAN_EFF_MASK CAN_ERR_FLAG CAN_ERR_MASK CAN_ISOTP CAN_J1939 CAN_RAW CAN_RAW_ERR_FILTER CAN_RAW_FD_FRAMES CAN_RAW_FILTER CAN_RAW_JOIN_FILTERS CAN_RAW_LOOPBACK CAN_RAW_RECV_OWN_MSGS CAN_RTR_FLAG CAN_SFF_MASK J1939_EE_INFO_NONE J1939_EE_INFO_TX_ABORT J1939_FILTER_MAX J1939_IDLE_ADDR J1939_MAX_UNICAST_ADDR J1939_NLA_BYTES_ACKED J1939_NLA_PAD J1939_NO_ADDR J1939_NO_NAME J1939_NO_PGN J1939_PGN_ADDRESS_CLAIMED J1939_PGN_ADDRESS_COMMANDED J1939_PGN_MAX J1939_PGN_PDU1_MAX J1939_PGN_REQUEST ETH_P_ALL ETHERTYPE_ARP ETHERTYPE_IP ETHERTYPE_IPV6 ETHERTYPE_VLAN UDPLITE_RECV_CSCOV UDPLITE_SEND_CSCOV TIPC_ADDR_ID TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE TIPC_DEST_DROPPABLE TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE TIPC_PUBLISHED TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_CANCEL TIPC_SUB_PORTS TIPC_SUB_SERVICE TIPC_TOP_SRV TIPC_WAIT_FOREVER TIPC_WITHDRAWN TIPC_ZONE_SCOPE VMADDR_CID_ANY VMADDR_CID_HOST VMADDR_PORT_ANY VM_SOCKETS_INVALID_VERSION POLLIN POLLPRI POLLOUT POLLERR POLLHUP POLLNVAL POLLRDNORM POLLRDBAND POLLWRNORM POLLWEBAND POLLMSG FD_READ FD_WRITE FD_ACCEPT FD_CONNECT FD_CLOSE WSA_WAIT_TIMEOUT WSA_WAIT_FAILED INFINITE FD_CONNECT_BIT FD_CLOSE_BIT WSA_IO_PENDING WSA_IO_INCOMPLETE WSA_INVALID_HANDLE WSA_INVALID_PARAMETER WSA_NOT_ENOUGH_MEMORY WSA_OPERATION_ABORTED WSA_FLAG_OVERLAPPED WSA_FLAG_NO_HANDLE_INHERIT SIO_RCVALL SIO_KEEPALIVE_VALS SIOCGIFNAME SIOCGIFINDEX SO_DOMAIN SO_PROTOCOL SO_PEERSEC SO_PASSSEC TCP_USER_TIMEOUT TCP_CONGESTION TCP_NOTSENT_LOWAT '''.split() for name in constant_names: setattr(CConfig, name, platform.DefinedConstantInteger(name)) if _WIN32: # some SDKs define these values with an enum, #ifdef won't work for name in ('RCVALL_ON', 'RCVALL_OFF', 'RCVALL_SOCKETLEVELONLY', 'TCP_FASTOPEN'): setattr(CConfig, name, platform.ConstantInteger(name)) constant_names.append(name) constants["BDADDR_ANY"] = "00:00:00:00:00:00" constants["BDADDR_LOCAL"] = "00:00:00:FF:FF:FF" constants_w_defaults = [('SOL_IP', 0), ('SOL_TCP', 6), ('SOL_UDP', 17), ('SOMAXCONN', 5), ('IPPROTO_IP', 6), ('IPPROTO_IPV6', 41), ('IPPROTO_ICMP', 1), ('IPPROTO_TCP', 6), ('IPPROTO_UDP', 17), ('IPPROTO_RAW', 255), ('IPPORT_RESERVED', 1024), ('IPPORT_USERRESERVED', 5000), ('INADDR_ANY', 0x00000000), ('INADDR_BROADCAST', 0xffffffff), ('INADDR_LOOPBACK', 0x7F000001), ('INADDR_UNSPEC_GROUP', 0xe0000000), ('INADDR_ALLHOSTS_GROUP', 0xe0000001), ('INADDR_MAX_LOCAL_GROUP', 0xe00000ff), ('INADDR_NONE', 0xffffffff), ('SHUT_RD', 0), ('SHUT_WR', 1), ('SHUT_RDWR', 2), ('POLLIN', 1), ('POLLPRI', 2), ('POLLOUT', 4), ('POLLERR', 8), ('POLLHUP', 16), ('FD_SETSIZE', 64), ] for name, default in constants_w_defaults: setattr(CConfig, name, platform.DefinedConstantInteger(name)) # types if _MSVC: socketfd_type = lltype.Unsigned else: socketfd_type = rffi.INT_real CConfig.uint16_t = platform.SimpleType('uint16_t', rffi.USHORT) CConfig.uint32_t = platform.SimpleType('uint32_t', rffi.UINT) CConfig.size_t = platform.SimpleType('size_t', rffi.INT) CConfig.ssize_t = platform.SimpleType('ssize_t', rffi.INT) CConfig.socklen_t = platform.SimpleType('socklen_t', rffi.UINT_real) sockaddr_ptr = lltype.Ptr(lltype.ForwardReference()) addrinfo_ptr = lltype.Ptr(lltype.ForwardReference()) # struct types CConfig.sockaddr = platform.Struct('struct sockaddr', [('sa_family', rffi.INT), ('sa_data', rffi.CFixedArray(rffi.CHAR, 1)), ]) CConfig.in_addr = platform.Struct('struct in_addr', [('s_addr', rffi.UINT)]) CConfig.in6_addr = platform.Struct('struct in6_addr', [('s6_addr', rffi.CFixedArray(rffi.CHAR, 16))]) CConfig.sockaddr_in = platform.Struct('struct sockaddr_in', [('sin_family', rffi.INT), ('sin_port', rffi.USHORT), ('sin_addr', CConfig.in_addr)]) CConfig.sockaddr_in6 = platform.Struct('struct sockaddr_in6', [('sin6_family', rffi.INT), ('sin6_port', rffi.USHORT), ('sin6_flowinfo', rffi.INT), ('sin6_addr', CConfig.in6_addr), ('sin6_scope_id', rffi.INT)]) CConfig.sockaddr_un = platform.Struct('struct sockaddr_un', [('sun_family', rffi.INT), ('sun_path', rffi.CFixedArray(rffi.CHAR, 1))], ifdef='AF_UNIX') CConfig.sockaddr_nl = platform.Struct('struct sockaddr_nl', [('nl_family', rffi.INT), ('nl_pid', rffi.INT), ('nl_groups', rffi.INT)], ifdef='AF_NETLINK') CConfig.sockaddr_alg = platform.Struct('struct sockaddr_alg', [('salg_family', rffi.INT), ('salg_type', rffi.CFixedArray(rffi.CHAR, 14)), ('salg_feat', rffi.SHORT), ('salg_mask', rffi.SHORT), ('salg_name', rffi.CFixedArray(rffi.CHAR, 64)), ], ifdef='AF_ALG') CConfig.sockaddr_qrtr = platform.Struct('struct sockaddr_qrtr', [('sq_family', rffi.INT), ('sq_node', rffi.INT), ('sq_port', rffi.INT), ], ifdef='AF_ALG') CConfig.addrinfo = platform.Struct('struct addrinfo', [('ai_flags', rffi.INT), ('ai_family', rffi.INT), ('ai_socktype', rffi.INT), ('ai_protocol', rffi.INT), ('ai_addrlen', rffi.INT), ('ai_addr', sockaddr_ptr), ('ai_canonname', CCHARP), ('ai_next', addrinfo_ptr)]) CConfig.hostent = platform.Struct('struct hostent', [('h_name', CCHARP), ('h_aliases', rffi.CCHARPP), ('h_addrtype', rffi.INT), ('h_length', rffi.INT), ('h_addr_list', rffi.CCHARPP), ]) CConfig.servent = platform.Struct('struct servent', [('s_name', CCHARP), ('s_port', rffi.INT), ('s_proto', CCHARP), ]) CConfig.protoent = platform.Struct('struct protoent', [('p_proto', rffi.INT), ]) CConfig.HAVE_ACCEPT4 = platform.Has('accept4') if _POSIX: CConfig.nfds_t = platform.SimpleType('nfds_t') CConfig.pollfd = platform.Struct('struct pollfd', [('fd', socketfd_type), ('events', rffi.SHORT), ('revents', rffi.SHORT)]) CConfig.if_nameindex_s = platform.Struct('struct if_nameindex', [('if_index', rffi.UINT), ('if_name', rffi.CCHARP)]) if _HAS_AF_PACKET: CConfig.sockaddr_ll = platform.Struct('struct sockaddr_ll', [('sll_family', rffi.INT), ('sll_ifindex', rffi.INT), ('sll_protocol', rffi.INT), ('sll_pkttype', rffi.INT), ('sll_hatype', rffi.INT), ('sll_addr', rffi.CFixedArray(rffi.UCHAR, 8)), ('sll_halen', rffi.INT)]) CConfig.ifreq = platform.Struct('struct ifreq', [('ifr_ifindex', rffi.INT), ('ifr_name', rffi.CFixedArray(rffi.CHAR, 8))]) else: CConfig.if_nameindex_s = rffi.CStruct('if_nameindex', ('if_index', rffi.UINT), ('if_name', rffi.CCHARP)) includes = [] separate_module_sources = [] post_include_bits = [] # insert handler for sendmsg / recvmsg here HAVE_SENDMSG = bool(_POSIX) if HAVE_SENDMSG: includes += ['stddef.h', 'sys/socket.h', 'unistd.h', 'string.h', 'stdlib.h', 'errno.h', 'limits.h', 'stdio.h', 'sys/types.h', 'netinet/in.h', 'arpa/inet.h'] separate_module_sources += [''' // special defines for returning from recvmsg #define BAD_MSG_SIZE_GIVEN -10000 #define BAD_ANC_SIZE_GIVEN -10001 #define MAL_ANC -10002 // special defines for returning from sendmsg #define MUL_MSGS_NOT_SUP -1000 #define ANC_DATA_TOO_LARGE -1001 #define ANC_DATA_TOO_LARGEX -1002 #if INT_MAX > 0x7fffffff #define SOCKLEN_T_LIMIT 0x7fffffff #else #define SOCKLEN_T_LIMIT INT_MAX #endif // ######################################################################### // Recvmsg implementation and associated functions // Taken from CPython. Determines the minimum memory space required for the ancillary data. #ifdef CMSG_SPACE static int cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) { size_t cmsg_offset; static const size_t cmsg_len_end = (offsetof(struct cmsghdr, cmsg_len) + sizeof(cmsgh->cmsg_len)); /* Note that POSIX allows msg_controllen to be of signed type. */ if (cmsgh == NULL || msg->msg_control == NULL) return 0; /* Note that POSIX allows msg_controllen to be of a signed type. This is annoying under OS X as it's unsigned there and so it triggers a tautological comparison warning under Clang when compared against 0. Since the check is valid on other platforms, silence the warning under Clang. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif if (msg->msg_controllen < 0) return 0; #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic pop Output exceeded 6164480 bytes, remaining output has been truncated program finished with exit code 1 elapsedTime=1461.784508