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@linux.vnet.ibm.com> (ppc64le, ppc64, powerpc)
Tested-by: Ben Avison <bavison@riscosopen.org> (armv6l, armv7l, i686)
[Pekka: added commit message]
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> (x86_64)
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)
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)
}
return fuzzer_test_main ("solid", 500000,
- 0x1B6DFF8D,
+ 0xC30FD380,
test_solid, argc, argv);
}