Browse Source

tests: fix Accept-Encoding strips to work with Hyper builds

The previous strip also removed the CR which turned problematic.

valgrind.supp: add zstd suppression using hyper

Reported-and-analyzed-by: Kevin Burke
Fixes #7169
Closes #7171
Daniel Stenberg 2 years ago
parent
commit
9dc0baf5c6

+ 1 - 1
.travis.yml

@@ -116,7 +116,7 @@ jobs:
         - libbrotli-dev
         - libzstd-dev
   - env:
-    - T=debug HYPER="yes" C="--with-hyper=$HOME/hyper --with-openssl" LD_LIBRARY_PATH=$HOME/hyper/target/debug:/usr/local/lib TFLAGS="1 to 153"
+    - T=debug HYPER="yes" C="--with-hyper=$HOME/hyper --with-openssl" LD_LIBRARY_PATH=$HOME/hyper/target/debug:/usr/local/lib TFLAGS="1 to 153 220 221 222 223 224 230 232 314 315 316 396 397"
     addons:
       apt:
         <<: *common_apt

+ 1 - 9
tests/data/test220

@@ -55,22 +55,14 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-%if hyper
-s/^Accept-Encoding: .*/Accept-Encoding: xxx
/
-%else
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
-%endif
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
 GET /%TESTNUMBER HTTP/1.1
 Host: %HOSTIP:%HTTPPORT
 User-Agent: curl/%VERSION
 Accept: */*
-%if hyper
 Accept-Encoding: xxx
-%else
-Accept-Encoding: xxx
-%endif
 
 </protocol>
 </verify>

+ 2 - 2
tests/data/test221

@@ -55,14 +55,14 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
 GET /%TESTNUMBER HTTP/1.1
 Host: %HOSTIP:%HTTPPORT
 User-Agent: curl/%VERSION
 Accept: */*
-Accept-Encoding: xxx
+Accept-Encoding: xxx
 
 </protocol>
 <errorcode>

+ 2 - 2
tests/data/test222

@@ -186,14 +186,14 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
 GET /%TESTNUMBER HTTP/1.1
 Host: %HOSTIP:%HTTPPORT
 User-Agent: curl/%VERSION
 Accept: */*
-Accept-Encoding: xxx
+Accept-Encoding: xxx
 
 </protocol>
 </verify>

+ 2 - 2
tests/data/test223

@@ -76,14 +76,14 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
 GET /%TESTNUMBER HTTP/1.1
 Host: %HOSTIP:%HTTPPORT
 User-Agent: curl/%VERSION
 Accept: */*
-Accept-Encoding: xxx
+Accept-Encoding: xxx
 
 </protocol>
 <errorcode>

+ 2 - 2
tests/data/test224

@@ -91,14 +91,14 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
 GET /%TESTNUMBER HTTP/1.1
 Host: %HOSTIP:%HTTPPORT
 User-Agent: curl/%VERSION
 Accept: */*
-Accept-Encoding: xxx
+Accept-Encoding: xxx
 
 </protocol>
 </verify>

+ 2 - 2
tests/data/test230

@@ -187,14 +187,14 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
 GET /%TESTNUMBER HTTP/1.1
 Host: %HOSTIP:%HTTPPORT
 User-Agent: curl/%VERSION
 Accept: */*
-Accept-Encoding: xxx
+Accept-Encoding: xxx
 
 </protocol>
 </verify>

+ 2 - 2
tests/data/test232

@@ -186,14 +186,14 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
 GET /%TESTNUMBER HTTP/1.1
 Host: %HOSTIP:%HTTPPORT
 User-Agent: curl/%VERSION
 Accept: */*
-Accept-Encoding: xxx
+Accept-Encoding: xxx
 
 </protocol>
 </verify>

+ 1 - 9
tests/data/test314

@@ -182,22 +182,14 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-%if hyper
-s/^Accept-Encoding: .*/Accept-Encoding: xxx
/
-%else
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
-%endif
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
 GET /%TESTNUMBER HTTP/1.1
 Host: %HOSTIP:%HTTPPORT
 User-Agent: curl/%VERSION
 Accept: */*
-%if hyper
 Accept-Encoding: xxx
-%else
-Accept-Encoding: xxx
-%endif
 
 </protocol>
 </verify>

+ 2 - 2
tests/data/test315

@@ -72,14 +72,14 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
 GET /%TESTNUMBER HTTP/1.1
 Host: %HOSTIP:%HTTPPORT
 User-Agent: curl/%VERSION
 Accept: */*
-Accept-Encoding: xxx
+Accept-Encoding: xxx
 
 </protocol>
 <errorcode>

+ 2 - 2
tests/data/test316

@@ -182,14 +182,14 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
 GET /%TESTNUMBER HTTP/1.1
 Host: %HOSTIP:%HTTPPORT
 User-Agent: curl/%VERSION
 Accept: */*
-Accept-Encoding: xxx
+Accept-Encoding: xxx
 
 </protocol>
 </verify>

+ 2 - 2
tests/data/test396

@@ -186,14 +186,14 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
 GET /%TESTNUMBER HTTP/1.1
 Host: %HOSTIP:%HTTPPORT
 User-Agent: curl/%VERSION
 Accept: */*
-Accept-Encoding: xxx
+Accept-Encoding: xxx
 
 </protocol>
 </verify>

+ 2 - 2
tests/data/test397

@@ -182,14 +182,14 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
 GET /%TESTNUMBER HTTP/1.1
 Host: %HOSTIP:%HTTPPORT
 User-Agent: curl/%VERSION
 Accept: */*
-Accept-Encoding: xxx
+Accept-Encoding: xxx
 
 </protocol>
 </verify>

+ 9 - 0
tests/valgrind.supp

@@ -1,3 +1,12 @@
+{
+   zstd_decompression-1.3.3-on-Ubuntu-18.04_with_hyper
+   Memcheck:Cond
+   fun:ZSTD_decompressStream
+   fun:zstd_unencode_write
+   fun:Curl_unencode_write
+   fun:hyper_body_chunk
+}
+
 {
    zstd_decompression-1.3.3-on-Ubuntu-18.04
    Memcheck:Cond