Unbreak SSL_total_renegotiations.

The logic to update that got removed in
https://boringssl-review.googlesource.com/4825. Add tests.

Change-Id: Idc550e8fa3ce6f69a76fa65d7651adde281edba6
Reviewed-on: https://boringssl-review.googlesource.com/6220
Reviewed-by: Matt Braithwaite <mab@google.com>
Reviewed-by: Adam Langley <alangley@gmail.com>
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/ssl/test/runner/runner.go b/ssl/test/runner/runner.go
index 61c8c57..ed37b77 100644
--- a/ssl/test/runner/runner.go
+++ b/ssl/test/runner/runner.go
@@ -2711,6 +2711,7 @@
 		tests = append(tests, testCase{
 			name:        "Renegotiate-Client",
 			renegotiate: true,
+			flags:       []string{"-expect-total-renegotiations", "1"},
 		})
 		// NPN on client and server; results in post-handshake message.
 		tests = append(tests, testCase{
@@ -3715,6 +3716,7 @@
 			},
 		},
 		renegotiate: true,
+		flags:       []string{"-expect-total-renegotiations", "1"},
 	})
 	testCases = append(testCases, testCase{
 		name:        "Renegotiate-Client-EmptyExt",
@@ -3757,6 +3759,7 @@
 				NoRenegotiationInfo: true,
 			},
 		},
+		flags: []string{"-expect-total-renegotiations", "1"},
 	})
 	testCases = append(testCases, testCase{
 		name:        "Renegotiate-Client-SwitchCiphers",
@@ -3765,6 +3768,7 @@
 			CipherSuites: []uint16{TLS_RSA_WITH_RC4_128_SHA},
 		},
 		renegotiateCiphers: []uint16{TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256},
+		flags:              []string{"-expect-total-renegotiations", "1"},
 	})
 	testCases = append(testCases, testCase{
 		name:        "Renegotiate-Client-SwitchCiphers2",
@@ -3773,6 +3777,7 @@
 			CipherSuites: []uint16{TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256},
 		},
 		renegotiateCiphers: []uint16{TLS_RSA_WITH_RC4_128_SHA},
+		flags:              []string{"-expect-total-renegotiations", "1"},
 	})
 	testCases = append(testCases, testCase{
 		name:               "Renegotiate-Client-Forbidden",
@@ -3791,6 +3796,7 @@
 				RequireSameRenegoClientVersion: true,
 			},
 		},
+		flags: []string{"-expect-total-renegotiations", "1"},
 	})
 	testCases = append(testCases, testCase{
 		name:        "Renegotiate-FalseStart",
@@ -3802,6 +3808,7 @@
 		flags: []string{
 			"-false-start",
 			"-select-next-proto", "foo",
+			"-expect-total-renegotiations", "1",
 		},
 		shimWritesFirst: true,
 	})