aboutsummaryrefslogtreecommitdiff
path: root/misc/ios
diff options
context:
space:
mode:
authorElias Naur <elias.naur@gmail.com>2017-10-03 13:05:22 +0200
committerElias Naur <elias.naur@gmail.com>2017-10-03 14:21:35 +0000
commiteb5bf55496b7378fb8831521c1b943dc940a5b98 (patch)
tree926d385f4c7d9f8a42847156461d7fe00e995f7d /misc/ios
parent6b4008db8be6d4d8ca0693c51b1e8f15f8d1f6ce (diff)
downloadgo-eb5bf55496b7378fb8831521c1b943dc940a5b98.tar.gz
go-eb5bf55496b7378fb8831521c1b943dc940a5b98.zip
misc/ios: always kill lldb process when it hangs
The lldb child process is killed if a test runs too long. Also kill it when the setup times out (and is retried). Might help with builder flakes where all 5 attempts to start up lldb fail even though the tests before and after the timeouts succeed. For example: ... ok vendor/golang_org/x/net/route 37.797s lldb setup error: command timeout (lldb start for 17s) start timeout, trying again lldb setup error: command timeout (lldb start for 17s) start timeout, trying again lldb setup error: command timeout (lldb start for 17s) start timeout, trying again lldb setup error: command timeout (lldb start for 17s) start timeout, trying again lldb setup error: command timeout (lldb start for 17s) go_darwin_arm_exec: failed to start test harness (retry attempted) FAIL vendor/golang_org/x/text/transform 115.185s ok vendor/golang_org/x/text/unicode/norm 122.773s ... Change-Id: I6638860522896491dccfa12f1e520c0f23df6d66 Reviewed-on: https://go-review.googlesource.com/67791 Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'misc/ios')
-rw-r--r--misc/ios/go_darwin_arm_exec.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/misc/ios/go_darwin_arm_exec.go b/misc/ios/go_darwin_arm_exec.go
index b49496cc10..f1807ae1e0 100644
--- a/misc/ios/go_darwin_arm_exec.go
+++ b/misc/ios/go_darwin_arm_exec.go
@@ -385,6 +385,9 @@ func (s *lldbSession) wait(reason string, cond func(out *buf) bool, extraTimeout
}
return fmt.Errorf("test timeout (%s)", reason)
case <-doTimedout:
+ if p := s.cmd.Process; p != nil {
+ p.Kill()
+ }
return fmt.Errorf("command timeout (%s for %v)", reason, doTimeout)
case err := <-s.exited:
return fmt.Errorf("exited (%s: %v)", reason, err)