diff options
| author | Andrey Konovalov <andreyknvl@gmail.com> | 2017-07-24 14:34:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-24 14:34:34 +0200 |
| commit | 1e06f3e00fe12ed48282e1c896f57b0c2874eb44 (patch) | |
| tree | ede8f9a4d14ef7e254cfbd39750e911f5ad4ff88 /pkg/csource/csource.go | |
| parent | 87f9bdb8688ceafa804eb49d566bdc38dfb9fd5e (diff) | |
| parent | 0d9ae38d5d5eb21cadc39a56d1272b40755bb6a3 (diff) | |
Merge pull request #274 from xairy/up-better-repro
Improve C repros
Diffstat (limited to 'pkg/csource/csource.go')
| -rw-r--r-- | pkg/csource/csource.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/csource/csource.go b/pkg/csource/csource.go index e52be3e88..32415e982 100644 --- a/pkg/csource/csource.go +++ b/pkg/csource/csource.go @@ -219,7 +219,7 @@ func generateTestFunc(w io.Writer, opts Options, calls []string, name string) { } fmt.Fprintf(w, "\tfor (i = 0; i < %v; i++) {\n", len(calls)) fmt.Fprintf(w, "\t\tpthread_create(&th[i], 0, thr, (void*)i);\n") - fmt.Fprintf(w, "\t\tusleep(10000);\n") + fmt.Fprintf(w, "\t\tusleep(rand()%%10000);\n") fmt.Fprintf(w, "\t}\n") if opts.Collide { fmt.Fprintf(w, "\tfor (i = 0; i < %v; i++) {\n", len(calls)) @@ -228,7 +228,7 @@ func generateTestFunc(w io.Writer, opts Options, calls []string, name string) { fmt.Fprintf(w, "\t\t\tusleep(rand()%%10000);\n") fmt.Fprintf(w, "\t}\n") } - fmt.Fprintf(w, "\tusleep(100000);\n") + fmt.Fprintf(w, "\tusleep(rand()%%100000);\n") fmt.Fprintf(w, "}\n\n") } } |
