diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-07-26 15:00:49 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-07-26 15:00:51 -0700 |
commit | b50122379c696f1ae31d4fa914c1c14d28cae826 (patch) | |
tree | 74fd85cff244b3d905bb21f3e750dcdaa26a95fe /runsc/container/container_test.go | |
parent | 444a9d9e545f01dc204f1863e91acb8700823c6e (diff) | |
parent | 1c5b6d9bd26ba090610d05366df90d4fee91c677 (diff) |
Merge pull request #452 from zhangningdlut:chris_test_pidns
PiperOrigin-RevId: 260220279
Diffstat (limited to 'runsc/container/container_test.go')
-rw-r--r-- | runsc/container/container_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/runsc/container/container_test.go b/runsc/container/container_test.go index c1d6ca7b8..ff68c586e 100644 --- a/runsc/container/container_test.go +++ b/runsc/container/container_test.go @@ -714,6 +714,16 @@ func TestKillPid(t *testing.T) { if err := waitForProcessCount(cont, nProcs-1); err != nil { t.Fatal(err) } + + procs, err = cont.Processes() + if err != nil { + t.Fatalf("failed to get process list: %v", err) + } + for _, p := range procs { + if pid == int32(p.PID) { + t.Fatalf("pid %d is still alive, which should be killed", pid) + } + } } } |