dlclark / regexp2

A full-featured regex engine in pure Go based on the .NET engine
MIT License
979 stars 83 forks source link

TestDeadline fails with go 1.21.3 #71

Open solopasha opened 11 months ago

solopasha commented 11 months ago
command: go test -buildmode pie -compiler gc -ldflags " -X github.com/dlclark/regexp2/version=1.10.0 -extldflags '-Wl,-z,relro -Wl,--as-needed 
 -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redh
at/redhat-package-notes  '"
      testing: github.com/dlclark/regexp2
github.com/dlclark/regexp2
--- FAIL: TestDeadline (0.00s)
    --- FAIL: TestDeadline/1ms (0.00s)
        fastclock_test.go:31: deadline (1ms) expired too soon (after 1.067327ms)
FAIL
exit status 1
FAIL    github.com/dlclark/regexp2      1.651s
dlclark commented 11 months ago

What are the specs of the machine running the tests?

This test works on my machine (go v1.21.4), but I could imagine that for very slow machines the timing may be off...anything that is testing time-based delays is subject to this problem.

solopasha commented 10 months ago

It's a ryzen 5 5600x.

dlclark commented 9 months ago

Is this still consistently happening?

solopasha commented 9 months ago

Yes. 5 builds, all failed in this test https://download.copr.fedorainfracloud.org/results/solopasha/golang-github-dlclark-regexp2-1.10.0/fedora-rawhide-x86_64/06871697-golang-github-dlclark-regexp2/builder-live.log.gz https://download.copr.fedorainfracloud.org/results/solopasha/golang-github-dlclark-regexp2-1.10.0/fedora-rawhide-x86_64/06871698-golang-github-dlclark-regexp2/builder-live.log.gz https://download.copr.fedorainfracloud.org/results/solopasha/golang-github-dlclark-regexp2-1.10.0/fedora-rawhide-x86_64/06871699-golang-github-dlclark-regexp2/builder-live.log.gz https://download.copr.fedorainfracloud.org/results/solopasha/golang-github-dlclark-regexp2-1.10.0/fedora-rawhide-x86_64/06871700-golang-github-dlclark-regexp2/builder-live.log.gz https://download.copr.fedorainfracloud.org/results/solopasha/golang-github-dlclark-regexp2-1.10.0/fedora-rawhide-x86_64/06871701-golang-github-dlclark-regexp2/builder-live.log.gz