You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the context passed to `Start()` is cancelled, the "kill the
process by context cancellation" goroutine started from `startVMM()`
invokes `stopVMM()`.
https://github.com/firecracker-microvm/firecracker-go-sdk/blob/master/machine.go#L553-L559
A typical user may cancel the context passed to `Start()` after the
firecracker VM has terminated successfully. This causes a "process
already finished" error to be logged, but no real negatives.
This PR extends stopVMM() to no longer send SIGTERM if `Wait()` has
returned (since that signals the process has already completed).
https://github.com/firecracker-microvm/firecracker-go-sdk/blob/master/machine.go#L519-L524
Since the `stopVMM()` happens async and the only effect is a log
message, I modified the `TestWait()` harness to:
- Wait for context cancellation to propagate (`1s`)
- Capture and verify logs didn't emit the error
Signed-off-by: Peter Wagner <[email protected]>
0 commit comments