Hi,
I've received the attached patch against the test framework.
This is not the first time Petr propose such patches and most (or maybe
even all) have been merged.
The goal is to avoid new warnings on suse tests when a recent test
framework is used on an older version of httpd.
However, this particular case puzzles me.
I see r1868313 as a fix on a non-RFC compliant behavior. So I'm not sure
this should be "hidden" only because older versions are known to fail.
In other word, what is the "semantic" behind the test framework?
- Testing against regression only? (in this case including Petr's
patch makes sense to me) - or -
- Checking that the behavior is correct (in this case, I'm not fan
of "hiding" things that are known to fail. A failure would mean: "you
should upgrade to have this fixed")
What is your opinion?
CJ
Message transféré
Sujet : t/modules/{brotli,deflate}.t: handle the case < 2.4.42
Date : Tue, 17 Dec 2019 13:52:08 +0100
De :pgajdos
Pour : christophe.jail...@wanadoo.fr
Hello Christophe,
I just updated to httpd-framework r1870094 and it is failing for me in
brotli.t and deflate.t and it is because of r1868312 which assumes
that httpd-trunk r1868313 is included in the httpd (2.4.42 and on).
I tried to do something in the patch attached, but not sure it is
satisfactory for inclusion.
Bye,
Petr
--
Have a lot of fun!
Index: httpd-framework/t/modules/brotli.t
===
--- httpd-framework.orig/t/modules/brotli.t 2019-12-16 10:22:18.570687529 +0100
+++ httpd-framework/t/modules/brotli.t 2019-12-16 15:04:43.043442458 +0100
@@ -5,16 +5,22 @@ use Apache::Test;
use Apache::TestUtil;
use Apache::TestRequest;
+my $with_contenc=1;
+if (have_min_apache_version('2.4.42')) {
+ # httpd-trunk r1868313 not included
+ $with_contenc=0;
+}
+
my @qvalue = (
[ '' , 1],
[ ' ' , 1],
[ ';' , 1],
[';q=', 1],
-[';q=0' , 0],
-[';q=0.' , 0],
-[';q=0.0' , 0],
-[';q=0.00', 0],
-[';q=0.000' , 0],
+[';q=0' , $with_contenc],
+[';q=0.' , $with_contenc],
+[';q=0.0' , $with_contenc],
+[';q=0.00', $with_contenc],
+[';q=0.000' , $with_contenc],
[';q=0.' , 1], # invalid qvalue format
);
Index: httpd-framework/t/modules/deflate.t
===
--- httpd-framework.orig/t/modules/deflate.t 2019-12-16 10:22:18.570687529 +0100
+++ httpd-framework/t/modules/deflate.t 2019-12-16 15:04:43.043442458 +0100
@@ -56,7 +56,12 @@ for my $server_deflate_uri (@server_defl
content => $deflated_str);
ok $original_str eq $inflated_str;
-ok $original_str eq $deflated_str_q0;
+if (have_min_apache_version("2.4.42")) {
+ ok $original_str eq $deflated_str_q0;
+} else {
+ # httpd-trunk r1868313 not included
+ ok $deflated_str eq $deflated_str_q0;
+}
my $resp = POST($server_inflate_uri, @inflate_headers,
content => "foo123456789012346");
if (have_min_apache_version("2.5")) {