Repository navigation
Test suite fails 16 tests on hppa #3927
Description
Activity
When activating truetype I get 3 additional failures:
Tests/test_imagefont.py::TestImageFont::test_variation_get FAILED
Tests/test_imagefont.py::TestImageFont::test_variation_set_by_axes FAILED
Tests/test_imagefont.py::TestImageFont::test_variation_set_by_name FAILED- addedPlatformA catchall for platform-relatedA catchall for platform-related
on Jul 1, 2019 As mentioned in the comments to #3225: this also happens on sparc (also big endian).
A subset of these tests fail also on ppc32 (Big Endian):
Tests/test_file_libtiff.py::TestFileLibTiff::test_old_style_jpeg FAILED
Tests/test_file_libtiff.py::TestFileLibTiff::test_strip_ycbcr_jpeg_1x1_sampling FAILED
Tests/test_file_libtiff.py::TestFileLibTiff::test_strip_ycbcr_jpeg_2x2_sampling FAILED
Tests/test_file_libtiff.py::TestFileLibTiff::test_tiled_ycbcr_jpeg_1x1_sampling FAILED
Tests/test_file_libtiff.py::TestFileLibTiff::test_tiled_ycbcr_jpeg_2x2_sampling FAILED
Tests/test_file_png.py::TestFilePng::test_sanity FAILED
Tests/test_image_getextrema.py::TestImageGetExtrema::test_extrema FAILED
Tests/test_image_getextrema.py::TestImageGetExtrema::test_true_16 FAILEDIn addition to that the following tests fail on ppc32 (Big Endian):
Tests/test_file_jpeg2k.py::TestFileJpeg2k::test_16bit_monochrome_j2k_like_tiff FAILED
Tests/test_file_jpeg2k.py::TestFileJpeg2k::test_16bit_monochrome_jp2_like_tiff FAILED
Tests/test_file_webp_animated.py::TestFileWebpAnimation::test_write_animation_L FAILED
Tests/test_file_webp_animated.py::TestFileWebpAnimation::test_write_animation_RGB FAILEDTwo of them already filed in bug #3290 and in bug #3291.
pillow-6.1.0:20190816-234305.logFor the comment from @ernsteiswuerfel
- test_file_libtiff.py should have been fixed by Add support for reading TIFFs with PlanarConfiguration=2 #5364
- test_file_png.py and test_file_jpeg2k.py should have been fixed by Improved I;16 operations on big endian #5901
- test_image_getextrema.py should have been fixed by Fixed endian handling for I;16 getextrema #4457
- test_file_webp_animated.py is listed as part of Big-endian test failures on IBM Z #4213
@DerDakon does #3243 (comment) also mean that your problems here are fixed, including the test_imagefont.py tests?
Edit: Looking for a cause, I suspect it was #4696 that changed the test_imagefont results.
Just ran the testsuite for 9.9.0 on ppc32 which now says:
[...] XFAIL Tests/test_decompression_bomb.py::TestDecompressionBomb::test_exception_ico different exception XFAIL Tests/test_file_webp_animated.py::test_write_animation_L Fails on big-endian XFAIL Tests/test_file_webp_animated.py::test_write_animation_RGB Fails on big-endian XFAIL Tests/test_image_resample.py::TestCoreResampleAlphaCorrect::test_levels_rgba Current implementation isn't precise enough XFAIL Tests/test_image_resample.py::TestCoreResampleAlphaCorrect::test_levels_la Current implementation isn't precise enough XPASS Tests/test_file_palm.py::test_p_mode Palm P image is wrong FAILED Tests/test_image.py::TestImage::test_zero_tobytes[size0] - SystemError: tile cannot extend out... FAILED Tests/test_image.py::TestImage::test_zero_tobytes[size1] - SystemError: tile cannot extend out... FAILED Tests/test_image.py::TestImage::test_zero_tobytes[size2] - SystemError: tile cannot extend out... FAILED Tests/test_imagepath.py::test_invalid_coords - SystemError: new style getargs format but argum... ====== 4 failed, 2653 passed, 223 skipped, 5 xfailed, 1 xpassed, 5 warnings in 172.01s (0:02:52) =======So my originally reported failures for ppc32 are fixed or the tests get skipped where appropriate.
Current failures are:
__________________________________ TestImage.test_zero_tobytes[size0] __________________________________ self = <Tests.test_image.TestImage object at 0xf0d37730>, size = (1, 0) @pytest.mark.parametrize("size", ((1, 0), (0, 1), (0, 0))) def test_zero_tobytes(self, size): im = Image.new("RGB", size) > assert im.tobytes() == b"" Tests/test_image.py:792: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <PIL.Image.Image image mode=RGB size=1x0 at 0xF0D37C40>, encoder_name = 'raw', args = 'RGB' e = <ImagingEncoder object at 0xf043ba40> def tobytes(self, encoder_name="raw", *args): """ Return image as a bytes object. .. warning:: This method returns the raw image data from the internal storage. For compressed image data (e.g. PNG, JPEG) use :meth:`~.save`, with a BytesIO parameter for in-memory data. :param encoder_name: What encoder to use. The default is to use the standard "raw" encoder. :param args: Extra arguments to the encoder. :returns: A :py:class:`bytes` object. """ # may pass tuple instead of argument list if len(args) == 1 and isinstance(args[0], tuple): args = args[0] if encoder_name == "raw" and args == (): args = self.mode self.load() # unpack data e = _getencoder(self.mode, encoder_name, args) > e.setimage(self.im) E SystemError: tile cannot extend outside image ../.local/lib/python3.10/site-packages/PIL/Image.py:722: SystemError __________________________________ TestImage.test_zero_tobytes[size1] __________________________________ self = <Tests.test_image.TestImage object at 0xf107fd90>, size = (0, 1) @pytest.mark.parametrize("size", ((1, 0), (0, 1), (0, 0))) def test_zero_tobytes(self, size): im = Image.new("RGB", size) > assert im.tobytes() == b"" Tests/test_image.py:792: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <PIL.Image.Image image mode=RGB size=0x1 at 0xF107F520>, encoder_name = 'raw', args = 'RGB' e = <ImagingEncoder object at 0xf043b7a0> def tobytes(self, encoder_name="raw", *args): """ Return image as a bytes object. .. warning:: This method returns the raw image data from the internal storage. For compressed image data (e.g. PNG, JPEG) use :meth:`~.save`, with a BytesIO parameter for in-memory data. :param encoder_name: What encoder to use. The default is to use the standard "raw" encoder. :param args: Extra arguments to the encoder. :returns: A :py:class:`bytes` object. """ # may pass tuple instead of argument list if len(args) == 1 and isinstance(args[0], tuple): args = args[0] if encoder_name == "raw" and args == (): args = self.mode self.load() # unpack data e = _getencoder(self.mode, encoder_name, args) > e.setimage(self.im) E SystemError: tile cannot extend outside image ../.local/lib/python3.10/site-packages/PIL/Image.py:722: SystemError __________________________________ TestImage.test_zero_tobytes[size2] __________________________________ self = <Tests.test_image.TestImage object at 0xf107f310>, size = (0, 0) @pytest.mark.parametrize("size", ((1, 0), (0, 1), (0, 0))) def test_zero_tobytes(self, size): im = Image.new("RGB", size) > assert im.tobytes() == b"" Tests/test_image.py:792: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <PIL.Image.Image image mode=RGB size=0x0 at 0xF107F940>, encoder_name = 'raw', args = 'RGB' e = <ImagingEncoder object at 0xf043bb00> def tobytes(self, encoder_name="raw", *args): """ Return image as a bytes object. .. warning:: This method returns the raw image data from the internal storage. For compressed image data (e.g. PNG, JPEG) use :meth:`~.save`, with a BytesIO parameter for in-memory data. :param encoder_name: What encoder to use. The default is to use the standard "raw" encoder. :param args: Extra arguments to the encoder. :returns: A :py:class:`bytes` object. """ # may pass tuple instead of argument list if len(args) == 1 and isinstance(args[0], tuple): args = args[0] if encoder_name == "raw" and args == (): args = self.mode self.load() # unpack data e = _getencoder(self.mode, encoder_name, args) > e.setimage(self.im) E SystemError: tile cannot extend outside image ../.local/lib/python3.10/site-packages/PIL/Image.py:722: SystemError _________________________________________ test_invalid_coords __________________________________________ def test_invalid_coords(): # Arrange coords = ["a", "b"] # Act / Assert with pytest.raises(ValueError) as e: > ImagePath.Path(coords) E SystemError: new style getargs format but argument is not a tuple Tests/test_imagepath.py:74: SystemErrorErm yes... you are correct! My fault. With 9.0.0 branch I get 2654 passed, 222 skipped, 5 xfailed, 1 xpassed, 5 warnings
Thanks for fixing these 'alternative arch' bugs!
Reacted by Andrew Murray and Sam JamesThe webp test failures were actually due to problems in libwebp itself, not Pillow. libwebp 1.2.2 has resolved these, and #5984 will remove the xfail conditions on those two tests.
Reacted by Sam James
What did you do?
Built and run Pillow master (290cd17) on Gentoo/HPPA (big endian!) and ran the test suite:
What actually happened?
Tests/test_file_gif.py::TestFileGif::test_extents FAILED
Tests/test_file_ico.py::TestFileIco::test_unexpected_size FAILED
Tests/test_file_jpeg.py::TestFileJpeg::test_photoshop FAILED
Tests/test_file_libtiff.py::TestFileLibTiff::test_16bit_RGB_tiff FAILED
Tests/test_file_libtiff.py::TestFileLibTiff::test_old_style_jpeg FAILED
Tests/test_file_libtiff.py::TestFileLibTiff::test_strip_cmyk_16l_jpeg FAILED
Tests/test_file_libtiff.py::TestFileLibTiff::test_strip_ycbcr_jpeg_1x1_sampling FAILED
Tests/test_file_libtiff.py::TestFileLibTiff::test_strip_ycbcr_jpeg_2x2_sampling FAILED
Tests/test_file_libtiff.py::TestFileLibTiff::test_tiled_ycbcr_jpeg_1x1_sampling FAILED
Tests/test_file_libtiff.py::TestFileLibTiff::test_tiled_ycbcr_jpeg_2x2_sampling FAILED
Tests/test_file_png.py::TestFilePng::test_sanity FAILED
Tests/test_image_getextrema.py::TestImageGetExtrema::test_extrema FAILED
Tests/test_image_getextrema.py::TestImageGetExtrema::test_true_16 FAILED
Tests/test_imagedraw.py::TestImageDraw::test_arc_width_pieslice_large FAILED
Tests/test_imagedraw.py::TestImageDraw::test_ellipse_width_large FAILED
Tests/test_imagedraw.py::TestImageDraw::test_rectangle_I16 FAILED
Not all of those are regressions, here is the fail list for 6.0.0:
Tests/test_file_libtiff.py::TestFileLibTiff::test_old_style_jpeg FAILED
Tests/test_file_libtiff.py::TestFileLibTiff::test_strip_ycbcr_jpeg_1x1_sampling FAILED
Tests/test_file_libtiff.py::TestFileLibTiff::test_strip_ycbcr_jpeg_2x2_sampling FAILED
Tests/test_file_libtiff.py::TestFileLibTiff::test_tiled_ycbcr_jpeg_1x1_sampling FAILED
Tests/test_file_libtiff.py::TestFileLibTiff::test_tiled_ycbcr_jpeg_2x2_sampling FAILED
Tests/test_file_png.py::TestFilePng::test_sanity FAILED
Tests/test_image_getextrema.py::TestImageGetExtrema::test_extrema FAILED
Tests/test_image_getextrema.py::TestImageGetExtrema::test_true_16 FAILED
What are your OS, Python and Pillow versions?
pillow-6.1.0.log