diff options
author | Fabricio Voznika <fvoznika@google.com> | 2018-09-18 19:11:49 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-09-18 19:12:54 -0700 |
commit | 8aec7473a1cc106d1de2e6c072b84eecc1f239b5 (patch) | |
tree | 4893e1b99868cf2621b4eeec679cd008a59fdd30 /runsc/container/multi_container_test.go | |
parent | fd222d62eda8b447fa0e11260f64fdb94e5e7084 (diff) |
Added state machine checks for Container.Status
For my own sanitity when thinking about possible transitions and state.
PiperOrigin-RevId: 213559482
Change-Id: I25588c86cf6098be4eda01f4e7321c102ceef33c
Diffstat (limited to 'runsc/container/multi_container_test.go')
-rw-r--r-- | runsc/container/multi_container_test.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runsc/container/multi_container_test.go b/runsc/container/multi_container_test.go index 349ea755a..d6418efb6 100644 --- a/runsc/container/multi_container_test.go +++ b/runsc/container/multi_container_test.go @@ -378,12 +378,15 @@ func TestMultiContainerSignal(t *testing.T) { t.Errorf("failed to wait for sleep to start: %v", err) } + // goferPid is reset when container is destroyed. + goferPid := containers[1].GoferPid + // Destroy container and ensure container's gofer process has exited. if err := containers[1].Destroy(); err != nil { t.Errorf("failed to destroy container: %v", err) } _, _, err = testutil.RetryEintr(func() (uintptr, uintptr, error) { - cpid, err := syscall.Wait4(containers[1].GoferPid, nil, 0, nil) + cpid, err := syscall.Wait4(goferPid, nil, 0, nil) return uintptr(cpid), 0, err }) if err != nil && err != syscall.ECHILD { |