You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rj...@apache.org on 2019/01/19 14:36:35 UTC
svn commit: r1851672 - /httpd/test/framework/trunk/t/modules/http2.t
Author: rjung
Date: Sat Jan 19 14:36:35 2019
New Revision: 1851672
URL: http://svn.apache.org/viewvc?rev=1851672&view=rev
Log:
Fix wrong test number calculation when testing
with an OpenSSL 0.9.8 client (52 instead of 56):
- count tests in $tls_version_suite always instead of
only when $sni_available
- when those tests are not run because of !$sock,
skip() them
Any while at it also:
- correct the skip number when mod_cgi is not available
- no need to set $tls_modern to its default value again
- one minor style nit
Modified:
httpd/test/framework/trunk/t/modules/http2.t
Modified: httpd/test/framework/trunk/t/modules/http2.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/http2.t?rev=1851672&r1=1851671&r2=1851672&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/modules/http2.t (original)
+++ httpd/test/framework/trunk/t/modules/http2.t Sat Jan 19 14:36:35 2019
@@ -10,15 +10,13 @@ use Apache::TestConfig ();
my $tls_version_suite = 4;
my $num_suite = 24;
my $vhost_suite = 4;
-
+my $total_tests = 2 * $num_suite + $vhost_suite + $tls_version_suite;
Net::SSLeay::initialize();
my $sni_available = Net::SSLeay::OPENSSL_VERSION_NUMBER() >= 0x01000000;
my $alpn_available = $sni_available && exists &Net::SSLeay::CTX_set_alpn_protos;
-my $total_tests = 2 * $num_suite + $vhost_suite + ($sni_available? $tls_version_suite : 0);
-
plan tests => $total_tests, need 'Protocol::HTTP2::Client',
need_module 'http2', need_min_apache_version('2.4.17');
@@ -35,7 +33,7 @@ my $tls_modern = 1;
my $tls_version = 0;
my $sock = Apache::TestRequest::vhost_socket('h2');
-if ( $sock ) {
+if ($sock) {
ok ($sock->connected);
my $req = "GET / HTTP/1.1\r\n".
@@ -54,7 +52,7 @@ if ( $sock ) {
}
}
else {
- $tls_modern = 1;
+ skip "skipping test as socket not defined" foreach(1..$tls_version_suite);
}
Apache::TestRequest::module("http2");
@@ -461,7 +459,7 @@ EOF
};
}
else {
- skip "skipping test as mod_cgi not available" foreach(1..1);
+ skip "skipping test as mod_cgi not available" foreach(1..16);
}
add_sequential(