[Pixman] [RFC PATCH] solid-test: Allow for big-endian targets

Ben Avison bavison at riscosopen.org
Tue May 26 11:16:32 PDT 2015


---
Hi Fernando,

solid-test is a very new test, and you're quite possibly the first person
to try it on any big-endian machine. Can you try this variation and see if
it helps please?

Thanks,
Ben

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

diff --git a/test/solid-test.c b/test/solid-test.c
index 7be5466..fd95e1f 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);
+        color.red   = prng_rand_n (UINT16_MAX);
+        color.green = prng_rand_n (UINT16_MAX);
+        color.blue  = prng_rand_n (UINT16_MAX);
         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,
+                             0xFD523DB8,
 			     test_solid, argc, argv);
 }
-- 
1.7.5.4



More information about the Pixman mailing list