You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2012/04/21 02:59:23 UTC
[2/2] git commit: TS-1137 Also fix the regression tests
TS-1137 Also fix the regression tests
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/ceb64674
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/ceb64674
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/ceb64674
Branch: refs/heads/master
Commit: ceb6467405db5c6923bb7e46a75d156e33ea1c60
Parents: 03d6ea1
Author: Leif Hedstrom <le...@ogre.com>
Authored: Fri Apr 20 18:58:16 2012 -0600
Committer: Leif Hedstrom <le...@ogre.com>
Committed: Fri Apr 20 18:58:25 2012 -0600
----------------------------------------------------------------------
CHANGES | 4 ++++
proxy/InkAPITest.cc | 26 +++++++++++++-------------
2 files changed, 17 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ceb64674/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 0419995..1fd8d12 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 3.1.4
+ *) [TS-1137] Wrong returned value of incoming port address. This
+ API is deprecated, so I also fixed the regression tests accordingly.
+ Authors: Yakov Kopel and Leif.
+
*) [TS-1211] Read backlog config value to set the listen backlog.
*) [TS-1202] Install traffic_shell man/doc pages in a more appropriate
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ceb64674/proxy/InkAPITest.cc
----------------------------------------------------------------------
diff --git a/proxy/InkAPITest.cc b/proxy/InkAPITest.cc
index a6ab963..bac3d86 100644
--- a/proxy/InkAPITest.cc
+++ b/proxy/InkAPITest.cc
@@ -2123,8 +2123,8 @@ REGRESSION_TEST(SDK_API_TSContSchedule) (RegressionTest * test, int atype, int *
// TSHttpTxnReenable
// TSHttpTxnClientIPGet
// TSHttpTxnServerIPGet
-// TSHttpTxnClientIncomingPortGet
-// TSHttpTxnClientRemotePortGet
+// TSHttpTxnIncomingAddrGet
+// TSHttpTxnClientAddrGet
// TSHttpTxnClientReqGet
// TSHttpTxnClientRespGet
// TSHttpTxnServerReqGet
@@ -2241,9 +2241,9 @@ checkHttpTxnServerIPGet(SocketTest * test, void *data)
}
-//This func is called by us from mytest_handler to test TSHttpTxnClientIncomingPortGet
+//This func is called by us from mytest_handler to test TSHttpTxnIncomingAddrGet
static int
-checkHttpTxnClientIncomingPortGet(SocketTest * test, void *data)
+checkHttpTxnIncomingAddrGet(SocketTest * test, void *data)
{
uint16_t port;
HttpProxyPort* proxy_port = HttpProxyPort::findHttp(AF_INET);
@@ -2252,13 +2252,13 @@ checkHttpTxnClientIncomingPortGet(SocketTest * test, void *data)
if (0 == proxy_port) {
SDK_RPRINT(test->regtest, "TSHttpTxnIncomingPortGet", "TestCase1", TC_FAIL,
- "TSHttpTxnClientIncomingPortGet failed to find configured HTTP port.");
+ "TSHttpTxnIncomingAddrGet failed to find configured HTTP port.");
test->test_client_incoming_port_get = false;
return TS_EVENT_CONTINUE;
}
if (0 == ptr) {
SDK_RPRINT(test->regtest, "TSHttpTxnIncomingPortGet", "TestCase1", TC_FAIL,
- "TSHttpTxnClientIncomingPortGet returns 0 pointer");
+ "TSHttpTxnIncomingAddrGet returns 0 pointer");
test->test_client_incoming_port_get = false;
return TS_EVENT_CONTINUE;
}
@@ -2267,19 +2267,19 @@ checkHttpTxnClientIncomingPortGet(SocketTest * test, void *data)
TSDebug(UTDBG_TAG, "TS HTTP port = %x, Txn incoming client port %x", proxy_port->m_port, port);
if (port == proxy_port->m_port) {
- SDK_RPRINT(test->regtest, "TSHttpTxnClientIncomingPortGet", "TestCase1", TC_PASS, "ok");
+ SDK_RPRINT(test->regtest, "TSHttpTxnIncomingAddrGet", "TestCase1", TC_PASS, "ok");
test->test_client_incoming_port_get = true;
} else {
- SDK_RPRINT(test->regtest, "TSHttpTxnClientIncomingPortGet", "TestCase1", TC_FAIL,
- "Value's Mismatch. From Funtion: %d Expected value: %d", port, proxy_port->m_port);
+ SDK_RPRINT(test->regtest, "TSHttpTxnIncomingAddrGet", "TestCase1", TC_FAIL,
+ "Value's Mismatch. From Function: %d Expected value: %d", port, proxy_port->m_port);
test->test_client_incoming_port_get = false;
}
return TS_EVENT_CONTINUE;
}
-//This func is called by us from mytest_handler to test TSHttpTxnClientRemotePortGet
+//This func is called by us from mytest_handler to test TSHttpTxnClientAddrGet
static int
-checkHttpTxnClientRemotePortGet(SocketTest * test, void *data)
+checkHttpTxnClientAddrGet(SocketTest *test, void *data)
{
uint16_t port;
@@ -2461,8 +2461,8 @@ mytest_handler(TSCont contp, TSEvent event, void *data)
test->hook_mask |= 8;
}
- checkHttpTxnClientIncomingPortGet(test, data);
- checkHttpTxnClientRemotePortGet(test, data);
+ checkHttpTxnIncomingAddrGet(test, data);
+ checkHttpTxnClientAddrGet(test, data);
checkHttpTxnClientIPGet(test, data);
checkHttpTxnServerIPGet(test, data);