This is an automated email from the ASF dual-hosted git repository.
bneradt 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 5d01b8c858 Fedora 40: autest output updates for new curl and openssl
(#11296)
5d01b8c858 is described below
commit 5d01b8c858ba531d90c216eed5778d87c9018ca8
Author: Brian Neradt <[email protected]>
AuthorDate: Fri Apr 26 16:56:13 2024 -0500
Fedora 40: autest output updates for new curl and openssl (#11296)
After landing this patch, all autests should now work with fedora:40.
* http2.test.py: normalize curl output for "bytes data"
* tls_verify_override_base.test.py: --resolv -> --resolve
Somehow older versions of curl perimissively let the user accidentally
pass `--resolv` instead of `--resolve`. 8.7.1 seems more picky. This
fixes all references to `--resolv` to `--resolve` in the autests.
* tls_0rtt_server.test.py: new openssl s_client output
openssl s_client 3.2 has slightly different output that the
tls_0rtt_server.test.py test needs to be updated to handle. This adds
logic to handle that new output.
---
tests/gold_tests/h2/gold/http2_8_stderr.gold | 18 ------------------
tests/gold_tests/h2/gold/http2_8_stdout.gold | 19 ++++++++++++++++++-
tests/gold_tests/h2/http2.test.py | 8 +++++---
tests/gold_tests/tls/h2_early_decode.py | 4 +++-
tests/gold_tests/tls/test-0rtt-s_client.py | 3 ++-
tests/gold_tests/tls/tls_verify_override_base.test.py | 4 ++--
6 files changed, 30 insertions(+), 26 deletions(-)
diff --git a/tests/gold_tests/h2/gold/http2_8_stderr.gold
b/tests/gold_tests/h2/gold/http2_8_stderr.gold
deleted file mode 100644
index f5d57eb4c5..0000000000
--- a/tests/gold_tests/h2/gold/http2_8_stderr.gold
+++ /dev/null
@@ -1,18 +0,0 @@
-``
-> GET /huge_resp_hdrs HTTP/2
-> Host: ``
-> User-Agent: curl/``
-> Accept: */*
-``
-< HTTP/2 200 ``
-< server: ATS/``
-< content-length: 6
-< date: ``
-< age: ``
-< x-huge-0:
0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789ab
[...]
-< x-huge-1:
0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789ab
[...]
-< x-huge-2:
0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789ab
[...]
-< x-huge-3:
0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789ab
[...]
-< x-huge-4:
0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789ab
[...]
-< x-huge-5:
0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789ab
[...]
-``
diff --git a/tests/gold_tests/h2/gold/http2_8_stdout.gold
b/tests/gold_tests/h2/gold/http2_8_stdout.gold
index fb1fe7d2ce..f5d57eb4c5 100644
--- a/tests/gold_tests/h2/gold/http2_8_stdout.gold
+++ b/tests/gold_tests/h2/gold/http2_8_stdout.gold
@@ -1 +1,18 @@
-200 OK``
+``
+> GET /huge_resp_hdrs HTTP/2
+> Host: ``
+> User-Agent: curl/``
+> Accept: */*
+``
+< HTTP/2 200 ``
+< server: ATS/``
+< content-length: 6
+< date: ``
+< age: ``
+< x-huge-0:
0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789ab
[...]
+< x-huge-1:
0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789ab
[...]
+< x-huge-2:
0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789ab
[...]
+< x-huge-3:
0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789ab
[...]
+< x-huge-4:
0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789ab
[...]
+< x-huge-5:
0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789ab
[...]
+``
diff --git a/tests/gold_tests/h2/http2.test.py
b/tests/gold_tests/h2/http2.test.py
index fdd73d1419..0a24a55ffb 100644
--- a/tests/gold_tests/h2/http2.test.py
+++ b/tests/gold_tests/h2/http2.test.py
@@ -220,11 +220,13 @@ tr.StillRunningAfter = server
# Test Case 8: Huge response header
tr = Test.AddTestRun("huge response header")
-tr.Processes.Default.Command = 'curl -vs -k --http2
https://127.0.0.1:{0}/huge_resp_hdrs'.format(ts.Variables.ssl_port)
+# Different versions of curl have "bytes data" at various places in the output.
+# Normalize them by simply filtering out those lines since they are not
+# important to this test.
+tr.Processes.Default.Command = f'curl -vs -k --http2
https://127.0.0.1:{ts.Variables.ssl_port}/huge_resp_hdrs |& grep -v "bytes
data"'
tr.Processes.Default.ReturnCode = 0
-tr.Processes.Default.Streams.stdout = "gold/http2_8_stdout.gold"
# Different versions of curl will have different cases for HTTP/2 field names.
-tr.Processes.Default.Streams.stderr =
Testers.GoldFile("gold/http2_8_stderr.gold", case_insensitive=True)
+tr.Processes.Default.Streams.stdout =
Testers.GoldFile("gold/http2_8_stdout.gold", case_insensitive=True)
tr.StillRunningAfter = server
# Test Case 9: Header Only Response - e.g. 204
diff --git a/tests/gold_tests/tls/h2_early_decode.py
b/tests/gold_tests/tls/h2_early_decode.py
index 2035e2842b..9247dd2a34 100755
--- a/tests/gold_tests/tls/h2_early_decode.py
+++ b/tests/gold_tests/tls/h2_early_decode.py
@@ -213,7 +213,9 @@ class Decoder:
def decode(self, data):
temp_data = data
frames = []
- while len(temp_data) >= 9:
+ loop_limiter_count = 0
+ while len(temp_data) >= 9 and loop_limiter_count < 1000:
+ loop_limiter_count += 1
frame_header = temp_data[0:9]
frame = self.read_frame_header(frame_header)
if frame.length > len(temp_data[9:]):
diff --git a/tests/gold_tests/tls/test-0rtt-s_client.py
b/tests/gold_tests/tls/test-0rtt-s_client.py
index 8c017d658e..2983abcf58 100644
--- a/tests/gold_tests/tls/test-0rtt-s_client.py
+++ b/tests/gold_tests/tls/test-0rtt-s_client.py
@@ -69,7 +69,8 @@ def main():
data = b''
for line in lines:
line += b'\n'
- if line.startswith(bytes('SSL_connect:', 'utf-8')) or \
+ if line.startswith(bytes('Connecting to', 'utf-8')) or \
+ line.startswith(bytes('SSL_connect:', 'utf-8')) or \
line.startswith(bytes('SSL3 alert', 'utf-8')) or \
bytes('Can\'t use SSL_get_servername', 'utf-8') in line:
continue
diff --git a/tests/gold_tests/tls/tls_verify_override_base.test.py
b/tests/gold_tests/tls/tls_verify_override_base.test.py
index 75c4b4abe7..807c7579dd 100644
--- a/tests/gold_tests/tls/tls_verify_override_base.test.py
+++ b/tests/gold_tests/tls/tls_verify_override_base.test.py
@@ -206,7 +206,7 @@ tr.Processes.Default.Streams.stdout =
Testers.ContainsExpression("Could not conn
# Should fail
tr = Test.AddTestRun("foo-to-bar-sni-policy-servername")
-tr.Processes.Default.Command = "curl -k --resolv foo.com:{0}:127.0.0.1
https://foo.com:{0}/snipolicybarservername".format(
+tr.Processes.Default.Command = "curl -k --resolve foo.com:{0}:127.0.0.1
https://foo.com:{0}/snipolicybarservername".format(
ts.Variables.ssl_port)
tr.ReturnCode = 0
tr.StillRunningAfter = server
@@ -231,7 +231,7 @@ tr.Processes.Default.Streams.stdout =
Testers.ExcludesExpression("Could not conn
# Should succeed
tr = Test.AddTestRun("bar-to-foo-sni-policy-servername")
-tr.Processes.Default.Command = "curl -k --resolv bar.com:{0}:127.0.0.1
https://bar.com:{0}/snipolicyfooservername".format(
+tr.Processes.Default.Command = "curl -k --resolve bar.com:{0}:127.0.0.1
https://bar.com:{0}/snipolicyfooservername".format(
ts.Variables.ssl_port)
tr.ReturnCode = 0
tr.StillRunningAfter = server