gitsign icon indicating copy to clipboard operation
gitsign copied to clipboard

Slow system spurious `TestSignDetached` self-check failures

Open jas4711 opened this issue 10 months ago • 2 comments

Hi! I'm packaging this for Debian, and on our riscv64 builds, I got this self-test failure:

    sign_test.go:102: expected SigningTime to be now. Difference was -1.020778821s
--- FAIL: TestSignDetached (0.02s)

See: https://buildd.debian.org/status/fetch.php?pkg=gitsign&arch=riscv64&ver=0.12.0-3&stamp=1737565102&raw=0

I suspect this is triggered by this platform being really slow. From the error messages, maybe something is taking more than 1 second and this trigger a time comparison mismatch?

Could you make the allowed time window a bit larger? Say 5 seconds instead of 1 second?

/Simon

jas4711 avatar Jan 22 '25 21:01 jas4711

FWIW, I have now seen this also for the TestSign test on a s390x system:

=== RUN   TestSign
    sign_test.go:58: expected SigningTime to be now. Difference was -1.001646255s
--- FAIL: TestSign (0.00s)

https://buildd.debian.org/status/fetch.php?pkg=gitsign&arch=s390x&ver=0.12.0-4%2Bb2&stamp=1743659680&raw=0

jas4711 avatar Apr 10 '25 09:04 jas4711

I tried to fix this myself in #664 - what do you think? We may end up using something like it in the Debian packaging.

jas4711 avatar Apr 10 '25 09:04 jas4711