pixman: Branch 'master'

Pekka Paalanen pq at kemper.freedesktop.org
Mon Jun 1 03:12:24 PDT 2015


 test/solid-test.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 62a772f2ea9ec14b0240c0cc62e174ffa98ee2cc
Author: Ben Avison <bavison at riscosopen.org>
Date:   Fri May 29 16:20:43 2015 +0100

    test: Fix solid-test for big-endian targets
    
    When generating test data, we need to make sure the interpretation of
    the data is the same regardless of endianess. That is, the pixel value
    for each channel is the same on both little and big-endians.
    
    This fixes a test failure on ppc64 (big-endian).
    
    Tested-by: Fernando Seiti Furusato <ferseiti at linux.vnet.ibm.com> (ppc64le, ppc64, powerpc)
    Tested-by: Ben Avison <bavison at riscosopen.org> (armv6l, armv7l, i686)
    [Pekka: added commit message]
    Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
    Tested-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk> (x86_64)

diff --git a/test/solid-test.c b/test/solid-test.c
index 7be5466..c6ea397 100644
--- a/test/solid-test.c
+++ b/test/solid-test.c
@@ -237,7 +237,7 @@ create_solid_image (const pixman_format_code_t *allowed_formats,
         pixman_image_unref (dummy_img);
 
         /* Now set the bitmap contents to a random value */
-        *buffer = prng_rand ();
+        prng_randmemset (buffer, 4, 0);
         image_endian_swap (img);
 
         if (used_fmt)
@@ -251,7 +251,10 @@ create_solid_image (const pixman_format_code_t *allowed_formats,
         pixman_color_t color;
         pixman_image_t *img;
 
-        prng_randmemset (&color, sizeof color, 0);
+        color.alpha = prng_rand_n (UINT16_MAX + 1);
+        color.red   = prng_rand_n (UINT16_MAX + 1);
+        color.green = prng_rand_n (UINT16_MAX + 1);
+        color.blue  = prng_rand_n (UINT16_MAX + 1);
         img = pixman_image_create_solid_fill (&color);
 
         if (used_fmt)
@@ -345,6 +348,6 @@ main (int argc, const char *argv[])
     }
 
     return fuzzer_test_main ("solid", 500000,
-			     0x1B6DFF8D,
+                             0xC30FD380,
 			     test_solid, argc, argv);
 }


More information about the xorg-commit mailing list