summaryrefslogtreecommitdiffstats
path: root/net/tools
diff options
context:
space:
mode:
authorrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-09 10:45:41 +0000
committerrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-09 10:45:41 +0000
commitbdf2d434f0f0f832237257fe837a24cf4514fdaa (patch)
tree03f08727c56150f40d453204b80c08daefd039e7 /net/tools
parent70e263e2fbd7c254a0bf462cd8e409a0102eec10 (diff)
downloadchromium_src-bdf2d434f0f0f832237257fe837a24cf4514fdaa.zip
chromium_src-bdf2d434f0f0f832237257fe837a24cf4514fdaa.tar.gz
chromium_src-bdf2d434f0f0f832237257fe837a24cf4514fdaa.tar.bz2
Land Recent QUIC Changes.
Add a LOG(DFATAL) if the sequence number length is too small to fit the least_unacked delta in a QUIC ack frame. Merge internal change: 61228351 https://codereview.chromium.org/156233004/ Change the types of the arguments to two methods in QuicReceivedPacketManager to be more specific. No behavior changes. Merge internal change: 61215502 https://codereview.chromium.org/157803006/ Add convenience version() method to QuicServerSessionTest. Merge internal change: 61210235 https://codereview.chromium.org/158173002/ Add convenience version() method to QuicSessionTest. Merge internal change: 61206589 https://codereview.chromium.org/158063003/ Fix bug in QuicSentPacketManager::ClearPreviousRetransmissions where pending packets were abandoned instead of being kept unacked so they could be detected to be lost. Merge internal change: 61197933 https://codereview.chromium.org/158073007/ Add QUIC_VERSION_15 to add a revived_packets set to replace the deprecated accumulated_number_of_lost_packets field. FEC requires a way to communicate that the peer doesn't need a packet retransmitted, without indicating it's been received to the send algorithm. Merge internal change: 61159374 https://codereview.chromium.org/157403006/ Rename previous_transmissions to all_transmission in the QUIC unacked packet map. Change all_transmission to include all transmissions of a packet, even if there is only one, instead of becoming null. Merge internal change: 61144526 https://codereview.chromium.org/158153002/ Use an alternative fix for OneShotVisitor of CryptoFramer that doesn't require a done() method. Detect an old-style Public Reset packet by checking for a sequence number length of 6 in public flags. This requires updating the expected error details messages in PublicResetPacket unit tests. Merge internal change: 61152017 https://codereview.chromium.org/153993015/ Refactor QuicSentPacketManager::MarkPacketHandled to simplify implementation in preparation for breaking out the unacked packet map. Also fixes a minor bug in which a packet which has been marked for retransmission would still be retransmitted if a previous transmission was acked. Merge internal change: 61139074 https://codereview.chromium.org/137923007/ Doing early validation of quic config, to change a potential crash-during-serving to a crash-on-startup. Changing a serving crash to a start-up crash. Not flag protected Merge internal change: 61136961 https://codereview.chromium.org/157383006/ Remove parity tracking in FEC groups as part of the migration to QUIC_VERSION_15, which does not need it. Merge internal change: 61136827 https://codereview.chromium.org/157913003/ Comment out flaky test expectation while the root cause is investigated. Merge internal change: 61104556 https://codereview.chromium.org/135933005/ QUIC - clean up changes - fixed during merge with internal source code. Merge internal change: 61045294 https://codereview.chromium.org/157403005/ Fix problems with absolute value function. The standard library provides seven absolute value functions.  From C, there is abs, labs, llabs, fabs, fabsf, and fabsl for the types int, long, long long, double, float and long double.  Due to numeric conversions, these functions can accept arguments of any numeric types, silently converting between types.  C++ libraries has std::abs, which provides overloads for all these types, making it a better choice.  The following problems have been observed, along with their fixes: 1) The wrong sized absolute value was used.  Using abs for a long long would cause a cast to int first, resulting in unexpected values outside of the range (INT_MIN, INT_MAX).  Switch to using std::abs 2) Using the wrong type of absolute value function.  Passing a floating point number to an integer absolute value will cause rounding of values, especially important for values close to zero.  Switch to using std::abs 3) Taking the absolute value of an unsigned value.  This usually has no effect, but may have some effects from casting.  Fixed by removing the absolute value function. 4) Attempting to find the absolute difference between two unsigned values.  These were transformed from abs(a - b) to (a > b ? a - b : b - a).  This ternary expression is usually stored in another variable. 5) Accidentally capturing the conditional such as abs(a - b < threshold).  Moving the parentheses over to fix. 6) Some static_casts were used to, such as from uint32 -> int64, to get a signed value in the absolute value. 7) A few types were changed from unsigned to signed. Merge internal change: 61013787 https://codereview.chromium.org/136123012/ Pass the whole QuicRstStreamFrame to OnStreamReset. Preparation for dealing with byte_offset updates that arrive in the RST frame. (minor) QUIC OnStreamReset now takes QuicRstStreamFrame as argument. Merge internal change: 60995908 https://codereview.chromium.org/142373006/ R=rch@chromium.org Review URL: https://codereview.chromium.org/157803007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249994 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/tools')
-rw-r--r--net/tools/quic/end_to_end_test.cc4
-rw-r--r--net/tools/quic/quic_server_session_test.cc18
2 files changed, 12 insertions, 10 deletions
diff --git a/net/tools/quic/end_to_end_test.cc b/net/tools/quic/end_to_end_test.cc
index 36e64ee..2e08a50 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -451,9 +451,9 @@ TEST_P(EndToEndTest, LargePostNoPacketLoss) {
EXPECT_EQ(kFooResponseBody, client_->SendCustomSynchronousRequest(request));
QuicConnectionStats stats =
client_->client()->session()->connection()->GetStats();
- // TODO(rtenneti): Enable packets_lost check after bug(12887145) is fixed.
+ // TODO(ianswett): Restore the packets_lost expectation when fixing b/12887145
// EXPECT_EQ(0u, stats.packets_lost);
- // EXPECT_EQ(0u, stats.rto_count);
+ EXPECT_EQ(0u, stats.rto_count);
}
TEST_P(EndToEndTest, LargePostNoPacketLoss1sRTT) {
diff --git a/net/tools/quic/quic_server_session_test.cc b/net/tools/quic/quic_server_session_test.cc
index 9466d91..019ff92 100644
--- a/net/tools/quic/quic_server_session_test.cc
+++ b/net/tools/quic/quic_server_session_test.cc
@@ -110,6 +110,8 @@ class QuicServerSessionTest : public ::testing::TestWithParam<QuicVersion> {
QuicDataStreamPeer::SetHeadersDecompressed(stream, true);
}
+ QuicVersion version() const { return connection_->version(); }
+
StrictMock<MockQuicServerSessionVisitor> owner_;
StrictMock<MockConnection>* connection_;
QuicConfig config_;
@@ -122,7 +124,7 @@ INSTANTIATE_TEST_CASE_P(Tests, QuicServerSessionTest,
::testing::ValuesIn(QuicSupportedVersions()));
TEST_P(QuicServerSessionTest, CloseStreamDueToReset) {
- QuicStreamId stream_id = GetParam() == QUIC_VERSION_12 ? 3 : 5;
+ QuicStreamId stream_id = (version() == QUIC_VERSION_12 ? 3 : 5);
// Open a stream, then reset it.
// Send two bytes of payload to open it.
QuicStreamFrame data1(stream_id, false, 0, MakeIOVector("HT"));
@@ -148,7 +150,7 @@ TEST_P(QuicServerSessionTest, CloseStreamDueToReset) {
}
TEST_P(QuicServerSessionTest, NeverOpenStreamDueToReset) {
- QuicStreamId stream_id = GetParam() == QUIC_VERSION_12 ? 3 : 5;
+ QuicStreamId stream_id = (version() == QUIC_VERSION_12 ? 3 : 5);
// Send a reset.
QuicRstStreamFrame rst1(stream_id, QUIC_STREAM_NO_ERROR, 0);
visitor_->OnRstStream(rst1);
@@ -159,7 +161,7 @@ TEST_P(QuicServerSessionTest, NeverOpenStreamDueToReset) {
vector<QuicStreamFrame> frames;
frames.push_back(data1);
- if (connection_->version() > QUIC_VERSION_12) {
+ if (version() > QUIC_VERSION_12) {
EXPECT_TRUE(visitor_->OnStreamFrames(frames));
} else {
// When we get data for the closed stream, it implies the far side has
@@ -175,8 +177,8 @@ TEST_P(QuicServerSessionTest, NeverOpenStreamDueToReset) {
}
TEST_P(QuicServerSessionTest, GoOverPrematureClosedStreamLimit) {
- QuicStreamId stream_id = GetParam() == QUIC_VERSION_12 ? 3 : 5;
- if (connection_->version() > QUIC_VERSION_12) {
+ QuicStreamId stream_id = (version() == QUIC_VERSION_12 ? 3 : 5);
+ if (version() > QUIC_VERSION_12) {
// The prematurely closed stream limit is v12 specific.
return;
}
@@ -194,7 +196,7 @@ TEST_P(QuicServerSessionTest, GoOverPrematureClosedStreamLimit) {
}
TEST_P(QuicServerSessionTest, AcceptClosedStream) {
- QuicStreamId stream_id = GetParam() == QUIC_VERSION_12 ? 3 : 5;
+ QuicStreamId stream_id = (version() == QUIC_VERSION_12 ? 3 : 5);
vector<QuicStreamFrame> frames;
// Send (empty) compressed headers followed by two bytes of data.
frames.push_back(QuicStreamFrame(stream_id, false, 0,
@@ -222,7 +224,7 @@ TEST_P(QuicServerSessionTest, AcceptClosedStream) {
}
TEST_P(QuicServerSessionTest, MaxNumConnections) {
- QuicStreamId stream_id = GetParam() == QUIC_VERSION_12 ? 3 : 5;
+ QuicStreamId stream_id = (version() == QUIC_VERSION_12 ? 3 : 5);
EXPECT_EQ(0u, session_->GetNumOpenStreams());
EXPECT_TRUE(QuicServerSessionPeer::GetIncomingDataStream(session_.get(),
stream_id));
@@ -236,7 +238,7 @@ TEST_P(QuicServerSessionTest, MaxNumConnections) {
}
TEST_P(QuicServerSessionTest, MaxNumConnectionsImplicit) {
- QuicStreamId stream_id = GetParam() == QUIC_VERSION_12 ? 3 : 5;
+ QuicStreamId stream_id = (version() == QUIC_VERSION_12 ? 3 : 5);
EXPECT_EQ(0u, session_->GetNumOpenStreams());
EXPECT_TRUE(QuicServerSessionPeer::GetIncomingDataStream(session_.get(),
stream_id));