diff --git a/ssl/test/bssl_shim.cc b/ssl/test/bssl_shim.cc index 08482fb69..31c0a0147 100644 --- a/ssl/test/bssl_shim.cc +++ b/ssl/test/bssl_shim.cc @@ -721,7 +721,9 @@ static bool DoConnection(bssl::UniquePtr *out_session, BIO_push(packeted.get(), bio.release()); bio = std::move(packeted); } - if (config->async) { + if (config->async && !config->is_quic) { + // Note async tests only affect callbacks in QUIC. The IO path does not + // behave differently when synchronous or asynchronous our QUIC APIs. bssl::UniquePtr async_scoped = config->is_dtls ? AsyncBioCreateDatagram() : AsyncBioCreate(); if (!async_scoped) { @@ -968,6 +970,11 @@ static bool DoExchange(bssl::UniquePtr *out_session, fprintf(stderr, "-read-with-unfinished-write requires -async.\n"); return false; } + if (config->is_quic) { + fprintf(stderr, + "-read-with-unfinished-write is incompatible with QUIC.\n"); + return false; + } // Let only one byte of the record through. AsyncBioAllowWrite(GetTestState(ssl)->async_bio, 1); diff --git a/ssl/test/runner/runner.go b/ssl/test/runner/runner.go index aca229a3b..f1ec122c3 100644 --- a/ssl/test/runner/runner.go +++ b/ssl/test/runner/runner.go @@ -4574,32 +4574,29 @@ type stateMachineTestConfig struct { func addAllStateMachineCoverageTests() { for _, async := range []bool{false, true} { for _, protocol := range []protocol{tls, dtls, quic} { - if protocol == quic && async == true { - // QUIC doesn't work with async mode. - continue - } addStateMachineCoverageTests(stateMachineTestConfig{ protocol: protocol, async: async, }) - // QUIC doesn't work with implicit handshakes. + // QUIC doesn't work with the implicit handshake API. Additionally, + // splitting or packing handshake records is meaningless in QUIC. if protocol != quic { addStateMachineCoverageTests(stateMachineTestConfig{ protocol: protocol, async: async, implicitHandshake: true, }) + addStateMachineCoverageTests(stateMachineTestConfig{ + protocol: protocol, + async: async, + splitHandshake: true, + }) + addStateMachineCoverageTests(stateMachineTestConfig{ + protocol: protocol, + async: async, + packHandshake: true, + }) } - addStateMachineCoverageTests(stateMachineTestConfig{ - protocol: protocol, - async: async, - splitHandshake: true, - }) - addStateMachineCoverageTests(stateMachineTestConfig{ - protocol: protocol, - async: async, - packHandshake: true, - }) } } } @@ -4768,7 +4765,10 @@ func addStateMachineCoverageTests(config stateMachineTestConfig) { // Unfinished writes can only be tested when operations are async. EarlyData // can't be tested as part of an ImplicitHandshake in this case since // otherwise the early data will be sent as normal data. - if config.async && !config.implicitHandshake { + // + // Note application data is external in QUIC, so unfinished writes do not + // apply. + if config.async && !config.implicitHandshake && config.protocol != quic { tests = append(tests, testCase{ testType: clientTest, name: "TLS13-EarlyData-UnfinishedWrite-Client",