trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From masa...@apache.org
Subject [trafficserver] branch master updated: Separate stubs for libinknet from test_I_UDPNet.cc
Date Thu, 13 Jun 2019 22:59:42 GMT
This is an automated email from the ASF dual-hosted git repository.

masaori pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new e18bb8b  Separate stubs for libinknet from test_I_UDPNet.cc
e18bb8b is described below

commit e18bb8b26ea3e130f874407b96cb22bea938dc43
Author: Masaori Koshiba <masaori@apache.org>
AuthorDate: Mon Jun 10 13:49:58 2019 +0900

    Separate stubs for libinknet from test_I_UDPNet.cc
---
 iocore/net/Makefile.am       |   1 +
 iocore/net/libinknet_stub.cc | 162 +++++++++++++++++++++++++++++++++++++++++++
 iocore/net/test_I_UDPNet.cc  | 142 -------------------------------------
 3 files changed, 163 insertions(+), 142 deletions(-)

diff --git a/iocore/net/Makefile.am b/iocore/net/Makefile.am
index 1c098f6..c70c061 100644
--- a/iocore/net/Makefile.am
+++ b/iocore/net/Makefile.am
@@ -78,6 +78,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 0000000..1dbc971
--- /dev/null
+++ b/iocore/net/libinknet_stub.cc
@@ -0,0 +1,162 @@
+/** @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/test_I_UDPNet.cc b/iocore/net/test_I_UDPNet.cc
index 16810cb..e74be1d 100644
--- a/iocore/net/test_I_UDPNet.cc
+++ b/iocore/net/test_I_UDPNet.cc
@@ -232,145 +232,3 @@ main(int /* argc ATS_UNUSED */, const char ** /* argv ATS_UNUSED */)
   RegressionTest::run("UDPNet", REGRESSION_TEST_QUICK);
   return RegressionTest::final_status == REGRESSION_TEST_PASSED ? 0 : 1;
 }
-
-//
-// stub
-//
-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;
-}


Mime
View raw message