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