From 34886a79d63a0f43500bb9f56c32651d8a0de39a Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 31 May 2018 17:17:59 -0700 Subject: hooks/exec: Allow successful reaps for 0s post-kill timeouts I'd been getting the failed-to-reap errors locally, but on an unrelated pull-request the FAH27 suite successfully reaped that hook [1]: --- FAIL: TestRunKillTimeout (0.50s) assertions.go:226: Error Trace: exec_test.go:210 Error: Expect "signal: killed" to match "^failed to reap process within 0s of the kill signal$" FAIL The successful-reap cases limit our coverage, but I don't think that's a big enough problem to be worth repeated polling or similar until we do get the failed-to-reap error. [1]: https://s3.amazonaws.com/aos-ci/ghprb/projectatomic/libpod/96c1535fdc11b2de24421863d7ad5d3b94338b37.0.1527811547665239762/output.log Signed-off-by: W. Trevor King Closes: #868 Approved by: rhatdan --- pkg/hooks/exec/exec_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/hooks/exec/exec_test.go b/pkg/hooks/exec/exec_test.go index 433f953df..62e45ff3a 100644 --- a/pkg/hooks/exec/exec_test.go +++ b/pkg/hooks/exec/exec_test.go @@ -207,7 +207,7 @@ func TestRunKillTimeout(t *testing.T) { } hookErr, err := Run(ctx, hook, []byte("{}"), nil, nil, time.Duration(0)) assert.Equal(t, context.DeadlineExceeded, err) - assert.Regexp(t, "^failed to reap process within 0s of the kill signal$", hookErr) + assert.Regexp(t, "^(failed to reap process within 0s of the kill signal|signal: killed)$", hookErr) } func init() { -- cgit v1.2.3-54-g00ecf