+func (s *TestSuite) TestStopOnSignal(c *C) {
+ s.testStopContainer(c, func(cr *ContainerRunner) {
+ go func() {
+ for cr.ContainerID == "" {
+ time.Sleep(time.Millisecond)
+ }
+ cr.SigChan <- syscall.SIGINT
+ }()
+ })
+}
+
+func (s *TestSuite) TestStopOnArvMountDeath(c *C) {
+ s.testStopContainer(c, func(cr *ContainerRunner) {
+ cr.ArvMountExit = make(chan error)
+ go func() {
+ cr.ArvMountExit <- exec.Command("true").Run()
+ close(cr.ArvMountExit)
+ }()
+ })
+}
+
+func (s *TestSuite) testStopContainer(c *C, setup func(cr *ContainerRunner)) {