diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-03-01 12:04:29 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-01 12:04:29 -0800 |
commit | 2747c20867127c930d705f5162dcd78b4faf9624 (patch) | |
tree | 9a52705cf30e667ff097079c501eeb8b11d3066e /test/e2e/checkpoint_test.go | |
parent | c0bc88decc236a7898ba05d9815fb5df7c050f44 (diff) | |
parent | 43fe2bf064a4c7e7e24f35abd76acc5add6cc09a (diff) | |
download | podman-2747c20867127c930d705f5162dcd78b4faf9624.tar.gz podman-2747c20867127c930d705f5162dcd78b4faf9624.tar.bz2 podman-2747c20867127c930d705f5162dcd78b4faf9624.zip |
Merge pull request #2485 from adrianreber/oci-check
Verify that used OCI runtime supports checkpoint
Diffstat (limited to 'test/e2e/checkpoint_test.go')
-rw-r--r-- | test/e2e/checkpoint_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/e2e/checkpoint_test.go b/test/e2e/checkpoint_test.go index 11332708b..583432df1 100644 --- a/test/e2e/checkpoint_test.go +++ b/test/e2e/checkpoint_test.go @@ -6,6 +6,7 @@ import ( "fmt" "net" "os" + "os/exec" "github.com/containers/libpod/pkg/criu" . "github.com/containers/libpod/test/utils" @@ -27,6 +28,16 @@ var _ = Describe("Podman checkpoint", func() { } podmanTest = PodmanTestCreate(tempdir) podmanTest.RestoreAllArtifacts() + // Check if the runtime implements checkpointing. Currently only + // runc's checkpoint/restore implementation is supported. + cmd := exec.Command(podmanTest.OCIRuntime, "checkpoint", "-h") + if err := cmd.Start(); err != nil { + Skip("OCI runtime does not support checkpoint/restore") + } + if err := cmd.Wait(); err != nil { + Skip("OCI runtime does not support checkpoint/restore") + } + if !criu.CheckForCriu() { Skip("CRIU is missing or too old.") } |