diff options
Diffstat (limited to 'extras/hs-test/infra/vppinstance.go')
-rw-r--r-- | extras/hs-test/infra/vppinstance.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/extras/hs-test/infra/vppinstance.go b/extras/hs-test/infra/vppinstance.go index 370d2be38d1..59d17de4d20 100644 --- a/extras/hs-test/infra/vppinstance.go +++ b/extras/hs-test/infra/vppinstance.go @@ -243,9 +243,11 @@ func (vpp *VppInstance) Start() error { } func (vpp *VppInstance) Stop() { - pid := strings.TrimSpace(vpp.Container.Exec(false, "pidof vpp")) + pid, err := vpp.Container.Exec(false, "pidof vpp") + pid = strings.TrimSpace(pid) // Stop VPP only if it's still running - if len(pid) > 0 { + if err == nil { + vpp.getSuite().Log("Stopping VPP") vpp.Container.Exec(false, "bash -c \"kill -15 "+pid+"\"") } } |