Add some timestamps to connect/accept failures.
This is in an attempt to debug the Mac flakiness. The timestamps will
hopefully help narrow down the order of operations here.
Bug: 199
Change-Id: I8b8dd7222e3a57a8b055b8bc1b7731334e0fcdf0
Reviewed-on: https://boringssl-review.googlesource.com/17886
Commit-Queue: David Benjamin <davidben@google.com>
Commit-Queue: Steven Valdez <svaldez@google.com>
Reviewed-by: Steven Valdez <svaldez@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/ssl/test/runner/runner.go b/ssl/test/runner/runner.go
index 86f5f71..5c0906a 100644
--- a/ssl/test/runner/runner.go
+++ b/ssl/test/runner/runner.go
@@ -881,18 +881,26 @@
// exit first.
func acceptOrWait(listener *net.TCPListener, waitChan chan error) (net.Conn, error) {
type connOrError struct {
- conn net.Conn
- err error
+ conn net.Conn
+ err error
+ startTime, endTime time.Time
}
connChan := make(chan connOrError, 1)
go func() {
+ startTime := time.Now()
listener.SetDeadline(time.Now().Add(*idleTimeout))
conn, err := listener.Accept()
- connChan <- connOrError{conn, err}
+ endTime := time.Now()
+ connChan <- connOrError{conn, err, startTime, endTime}
close(connChan)
}()
select {
case result := <-connChan:
+ if result.err != nil {
+ // TODO(davidben): Remove this logging when
+ // https://crbug.com/boringssl/199 is resolved.
+ fmt.Fprintf(os.Stderr, "acceptOrWait failed, startTime=%v, endTime=%v\n", result.startTime, result.endTime)
+ }
return result.conn, result.err
case childErr := <-waitChan:
waitChan <- childErr