[trafficserver] branch quic-latest updated: Fix building unit tests for QUIC

2019-03-06 Thread masaori
This is an automated email from the ASF dual-hosted git repository.

masaori 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 e5a65d7  Fix building unit tests for QUIC
e5a65d7 is described below

commit e5a65d77da2d2f3b50ca5be7930488352ae896bb
Author: Masaori Koshiba 
AuthorDate: Thu Mar 7 11:16:54 2019 +0900

Fix building unit tests for QUIC

Prior this change, there're many undefined symbols comes from 
SSLMultiCertConfigLoader.
As workaround fix, link unit tests to libinknet.a.
---
 iocore/net/Makefile.am   |   1 +
 iocore/net/libinknet_stub.cc | 163 +++
 iocore/net/quic/Makefile.am  |  15 ++--
 iocore/net/quic/test/stub.cc |  51 --
 iocore/net/test_I_UDPNet.cc  | 142 -
 5 files changed, 173 insertions(+), 199 deletions(-)

diff --git a/iocore/net/Makefile.am b/iocore/net/Makefile.am
index 76a1bdc..dc0a385 100644
--- a/iocore/net/Makefile.am
+++ b/iocore/net/Makefile.am
@@ -83,6 +83,7 @@ test_UDPNet_LDADD = \
@HWLOC_LIBS@ @OPENSSL_LIBS@ @LIBPCRE@ @YAMLCPP_LIBS@
 
 test_UDPNet_SOURCES = \
+   libinknet_stub.cc \
test_I_UDPNet.cc
 
 libinknet_a_SOURCES = \
diff --git a/iocore/net/libinknet_stub.cc b/iocore/net/libinknet_stub.cc
new file mode 100644
index 000..91fbf1f
--- /dev/null
+++ b/iocore/net/libinknet_stub.cc
@@ -0,0 +1,163 @@
+/** @file
+
+  Stub file for linking libinknet.a from unit tests
+
+  @section license License
+
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ */
+
+#include "HttpSessionManager.h"
+
+void
+initialize_thread_for_http_sessions(EThread *, int)
+{
+  ink_assert(false);
+}
+
+#include "P_UnixNet.h"
+#include "P_DNSConnection.h"
+int
+DNSConnection::close()
+{
+  ink_assert(false);
+  return 0;
+}
+
+void
+DNSConnection::trigger()
+{
+  ink_assert(false);
+}
+
+#include "StatPages.h"
+void
+StatPagesManager::register_http(char const *, Action *(*)(Continuation *, 
HTTPHdr *))
+{
+  ink_assert(false);
+}
+
+#include "ParentSelection.h"
+void
+SocksServerConfig::startup()
+{
+  ink_assert(false);
+}
+
+int SocksServerConfig::m_id = 0;
+
+void
+ParentConfigParams::findParent(HttpRequestData *, ParentResult *, unsigned 
int, unsigned int)
+{
+  ink_assert(false);
+}
+
+void
+ParentConfigParams::nextParent(HttpRequestData *, ParentResult *, unsigned 
int, unsigned int)
+{
+  ink_assert(false);
+}
+
+#include "Log.h"
+void
+Log::trace_in(sockaddr const *, unsigned short, char const *, ...)
+{
+  ink_assert(false);
+}
+
+void
+Log::trace_out(sockaddr const *, unsigned short, char const *, ...)
+{
+  ink_assert(false);
+}
+
+#include "InkAPIInternal.h"
+int
+APIHook::invoke(int, void *)
+{
+  ink_assert(false);
+  return 0;
+}
+
+APIHook *
+APIHook::next() const
+{
+  ink_assert(false);
+  return nullptr;
+}
+
+APIHook *
+APIHooks::get() const
+{
+  ink_assert(false);
+  return nullptr;
+}
+
+void
+ConfigUpdateCbTable::invoke(const char * /* name ATS_UNUSED */)
+{
+  ink_release_assert(false);
+}
+
+#include "ControlMatcher.h"
+char *
+HttpRequestData::get_string()
+{
+  ink_assert(false);
+  return nullptr;
+}
+
+const char *
+HttpRequestData::get_host()
+{
+  ink_assert(false);
+  return nullptr;
+}
+
+sockaddr const *
+HttpRequestData::get_ip()
+{
+  ink_assert(false);
+  return nullptr;
+}
+
+sockaddr const *
+HttpRequestData::get_client_ip()
+{
+  ink_assert(false);
+  return nullptr;
+}
+
+SslAPIHooks *ssl_hooks = nullptr;
+StatPagesManager statPagesManager;
+
+#include "ProcessManager.h"
+inkcoreapi ProcessManager *pmgmt = nullptr;
+
+int
+BaseManager::registerMgmtCallback(int, MgmtCallback const &)
+{
+  ink_assert(false);
+  return 0;
+}
+
+void
+ProcessManager::signalManager(int, char const *, int)
+{
+  ink_assert(false);
+  return;
+}
diff --git a/iocore/net/quic/Makefile.am b/iocore/net/quic/Makefile.am
index b5b571e..ceddc26 100644
--- a/iocore/net/quic/Makefile.am
+++ b/iocore/net/quic/Makefile.am
@@ -124,20 +124,23 @@ test_CPPFLAGS = \
 test_LDADD = \
   libquic.a \
   $(top_builddir)/lib/records/librecords_p.a \
