소스 검색

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 6 년 전
committed by Adam Langley
부모
커밋
06c28d8e51
1개의 변경된 파일0개의 추가작업 그리고 10개의 파일을 삭제
  1. +0
    -10
      ssl/test/runner/runner.go

+ 0
- 10
ssl/test/runner/runner.go 파일 보기

@@ -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


불러오는 중...
취소
저장