tests timing out with race detector

87 views
Skip to first unread message

Albert Strasheim

unread,
Jan 8, 2013, 5:23:22 AM1/8/13
to golan...@googlegroups.com
Hello all

I've encountered two sets of tests that sometimes fail with -race.

# go test -race -short std
--- FAIL: TestFiles-42 (28.74 seconds)
printer_test.go:180: testdata/expressions.input: running too slowly
FAIL
FAIL go/printer 71.511s

The tests for code.google.com/p/go.net/idna sometimes take more than 600s to run, which exceeds the default timeout. The culprit is TestPunycodeErrors.

Dmitry suggests:

"So I would suggest to either increase the timeout, reduce number of iterations under race detector, or exclude the test at all under race detector."

The idna stuff looks like a performance issue, which might be addressed by one of:


What is the best way to proceed? I would suggest skipping these tests when running under the race detector and opening an issue to investigate after Go 1.1?

Regards

Albert

Russ Cox

unread,
Jan 8, 2013, 10:27:47 AM1/8/13
to Albert Strasheim, golang-dev
How long do these tests run outside the race detector? It is possible
we should just make them do less when -short is specified.

Albert Strasheim

unread,
Jan 8, 2013, 10:55:10 AM1/8/13
to golan...@googlegroups.com, Albert Strasheim
On Tuesday, January 8, 2013 5:27:47 PM UTC+2, rsc wrote:
How long do these tests run outside the race detector? It is possible
we should just make them do less when -short is specified.

I considered that, but both of the tests that are failing run in milliseconds without -race.

Russ Cox

unread,
Jan 9, 2013, 2:17:26 PM1/9/13
to Albert Strasheim, golang-dev
Skipping them under the race detector sounds fine, although I'm not
100% sure how to do that.

Rémy Oudompheng

unread,
Jan 9, 2013, 2:20:35 PM1/9/13
to Russ Cox, Albert Strasheim, golang-dev
On 2013/1/9 Russ Cox <r...@golang.org> wrote:
> Skipping them under the race detector sounds fine, although I'm not
> 100% sure how to do that.

Maybe moving the heavy tests to a file with // +build !race ?
Reply all
Reply to author
Forward
0 new messages