summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNicolas Lacasse <nlacasse@google.com>2018-10-18 11:59:35 -0700
committerShentubot <shentubot@google.com>2018-10-18 12:00:56 -0700
commit2a697791d1a473c76973f135f3af9240a32ad668 (patch)
tree2a1f35cd9bfbb67135228a4c45f896baaf413d6f
parentf7419fec26d1fd0d12936cc44f2c3481bbade033 (diff)
Skip TestPythonHello on ptrace platform while we debug the issue.
PiperOrigin-RevId: 217743078 Change-Id: I47fabd88139b968b6183bcc0340065fdbbc1d40d
-rw-r--r--runsc/test/image/image_test.go6
-rw-r--r--runsc/test/testutil/docker.go9
2 files changed, 15 insertions, 0 deletions
diff --git a/runsc/test/image/image_test.go b/runsc/test/image/image_test.go
index 40c92e1c0..d89d80a86 100644
--- a/runsc/test/image/image_test.go
+++ b/runsc/test/image/image_test.go
@@ -192,6 +192,12 @@ func TestMysql(t *testing.T) {
}
func TestPythonHello(t *testing.T) {
+ // TODO: This test occasionally hangs on the ptrace
+ // platform. Re-enable it once we have this issue fixed.
+ if testutil.IsPtracePlatform() {
+ t.Skipf("Skipping PythonHello test on ptrace platform")
+ }
+
if err := testutil.Pull("google/python-hello"); err != nil {
t.Fatalf("docker pull failed: %v", err)
}
diff --git a/runsc/test/testutil/docker.go b/runsc/test/testutil/docker.go
index 4e48817cf..7d6a72e5f 100644
--- a/runsc/test/testutil/docker.go
+++ b/runsc/test/testutil/docker.go
@@ -49,6 +49,15 @@ func IsPauseResumeSupported() bool {
return !strings.Contains(getRuntime(), "hostnet")
}
+// IsPtracePlatform returns true if the runtime is using ptrace platform.
+//
+// TODO: Tests should not depend on the platform, but
+// TestPythonHello sometimes hangs on ptrace. Once that is debugged, this
+// method should go away.
+func IsPtracePlatform() bool {
+ return !strings.Contains(getRuntime(), "kvm")
+}
+
// EnsureSupportedDockerVersion checks if correct docker is installed.
func EnsureSupportedDockerVersion() {
cmd := exec.Command("docker", "version")