<div dir="ltr"><div>Hello,</div><div><br></div><div>I spent quite some hours debugging this on a ppc64le virtual machine.</div><div><br></div><div>tldr; it's a rare case in SDL1 on ppc64le, and I've skipped those tests on this architecture for SDL1. Additionally there is a work around for users of this architecture (don't do self blits, make a copy first).<br></div><div><a href="https://github.com/pygame/pygame/pull/391/commits/9601fd1a2d1d359b811943d5d123096fabfad1a0">https://github.com/pygame/pygame/pull/391/commits/9601fd1a2d1d359b811943d5d123096fabfad1a0</a><br></div><div><br></div><div>best,<br></div><div><br></div><div><br></div><div><a href="https://github.com/pygame/pygame/issues/370#issuecomment-364625291">https://github.com/pygame/pygame/issues/370#issuecomment-364625291</a><br></div><div><br></div><div>It looks like these fail inside SDL_BlitSurface.</div><br>Inside surface.c, this part... (line 3084 currently)<br><br>            src = SDL_ConvertSurface (src, &newfmt, SDL_SWSURFACE);<br>            if (src) {<br>                result = SDL_BlitSurface (src, srcrect, dst, dstrect);<br>                SDL_FreeSurface (src);<br>            }<br>If in the test, I add something like this around test/surface_test.py:2314<br><br>    comp.blit(tmp.copy(), (0, 0))<br>It avoids the self blit error... but is still slightly wrong color value (off by one in r). And of course, avoiding the self-blit is avoiding the whole point of the test.<br><br>It's sort of a quite rare case, of needing to do a self blit using a palette. That combined with the very low chance of updates for SDL1 on ppc64le(upstream moved on years ago), I've skiped these tests on ppc64le inside pygame on SDL1.<br><br><br><br>On Wed, 26 Apr 2017 10:49:21 -0400 "Aaron M. Ucko" <<a href="mailto:ucko@debian.org">ucko@debian.org</a>> wrote:<br>> Source: pygame<br>> Version: 1.9.1release+dfsg-10+b2<br>> Severity: serious<br>> Justification: fails to build from source (but built successfully in the past)<br>> <br>> The ppc64el build of pygame failed:<br>> <br>>   ======================================================================<br>>   FAIL: test_save_colorkey (pygame.tests.image_test.ImageModuleTest)<br>>   make sure the color key is not changed when saving.<br>>   ----------------------------------------------------------------------<br>>   Traceback (most recent call last):<br>>     File "/<<BUILDDIR>>/pygame-1.9.3+dfsg/.pybuild/pythonX.Y_2.7/build/pygame/tests/image_test.py", line 283, in test_save_colorkey<br>>       self.assertEqual(p1, s2.get_at((0,0)))<br>>   AssertionError: (23, 23, 23, 255) != (23, 23, 255, 23)<br>>   <br>>   ======================================================================<br>>   FAIL: test_cross (pygame.tests.math_test.Vector2TypeTest)<br>>   [as per #861249]<br>>   <br>>   ======================================================================<br>>   FAIL: test_blanket_alpha (pygame.tests.surface_test.SurfaceSelfBlitTest)<br>>   ----------------------------------------------------------------------<br>>   Traceback (most recent call last):<br>>     File "/<<BUILDDIR>>/pygame-1.9.3+dfsg/.pybuild/pythonX.Y_2.7/build/pygame/tests/surface_test.py", line 2331, in test_blanket_alpha<br>>       self._assert_same(surf, comp)<br>>     File "/<<BUILDDIR>>/pygame-1.9.3+dfsg/.pybuild/pythonX.Y_2.7/build/pygame/tests/surface_test.py", line 2252, in _assert_same<br>>       a.get_bitsize())))<br>>   AssertionError: (255, 0, 0, 255) != (0, 255, 170, 255), bpp: 8<br>>   <br>>   ======================================================================<br>>   FAIL: test_colorkey (pygame.tests.surface_test.SurfaceSelfBlitTest)<br>>   ----------------------------------------------------------------------<br>>   Traceback (most recent call last):<br>>     File "/<<BUILDDIR>>/pygame-1.9.3+dfsg/.pybuild/pythonX.Y_2.7/build/pygame/tests/surface_test.py", line 2311, in test_colorkey<br>>       self._assert_same(surf, comp)<br>>     File "/<<BUILDDIR>>/pygame-1.9.3+dfsg/.pybuild/pythonX.Y_2.7/build/pygame/tests/surface_test.py", line 2252, in _assert_same<br>>       a.get_bitsize())))<br>>   AssertionError: (255, 0, 0, 255) != (0, 255, 0, 255), bpp: 8<br>> <br>> Could you please take a look?<br>> <br>> Thanks!<br>> <br>> -- System Information:<br>> Debian Release: 9.0<br>>   APT prefers testing<br>>   APT policy: (500, 'testing'), (500, 'stable'), (300, 'unstable')<br>> Architecture: amd64<br>>  (x86_64)<br>> Foreign Architectures: i386, x32<br>> <br>> Kernel: Linux 4.9.0-2-amd64 (SMP w/4 CPU cores)<br>> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)<br>> Shell: /bin/sh linked to /bin/dash<br>> Init: systemd (via /run/systemd/system)<br>> <br>> <br></div>