diff --git a/go.mod b/go.mod index d6a6744d..02649252 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.25.0 require ( github.com/go-ole/go-ole v1.3.0 - github.com/onsi/ginkgo/v2 v2.32.1 + github.com/onsi/ginkgo/v2 v2.32.2 github.com/onsi/gomega v1.43.0 github.com/schollz/progressbar/v3 v3.19.1 github.com/sirupsen/logrus v1.10.2 diff --git a/go.sum b/go.sum index 3cb6843f..a73eeb69 100644 --- a/go.sum +++ b/go.sum @@ -34,8 +34,8 @@ github.com/mfridman/tparse v0.18.0 h1:wh6dzOKaIwkUGyKgOntDW4liXSo37qg5AXbIhkMV3v github.com/mfridman/tparse v0.18.0/go.mod h1:gEvqZTuCgEhPbYk/2lS3Kcxg1GmTxxU7kTC8DvP0i/A= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= -github.com/onsi/ginkgo/v2 v2.32.1 h1:6tlvcDm/3sE8lGJbZ4+d4mO3RLy24/tQWOFzVSQNIfw= -github.com/onsi/ginkgo/v2 v2.32.1/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44= +github.com/onsi/ginkgo/v2 v2.32.2 h1:2o6vyFvR6snrJWgRVztC+OwuqqPEMI1UzYl2s2iU7Cg= +github.com/onsi/ginkgo/v2 v2.32.2/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44= github.com/onsi/gomega v1.43.0 h1:VlG/1FxqNxhSO+lq/OHBNaaqwiBK/mO8JbVkX9Y+FeU= github.com/onsi/gomega v1.43.0/go.mod h1:REff/hsDsodHoKlWsP2mAPhu1+5/6hVYNf9rIEBpeSg= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= diff --git a/test/tools/go.mod b/test/tools/go.mod index 5820823f..a95c65db 100644 --- a/test/tools/go.mod +++ b/test/tools/go.mod @@ -2,7 +2,7 @@ module github.com/containers/libhvee/test/tools go 1.25.0 -require github.com/onsi/ginkgo/v2 v2.32.1 +require github.com/onsi/ginkgo/v2 v2.32.2 require ( github.com/Masterminds/semver/v3 v3.4.0 // indirect diff --git a/test/tools/go.sum b/test/tools/go.sum index f02755f3..a2dee58f 100644 --- a/test/tools/go.sum +++ b/test/tools/go.sum @@ -28,8 +28,8 @@ github.com/maruel/natural v1.1.1 h1:Hja7XhhmvEFhcByqDoHz9QZbkWey+COd9xWfCfn1ioo= github.com/maruel/natural v1.1.1/go.mod h1:v+Rfd79xlw1AgVBjbO0BEQmptqb5HvL/k9GRHB7ZKEg= github.com/mfridman/tparse v0.18.0 h1:wh6dzOKaIwkUGyKgOntDW4liXSo37qg5AXbIhkMV3vE= github.com/mfridman/tparse v0.18.0/go.mod h1:gEvqZTuCgEhPbYk/2lS3Kcxg1GmTxxU7kTC8DvP0i/A= -github.com/onsi/ginkgo/v2 v2.32.1 h1:6tlvcDm/3sE8lGJbZ4+d4mO3RLy24/tQWOFzVSQNIfw= -github.com/onsi/ginkgo/v2 v2.32.1/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44= +github.com/onsi/ginkgo/v2 v2.32.2 h1:2o6vyFvR6snrJWgRVztC+OwuqqPEMI1UzYl2s2iU7Cg= +github.com/onsi/ginkgo/v2 v2.32.2/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44= github.com/onsi/gomega v1.40.0 h1:Vtol0e1MghCD2ZVIilPDIg44XSL9l2QAn8ZNaljWcJc= github.com/onsi/gomega v1.40.0/go.mod h1:M/Uqpu/8qTjtzCLUA2zJHX9Iilrau25x1PdoSRbWh5A= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/test/tools/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/server_handler.go b/test/tools/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/server_handler.go index ab9e1137..36060651 100644 --- a/test/tools/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/server_handler.go +++ b/test/tools/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/server_handler.go @@ -32,6 +32,7 @@ type ServerHandler struct { numSuiteDidBegins int numSuiteDidEnds int + procDidEnd []bool aggregatedReport types.Report reportHoldingArea []types.SpecReport } @@ -42,6 +43,7 @@ func newServerHandler(parallelTotal int, reporter reporters.Reporter) *ServerHan lock: &sync.Mutex{}, counterLock: &sync.Mutex{}, alives: make([]func() bool, parallelTotal), + procDidEnd: make([]bool, parallelTotal), beforeSuiteState: BeforeSuiteState{Data: nil, State: types.SpecStateInvalid}, parallelTotal: parallelTotal, @@ -90,6 +92,9 @@ func (handler *ServerHandler) SpecSuiteDidEnd(report types.Report, _ *Void) erro defer handler.lock.Unlock() handler.numSuiteDidEnds += 1 + if proc := report.SuiteConfig.ParallelProcess; proc >= 1 && proc <= handler.parallelTotal { + handler.procDidEnd[proc-1] = true + } if handler.numSuiteDidEnds == 1 { handler.aggregatedReport = report } else { @@ -133,9 +138,17 @@ func (handler *ServerHandler) procIsAlive(proc int) bool { return alive() } +func (handler *ServerHandler) procHasFinished(proc int) bool { + handler.lock.Lock() + didEnd := handler.procDidEnd[proc-1] + handler.lock.Unlock() + + return didEnd || !handler.procIsAlive(proc) +} + func (handler *ServerHandler) haveNonprimaryProcsFinished() bool { for i := 2; i <= handler.parallelTotal; i++ { - if handler.procIsAlive(i) { + if !handler.procHasFinished(i) { return false } } diff --git a/test/tools/vendor/github.com/onsi/ginkgo/v2/types/version.go b/test/tools/vendor/github.com/onsi/ginkgo/v2/types/version.go index 177baed9..a34f1f3a 100644 --- a/test/tools/vendor/github.com/onsi/ginkgo/v2/types/version.go +++ b/test/tools/vendor/github.com/onsi/ginkgo/v2/types/version.go @@ -1,3 +1,3 @@ package types -const VERSION = "2.32.1" +const VERSION = "2.32.2" diff --git a/test/tools/vendor/modules.txt b/test/tools/vendor/modules.txt index d3a57718..f2447fde 100644 --- a/test/tools/vendor/modules.txt +++ b/test/tools/vendor/modules.txt @@ -7,7 +7,7 @@ github.com/go-task/slim-sprig/v3 # github.com/google/pprof v0.0.0-20260402051712-545e8a4df936 ## explicit; go 1.24.0 github.com/google/pprof/profile -# github.com/onsi/ginkgo/v2 v2.32.1 +# github.com/onsi/ginkgo/v2 v2.32.2 ## explicit; go 1.25.0 github.com/onsi/ginkgo/v2/config github.com/onsi/ginkgo/v2/formatter diff --git a/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md b/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md index 4d1ed952..45fa5343 100644 --- a/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md +++ b/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.32.2 + +### Fixes +- fix bug where ginkgo -race -p was taking extra long to exit [c6792b0] + ## 2.32.1 ### Fixes diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/server_handler.go b/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/server_handler.go index ab9e1137..36060651 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/server_handler.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/server_handler.go @@ -32,6 +32,7 @@ type ServerHandler struct { numSuiteDidBegins int numSuiteDidEnds int + procDidEnd []bool aggregatedReport types.Report reportHoldingArea []types.SpecReport } @@ -42,6 +43,7 @@ func newServerHandler(parallelTotal int, reporter reporters.Reporter) *ServerHan lock: &sync.Mutex{}, counterLock: &sync.Mutex{}, alives: make([]func() bool, parallelTotal), + procDidEnd: make([]bool, parallelTotal), beforeSuiteState: BeforeSuiteState{Data: nil, State: types.SpecStateInvalid}, parallelTotal: parallelTotal, @@ -90,6 +92,9 @@ func (handler *ServerHandler) SpecSuiteDidEnd(report types.Report, _ *Void) erro defer handler.lock.Unlock() handler.numSuiteDidEnds += 1 + if proc := report.SuiteConfig.ParallelProcess; proc >= 1 && proc <= handler.parallelTotal { + handler.procDidEnd[proc-1] = true + } if handler.numSuiteDidEnds == 1 { handler.aggregatedReport = report } else { @@ -133,9 +138,17 @@ func (handler *ServerHandler) procIsAlive(proc int) bool { return alive() } +func (handler *ServerHandler) procHasFinished(proc int) bool { + handler.lock.Lock() + didEnd := handler.procDidEnd[proc-1] + handler.lock.Unlock() + + return didEnd || !handler.procIsAlive(proc) +} + func (handler *ServerHandler) haveNonprimaryProcsFinished() bool { for i := 2; i <= handler.parallelTotal; i++ { - if handler.procIsAlive(i) { + if !handler.procHasFinished(i) { return false } } diff --git a/vendor/github.com/onsi/ginkgo/v2/types/version.go b/vendor/github.com/onsi/ginkgo/v2/types/version.go index 177baed9..a34f1f3a 100644 --- a/vendor/github.com/onsi/ginkgo/v2/types/version.go +++ b/vendor/github.com/onsi/ginkgo/v2/types/version.go @@ -1,3 +1,3 @@ package types -const VERSION = "2.32.1" +const VERSION = "2.32.2" diff --git a/vendor/modules.txt b/vendor/modules.txt index 81ab9bd9..f5d3cfd8 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -24,7 +24,7 @@ github.com/google/pprof/profile # github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db ## explicit github.com/mitchellh/colorstring -# github.com/onsi/ginkgo/v2 v2.32.1 +# github.com/onsi/ginkgo/v2 v2.32.2 ## explicit; go 1.25.0 github.com/onsi/ginkgo/v2 github.com/onsi/ginkgo/v2/config