You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2018/03/13 05:31:49 UTC

[trafficserver] branch quic-latest updated: Make tests compilable again

This is an automated email from the ASF dual-hosted git repository.

maskit pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/quic-latest by this push:
     new 943dfdb  Make tests compilable again
943dfdb is described below

commit 943dfdb66eef9aec56e417bcbe49165429331365
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Tue Mar 13 14:31:11 2018 +0900

    Make tests compilable again
---
 iocore/net/quic/test/Makefile.am               | 16 ++++++++++++++++
 iocore/net/quic/test/test_QUICLossDetector.cc  |  4 ++--
 iocore/net/quic/test/test_QUICPacket.cc        | 10 +++++-----
 iocore/net/quic/test/test_QUICPacketFactory.cc |  4 ++--
 4 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/iocore/net/quic/test/Makefile.am b/iocore/net/quic/test/Makefile.am
index d0b482e..6e05382 100644
--- a/iocore/net/quic/test/Makefile.am
+++ b/iocore/net/quic/test/Makefile.am
@@ -347,6 +347,8 @@ test_QUICKeyGenerator_LDFLAGS = \
 test_QUICKeyGenerator_LDADD = \
   @OPENSSL_LIBS@ \
   $(top_builddir)/lib/ts/libtsutil.la \
+  $(top_builddir)/lib/records/librecords_p.a \
+  $(top_builddir)/mgmt/libmgmt_p.la \
   $(top_builddir)/proxy/shared/libUglyLogStubs.a \
   $(top_builddir)/iocore/eventsystem/libinkevent.a
 
@@ -355,6 +357,13 @@ test_QUICKeyGenerator_SOURCES = \
   test_QUICKeyGenerator.cc \
   ../QUICKeyGenerator.cc \
   $(QUICKeyGenerator_impl) \
+  ../QUICDebugNames.cc \
+  ../QUICIncomingFrameBuffer.cc \
+  ../QUICFlowController.cc \
+  ../QUICPacket.cc \
+  ../QUICStreamState.cc \
+  ../QUICFrame.cc \
+  ../QUICStream.cc \
   ../QUICHKDF.cc \
   ../QUICTypes.cc
 
@@ -387,6 +396,13 @@ test_QUICHandshakeProtocol_SOURCES = \
   $(QUICTLS_impl) \
   ../QUICHandshakeProtocol.h \
   ../QUICTypes.cc \
+  ../QUICDebugNames.cc \
+  ../QUICStreamState.cc \
+  ../QUICFrame.cc \
+  ../QUICStream.cc \
+  ../QUICPacket.cc \
+  ../QUICIncomingFrameBuffer.cc \
+  ../QUICFlowController.cc \
   ../QUICGlobals.cc \
   ../../SSLNextProtocolSet.cc
 
diff --git a/iocore/net/quic/test/test_QUICLossDetector.cc b/iocore/net/quic/test/test_QUICLossDetector.cc
index 1fb01cf..963be5f 100644
--- a/iocore/net/quic/test/test_QUICLossDetector.cc
+++ b/iocore/net/quic/test/test_QUICLossDetector.cc
@@ -54,10 +54,10 @@ TEST_CASE("QUICLossDetector_Loss", "[quic]")
     ats_unique_buf payload = ats_unique_malloc(sizeof(raw));
     memcpy(payload.get(), raw, sizeof(raw));
 
-    QUICPacketHeader *header = QUICPacketHeader::build(QUICPacketType::HANDSHAKE, 0xffddbb9977553311ULL, 0x00000001, 0, 0x00112233,
+    QUICPacketHeaderUPtr header = QUICPacketHeader::build(QUICPacketType::HANDSHAKE, 0xffddbb9977553311ULL, 0x00000001, 0, 0x00112233,
                                                        std::move(payload), sizeof(raw));
     QUICPacketUPtr packet =
-      QUICPacketUPtr(new QUICPacket(header, std::move(payload), sizeof(raw), true), [](QUICPacket *p) { delete p; });
+      QUICPacketUPtr(new QUICPacket(std::move(header), std::move(payload), sizeof(raw), true), [](QUICPacket *p) { delete p; });
     detector.on_packet_sent(std::move(packet));
     ink_hrtime_sleep(HRTIME_MSECONDS(1000));
     CHECK(tx->retransmitted.size() > 0);
diff --git a/iocore/net/quic/test/test_QUICPacket.cc b/iocore/net/quic/test/test_QUICPacket.cc
index fe83032..d8bf64d 100644
--- a/iocore/net/quic/test/test_QUICPacket.cc
+++ b/iocore/net/quic/test/test_QUICPacket.cc
@@ -37,7 +37,7 @@ TEST_CASE("QUICPacketHeader - Long", "[quic]")
       0x00, 0x00, 0x00, 0x09,                         // Supported Version 1
     };
 
