From 2b67d0c3823efb8689055364c17c09895733da2e Mon Sep 17 00:00:00 2001 From: Saw-jan Date: Thu, 21 Sep 2023 12:32:27 +0545 Subject: [PATCH] ociswrapper: do not panic if the process has already finished --- tests/ociswrapper/ocis/ocis.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/ociswrapper/ocis/ocis.go b/tests/ociswrapper/ocis/ocis.go index 05f0bea5e9..8f3648616b 100644 --- a/tests/ociswrapper/ocis/ocis.go +++ b/tests/ociswrapper/ocis/ocis.go @@ -8,6 +8,7 @@ import ( "os" "os/exec" "strconv" + "strings" "syscall" "time" @@ -90,7 +91,9 @@ func Start(envMap map[string]any) { func Stop() { err := cmd.Process.Kill() if err != nil { - log.Fatalln(err) + if !strings.HasSuffix(err.Error(), "process already finished") { + log.Fatalln(err) + } } cmd.Wait() }