diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/doxygen/Doxyfile.core.internal | 1 | ||||
-rw-r--r-- | tools/http2_interop/http2interop_test.go | 44 | ||||
-rw-r--r-- | tools/http2_interop/s6.5.go | 1 | ||||
-rw-r--r-- | tools/http2_interop/s6.5_test.go | 5 | ||||
-rw-r--r-- | tools/http2_interop/testsuite.go | 56 | ||||
-rwxr-xr-x | tools/run_tests/run_interop_tests.py | 3 | ||||
-rw-r--r-- | tools/run_tests/sources_and_headers.json | 246 | ||||
-rw-r--r-- | tools/run_tests/tests.json | 216 |
8 files changed, 558 insertions, 14 deletions
diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 8dcd8cd42c..21c6b36ca1 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -1010,6 +1010,7 @@ src/core/surface/call_log_batch.c \ src/core/surface/channel.c \ src/core/surface/channel_connectivity.c \ src/core/surface/channel_create.c \ +src/core/surface/channel_ping.c \ src/core/surface/completion_queue.c \ src/core/surface/event_string.c \ src/core/surface/init.c \ diff --git a/tools/http2_interop/http2interop_test.go b/tools/http2_interop/http2interop_test.go index b35d085569..fb314da196 100644 --- a/tools/http2_interop/http2interop_test.go +++ b/tools/http2_interop/http2interop_test.go @@ -3,6 +3,7 @@ package http2interop import ( "crypto/tls" "crypto/x509" + "encoding/json" "flag" "fmt" "io/ioutil" @@ -67,7 +68,8 @@ func (ctx *HTTP2InteropCtx) Close() error { return nil } -func TestClientShortSettings(t *testing.T) { +func TestSoonClientShortSettings(t *testing.T) { + defer Report(t) if *testCase != "framing" { t.SkipNow() } @@ -78,7 +80,8 @@ func TestClientShortSettings(t *testing.T) { } } -func TestShortPreface(t *testing.T) { +func TestSoonShortPreface(t *testing.T) { + defer Report(t) if *testCase != "framing" { t.SkipNow() } @@ -89,7 +92,8 @@ func TestShortPreface(t *testing.T) { } } -func TestUnknownFrameType(t *testing.T) { +func TestSoonUnknownFrameType(t *testing.T) { + defer Report(t) if *testCase != "framing" { t.SkipNow() } @@ -99,7 +103,8 @@ func TestUnknownFrameType(t *testing.T) { } } -func TestClientPrefaceWithStreamId(t *testing.T) { +func TestSoonClientPrefaceWithStreamId(t *testing.T) { + defer Report(t) if *testCase != "framing" { t.SkipNow() } @@ -108,7 +113,8 @@ func TestClientPrefaceWithStreamId(t *testing.T) { matchError(t, err, "EOF") } -func TestTLSApplicationProtocol(t *testing.T) { +func TestSoonTLSApplicationProtocol(t *testing.T) { + defer Report(t) if *testCase != "tls" { t.SkipNow() } @@ -117,7 +123,8 @@ func TestTLSApplicationProtocol(t *testing.T) { matchError(t, err, "EOF", "broken pipe") } -func TestTLSMaxVersion(t *testing.T) { +func TestSoonTLSMaxVersion(t *testing.T) { + defer Report(t) if *testCase != "tls" { t.SkipNow() } @@ -128,7 +135,8 @@ func TestTLSMaxVersion(t *testing.T) { matchError(t, err, "EOF", "server selected unsupported protocol") } -func TestTLSBadCipherSuites(t *testing.T) { +func TestSoonTLSBadCipherSuites(t *testing.T) { + defer Report(t) if *testCase != "tls" { t.SkipNow() } @@ -151,5 +159,25 @@ func matchError(t *testing.T, err error, matches ...string) { func TestMain(m *testing.M) { flag.Parse() - os.Exit(m.Run()) + m.Run() + var fatal bool + var any bool + for _, ci := range allCaseInfos.Cases { + if ci.Skipped { + continue + } + any = true + if !ci.Passed && ci.Fatal { + fatal = true + } + } + + if err := json.NewEncoder(os.Stderr).Encode(&allCaseInfos); err != nil { + fmt.Println("Failed to encode", err) + } + var code int + if !any || fatal { + code = 1 + } + os.Exit(code) } diff --git a/tools/http2_interop/s6.5.go b/tools/http2_interop/s6.5.go index 8145b6e031..32468abe83 100644 --- a/tools/http2_interop/s6.5.go +++ b/tools/http2_interop/s6.5.go @@ -11,7 +11,6 @@ func testSmallMaxFrameSize(ctx *HTTP2InteropCtx) error { return err } defer conn.Close() - conn.Log = ctx.T.Log conn.SetDeadline(time.Now().Add(defaultTimeout)) sf := &SettingsFrame{ diff --git a/tools/http2_interop/s6.5_test.go b/tools/http2_interop/s6.5_test.go index 48e8ced576..9dadd4e699 100644 --- a/tools/http2_interop/s6.5_test.go +++ b/tools/http2_interop/s6.5_test.go @@ -4,8 +4,9 @@ import ( "testing" ) -func TestSmallMaxFrameSize(t *testing.T) { - if *testCase != "experimental" { +func TestSoonSmallMaxFrameSize(t *testing.T) { + defer Report(t) + if *testCase != "framing" { t.SkipNow() } ctx := InteropCtx(t) diff --git a/tools/http2_interop/testsuite.go b/tools/http2_interop/testsuite.go new file mode 100644 index 0000000000..51d36e217e --- /dev/null +++ b/tools/http2_interop/testsuite.go @@ -0,0 +1,56 @@ +package http2interop + +import ( + "path" + "runtime" + "strings" + "sync" + "testing" +) + +// When a test is skipped or fails, runtime.Goexit() is called which destroys the callstack. +// This means the name of the test case is lost, so we need to grab a copy of pc before. +func Report(t testing.TB) { + // If the goroutine panics, Fatal()s, or Skip()s, the function name is at the 3rd callstack + // layer. On success, its at 1st. Since it's hard to check which happened, just try both. + pcs := make([]uintptr, 10) + total := runtime.Callers(1, pcs) + var name string + for _, pc := range pcs[:total] { + fn := runtime.FuncForPC(pc) + fullName := fn.Name() + if strings.HasPrefix(path.Ext(fullName), ".Test") { + // Skip the leading . + name = string([]byte(path.Ext(fullName))[1:]) + break + } + } + if name == "" { + return + } + + allCaseInfos.lock.Lock() + defer allCaseInfos.lock.Unlock() + allCaseInfos.Cases = append(allCaseInfos.Cases, &caseInfo{ + Name: name, + Passed: !t.Failed() && !t.Skipped(), + Skipped: t.Skipped(), + Fatal: t.Failed() && !strings.HasPrefix(name, "TestSoon"), + }) +} + +type caseInfo struct { + Name string `json:"name"` + Passed bool `json:"passed"` + Skipped bool `json:"skipped,omitempty"` + Fatal bool `json:"fatal,omitempty"` +} + +type caseInfos struct { + lock sync.Mutex + Cases []*caseInfo `json:"cases"` +} + +var ( + allCaseInfos = caseInfos{} +) diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index 5435a1d02f..5feb4f0c38 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -661,9 +661,6 @@ try: if args.http2_interop: for test_case in _HTTP2_TEST_CASES: - if server_name == "go": - # TODO(carl-mastrangelo): Reenable after https://github.com/grpc/grpc-go/issues/434 - continue test_job = cloud_to_cloud_jobspec(http2Interop, test_case, server_name, diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index accdee62d1..fd4fdaecfd 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -1989,6 +1989,21 @@ "deps": [ "end2end_certs", "end2end_fixture_h2_compress", + "end2end_test_channel_ping", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_compress_channel_ping_test", + "src": [] + }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_compress", "end2end_test_compressed_payload", "gpr", "gpr_test_util", @@ -2529,6 +2544,21 @@ "deps": [ "end2end_certs", "end2end_fixture_h2_fakesec", + "end2end_test_channel_ping", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_fakesec_channel_ping_test", + "src": [] + }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_fakesec", "end2end_test_compressed_payload", "gpr", "gpr_test_util", @@ -3069,6 +3099,21 @@ "deps": [ "end2end_certs", "end2end_fixture_h2_full", + "end2end_test_channel_ping", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_full_channel_ping_test", + "src": [] + }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_full", "end2end_test_compressed_payload", "gpr", "gpr_test_util", @@ -3609,6 +3654,21 @@ "deps": [ "end2end_certs", "end2end_fixture_h2_full+poll", + "end2end_test_channel_ping", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_full+poll_channel_ping_test", + "src": [] + }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_full+poll", "end2end_test_compressed_payload", "gpr", "gpr_test_util", @@ -4149,6 +4209,21 @@ "deps": [ "end2end_certs", "end2end_fixture_h2_oauth2", + "end2end_test_channel_ping", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_oauth2_channel_ping_test", + "src": [] + }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_oauth2", "end2end_test_compressed_payload", "gpr", "gpr_test_util", @@ -6579,6 +6654,21 @@ "deps": [ "end2end_certs", "end2end_fixture_h2_ssl", + "end2end_test_channel_ping", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_ssl_channel_ping_test", + "src": [] + }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_ssl", "end2end_test_compressed_payload", "gpr", "gpr_test_util", @@ -7119,6 +7209,21 @@ "deps": [ "end2end_certs", "end2end_fixture_h2_ssl+poll", + "end2end_test_channel_ping", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_ssl+poll_channel_ping_test", + "src": [] + }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_ssl+poll", "end2end_test_compressed_payload", "gpr", "gpr_test_util", @@ -8604,6 +8709,21 @@ "deps": [ "end2end_certs", "end2end_fixture_h2_uds", + "end2end_test_channel_ping", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_uds_channel_ping_test", + "src": [] + }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_uds", "end2end_test_compressed_payload", "gpr", "gpr_test_util", @@ -9129,6 +9249,21 @@ "deps": [ "end2end_certs", "end2end_fixture_h2_uds+poll", + "end2end_test_channel_ping", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_uds+poll_channel_ping_test", + "src": [] + }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_uds+poll", "end2end_test_compressed_payload", "gpr", "gpr_test_util", @@ -9628,6 +9763,20 @@ { "deps": [ "end2end_nosec_fixture_h2_compress", + "end2end_nosec_test_channel_ping", + "gpr", + "gpr_test_util", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [], + "language": "c", + "name": "h2_compress_channel_ping_nosec_test", + "src": [] + }, + { + "deps": [ + "end2end_nosec_fixture_h2_compress", "end2end_nosec_test_compressed_payload", "gpr", "gpr_test_util", @@ -10118,6 +10267,20 @@ { "deps": [ "end2end_nosec_fixture_h2_full", + "end2end_nosec_test_channel_ping", + "gpr", + "gpr_test_util", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [], + "language": "c", + "name": "h2_full_channel_ping_nosec_test", + "src": [] + }, + { + "deps": [ + "end2end_nosec_fixture_h2_full", "end2end_nosec_test_compressed_payload", "gpr", "gpr_test_util", @@ -10608,6 +10771,20 @@ { "deps": [ "end2end_nosec_fixture_h2_full+poll", + "end2end_nosec_test_channel_ping", + "gpr", + "gpr_test_util", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [], + "language": "c", + "name": "h2_full+poll_channel_ping_nosec_test", + "src": [] + }, + { + "deps": [ + "end2end_nosec_fixture_h2_full+poll", "end2end_nosec_test_compressed_payload", "gpr", "gpr_test_util", @@ -13240,6 +13417,20 @@ { "deps": [ "end2end_nosec_fixture_h2_uds", + "end2end_nosec_test_channel_ping", + "gpr", + "gpr_test_util", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [], + "language": "c", + "name": "h2_uds_channel_ping_nosec_test", + "src": [] + }, + { + "deps": [ + "end2end_nosec_fixture_h2_uds", "end2end_nosec_test_compressed_payload", "gpr", "gpr_test_util", @@ -13716,6 +13907,20 @@ { "deps": [ "end2end_nosec_fixture_h2_uds+poll", + "end2end_nosec_test_channel_ping", + "gpr", + "gpr_test_util", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [], + "language": "c", + "name": "h2_uds+poll_channel_ping_nosec_test", + "src": [] + }, + { + "deps": [ + "end2end_nosec_fixture_h2_uds+poll", "end2end_nosec_test_compressed_payload", "gpr", "gpr_test_util", @@ -14579,6 +14784,7 @@ "src/core/surface/channel.h", "src/core/surface/channel_connectivity.c", "src/core/surface/channel_create.c", + "src/core/surface/channel_ping.c", "src/core/surface/completion_queue.c", "src/core/surface/completion_queue.h", "src/core/surface/event_string.c", @@ -15058,6 +15264,7 @@ "src/core/surface/channel.h", "src/core/surface/channel_connectivity.c", "src/core/surface/channel_create.c", + "src/core/surface/channel_ping.c", "src/core/surface/completion_queue.c", "src/core/surface/completion_queue.h", "src/core/surface/event_string.c", @@ -16378,6 +16585,26 @@ "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", + "name": "end2end_test_channel_ping", + "src": [ + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/tests/channel_ping.c" + ] + }, + { + "deps": [ + "end2end_certs", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [ + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" + ], + "language": "c", "name": "end2end_test_compressed_payload", "src": [ "test/core/end2end/end2end_tests.h", @@ -17067,6 +17294,25 @@ "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", + "name": "end2end_nosec_test_channel_ping", + "src": [ + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/tests/channel_ping.c" + ] + }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [ + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" + ], + "language": "c", "name": "end2end_nosec_test_compressed_payload", "src": [ "test/core/end2end/end2end_tests.h", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index db57e0cc86..bc82b67b81 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -1893,6 +1893,24 @@ "exclude_configs": [], "flaky": false, "language": "c", + "name": "h2_compress_channel_ping_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, + { + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", "name": "h2_compress_compressed_payload_test", "platforms": [ "linux", @@ -2529,6 +2547,23 @@ "exclude_configs": [], "flaky": false, "language": "c", + "name": "h2_fakesec_channel_ping_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, + { + "ci_platforms": [ + "linux", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", "name": "h2_fakesec_compressed_payload_test", "platforms": [ "linux", @@ -3153,6 +3188,24 @@ "exclude_configs": [], "flaky": false, "language": "c", + "name": "h2_full_channel_ping_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, + { + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", "name": "h2_full_compressed_payload_test", "platforms": [ "linux", @@ -3732,6 +3785,18 @@ "exclude_configs": [], "flaky": false, "language": "c", + "name": "h2_full+poll_channel_ping_test", + "platforms": [ + "linux" + ] + }, + { + "ci_platforms": [ + "linux" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", "name": "h2_full+poll_compressed_payload_test", "platforms": [ "linux" @@ -4221,6 +4286,23 @@ "exclude_configs": [], "flaky": false, "language": "c", + "name": "h2_oauth2_channel_ping_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, + { + "ci_platforms": [ + "linux", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", "name": "h2_oauth2_compressed_payload_test", "platforms": [ "linux", @@ -7018,6 +7100,24 @@ "exclude_configs": [], "flaky": false, "language": "c", + "name": "h2_ssl_channel_ping_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, + { + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", "name": "h2_ssl_compressed_payload_test", "platforms": [ "linux", @@ -7597,6 +7697,18 @@ "exclude_configs": [], "flaky": false, "language": "c", + "name": "h2_ssl+poll_channel_ping_test", + "platforms": [ + "linux" + ] + }, + { + "ci_platforms": [ + "linux" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", "name": "h2_ssl+poll_compressed_payload_test", "platforms": [ "linux" @@ -9178,6 +9290,22 @@ "exclude_configs": [], "flaky": false, "language": "c", + "name": "h2_uds_channel_ping_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", "name": "h2_uds_compressed_payload_test", "platforms": [ "linux", @@ -9692,6 +9820,18 @@ "exclude_configs": [], "flaky": false, "language": "c", + "name": "h2_uds+poll_channel_ping_test", + "platforms": [ + "linux" + ] + }, + { + "ci_platforms": [ + "linux" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", "name": "h2_uds+poll_compressed_payload_test", "platforms": [ "linux" @@ -10163,6 +10303,24 @@ "exclude_configs": [], "flaky": false, "language": "c", + "name": "h2_compress_channel_ping_nosec_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, + { + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", "name": "h2_compress_compressed_payload_nosec_test", "platforms": [ "linux", @@ -10793,6 +10951,24 @@ "exclude_configs": [], "flaky": false, "language": "c", + "name": "h2_full_channel_ping_nosec_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, + { + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", "name": "h2_full_compressed_payload_nosec_test", "platforms": [ "linux", @@ -11360,6 +11536,18 @@ "exclude_configs": [], "flaky": false, "language": "c", + "name": "h2_full+poll_channel_ping_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "ci_platforms": [ + "linux" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", "name": "h2_full+poll_compressed_payload_nosec_test", "platforms": [ "linux" @@ -14484,6 +14672,22 @@ "exclude_configs": [], "flaky": false, "language": "c", + "name": "h2_uds_channel_ping_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", "name": "h2_uds_compressed_payload_nosec_test", "platforms": [ "linux", @@ -14986,6 +15190,18 @@ "exclude_configs": [], "flaky": false, "language": "c", + "name": "h2_uds+poll_channel_ping_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "ci_platforms": [ + "linux" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", "name": "h2_uds+poll_compressed_payload_nosec_test", "platforms": [ "linux" |