[trafficserver] branch master updated: Fixed next hop tests for out of tree builds
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git View the commit online: https://github.com/apache/trafficserver/commit/e541bc744a3ccd06648776f699f5f70976d8dcdf The following commit(s) were added to refs/heads/master by this push: new e541bc7 Fixed next hop tests for out of tree builds e541bc7 is described below commit e541bc744a3ccd06648776f699f5f70976d8dcdf Author: Bryan Call AuthorDate: Thu Nov 21 11:37:46 2019 +0800 Fixed next hop tests for out of tree builds --- proxy/http/remap/Makefile.am | 3 +++ proxy/http/remap/unit-tests/test_NextHopConsistentHash.cc | 6 +++--- proxy/http/remap/unit-tests/test_NextHopRoundRobin.cc | 8 proxy/http/remap/unit-tests/test_NextHopStrategyFactory.cc | 11 +++ 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/proxy/http/remap/Makefile.am b/proxy/http/remap/Makefile.am index 89be4da..c569801 100644 --- a/proxy/http/remap/Makefile.am +++ b/proxy/http/remap/Makefile.am @@ -125,6 +125,7 @@ test_RemapPluginInfo_SOURCES = \ test_NextHopStrategyFactory_CPPFLAGS = \ $(AM_CPPFLAGS) \ -D_NH_UNIT_TESTS_ \ + -DTS_SRC_DIR=\"$(abs_top_srcdir)/proxy/http/remap/\" \ -I$(abs_top_srcdir)/tests/include \ $(TS_INCLUDES) \ @YAMLCPP_INCLUDES@ @@ -154,6 +155,7 @@ test_NextHopStrategyFactory_SOURCES = \ test_NextHopRoundRobin_CPPFLAGS = \ $(AM_CPPFLAGS) \ -D_NH_UNIT_TESTS_ \ + -DTS_SRC_DIR=\"$(abs_top_srcdir)/proxy/http/remap/\" \ -I$(abs_top_srcdir)/tests/include \ $(TS_INCLUDES) \ @YAMLCPP_INCLUDES@ @@ -183,6 +185,7 @@ test_NextHopRoundRobin_SOURCES = \ test_NextHopConsistentHash_CPPFLAGS = \ $(AM_CPPFLAGS) \ -D_NH_UNIT_TESTS_ \ + -DTS_SRC_DIR=\"$(abs_top_srcdir)/proxy/http/remap/\" \ -I$(abs_top_srcdir)/tests/include \ $(TS_INCLUDES) \ @YAMLCPP_INCLUDES@ diff --git a/proxy/http/remap/unit-tests/test_NextHopConsistentHash.cc b/proxy/http/remap/unit-tests/test_NextHopConsistentHash.cc index 912a5da..cbd29bd 100644 --- a/proxy/http/remap/unit-tests/test_NextHopConsistentHash.cc +++ b/proxy/http/remap/unit-tests/test_NextHopConsistentHash.cc @@ -51,7 +51,7 @@ SCENARIO("Testing NextHopConsistentHash class, using policy 'consistent_hash'", { // load the configuration strtegies. std::shared_ptr strategy; -NextHopStrategyFactory nhf("unit-tests/consistent-hash-tests.yaml"); +NextHopStrategyFactory nhf(TS_SRC_DIR "unit-tests/consistent-hash-tests.yaml"); strategy = nhf.strategyInstance("consistent-hash-1"); WHEN("the config is loaded.") @@ -190,7 +190,7 @@ SCENARIO("Testing NextHopConsistentHash class (all firstcalls), using policy 'co GIVEN("Loading the consistent-hash-tests.yaml config for 'consistent_hash' tests.") { std::shared_ptr strategy; -NextHopStrategyFactory nhf("unit-tests/consistent-hash-tests.yaml"); +NextHopStrategyFactory nhf(TS_SRC_DIR "unit-tests/consistent-hash-tests.yaml"); strategy = nhf.strategyInstance("consistent-hash-1"); WHEN("the config is loaded.") @@ -292,7 +292,7 @@ SCENARIO("Testing NextHopConsistentHash class (alternating rings), using policy GIVEN("Loading the consistent-hash-tests.yaml config for 'consistent_hash' tests.") { std::shared_ptr strategy; -NextHopStrategyFactory nhf("unit-tests/consistent-hash-tests.yaml"); +NextHopStrategyFactory nhf(TS_SRC_DIR "unit-tests/consistent-hash-tests.yaml"); strategy = nhf.strategyInstance("consistent-hash-2"); WHEN("the config is loaded.") diff --git a/proxy/http/remap/unit-tests/test_NextHopRoundRobin.cc b/proxy/http/remap/unit-tests/test_NextHopRoundRobin.cc index 7df2fd3..df47f3c 100644 --- a/proxy/http/remap/unit-tests/test_NextHopRoundRobin.cc +++ b/proxy/http/remap/unit-tests/test_NextHopRoundRobin.cc @@ -41,7 +41,7 @@ SCENARIO("Testing NextHopRoundRobin class, using policy 'rr-strict'", "[NextHopR GIVEN("Loading the round-robin-tests.yaml config for round robin 'rr-strict' tests.") { std::shared_ptr strategy; -NextHopStrategyFactory nhf("unit-tests/round-robin-tests.yaml"); +NextHopStrategyFactory nhf(TS_SRC_DIR "unit-tests/round-robin-tests.yaml"); strategy = nhf.strategyInstance("rr-strict-exhaust-ring"); WHEN("the config is loaded.") @@ -146,7 +146,7 @@ SCENARIO("Testing NextHopRoundRobin class, using policy 'first-live'", "[NextHop GIVEN("Loading the round-robin-tests.yaml config for round robin 'first-live' tests.") { std::shared_ptr strategy; -NextHopStrategyFactory nhf("unit-tests/round-robin-tests.yaml"); +NextHopStrategyFactory nhf(TS_SRC_DIR "unit-tests/round-robin-tests.yaml"); strategy = nhf.strategyInstance("first-live"); WHEN("the config is loaded.") @@ -205,7 +205,7 @@
[trafficserver] branch master updated (66bf0c4 -> f990f13)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 66bf0c4 Add autopep8 & pyflakes in dev-packages for AuTest add f990f13 This fixes next hop unit tests that segfault due to missing (#6216) No new revisions were added by this update. Summary of changes: proxy/http/remap/unit-tests/test_NextHopConsistentHash.cc | 9 + proxy/http/remap/unit-tests/test_NextHopRoundRobin.cc | 12 2 files changed, 21 insertions(+)
[trafficserver] branch master updated (52538c4 -> 66bf0c4)
This is an automated email from the ASF dual-hosted git repository. masaori pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 52538c4 Set END_STREAM flag when write_vio ntodo is 0 add 66bf0c4 Add autopep8 & pyflakes in dev-packages for AuTest No new revisions were added by this update. Summary of changes: tests/Pipfile | 2 ++ tests/README.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
[trafficserver] branch master updated (c0fe598a -> 52538c4)
This is an automated email from the ASF dual-hosted git repository. masaori pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from c0fe598a Add 100-continue expectation support on H2 connection add 52538c4 Set END_STREAM flag when write_vio ntodo is 0 No new revisions were added by this update. Summary of changes: proxy/http2/Http2ConnectionState.cc | 12 +++- proxy/http2/Http2Stream.h | 4 ++-- tests/gold_tests/h2/gold/http2_9_stderr.gold| 10 ++ .../gold/sni-1.gold => h2/gold/http2_9_stdout.gold} | 0 tests/gold_tests/h2/http2.test.py | 13 + 5 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 tests/gold_tests/h2/gold/http2_9_stderr.gold copy tests/gold_tests/{tls_hooks/gold/sni-1.gold => h2/gold/http2_9_stdout.gold} (100%)
[trafficserver] branch master updated (994a2f0 -> c0fe598a)
This is an automated email from the ASF dual-hosted git repository. masaori pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 994a2f0 Run dos2unix on all files in tree add c0fe598a Add 100-continue expectation support on H2 connection No new revisions were added by this update. Summary of changes: proxy/hdrs/HTTP.h | 23 +-- proxy/http2/Http2Stream.cc | 11 +++ tests/gold_tests/h2/gold/httpbin_0_stdout.gold | 9 ++--- tests/gold_tests/h2/gold/httpbin_3_stderr.gold | 9 + tests/gold_tests/h2/gold/httpbin_3_stdout.gold | 7 +++ tests/gold_tests/h2/gold/httpbin_access.gold | 1 + tests/gold_tests/h2/httpbin.test.py| 19 +-- 7 files changed, 68 insertions(+), 11 deletions(-) create mode 100644 tests/gold_tests/h2/gold/httpbin_3_stderr.gold create mode 100644 tests/gold_tests/h2/gold/httpbin_3_stdout.gold
[trafficserver] branch master updated (cd2afa6 -> 994a2f0)
This is an automated email from the ASF dual-hosted git repository. sudheerv pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from cd2afa6 Lua plugin fix: Account for null in output from TSUrlPercentDecode. add 994a2f0 Run dos2unix on all files in tree No new revisions were added by this update. Summary of changes: .../data/www.customplugin204.test_get.txt | 4 +-- .../data/www.customtemplate204.test_get.txt| 4 +-- .../body_factory/data/www.default204.test_get.txt | 4 +-- .../body_factory/data/www.default304.test_get.txt | 4 +-- .../body_factory/data/www.example.test_get_200.txt | 6 ++--- .../body_factory/data/www.example.test_get_304.txt | 8 +++--- .../body_factory/data/www.example.test_head.txt| 6 ++--- .../data/www.example.test_head_200.txt | 6 ++--- .../headers/data/www.passthrough.test_get.txt | 4 +-- .../headers/data/www.redirect0.test_get.txt| 4 +-- .../headers/data/www.redirect301.test_get.txt | 4 +-- .../headers/data/www.redirect302.test_get.txt | 4 +-- .../headers/data/www.redirect307.test_get.txt | 4 +-- .../headers/data/www.redirect308.test_get.txt | 4 +-- .../headers/general-connection-failure-502.gold| 14 +- .../regex_remap/gold/regex_remap_crash.gold| 8 +++--- .../regex_remap/gold/regex_remap_smoke.gold| 8 +++--- .../regex_revalidate/gold/regex_reval-hit.gold | 20 +++ .../regex_revalidate/gold/regex_reval-miss.gold| 20 +++ .../regex_revalidate/gold/regex_reval-stale.gold | 20 +++ .../pluginTest/slice/gold/slice_200.stdout.gold| 16 ++-- .../pluginTest/slice/gold/slice_206.stdout.gold| 18 ++--- .../pluginTest/slice/gold/slice_first.stdout.gold | 18 ++--- .../pluginTest/slice/gold/slice_last.stderr.gold | 2 +- .../pluginTest/slice/gold/slice_last.stdout.gold | 18 ++--- .../pluginTest/slice/gold/slice_mid.stderr.gold| 2 +- .../pluginTest/slice/gold/slice_mid.stdout.gold| 18 ++--- .../pluginTest/slice/gold_error/crr.stdout.gold| 18 ++--- .../pluginTest/slice/gold_error/etag.stdout.gold | 18 ++--- .../pluginTest/slice/gold_error/lm.stdout.gold | 18 ++--- .../pluginTest/slice/gold_error/non206.stdout.gold | 20 +++ tests/gold_tests/pluginTest/url_sig/url_sig.gold | 30 +++--- tests/gold_tests/redirect/gold/redirect.gold | 6 ++--- 33 files changed, 179 insertions(+), 179 deletions(-)
[trafficserver] branch master updated (0ec8ca4 -> cd2afa6)
This is an automated email from the ASF dual-hosted git repository. amc pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 0ec8ca4 Cleanup: Remove useless UDPConnection function add cd2afa6 Lua plugin fix: Account for null in output from TSUrlPercentDecode. No new revisions were added by this update. Summary of changes: doc/admin-guide/plugins/lua.en.rst | 4 ++-- .../api/functions/TSUrlPercentEncode.en.rst| 24 -- plugins/lua/ts_lua_crypto.c| 4 ++-- 3 files changed, 22 insertions(+), 10 deletions(-)
[trafficserver] branch master updated: Cleanup: Remove useless UDPConnection function
This is an automated email from the ASF dual-hosted git repository. scw00 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 0ec8ca4 Cleanup: Remove useless UDPConnection function 0ec8ca4 is described below commit 0ec8ca4baa933fb0484e7767a0864fb5522b6734 Author: scw00 AuthorDate: Tue Nov 19 09:18:53 2019 +0800 Cleanup: Remove useless UDPConnection function --- iocore/net/I_UDPConnection.h | 4 +--- iocore/net/P_UDPConnection.h | 50 +--- iocore/net/P_UnixUDPConnection.h | 3 +-- 3 files changed, 13 insertions(+), 44 deletions(-) diff --git a/iocore/net/I_UDPConnection.h b/iocore/net/I_UDPConnection.h index d06920f..4a17973 100644 --- a/iocore/net/I_UDPConnection.h +++ b/iocore/net/I_UDPConnection.h @@ -49,7 +49,7 @@ public: SOCKET getFd(); void setBinding(struct sockaddr const *); void setBinding(const IpAddr &, in_port_t); - inkcoreapi int getBinding(struct sockaddr *); + inkcoreapi bool getBinding(struct sockaddr *); void destroy(); int shouldDestroy(); @@ -86,8 +86,6 @@ public: int getPortNum(); int GetSendGenerationNumber(); // const - void SetLastSentPktTSSeqNum(int64_t sentSeqNum); - int64_t cancel(); void setContinuation(Continuation *c); /** diff --git a/iocore/net/P_UDPConnection.h b/iocore/net/P_UDPConnection.h index ef69b31..10e57c2 100644 --- a/iocore/net/P_UDPConnection.h +++ b/iocore/net/P_UDPConnection.h @@ -35,19 +35,17 @@ class UDPConnectionInternal : public UDPConnection { public: - UDPConnectionInternal(); + UDPConnectionInternal() = default; ~UDPConnectionInternal() override; Continuation *continuation = nullptr; - int recvActive = 0; // interested in receiving int refcount = 0; // public for assertion - SOCKET fd; - IpEndpoint binding; - int binding_valid = 0; - int tobedestroyed = 0; - int sendGenerationNum; - int64_t lastSentPktTSSeqNum; + SOCKET fd = -1; + IpEndpoint binding{}; + bool binding_valid= false; + int tobedestroyed = 0; + int sendGenerationNum = 0; // this is for doing packet scheduling: we keep two values so that we can // implement cancel. The first value tracks the startTime of the last @@ -55,21 +53,11 @@ public: // startTime of the last packet when we are doing scheduling; whenever the // associated continuation cancels a packet, we rest lastPktStartTime to be // the same as the lastSentPktStartTime. - uint64_t lastSentPktStartTime; - uint64_t lastPktStartTime; + uint64_t lastSentPktStartTime = 0; + uint64_t lastPktStartTime = 0; }; TS_INLINE -UDPConnectionInternal::UDPConnectionInternal() : fd(-1) -{ - sendGenerationNum= 0; - lastSentPktTSSeqNum = -1; - lastSentPktStartTime = 0; - lastPktStartTime = 0; - memset(, 0, sizeof binding); -} - -TS_INLINE UDPConnectionInternal::~UDPConnectionInternal() { continuation = nullptr; @@ -87,7 +75,7 @@ UDPConnection::setBinding(struct sockaddr const *s) { UDPConnectionInternal *p = static_cast(this); ats_ip_copy(>binding, s); - p->binding_valid = 1; + p->binding_valid = true; } TS_INLINE void @@ -97,10 +85,10 @@ UDPConnection::setBinding(IpAddr const , in_port_t port) IpEndpoint addr; addr.assign(ip, htons(port)); ats_ip_copy(>binding, addr); - p->binding_valid = 1; + p->binding_valid = true; } -TS_INLINE int +TS_INLINE bool UDPConnection::getBinding(struct sockaddr *s) { UDPConnectionInternal *p = static_cast(this); @@ -144,22 +132,6 @@ UDPConnection::getPortNum() return ats_ip_port_host_order(_cast(this)->binding); } -TS_INLINE int64_t -UDPConnection::cancel() -{ - UDPConnectionInternal *p = static_cast(this); - - p->sendGenerationNum++; - p->lastPktStartTime = p->lastSentPktStartTime; - return p->lastSentPktTSSeqNum; -} - -TS_INLINE void -UDPConnection::SetLastSentPktTSSeqNum(int64_t sentSeqNum) -{ - static_cast(this)->lastSentPktTSSeqNum = sentSeqNum; -} - TS_INLINE void UDPConnection::setContinuation(Continuation *c) { diff --git a/iocore/net/P_UnixUDPConnection.h b/iocore/net/P_UnixUDPConnection.h index 9e3c2f2..37ad8bd 100644 --- a/iocore/net/P_UnixUDPConnection.h +++ b/iocore/net/P_UnixUDPConnection.h @@ -97,8 +97,7 @@ UDPConnection::recv(Continuation *c) // register callback interest. p->continuation = c; ink_assert(c != nullptr); - mutex = c->mutex; - p->recvActive = 1; + mutex = c->mutex; return ACTION_RESULT_NONE; }
[trafficserver] branch master updated: Check Range header for stale content
This is an automated email from the ASF dual-hosted git repository. scw00 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 a59f1df Check Range header for stale content a59f1df is described below commit a59f1dfa9fc2840bbdca1e69fcb84b3e2ed470a9 Author: ydyuan <1975643...@qq.com> AuthorDate: Wed Nov 6 12:26:44 2019 +0800 Check Range header for stale content Fix bug: 1. Ats cached a stale content 2. Then we set cache.config making this content never-cache 3. We send a request to ats for this content with a Range header 4. ATS send a request to os with ims header 5. The os returned 304 to ats 6. ATS return 200 to client. --- proxy/http/HttpTransact.cc | 4 1 file changed, 4 insertions(+) diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index c9ca406..80d61ea 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -4188,6 +4188,10 @@ HttpTransact::handle_cache_operation_on_forward_server_response(State *s) s->cache_info.action = CACHE_DO_DELETE; s->next_action = SM_ACTION_SERVER_READ; } else { + if (s->hdr_info.client_request.presence(MIME_PRESENCE_RANGE)) { +s->state_machine->do_range_setup_if_necessary(); +// Check client request range header if we cached a stealed content with cacheable=false + } s->cache_info.action = CACHE_DO_SERVE_AND_DELETE; s->next_action = SM_ACTION_SERVE_FROM_CACHE; }
[trafficserver] branch master updated (ed7add8 -> 0b5ae4a)
This is an automated email from the ASF dual-hosted git repository. rrm pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from ed7add8 Adds WS check, and some cleanup (#6213) add 0b5ae4a Fixes spelling in strategies.yaml docs No new revisions were added by this update. Summary of changes: configs/strategies.yaml.default| 2 +- doc/admin-guide/files/strategies.yaml.en.rst | 18 +- .../cache-architecture/architecture.en.rst | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-)
[trafficserver] branch master updated (9c1b88a -> ed7add8)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 9c1b88a Cleanup trailing whitespaces, and YAML formatting (#6210) add ed7add8 Adds WS check, and some cleanup (#6213) No new revisions were added by this update. Summary of changes: ci/jenkins/bin/build.sh| 1 + ci/jenkins/bin/clang-format.sh | 17 + ci/jenkins/bin/github.sh | 6 +- ci/jenkins/bin/regression.sh | 9 ++--- 4 files changed, 25 insertions(+), 8 deletions(-)