Bug 34767 - pixman composite-traps-test fails on a big endian system
Summary: pixman composite-traps-test fails on a big endian system
Status: RESOLVED FIXED
Alias: None
Product: pixman
Classification: Unclassified
Component: pixman (show other bugs)
Version: git master
Hardware: PowerPC Linux (All)
: medium normal
Assignee: Søren Sandmann Pedersen
QA Contact: Søren Sandmann Pedersen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-26 08:18 UTC by Siarhei Siamashka
Modified: 2011-03-12 12:08 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Siarhei Siamashka 2011-02-26 08:18:17 UTC
make  check-TESTS
make[2]: Entering directory `/root/20110226/pixman/test'
PASS: a1-trap-test
PASS: pdf-op-test
PASS: region-test
PASS: region-translate-test
PASS: fetch-test
PASS: oob-test
PASS: trap-crasher
PASS: alpha-loop
PASS: scaling-crash-test
PASS: gradient-crash-test
PASS: alphamap
PASS: stress-test
composite traps test failed! (checksum=B3DEF6E2, expected A34F95C7)
FAIL: composite-traps-test
blitters test passed (checksum=1DB8BDF8)
PASS: blitters-test
scaling test passed (checksum=80DF1CB2)
PASS: scaling-test
affine test passed (checksum=4B5D1852)
PASS: affine-test
PASS: composite
=============================================
1 of 17 tests failed
Please report to pixman@lists.freedesktop.org
=============================================
make[2]: *** [check-TESTS] Error 1
make[2]: Leaving directory `/root/20110226/pixman/test'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/root/20110226/pixman/test'
make: *** [check-recursive] Error 1

ps3 pixman # gcc -v
Using built-in specs.
COLLECT_GCC=/usr/powerpc-unknown-linux-gnu/gcc-bin/4.5.2/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/powerpc-unknown-linux-gnu/4.5.2/lto-wrapper
Target: powerpc-unknown-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.5.2/work/gcc-4.5.2/configure --prefix=/usr --bindir=/usr/powerpc-unknown-linux-gnu/gcc-bin/4.5.2 --includedir=/usr/lib/gcc/powerpc-unknown-linux-gnu/4.5.2/include --datadir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/4.5.2 --mandir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/4.5.2/man --infodir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/4.5.2/info --with-gxx-include-dir=/usr/lib/gcc/powerpc-unknown-linux-gnu/4.5.2/include/g++-v4 --host=powerpc-unknown-linux-gnu --build=powerpc-unknown-linux-gnu --enable-altivec --disable-fixed-point --without-ppl --without-cloog --disable-lto --enable-nls --without-included-gettext --with-system-zlib --disable-werror --enable-secureplt --disable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --enable-cld --with-python-dir=/share/gcc-data/powerpc-unknown-linux-gnu/4.5.2/python --enable-checking=release --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.5.2 p1.0, pie-0.4.5'
Thread model: posix
gcc version 4.5.2 (Gentoo 4.5.2 p1.0, pie-0.4.5)

ps3 pixman # uname -a
Linux ps3 2.6.35-gentoo-r15 #1 SMP Sun Dec 19 03:27:04 Local time zone must be set--see zic  ppc64 Cell Broadband Engine, altivec supported GNU/Linux
Comment 1 Søren Sandmann Pedersen 2011-03-01 11:18:00 UTC
Do you know if _all_ the test cases are different from little-endian, or if it is only particular ones?

Unfortunately, I don't have access to a big-endian system at the moment.
Comment 2 Siarhei Siamashka 2011-03-02 05:08:15 UTC
I only accidentally noticed this issue when doing some other tests and did not investigate it yet. OK, I'll have a look at it a bit later.
Comment 3 Søren Sandmann Pedersen 2011-03-04 12:41:56 UTC
I have access to a big-endian system now, so I'll look into this issue myself.
Comment 4 Søren Sandmann Pedersen 2011-03-04 13:04:06 UTC
The patch below is certainly part of the fix, but there is still something wrong when 1 and 4 bit images are involved.

diff --git a/test/composite-traps-test.c b/test/composite-traps-test.c
index 8f32778..0e4a06e 100644
--- a/test/composite-traps-test.c
+++ b/test/composite-traps-test.c
@@ -139,6 +139,8 @@ test_composite (int      testnum,
            pixman_image_set_source_clipping (src_img, 1);
            pixman_region_fini (&clip);
        }
+
+       image_endian_swap (src_img, src_bpp * 8);
     }
 
     /* Create destination image */
@@ -157,6 +159,8 @@ test_composite (int      testnum,
        
        dst_img = pixman_image_create_bits (
            dst_format, dst_width, dst_height, dst_bits, dst_stride);
+
+       image_endian_swap (dst_img, dst_bpp * 8);
     }
 
     /* Create traps */
Comment 5 Søren Sandmann Pedersen 2011-03-07 11:09:31 UTC
The problem was that this:

    src_bpp * 8

doesn't work when bits-per-pixel is less than 8. I have sent some fixes to the list:

    http://lists.freedesktop.org/archives/pixman/2011-March/001113.html
    http://lists.freedesktop.org/archives/pixman/2011-March/001114.html
Comment 6 Søren Sandmann Pedersen 2011-03-12 12:08:38 UTC
Fixed in master


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.