]> Cypherpunks repositories - gostls13.git/commitdiff
misc/cgo/testcarchive,testcshared: deflake tests
authorIan Lance Taylor <iant@golang.org>
Thu, 7 Jan 2016 00:43:21 +0000 (16:43 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 7 Jan 2016 01:32:29 +0000 (01:32 +0000)
After a failure on the build dashboard I tested testcarchive test 2 and
found that it failed an average of 1 in 475 runs on my laptop.  With
this change it ran over 50,000 times without failing.  I bumped up the
other iteration limits to correspond.

Change-Id: I0155c68161a2c2a09ae25c91e9269f1e8702628d
Reviewed-on: https://go-review.googlesource.com/18309
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

misc/cgo/testcarchive/main2.c
misc/cgo/testcarchive/main3.c
misc/cgo/testcarchive/main4.c
misc/cgo/testcshared/main4.c
misc/cgo/testcshared/main5.c

index 39e39c41a5cc8d6c0279775ba78450f9b5a5d19e..372697760d96e93529579ea6c15ce32983cc4946 100644 (file)
@@ -152,7 +152,7 @@ int main(int argc, char** argv) {
                        perror("sched_yield");
                }
                i++;
-               if (i > 10000) {
+               if (i > 100000) {
                        fprintf(stderr, "looping too long waiting for signal\n");
                        exit(EXIT_FAILURE);
                }
index 2d3e5650db2f2aad43b1b0897cbe062a17983ec8..11046d087d7c968e641da0fd668770bd7cc53e3e 100644 (file)
@@ -68,7 +68,7 @@ int main(int argc, char** argv) {
                        perror("sched_yield");
                }
                i++;
-               if (i > 10000) {
+               if (i > 100000) {
                        fprintf(stderr, "looping too long waiting for signal\n");
                        exit(EXIT_FAILURE);
                }
@@ -142,7 +142,7 @@ int main(int argc, char** argv) {
                        perror("sched_yield");
                }
                i++;
-               if (i > 10000) {
+               if (i > 100000) {
                        fprintf(stderr, "looping too long waiting for signal\n");
                        exit(EXIT_FAILURE);
                }
index 3d7b736115d8716be5c1d28bc0a532c554cc8d86..2aaf09b7c1961ec5d16f678996aaaf17d6020e05 100644 (file)
@@ -78,7 +78,7 @@ static void* thread1(void* arg) {
                        perror("sched_yield");
                }
                i++;
-               if (i > 10000) {
+               if (i > 100000) {
                        fprintf(stderr, "looping too long waiting for signal\n");
                        exit(EXIT_FAILURE);
                }
@@ -133,7 +133,7 @@ static void* thread2(void* arg) {
                        perror("sched_yield");
                }
                i++;
-               if (i > 10000) {
+               if (i > 100000) {
                        fprintf(stderr, "looping too long waiting for signal\n");
                        exit(EXIT_FAILURE);
                }
index 803eb73bd93058b50dc5b8de11e6e7df72a89487..fd7b5b31ed13948131d42307b8f531fa73048b76 100644 (file)
@@ -170,7 +170,7 @@ int main(int argc, char** argv) {
                        perror("sched_yield");
                }
                i++;
-               if (i > 10000) {
+               if (i > 100000) {
                        fprintf(stderr, "looping too long waiting for signal\n");
                        exit(EXIT_FAILURE);
                }
index 50ddb47c6b6a114d799e2b2363661163266f6501..97a258f21a639996e6ed5f8ed142984f385729ed 100644 (file)
@@ -81,7 +81,7 @@ int main(int argc, char** argv) {
                        perror("sched_yield");
                }
                i++;
-               if (i > 10000) {
+               if (i > 100000) {
                        fprintf(stderr, "looping too long waiting for signal\n");
                        exit(EXIT_FAILURE);
                }
@@ -186,7 +186,7 @@ int main(int argc, char** argv) {
                        perror("sched_yield");
                }
                i++;
-               if (i > 10000) {
+               if (i > 100000) {
                        fprintf(stderr, "looping too long waiting for signal\n");
                        exit(EXIT_FAILURE);
                }