Clear one more timeout when using gdb.
https://boringssl-review.googlesource.com/18605 got the other ones. Change-Id: If00487a4dd8508496a31a0a565c965559e12879c Reviewed-on: https://boringssl-review.googlesource.com/21264 Commit-Queue: David Benjamin <davidben@google.com> Commit-Queue: Adam Langley <agl@google.com> Reviewed-by: Adam Langley <agl@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
This commit is contained in:
parent
4519a5a063
commit
861f28a624
@ -1145,21 +1145,27 @@ func runTest(test *testCase, shimPath string, mallocNumToFail int64) error {
|
||||
listener.Close()
|
||||
listener = nil
|
||||
|
||||
var shimKilledLock sync.Mutex
|
||||
var shimKilled bool
|
||||
waitTimeout := time.AfterFunc(*idleTimeout, func() {
|
||||
var childErr error
|
||||
if *useGDB {
|
||||
childErr = <-waitChan
|
||||
} else {
|
||||
var shimKilledLock sync.Mutex
|
||||
var shimKilled bool
|
||||
waitTimeout := time.AfterFunc(*idleTimeout, func() {
|
||||
shimKilledLock.Lock()
|
||||
shimKilled = true
|
||||
shimKilledLock.Unlock()
|
||||
shim.Process.Kill()
|
||||
})
|
||||
childErr = <-waitChan
|
||||
waitTimeout.Stop()
|
||||
shimKilledLock.Lock()
|
||||
shimKilled = true
|
||||
if shimKilled && err == nil {
|
||||
err = errors.New("timeout waiting for the shim to exit.")
|
||||
}
|
||||
shimKilledLock.Unlock()
|
||||
shim.Process.Kill()
|
||||
})
|
||||
childErr := <-waitChan
|
||||
waitTimeout.Stop()
|
||||
shimKilledLock.Lock()
|
||||
if shimKilled && err == nil {
|
||||
err = errors.New("timeout waiting for the shim to exit.")
|
||||
}
|
||||
shimKilledLock.Unlock()
|
||||
|
||||
var isValgrindError bool
|
||||
if exitError, ok := childErr.(*exec.ExitError); ok {
|
||||
switch exitError.Sys().(syscall.WaitStatus).ExitStatus() {
|
||||
|
Loading…
Reference in New Issue
Block a user