From 394c6089c3b8700164756677f53314d165f8d383 Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Thu, 27 May 2021 19:51:54 -0700 Subject: Fix test_app task-tree Executing `select {}` to wait forever triggers Go runtime deadlock detection and kills the child, causing the number actual processes be less than expected. PiperOrigin-RevId: 376298799 --- pkg/test/testutil/BUILD | 1 + pkg/test/testutil/testutil.go | 2 ++ 2 files changed, 3 insertions(+) (limited to 'pkg') diff --git a/pkg/test/testutil/BUILD b/pkg/test/testutil/BUILD index a789c246e..7ff13cf12 100644 --- a/pkg/test/testutil/BUILD +++ b/pkg/test/testutil/BUILD @@ -12,6 +12,7 @@ go_library( ], visibility = ["//:sandbox"], deps = [ + "//pkg/sentry/watchdog", "//pkg/sync", "//runsc/config", "//runsc/specutils", diff --git a/pkg/test/testutil/testutil.go b/pkg/test/testutil/testutil.go index 663c83679..f6a3e34c7 100644 --- a/pkg/test/testutil/testutil.go +++ b/pkg/test/testutil/testutil.go @@ -42,6 +42,7 @@ import ( "github.com/cenkalti/backoff" specs "github.com/opencontainers/runtime-spec/specs-go" "golang.org/x/sys/unix" + "gvisor.dev/gvisor/pkg/sentry/watchdog" "gvisor.dev/gvisor/pkg/sync" "gvisor.dev/gvisor/runsc/config" "gvisor.dev/gvisor/runsc/specutils" @@ -184,6 +185,7 @@ func TestConfig(t *testing.T) *config.Config { conf.Network = config.NetworkNone conf.Strace = true conf.TestOnlyAllowRunAsCurrentUserWithoutChroot = true + conf.WatchdogAction = watchdog.Panic return conf } -- cgit v1.2.3