-    QUICPacketHeader *header = QUICPacketHeader::load(input, sizeof(input), 0);
+    QUICPacketHeaderUPtr header = QUICPacketHeader::load({const_cast<uint8_t*>(input), [](void *p) {}}, sizeof(input), 0);
     CHECK(header->size() == 13);
     CHECK(header->packet_size() == 21);
     CHECK(header->type() == QUICPacketType::VERSION_NEGOTIATION);
@@ -58,7 +58,7 @@ TEST_CASE("QUICPacketHeader - Long", "[quic]")
       0xff, 0xff,                                     // Payload (dummy)
     };
 
-    QUICPacketHeader *header = QUICPacketHeader::load(input, sizeof(input), 0);
+    QUICPacketHeaderUPtr header = QUICPacketHeader::load({const_cast<uint8_t*>(input), [](void *p) {}}, sizeof(input), 0);
     CHECK(header->size() == 17);
     CHECK(header->packet_size() == 19);
     CHECK(header->type() == QUICPacketType::INITIAL);
@@ -85,7 +85,7 @@ TEST_CASE("QUICPacketHeader - Long", "[quic]")
     ats_unique_buf payload = ats_unique_malloc(5);
     memcpy(payload.get(), expected + 17, 5);
 
-    QUICPacketHeader *header =
+    QUICPacketHeaderUPtr header =
       QUICPacketHeader::build(QUICPacketType::INITIAL, 0x0102030405060708, 0x12345678, 0, 0x11223344, std::move(payload), 32);
 
     CHECK(header->size() == 17);
@@ -115,7 +115,7 @@ TEST_CASE("QUICPacketHeader - Short", "[quic]")
       0xff, 0xff,                                     // Payload (dummy)
     };
 
-    QUICPacketHeader *header = QUICPacketHeader::load(input, sizeof(input), 0);
+    QUICPacketHeaderUPtr header = QUICPacketHeader::load({const_cast<uint8_t *>(input), [](void *p) {}}, sizeof(input), 0);
     CHECK(header->size() == 13);
     CHECK(header->packet_size() == 15);
     CHECK(header->has_key_phase() == true);
@@ -140,7 +140,7 @@ TEST_CASE("QUICPacketHeader - Short", "[quic]")
 
     ats_unique_buf payload = ats_unique_malloc(5);
     memcpy(payload.get(), expected + 13, 5);
-    QUICPacketHeader *header = QUICPacketHeader::build(QUICPacketType::PROTECTED, QUICKeyPhase::PHASE_0, 0x0102030405060708,
+    QUICPacketHeaderUPtr header = QUICPacketHeader::build(QUICPacketType::PROTECTED, QUICKeyPhase::PHASE_0, 0x0102030405060708,
                                                        0x12345678, 0, std::move(payload), 32);
     CHECK(header->size() == 13);
     CHECK(header->packet_size() == 0);
diff --git a/iocore/net/quic/test/test_QUICPacketFactory.cc b/iocore/net/quic/test/test_QUICPacketFactory.cc
index ba5c523..853f436 100644
--- a/iocore/net/quic/test/test_QUICPacketFactory.cc
+++ b/iocore/net/quic/test/test_QUICPacketFactory.cc
@@ -42,8 +42,8 @@ TEST_CASE("QUICPacketFactory_Create_VersionNegotiationPacket", "[quic]")
     0x00 // Payload
   };
 
-  QUICPacketHeader *header = QUICPacketHeader::load(client_initial_packet_header, sizeof(client_initial_packet_header), 0);
-  QUICPacket client_initial_packet(header, ats_unique_buf(client_initial_packet_payload, [](void *) {}),
+  QUICPacketHeaderUPtr header = QUICPacketHeader::load({client_initial_packet_header, [](void *) {}}, sizeof(client_initial_packet_header), 0);
+  QUICPacket client_initial_packet(std::move(header), ats_unique_buf(client_initial_packet_payload, [](void *) {}),
                                    sizeof(client_initial_packet_payload), 0);
 
   QUICPacketUPtr packet = factory.create_version_negotiation_packet(&client_initial_packet, 0);

-- 
To stop receiving notification emails like this one, please contact
maskit@apache.org.