Ver a proveniência

Simplify shim timeout logic.

I don't think this lock is actually needed. If the process exited by the
time we call shim.Process.Kill(), then the test ultimately finished. If
not, wait() will return that the process died by a signal.

Change-Id: I668a86583aba16fd00e0cd05071acc13059a2c42
Reviewed-on: https://boringssl-review.googlesource.com/27325
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
David Benjamin há 6 anos
committed by Adam Langley
ascendente
cometimento
06c28d8e51
1 ficheiros alterados com 0 adições e 10 eliminações
  1. +0
    -10
      ssl/test/runner/runner.go

+ 0
- 10
ssl/test/runner/runner.go Ver ficheiro

@@ -1210,21 +1210,11 @@ func runTest(test *testCase, shimPath string, mallocNumToFail int64) 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()
if shimKilled && err == nil {
err = errors.New("timeout waiting for the shim to exit.")
}
shimKilledLock.Unlock()
}

var isValgrindError, mustFail bool


Carregando…
Cancelar
Guardar