aboutsummaryrefslogtreecommitdiff
path: root/pixman/test
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-10-16 11:23:27 +0200
committermarha <marha@users.sourceforge.net>2013-10-16 11:23:27 +0200
commit9e23b44bfe1e6e85231b1c07d945cadf0c868648 (patch)
tree0bd2b4d0521570bf020452591c895b90bda51095 /pixman/test
parent81fd17c8678e89cea6610b8b2996b028b21eb5dc (diff)
downloadvcxsrv-9e23b44bfe1e6e85231b1c07d945cadf0c868648.tar.gz
vcxsrv-9e23b44bfe1e6e85231b1c07d945cadf0c868648.tar.bz2
vcxsrv-9e23b44bfe1e6e85231b1c07d945cadf0c868648.zip
fontconfig libxcb libxcb/xcb-proto xserver mesa pixman xkbcomp git update 16 oct 2013
xserver commit 7cf1b595c8c8f9776a39559d2878cf90af3f2859 libxcb commit e4e0c6eec861f4c69da12060dc8dbe7a63fa5eb6 libxcb/xcb-proto commit 55c75accecf0e76d2aa38656efd2be4044b9e643 xkbcomp commit 839ccda42d8b088d94324cd77c4be954859914d3 pixman commit 9e81419ed5c0ee490ddacf7bada516a25cae87eb fontconfig commit 5406919c5e186f74ccdade1a65344ce7b5c56a64 mesa commit 6e444a72c1f9e4446e025b8cb780523cb89f0584
Diffstat (limited to 'pixman/test')
-rw-r--r--pixman/test/Makefile.win326
-rw-r--r--pixman/test/blitters-test.c2
-rw-r--r--pixman/test/thread-test.c17
-rw-r--r--pixman/test/utils.h5
4 files changed, 19 insertions, 11 deletions
diff --git a/pixman/test/Makefile.win32 b/pixman/test/Makefile.win32
index b6254a3cf..6cfb4a780 100644
--- a/pixman/test/Makefile.win32
+++ b/pixman/test/Makefile.win32
@@ -11,12 +11,12 @@ TEST_LDADD = \
libutils_OBJECTS = $(patsubst %.c, $(CFG_VAR)/%.obj, $(libutils_sources))
-SOURCES = $(patsubst %, %.c, $(TESTPROGRAMS) $(BENCHMARKS))
+SOURCES = $(patsubst %, %.c, $(TESTPROGRAMS) $(OTHERPROGRAMS))
OBJECTS = $(patsubst %.c, $(CFG_VAR)/%.obj, $(SOURCES))
TESTS = $(patsubst %, $(CFG_VAR)/%.exe, $(TESTPROGRAMS))
-BENCHS = $(patsubst %, $(CFG_VAR)/%.exe, $(BENCHMARKS))
+OTHERS = $(patsubst %, $(CFG_VAR)/%.exe, $(OTHERPROGRAMS))
-all: pixman inform $(TESTS) $(BENCHS)
+all: pixman inform $(TESTS) $(OTHERS)
check: pixman inform $(TESTS)
@failures=0 ; \
diff --git a/pixman/test/blitters-test.c b/pixman/test/blitters-test.c
index 920cbbbd7..ea03f475d 100644
--- a/pixman/test/blitters-test.c
+++ b/pixman/test/blitters-test.c
@@ -394,6 +394,6 @@ main (int argc, const char *argv[])
}
return fuzzer_test_main("blitters", 2000000,
- 0xAC8FDA98,
+ 0xE0A07495,
test_composite, argc, argv);
}
diff --git a/pixman/test/thread-test.c b/pixman/test/thread-test.c
index f24c31d06..fa2193302 100644
--- a/pixman/test/thread-test.c
+++ b/pixman/test/thread-test.c
@@ -18,6 +18,7 @@ typedef struct
{
int thread_no;
uint32_t *dst_buf;
+ prng_t prng_state;
} info_t;
static const pixman_op_t operators[] =
@@ -90,7 +91,7 @@ static const pixman_format_code_t formats[] =
#define N_ROUNDS 8192
#define RAND_ELT(arr) \
- arr[prng_rand() % ARRAY_LENGTH (arr)]
+ arr[prng_rand_r(&info->prng_state) % ARRAY_LENGTH (arr)]
#define DEST_WIDTH (7)
@@ -103,15 +104,17 @@ thread (void *data)
pixman_image_t *dst_img, *src_img;
int i;
- prng_srand (info->thread_no);
+ prng_srand_r (&info->prng_state, info->thread_no);
for (i = 0; i < N_ROUNDS; ++i)
{
pixman_op_t op;
int rand1, rand2;
- prng_randmemset (info->dst_buf, DEST_WIDTH * sizeof (uint32_t), 0);
- prng_randmemset (src_buf, sizeof (src_buf), 0);
+ prng_randmemset_r (&info->prng_state, info->dst_buf,
+ DEST_WIDTH * sizeof (uint32_t), 0);
+ prng_randmemset_r (&info->prng_state, src_buf,
+ sizeof (src_buf), 0);
src_img = pixman_image_create_bits (
RAND_ELT (formats), 4, 4, src_buf, 16);
@@ -122,8 +125,8 @@ thread (void *data)
image_endian_swap (src_img);
image_endian_swap (dst_img);
- rand2 = prng_rand() % 4;
- rand1 = prng_rand() % 4;
+ rand2 = prng_rand_r (&info->prng_state) % 4;
+ rand1 = prng_rand_r (&info->prng_state) % 4;
op = RAND_ELT (operators);
pixman_image_composite32 (
@@ -181,7 +184,7 @@ main (void)
crc32 = compute_crc32 (0, crc32s, sizeof crc32s);
-#define EXPECTED 0xFD497D8D
+#define EXPECTED 0xE299B18E
if (crc32 != EXPECTED)
{
diff --git a/pixman/test/utils.h b/pixman/test/utils.h
index 28b7193ed..ebb14d9e4 100644
--- a/pixman/test/utils.h
+++ b/pixman/test/utils.h
@@ -6,6 +6,11 @@
#include "pixman-private.h" /* For 'inline' definition */
#include "utils-prng.h"
+#if defined(_MSC_VER)
+#define snprintf _snprintf
+#define strcasecmp _stricmp
+#endif
+
#define ARRAY_LENGTH(A) ((int) (sizeof (A) / sizeof ((A) [0])))
/* A primitive pseudorandom number generator,