cbor icon indicating copy to clipboard operation
cbor copied to clipboard

tests fail

Open jbenet opened this issue 8 years ago • 6 comments

> go test
--- FAIL: TestDecodeEpochDateTime (0.00s)
    common_test.go:34: TestTake: expected 18, got 10
--- FAIL: TestDecodeEpochDateTimeFromInterface (0.00s)
    common_test.go:34: TestTake: expected 18, got 10
--- FAIL: TestDecodeNegativeEpochDateTimeFromInterface (0.00s)
    common_test.go:34: TestTake: expected 20, got 11
[]byte{0xa6, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x6b, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x63, 0x41, 0x67, 0x65, 0x18, 0x22, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x31, 0x49, 0x34, 0x20, 0x43, 0x42, 0x4f, 0x52, 0x20, 0x53, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0x40, 0x67, 0x4d, 0x61, 0x72, 0x72, 0x69, 0x65, 0x64, 0xf4, 0x66, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0xfb, 0x3f, 0xfc, 0x51, 0xeb, 0x85, 0x1e, 0xb8, 0x52}
FAIL
exit status 1
FAIL    github.com/DamnWidget/cbor  0.015s

jbenet avatar Jul 17 '15 04:07 jbenet

Hi @jbenet It's passing in my OS X and Linux boxes go test -v -test.run=TestDecodeEpochDate === RUN TestDecodeEpochDateTime --- PASS: TestDecodeEpochDateTime (0.00s) === RUN TestDecodeEpochDateTimeFromInterface --- PASS: TestDecodeEpochDateTimeFromInterface (0.00s) === RUN TestDecodeEpochDateTimeWrongMajor --- PASS: TestDecodeEpochDateTimeWrongMajor (0.00s) PASS ok github.com/DamnWidget/cbor 0.003s

I am not sure why is failing in your case.

DamnWidget avatar Jul 17 '15 08:07 DamnWidget

Not sure. fails on my OS X

> go version
go version go1.4.2 darwin/amd64
> uname -a
Darwin lorien.local 14.0.0 Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
> cat .git/refs/heads/master
267653f36473451f5c9486d3d2b757aeb98e9bb1
> go test
--- FAIL: TestDecodeEpochDateTime (0.00s)
  common_test.go:34: TestTake: expected 18, got 10
--- FAIL: TestDecodeEpochDateTimeFromInterface (0.00s)
  common_test.go:34: TestTake: expected 18, got 10
--- FAIL: TestDecodeNegativeEpochDateTimeFromInterface (0.00s)
  common_test.go:34: TestTake: expected 20, got 11
[]byte{0xa6, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x6b, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x63, 0x41, 0x67, 0x65, 0x18, 0x22, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x31, 0x49, 0x34, 0x20, 0x43, 0x42, 0x4f, 0x52, 0x20, 0x53, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0x40, 0x67, 0x4d, 0x61, 0x72, 0x72, 0x69, 0x65, 0x64, 0xf4, 0x66, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0xfb, 0x3f, 0xfc, 0x51, 0xeb, 0x85, 0x1e, 0xb8, 0x52}
FAIL
exit status 1
FAIL  github.com/DamnWidget/cbor  0.011s

try with -race -cpu 5 ?

jbenet avatar Jul 17 '15 09:07 jbenet

It's passing as well

=== RUN TestDecodeEpochDateTime-5
--- PASS: TestDecodeEpochDateTime-5 (0.00s)
=== RUN TestDecodeEpochDateTimeFromInterface-5
--- PASS: TestDecodeEpochDateTimeFromInterface-5 (0.00s)
=== RUN TestDecodeEpochDateTimeWrongMajor-5
--- PASS: TestDecodeEpochDateTimeWrongMajor-5 (0.00s)
PASS
ok      github.com/DamnWidget/cbor      0.009s

DamnWidget avatar Jul 17 '15 09:07 DamnWidget

Failing on my 64 bit linux box as well.

tshannon@Gaidin:~/workspace/go/src/github.com/DamnWidget/cbor$ go test -v -race -cpu 5 -test.run=TestDecodeEpochDate
=== RUN TestDecodeEpochDateTime-5
--- FAIL: TestDecodeEpochDateTime-5 (0.00s)
        common_test.go:34: TestTake: expected 18, got 12
=== RUN TestDecodeEpochDateTimeFromInterface-5
--- FAIL: TestDecodeEpochDateTimeFromInterface-5 (0.00s)
        common_test.go:34: TestTake: expected 18, got 12
=== RUN TestDecodeEpochDateTimeWrongMajor-5
--- PASS: TestDecodeEpochDateTimeWrongMajor-5 (0.00s)
FAIL
exit status 1
FAIL    github.com/DamnWidget/cbor      0.012s
tshannon@Gaidin:~/workspace/go/src/github.com/DamnWidget/cbor$ 


timshannon avatar Jul 30 '15 02:07 timshannon

reproducibility \o/

jbenet avatar Aug 05 '15 10:08 jbenet

Oh well, that's weird. I still can't reproduce it

DamnWidget avatar Aug 05 '15 11:08 DamnWidget