Package time fails very often in a VM

48 views
Skip to first unread message

Aram Hăvărneanu

unread,
Oct 21, 2011, 2:24:47 PM10/21/11
to golang-nuts
I usually have to build the distribution a few times before I can pass
this test:

TEST FAIL time
gmake[1]: Entering directory `/export/go/src/pkg/time'
gotest -test.short -test.timeout=120
rm -f _test/time.a
6g -p time -o _gotest_.6 format.go sleep.go sys.go tick.go time.go
sys_unix.go zoneinfo_posix.go zoneinfo_unix.go internal_test.go
rm -f _test/time.a
gopack grc _test/time.a _gotest_.6
--- FAIL: time_test.TestAfterTick (1.21 seconds)
10 ticks of 1e+08 ns took 1.208945e+09 ns, expected 1e+09
FAIL
gotest: "./6.out -test.short=true -test.timeout=120" failed: exit status 1
gmake[1]: *** [testshort] Error 2
gmake[1]: Leaving directory `/export/go/src/pkg/time'
gmake: *** [time.testshort] Error 1

In this particular instance GOHOSTOS is freebsd, but it doesn't
matter, I've had this error with darwin, linux and sunos (oops, I just
leaked some information ;-). It only happened to me once on a real
machine, but it happens all the time in virtual machines because
virtual machines don't track time with very high precision under load.

I don't think that increasing the allowed limits is a good solution.
The test is good in development, it allows the developer to see if it
breaks time, however, it's destined to fail at some point for users
that simply want to build go. I think failing this test should not be
fatal. Do you agree? Should I post a patch that makes this test non
fatal?

Thanks,

--
Aram Hăvărneanu

Russ Cox

unread,
Oct 24, 2011, 1:26:06 PM10/24/11
to Aram Hăvărneanu, golang-nuts
On Fri, Oct 21, 2011 at 14:24, Aram Hăvărneanu <ara...@mgk.ro> wrote:
> I don't think that increasing the allowed limits is a good solution.
> The test is good in development, it allows the developer to see if it
> breaks time, however, it's destined to fail at some point for users
> that simply want to build go. I think failing this test should not be
> fatal. Do you agree? Should I post a patch that makes this test non
> fatal?

No, please don't. The test is for developers. It is just an
unfortunate accident that end users run them (because we have
no binary distributions). Once we have binary distributions
this will not be a problem anymore.

Thanks.
Russ

Aram Hăvărneanu

unread,
Oct 24, 2011, 1:51:38 PM10/24/11
to r...@golang.org, golang-nuts
> No, please don't.  The test is for developers.  It is just an
> unfortunate accident that end users run them (because we have
> no binary distributions).  Once we have binary distributions
> this will not be a problem anymore.

Thank you for your response,

--
Aram Hăvărneanu

Reply all
Reply to author
Forward
0 new messages