+  $(top_builddir)/lib/tsconfig/libtsconfig.la \
   

[trafficserver] branch quic-latest updated: Fix building unit tests of quic

2017-10-11 Thread masaori
This is an automated email from the ASF dual-hosted git repository.

masaori 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 a0e5c98  Fix building unit tests of quic
a0e5c98 is described below

commit a0e5c98fdbca1684317cc0e94744a19ef733e170
Author: Masaori Koshiba 
AuthorDate: Thu Oct 12 14:11:32 2017 +0900

Fix building unit tests of quic
---
 .gitignore   | 1 +
 iocore/net/quic/test/Makefile.am | 8 
 2 files changed, 9 insertions(+)

diff --git a/.gitignore b/.gitignore
index de3eff5..ed253d8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -103,6 +103,7 @@ iocore/net/quic/test/test_QUICTypeUtil
 iocore/net/quic/test/test_QUICAckFrameCreator
 iocore/net/quic/test/test_QUICVersionNegotiator
 iocore/net/quic/test/test_QUICFlowController
+iocore/net/quic/test/test_QUICIncomingFrameBuffer
 iocore/net/quic/ts_quic_client
 iocore/aio/test_AIO
 iocore/eventsystem/test_Buffer
diff --git a/iocore/net/quic/test/Makefile.am b/iocore/net/quic/test/Makefile.am
index e25eced..b53ec4d 100644
--- a/iocore/net/quic/test/Makefile.am
+++ b/iocore/net/quic/test/Makefile.am
@@ -132,6 +132,7 @@ test_QUICFrame_SOURCES = \
   ../QUICTypes.cc \
   ../QUICStream.cc \
   ../QUICStreamState.cc \
+  ../QUICIncomingFrameBuffer.cc \
   ../QUICDebugNames.cc \
   ../QUICFlowController.cc \
   ../../SSLNextProtocolSet.cc
@@ -166,6 +167,7 @@ test_QUICFrameDispatcher_SOURCES = \
   ../QUICPacket.cc \
   ../QUICStream.cc \
   ../QUICStreamState.cc \
+  ../QUICIncomingFrameBuffer.cc \
   ../QUICApplication.cc \
   ../QUICHandshake.cc \
   ../QUICTypes.cc \
@@ -252,6 +254,7 @@ test_QUICStreamManager_SOURCES = \
   event_processor_main.cc \
   test_QUICStreamManager.cc \
   ../QUICStream.cc \
+  ../QUICIncomingFrameBuffer.cc \
   ../QUICFrameDispatcher.cc \
   ../QUICStreamManager.cc \
   ../QUICApplicationMap.cc \
@@ -290,6 +293,7 @@ test_QUICTransportParameters_SOURCES = \
   ../QUICCrypto.cc \
   $(QUICCrypto_impl) \
   ../QUICStream.cc \
+  ../QUICIncomingFrameBuffer.cc \
   ../QUICStreamState.cc \
   ../QUICStreamManager.cc \
   ../QUICFlowController.cc \
@@ -380,6 +384,7 @@ test_QUICTypeUtil_SOURCES = \
   main.cc \
   test_QUICTypeUtil.cc \
   ../QUICStream.cc \
+  ../QUICIncomingFrameBuffer.cc \
   ../QUICStreamState.cc \
   ../QUICFlowController.cc \
   ../QUICDebugNames.cc \
@@ -411,6 +416,7 @@ test_QUICAckFrameCreator_SOURCES = \
   ../QUICFrame.cc \
   ../QUICPacket.cc \
   ../QUICStream.cc \
+  ../QUICIncomingFrameBuffer.cc \
   ../QUICStreamState.cc \
   ../QUICFlowController.cc \
   ../QUICDebugNames.cc \
@@ -449,6 +455,7 @@ test_QUICVersionNegotiator_SOURCES = \
   ../QUICApplicationMap.cc \
   ../QUICHandshake.cc \
   ../QUICStream.cc \
+  ../QUICIncomingFrameBuffer.cc \
   ../QUICStreamState.cc \
   ../QUICStreamManager.cc \
   ../QUICFlowController.cc \
@@ -483,6 +490,7 @@ test_QUICFlowController_SOURCES = \
   test_QUICFlowController.cc \
   ../QUICFlowController.cc \
   ../QUICStream.cc \
+  ../QUICIncomingFrameBuffer.cc \
   ../QUICStreamState.cc \
   ../QUICDebugNames.cc \
   ../QUICTypes.cc \

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" '].