Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2016-09-22 17:18:58 +0300
committerAdam Langley <agl@google.com>2016-09-23 00:32:14 +0300
commitc07afb79f6f2509d037cb2ce4d10b2d4b4919123 (patch)
treea36c06f12577b0f52e250266bd22aa7b1968d8b2
parent25f4422c2cfa07ce432547beee6451fc77d52c17 (diff)
Record resumption and renewal transcripts separately.
We recently added a three-connection option, but the transcripts were still assuming just -Normal and -Resume. Change-Id: I8816bce95dd7fac779af658e3eb86bc78bb95c91 Reviewed-on: https://boringssl-review.googlesource.com/11226 Commit-Queue: David Benjamin <davidben@google.com> Reviewed-by: Adam Langley <agl@google.com>
-rw-r--r--ssl/test/runner/runner.go18
1 files changed, 6 insertions, 12 deletions
diff --git a/ssl/test/runner/runner.go b/ssl/test/runner/runner.go
index 162b15ed..8943865d 100644
--- a/ssl/test/runner/runner.go
+++ b/ssl/test/runner/runner.go
@@ -366,7 +366,7 @@ type testCase struct {
var testCases []testCase
-func writeTranscript(test *testCase, isResume bool, data []byte) {
+func writeTranscript(test *testCase, num int, data []byte) {
if len(data) == 0 {
return
}
@@ -387,13 +387,7 @@ func writeTranscript(test *testCase, isResume bool, data []byte) {
return
}
- name := test.name
- if isResume {
- name += "-Resume"
- } else {
- name += "-Normal"
- }
-
+ name := fmt.Sprintf("%s-%d", test.name, num)
if err := ioutil.WriteFile(path.Join(dir, name), data, 0644); err != nil {
fmt.Fprintf(os.Stderr, "Error writing %s: %s\n", name, err)
}
@@ -419,7 +413,7 @@ func (t *timeoutConn) Write(b []byte) (int, error) {
return t.Conn.Write(b)
}
-func doExchange(test *testCase, config *Config, conn net.Conn, isResume bool) error {
+func doExchange(test *testCase, config *Config, conn net.Conn, isResume bool, num int) error {
if !test.noSessionCache {
if config.ClientSessionCache == nil {
config.ClientSessionCache = NewLRUClientSessionCache(1)
@@ -470,7 +464,7 @@ func doExchange(test *testCase, config *Config, conn net.Conn, isResume bool) er
}
if len(*transcriptDir) != 0 {
defer func() {
- writeTranscript(test, isResume, connDebug.Transcript())
+ writeTranscript(test, num, connDebug.Transcript())
}()
}
@@ -909,7 +903,7 @@ func runTest(test *testCase, shimPath string, mallocNumToFail int64) error {
conn, err := acceptOrWait(listener, waitChan)
if err == nil {
- err = doExchange(test, &config, conn, false /* not a resumption */)
+ err = doExchange(test, &config, conn, false /* not a resumption */, 0)
conn.Close()
}
@@ -929,7 +923,7 @@ func runTest(test *testCase, shimPath string, mallocNumToFail int64) error {
var connResume net.Conn
connResume, err = acceptOrWait(listener, waitChan)
if err == nil {
- err = doExchange(test, &resumeConfig, connResume, true /* resumption */)
+ err = doExchange(test, &resumeConfig, connResume, true /* resumption */, i+1)
connResume.Close()
}
}