Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

various test failures on 32 bit x86 Alpine linux #3620

Closed
ncopa opened this issue May 19, 2020 · 6 comments
Closed

various test failures on 32 bit x86 Alpine linux #3620

ncopa opened this issue May 19, 2020 · 6 comments

Comments

@ncopa
Copy link

ncopa commented May 19, 2020

cython 0.29.18 introduces various test failures on 32bit x86 on Alpine Linux:

FAIL: unpacked_struct_with_arrays (buffmt.__test__)                                                                     
Doctest: buffmt.__test__.unpacked_struct_with_arrays                                                                    
----------------------------------------------------------------------                                                  
Traceback (most recent call last):                                                                                      
  File "/usr/lib/python3.8/doctest.py", line 2204, in runTest                                                           
    raise self.failureException(self.format_failure(new.getvalue()))                                                    
AssertionError: Failed doctest test for buffmt.__test__.unpacked_struct_with_arrays                                     
  File "/home/ncopa/aports/main/cython/src/cython-0.29.18/TEST_TMP/buffers/c/buffmt/buffmt.cpython-38-i386-linux-gnu.so"
, line unknown line number, in unpacked_struct_with_arrays                                                              
                                                                                                                        
----------------------------------------------------------------------                                                  
File "/home/ncopa/aports/main/cython/src/cython-0.29.18/TEST_TMP/buffers/c/buffmt/buffmt.cpython-38-i386-linux-gnu.so", 
line ?, in buffmt.__test__.unpacked_struct_with_arrays                                                                  
Failed example:                                                                                                         
    unpacked_struct_with_arrays("T{i:a:(8)f:b:f:c:Q:d:(5)i:e:i:f:i:g:xxxx(4)d:h:i:i:}")                                 
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python3.8/doctest.py", line 1336, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest buffmt.__test__.unpacked_struct_with_arrays[0]>", line 1, in <module>
        unpacked_struct_with_arrays("T{i:a:(8)f:b:f:c:Q:d:(5)i:e:i:f:i:g:xxxx(4)d:h:i:i:}")
      File "tests/buffers/buffmt.pyx", line 448, in buffmt.unpacked_struct_with_arrays (buffmt.c:5361)
        cdef object[UnpackedStructWithArrays] buf = MockBuffer(
    ValueError: Buffer dtype mismatch; next field is at offset 80 but 76 expected


======================================================================
FAIL: unpacked_struct_with_arrays (buffmt)
Doctest: buffmt.unpacked_struct_with_arrays
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/doctest.py", line 2204, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for buffmt.unpacked_struct_with_arrays
  File "/home/ncopa/aports/main/cython/src/cython-0.29.18/TEST_TMP/buffers/c/buffmt/buffmt.cpython-38-i386-linux-gnu.so"
, line unknown line number, in unpacked_struct_with_arrays

----------------------------------------------------------------------
File "/home/ncopa/aports/main/cython/src/cython-0.29.18/TEST_TMP/buffers/c/buffmt/buffmt.cpython-38-i386-linux-gnu.so", 
line ?, in buffmt.unpacked_struct_with_arrays
Failed example:
    unpacked_struct_with_arrays("T{i:a:(8)f:b:f:c:Q:d:(5)i:e:i:f:i:g:xxxx(4)d:h:i:i:}")
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python3.8/doctest.py", line 1336, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest buffmt.unpacked_struct_with_arrays[0]>", line 1, in <module>
        unpacked_struct_with_arrays("T{i:a:(8)f:b:f:c:Q:d:(5)i:e:i:f:i:g:xxxx(4)d:h:i:i:}")
      File "tests/buffers/buffmt.pyx", line 448, in buffmt.unpacked_struct_with_arrays (buffmt.c:5361)
        cdef object[UnpackedStructWithArrays] buf = MockBuffer(
    ValueError: Buffer dtype mismatch; next field is at offset 80 but 76 expected


======================================================================
FAIL: unpacked_struct_with_arrays (buffmt.__test__)
Doctest: buffmt.__test__.unpacked_struct_with_arrays
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/doctest.py", line 2204, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for buffmt.__test__.unpacked_struct_with_arrays
  File "/home/ncopa/aports/main/cython/src/cython-0.29.18/TEST_TMP/buffers/cpp/buffmt/buffmt.cpython-38-i386-linux-gnu.s
o", line unknown line number, in unpacked_struct_with_arrays 

----------------------------------------------------------------------
File "/home/ncopa/aports/main/cython/src/cython-0.29.18/TEST_TMP/buffers/cpp/buffmt/buffmt.cpython-38-i386-linux-gnu.so"
, line ?, in buffmt.__test__.unpacked_struct_with_arrays
Failed example:
    unpacked_struct_with_arrays("T{i:a:(8)f:b:f:c:Q:d:(5)i:e:i:f:i:g:xxxx(4)d:h:i:i:}")
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python3.8/doctest.py", line 1336, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest buffmt.__test__.unpacked_struct_with_arrays[0]>", line 1, in <module>
        unpacked_struct_with_arrays("T{i:a:(8)f:b:f:c:Q:d:(5)i:e:i:f:i:g:xxxx(4)d:h:i:i:}")
      File "tests/buffers/buffmt.pyx", line 448, in buffmt.unpacked_struct_with_arrays (buffmt.cpp:5375)
        cdef object[UnpackedStructWithArrays] buf = MockBuffer(
    ValueError: Buffer dtype mismatch; next field is at offset 80 but 76 expected


======================================================================
FAIL: unpacked_struct_with_arrays (buffmt)
Doctest: buffmt.unpacked_struct_with_arrays
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/doctest.py", line 2204, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for buffmt.unpacked_struct_with_arrays
  File "/home/ncopa/aports/main/cython/src/cython-0.29.18/TEST_TMP/buffers/cpp/buffmt/buffmt.cpython-38-i386-linux-gnu.s
o", line unknown line number, in unpacked_struct_with_arrays 

----------------------------------------------------------------------
File "/home/ncopa/aports/main/cython/src/cython-0.29.18/TEST_TMP/buffers/cpp/buffmt/buffmt.cpython-38-i386-linux-gnu.so"
, line ?, in buffmt.unpacked_struct_with_arrays
Failed example:
    unpacked_struct_with_arrays("T{i:a:(8)f:b:f:c:Q:d:(5)i:e:i:f:i:g:xxxx(4)d:h:i:i:}")
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python3.8/doctest.py", line 1336, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest buffmt.unpacked_struct_with_arrays[0]>", line 1, in <module>
        unpacked_struct_with_arrays("T{i:a:(8)f:b:f:c:Q:d:(5)i:e:i:f:i:g:xxxx(4)d:h:i:i:}")
      File "tests/buffers/buffmt.pyx", line 448, in buffmt.unpacked_struct_with_arrays (buffmt.cpp:5375)
        cdef object[UnpackedStructWithArrays] buf = MockBuffer(
    ValueError: Buffer dtype mismatch; next field is at offset 80 but 76 expected


----------------------------------------------------------------------
Ran 11873 tests in 6798.719s

FAILED (failures=4, skipped=34)

this does not happen on x86_64.

@scoder
Copy link
Contributor

scoder commented May 19, 2020

Thanks for the report. This is due to #3562 and AFAICT, should only be a non-portable test assumption and not wrong code being generated.

@smutch I think we need to revise this test, again.

@smutch
Copy link
Contributor

smutch commented May 20, 2020

Sorry this has crept up. I've just issued a PR to try and address the failures.

Unfortunately I don't have access to a 32bit OS to test this on. I attempted to use an i386 (32 bit) Alpine linux docker image but was unable to get things running, at least with miniconda. @ncopa do you have a Dockerfile that you would be willing to share which would allow me to test the fix?

@ncopa
Copy link
Author

ncopa commented May 20, 2020

Paste this into your console:

cat >Dockerfile <<EOF
FROM i386/alpine:edge

ENV pkgver=0.29.18

RUN apk upgrade -U -a \
	&& apk add py3-setuptools python3-dev build-base

RUN mkdir /src \
	&& cd /src \
	&& wget https://github.com/cython/cython/archive/\$pkgver.tar.gz \
	&& tar -zxf \$pkgver.tar.gz
RUN cd /src/cython-\$pkgver \
	&& linux32 python3 setup.py build
EOF
docker build -t cython3620 .
docker run --rm -it cython3620 sh -c "cd /src/cython-0.29.18 && PYTHON=python3 linux32 make test"

@ncopa
Copy link
Author

ncopa commented May 20, 2020

Is there some way i can re-run only the failing tests?
I could test #3621

@ncopa
Copy link
Author

ncopa commented May 20, 2020

Is there some way i can re-run only the failing tests?
I could test #3621

I think I figured it out: make test TESTOPTS=buffmt PYTHON=python3

@scoder
Copy link
Contributor

scoder commented May 20, 2020

Resolved in #3621.

@scoder scoder closed this as completed May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants