mirror of
https://github.com/containers/podman.git
synced 2025-05-20 16:47:39 +08:00
vendor: update go-criu to latest
There is no new version yet but we like to use the new code[1] to debug a flake[2] in the podman CI. It will not fix it but the new error might give us a better idea what is going on. [1] https://github.com/checkpoint-restore/go-criu/pull/175 [2] https://github.com/containers/podman/issues/18856 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
1
vendor/github.com/checkpoint-restore/go-criu/v7/.gitignore
generated
vendored
1
vendor/github.com/checkpoint-restore/go-criu/v7/.gitignore
generated
vendored
@ -15,3 +15,4 @@ scripts/magic-gen/expected.go
|
||||
scripts/magic-gen/output.go
|
||||
crit/bin
|
||||
crit/test-imgs/
|
||||
__pycache__
|
||||
|
5
vendor/github.com/checkpoint-restore/go-criu/v7/Makefile
generated
vendored
5
vendor/github.com/checkpoint-restore/go-criu/v7/Makefile
generated
vendored
@ -18,9 +18,6 @@ test: build
|
||||
coverage:
|
||||
$(MAKE) -C test coverage
|
||||
|
||||
codecov:
|
||||
$(MAKE) -C test codecov
|
||||
|
||||
rpc/rpc.proto:
|
||||
curl -sSL https://raw.githubusercontent.com/checkpoint-restore/criu/master/images/rpc.proto -o $@
|
||||
|
||||
@ -42,4 +39,4 @@ clean:
|
||||
$(MAKE) -C crit/ clean
|
||||
$(MAKE) -C test/ clean
|
||||
|
||||
.PHONY: build test lint vendor coverage codecov clean
|
||||
.PHONY: build test lint vendor coverage clean
|
||||
|
24
vendor/github.com/checkpoint-restore/go-criu/v7/main.go
generated
vendored
24
vendor/github.com/checkpoint-restore/go-criu/v7/main.go
generated
vendored
@ -61,13 +61,19 @@ func (c *Criu) Prepare() error {
|
||||
}
|
||||
|
||||
// Cleanup cleans up
|
||||
func (c *Criu) Cleanup() {
|
||||
func (c *Criu) Cleanup() error {
|
||||
var errs []error
|
||||
if c.swrkCmd != nil {
|
||||
c.swrkSk.Close()
|
||||
if err := c.swrkSk.Close(); err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
c.swrkSk = nil
|
||||
_ = c.swrkCmd.Wait()
|
||||
if err := c.swrkCmd.Wait(); err != nil {
|
||||
errs = append(errs, fmt.Errorf("criu swrk failed: %w", err))
|
||||
}
|
||||
c.swrkCmd = nil
|
||||
}
|
||||
return errors.Join(errs...)
|
||||
}
|
||||
|
||||
func (c *Criu) sendAndRecv(reqB []byte) ([]byte, int, error) {
|
||||
@ -99,9 +105,7 @@ func (c *Criu) doSwrk(reqType rpc.CriuReqType, opts *rpc.CriuOpts, nfy Notify) e
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Criu) doSwrkWithResp(reqType rpc.CriuReqType, opts *rpc.CriuOpts, nfy Notify, features *rpc.CriuFeatures) (*rpc.CriuResp, error) {
|
||||
var resp *rpc.CriuResp
|
||||
|
||||
func (c *Criu) doSwrkWithResp(reqType rpc.CriuReqType, opts *rpc.CriuOpts, nfy Notify, features *rpc.CriuFeatures) (resp *rpc.CriuResp, retErr error) {
|
||||
req := rpc.CriuReq{
|
||||
Type: &reqType,
|
||||
Opts: opts,
|
||||
@ -121,7 +125,13 @@ func (c *Criu) doSwrkWithResp(reqType rpc.CriuReqType, opts *rpc.CriuOpts, nfy N
|
||||
return nil, err
|
||||
}
|
||||
|
||||
defer c.Cleanup()
|
||||
defer func() {
|
||||
// append any cleanup errors to the returned error
|
||||
err := c.Cleanup()
|
||||
if err != nil {
|
||||
retErr = errors.Join(retErr, err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
for {
|
||||
|
Reference in New Issue
Block a user