New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 806919 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , iOS , Mac , Fuchsia
Pri: 3
Type: Bug



Sign in to add a comment

Unify quic_test_server in components/cronet and components/grpc support.

Project Member Reported by mef@chromium.org, Jan 29 2018

Issue description

I'm working on Cronet native API, and looking for using quic test server for testing of Cronet native API.

I've noticed that current situation is a bit confusing, as there are 3 different quic_test_servers used in different scenarios:

1. net/tools/quic/test_tools/quic_test_server.cc
- used in net/tools/quic/end_to_end_test.cc and doesn't look similar to the other two.

2. components/cronet/android/test/quic_test_server.cc - used in Cronet Android tests, provides Java bindings for configuration and support.

3. components/grpc_support/test/quic_test_server.cc - used in Cronet iOS tests, components/grpc_support/bidirectional_stream_unittest.cc and chrome/browser/policy/policy_network_browsertest.cc

I would like to unite (2) and (3) so this united quic test server could be used to test Cronet native implementation across platforms.

I would make it part of net:test_support but I'm afraid that this will cause confusion with (1).

Any comments and ideas are appreciated.
 

Comment 1 by rch@chromium.org, Jan 29 2018

It's even slightly more complicated than that because ... reasons.

So in net, there are two different but similar implementations:
* QuicServer
* QuicSimpleServer
They are basically the "same" server, except that the "Simple" server is cross-platform and based on Chrome's UDPSocket and MessageLoop implementations. The "QuicServer" is linux only and based on int fd and EpollServer.

QuicServer is used in the linux-only QUIC end_to_end_test.cc (both of these are basically clones of the internal versions of these files). QuicSimpleServer is used elsewhere, for example quic_end_to_end_unittest.cc and url_request_quic_unittest.cc. This makes sense, as it's the only cross-platform QUIC server we have. I suspect it's also the server used in both components/grpc_support/test/quic_test_server.cc and components/cronet/android/test/quic_test_server.cc.

Whew! A lot of background. I didn't look deeply, but do you know offhand what behavior is added to QuicSimpleServer in components/grpc_support/test/quic_test_server.cc and components/cronet/android/test/quic_test_server.cc?

Comment 2 by mef@chromium.org, Jan 29 2018

Thanks for the background, that's complicated!

Both grpc_support and cronet/android just initialize net::ProofSourceChromium and net::QuicHttpResponseCache and start the net::QuicSimpleServer.

There are slight differences in location of data and crypto data, but I should be able to reconcile that.

My biggest question is what's a good place to put this unified server, as neither grpc_support nor cronet seem appropriate.

Can it go under net/test/ or will it be too confusing vs (1)?

 

Comment 3 by rch@chromium.org, Jan 29 2018

net/test/ sounds fine to me. To avoid confusion with #1, perhaps we can pick a different name (QuicSimpleTestServer?). We could also potentially rename QuicTestServer to something like QuicEpollTestServer or some such?

Comment 4 by mef@chromium.org, Jan 29 2018

Owner: mef@chromium.org
Status: Assigned (was: Untriaged)
QuicSimpleTestServer sounds good. 
Thanks for your support, I'll try to create the CL.

Comment 5 by mef@chromium.org, Mar 5 2018

Status: Started (was: Assigned)
Project Member

Comment 6 by bugdroid1@chromium.org, Mar 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2f3f8eda34a3447f945dc401c5eef0c6c4ce7415

commit 2f3f8eda34a3447f945dc401c5eef0c6c4ce7415
Author: Misha Efimov <mef@chromium.org>
Date: Tue Mar 06 13:27:28 2018

Move Quic Simple Test Server from grpc_support into net.

Bug: 806919
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Id7d1026f1d3a0cc0b808ad59f431586e6854f7c5
Reviewed-on: https://chromium-review.googlesource.com/895665
Reviewed-by: Ryan Hamilton <rch@chromium.org>
Reviewed-by: Bartosz Fabianowski <bartfab@chromium.org>
Commit-Queue: Misha Efimov <mef@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541088}
[modify] https://crrev.com/2f3f8eda34a3447f945dc401c5eef0c6c4ce7415/chrome/browser/policy/policy_network_browsertest.cc
[modify] https://crrev.com/2f3f8eda34a3447f945dc401c5eef0c6c4ce7415/chrome/test/BUILD.gn
[modify] https://crrev.com/2f3f8eda34a3447f945dc401c5eef0c6c4ce7415/components/cronet/ios/test/BUILD.gn
[modify] https://crrev.com/2f3f8eda34a3447f945dc401c5eef0c6c4ce7415/components/cronet/ios/test/cronet_http_test.mm
[modify] https://crrev.com/2f3f8eda34a3447f945dc401c5eef0c6c4ce7415/components/cronet/ios/test/cronet_metrics_test.mm
[modify] https://crrev.com/2f3f8eda34a3447f945dc401c5eef0c6c4ce7415/components/cronet/ios/test/cronet_netlog_test.mm
[modify] https://crrev.com/2f3f8eda34a3447f945dc401c5eef0c6c4ce7415/components/cronet/ios/test/cronet_performance_test.mm
[modify] https://crrev.com/2f3f8eda34a3447f945dc401c5eef0c6c4ce7415/components/cronet/ios/test/cronet_pkp_test.mm
[modify] https://crrev.com/2f3f8eda34a3447f945dc401c5eef0c6c4ce7415/components/cronet/ios/test/cronet_prefs_test.mm
[modify] https://crrev.com/2f3f8eda34a3447f945dc401c5eef0c6c4ce7415/components/cronet/ios/test/cronet_quic_test.mm
[modify] https://crrev.com/2f3f8eda34a3447f945dc401c5eef0c6c4ce7415/components/cronet/ios/test/cronet_test_base.mm
[modify] https://crrev.com/2f3f8eda34a3447f945dc401c5eef0c6c4ce7415/components/grpc_support/BUILD.gn
[modify] https://crrev.com/2f3f8eda34a3447f945dc401c5eef0c6c4ce7415/components/grpc_support/bidirectional_stream_unittest.cc
[modify] https://crrev.com/2f3f8eda34a3447f945dc401c5eef0c6c4ce7415/components/grpc_support/test/BUILD.gn
[modify] https://crrev.com/2f3f8eda34a3447f945dc401c5eef0c6c4ce7415/components/grpc_support/test/get_stream_engine.cc
[delete] https://crrev.com/556bf096d65eb3f2fdc9d0de1431cd077876dd18/components/grpc_support/test/quic_test_server.h
[modify] https://crrev.com/2f3f8eda34a3447f945dc401c5eef0c6c4ce7415/net/BUILD.gn
[rename] https://crrev.com/2f3f8eda34a3447f945dc401c5eef0c6c4ce7415/net/test/quic_simple_test_server.cc
[add] https://crrev.com/2f3f8eda34a3447f945dc401c5eef0c6c4ce7415/net/test/quic_simple_test_server.h

I'll take a look what remains to be done.

Sign in to add a comment