pixman: Branch 'master' - 2 commits

Siarhei Siamashka siamashka at kemper.freedesktop.org
Mon Jun 11 18:25:26 PDT 2012


 test/composite.c         |    3 ++-
 test/fuzzer-find-diff.pl |    7 +++++++
 test/stress-test.c       |   15 ++++++---------
 3 files changed, 15 insertions(+), 10 deletions(-)

New commits:
commit 492dac7593075e622cfeddc73298df29d50b76bc
Author: Siarhei Siamashka <siarhei.siamashka at gmail.com>
Date:   Wed Jun 6 23:54:20 2012 +0300

    test: fix bisecting issue in fuzzer-find-diff.pl
    
    Before bisecting to find the exact test which has failed, we
    first need to make sure that the first test is fine (the first
    test is "good" and the whole range is "bad"). Otherwise
    test 2 gets incorrectly flagged as problematic in the case
    if we already got a failure on test 1 right from the start.

diff --git a/test/fuzzer-find-diff.pl b/test/fuzzer-find-diff.pl
index 53d9b8d..e1d67fb 100755
--- a/test/fuzzer-find-diff.pl
+++ b/test/fuzzer-find-diff.pl
@@ -29,10 +29,17 @@ sub test_range {
     my $min = shift;
     my $max = shift;
 
+    # check that [$min, $max] range is "bad", otherwise return
     if (`$ARGV[0] $min $max 2>/dev/null` eq `$ARGV[1] $min $max 2>/dev/null`) {
         return;
     }
 
+    # check that $min itself is "good", otherwise return
+    if (`$ARGV[0] $min 2>/dev/null` ne `$ARGV[1] $min 2>/dev/null`) {
+        return $min;
+    }
+
+    # start bisecting
     while ($max != $min + 1) {
         my $avg = int(($min + $max) / 2);
         my $res1 = `$ARGV[0] $min $avg 2>/dev/null`;
commit 40a0d10eeaedb879bbffe41f0537e8468c563df7
Author: Siarhei Siamashka <siarhei.siamashka at gmail.com>
Date:   Wed Jun 6 22:21:32 2012 +0300

    test: OpenMP 2.5 requires signed loop iteration variables
    
    Unsigned loop variables are only supported since version 3.0
    of OpenMP specification. Changing loop variables to use int32_t
    type fixes pixman build problems with path64 compiler.

diff --git a/test/composite.c b/test/composite.c
index 94b4825..bdecd75 100644
--- a/test/composite.c
+++ b/test/composite.c
@@ -739,7 +739,8 @@ main (int argc, char **argv)
 {
 #define N_TESTS (8 * 1024 * 1024)
     int result = 0;
-    uint32_t i, seed;
+    uint32_t seed;
+    int32_t i;
 
     if (argc > 1)
     {
diff --git a/test/stress-test.c b/test/stress-test.c
index 3174621..0b48da3 100644
--- a/test/stress-test.c
+++ b/test/stress-test.c
@@ -797,10 +797,10 @@ main (int argc, char **argv)
 {
     int verbose = FALSE;
     uint32_t seed = 1;
-    uint32_t n_tests = 0xffffffff;
+    uint32_t n_tests = 8000;
     uint32_t mod = 0;
     pixman_bool_t use_threads = TRUE;
-    uint32_t i;
+    int32_t i;
 
     pixman_disable_out_of_bounds_workaround ();
 
@@ -847,9 +847,6 @@ main (int argc, char **argv)
 	}
     }
 
-    if (n_tests == 0xffffffff)
-	n_tests = 8000;
-
     if (getenv ("PIXMAN_RANDOMIZE_TESTS"))
     {
 	seed = get_random_seed();
@@ -861,13 +858,13 @@ main (int argc, char **argv)
 #ifdef USE_OPENMP
 #   pragma omp parallel for default(none) shared(verbose, n_tests, mod, seed)
 #endif
-	for (i = seed; i < seed + n_tests; ++i)
-	    run_test (i, verbose, mod);
+	for (i = 0; i < (int32_t)n_tests; ++i)
+	    run_test (seed + i, verbose, mod);
     }
     else
     {
-	for (i = seed; i < seed + n_tests; ++i)
-	    run_test (i, verbose, mod);
+	for (i = 0; i < (int32_t)n_tests; ++i)
+	    run_test (seed + i, verbose, mod);
     }
 
     return 0;


More information about the xorg-commit mailing list