# HG changeset patch # User Sergey Kandaurov # Date 1477313963 -10800 # Node ID efccab043dd35562411d739d47ef8ad42654f349 # Parent 1b11a12be17913a75e81d318dcb6b912eac5f29e Tests: removed TODOs for fixes merged in 1.10.2. diff --git a/h2.t b/h2.t --- a/h2.t +++ b/h2.t @@ -28,11 +28,6 @@ select STDOUT; $| = 1; my $t = Test::Nginx->new()->has(qw/http http_v2 proxy rewrite charset gzip/) ->plan(141); -# Some systems return EINVAL on zero writev iovcnt per POSIX, while others not - -$t->todo_alerts() if ($^O eq 'darwin' or $^O eq 'netbsd') - and !$t->has_version('1.11.3'); - $t->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -793,18 +788,6 @@ is($frame->{headers}->{':status'}, 200, is($sum, 5000000, 'large response - DATA'); # Make sure http2 write handler doesn't break a connection. -# Some buggy systems tolerate ill-use of writev() triggered by write handler, -# while others, such as darwin and NetBSD, follow POSIX strictly, which causes -# a connection to close in nginx. While this also breaks the 'no alerts' test, -# it doesn't suit well, because error.log is currently polluted with much more -# alerts due to other various bugs in ngx_http_v2_module. We catch it here in -# a separate test as well to make it clear. - -SKIP: { -skip 'tolerant operating system', 1 unless $^O eq 'darwin' or $^O eq 'netbsd'; - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.3'); $sid = $s->new_stream(); $frames = $s->read(all => [{ sid => $sid, fin => 1 }]); @@ -812,10 +795,6 @@ local $TODO = 'not yet' unless $t->has_v ($frame) = grep { $_->{type} eq "HEADERS" } @$frames; is($frame->{headers}->{':status'}, 200, 'new stream after large response'); -} - -} - # write event send timeout $s = Test::Nginx::HTTP2->new(port(8086)); @@ -1134,15 +1113,10 @@ my $active = Test::Nginx::HTTP2->new(por ($frame) = grep { $_->{type} eq "GOAWAY" } @$frames; ok($frame, 'GOAWAY on connection close - idle stream'); -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.3'); - $frames = $active->read(all => [{ type => 'GOAWAY' }]); ($frame) = grep { $_->{type} eq "GOAWAY" } @$frames; ok($frame, 'GOAWAY on connection close - active stream'); -} - ############################################################################### sub gunzip_like { diff --git a/h2_proxy_cache.t b/h2_proxy_cache.t --- a/h2_proxy_cache.t +++ b/h2_proxy_cache.t @@ -163,18 +163,10 @@ ok(!grep ({ $_->{type} eq "DATA" } @$fra $s->h2_rst($sid, 8); $frames = $s->read(all => [{ sid => $sid, fin => 0x4 }], wait => 1.2); - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.3'); - ok(!(grep { $_->{type} eq "HEADERS" } @$frames), 'no headers'); -} - # client closes connection after sending a cacheable request producing alert -$t->todo_alerts() unless $t->has_version('1.11.3'); - $s = Test::Nginx::HTTP2->new(); $sid = $s->new_stream({ path => '/cache/t.html?4' }); diff --git a/h2_request_body.t b/h2_request_body.t --- a/h2_request_body.t +++ b/h2_request_body.t @@ -151,15 +151,9 @@ is(read_body_file($frame->{headers}{'x-b ($frame) = grep { $_->{type} eq "HEADERS" } @$frames; is($frame->{headers}->{':status'}, 200, 'request without body'); - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.2'); - is($frame->{headers}->{'x-length'}, undef, 'request without body - content length'); -} - # request body discarded # RST_STREAM with zero code received diff --git a/h2_request_body_preread.t b/h2_request_body_preread.t --- a/h2_request_body_preread.t +++ b/h2_request_body_preread.t @@ -89,7 +89,7 @@ http { EOF $t->write_file('t', ''); -$t->try_run('no http2_body_preread_size')->plan(8); +$t->run()->plan(8); ############################################################################### diff --git a/h2_ssl.t b/h2_ssl.t --- a/h2_ssl.t +++ b/h2_ssl.t @@ -29,8 +29,6 @@ plan(skip_all => 'IO::Socket::SSL not in my $t = Test::Nginx->new()->has(qw/http http_ssl http_v2/) ->has_daemon('openssl'); -$t->todo_alerts() unless $t->has_version('1.11.3'); - $t->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% diff --git a/h2_ssl_proxy_cache.t b/h2_ssl_proxy_cache.t --- a/h2_ssl_proxy_cache.t +++ b/h2_ssl_proxy_cache.t @@ -29,8 +29,6 @@ plan(skip_all => 'IO::Socket::SSL not in my $t = Test::Nginx->new()->has(qw/http http_ssl http_v2 proxy cache/) ->has_daemon('openssl'); -$t->todo_alerts() unless $t->has_version('1.11.3'); - $t->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% diff --git a/h2_ssl_verify_client.t b/h2_ssl_verify_client.t --- a/h2_ssl_verify_client.t +++ b/h2_ssl_verify_client.t @@ -103,16 +103,8 @@ plan(skip_all => 'no alpn') unless $s->a is(get('localhost')->{'x-verify'}, 'SUCCESS', 'success'); is(get('example.com')->{'x-verify'}, 'FAILED', 'failed'); - -# used to be "400 Bad Request" before 654d2dae97d3 (1.11.0) - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.0'); - is(get('localhost', 'example.com')->{':status'}, '421', 'misdirected'); -} - ############################################################################### sub get_ssl_socket { diff --git a/proxy_cache_range.t b/proxy_cache_range.t --- a/proxy_cache_range.t +++ b/proxy_cache_range.t @@ -100,16 +100,9 @@ like(http_get_range('/min_uses/t.html?3' like(http_get_range('/min_uses/t.html?4', 'Range: bytes=0-2,4-'), qr/^SEE.*^THIS/ms, 'multipart range below min_uses'); -TODO: { -local $TODO = 'not yet' if $t->read_file('nginx.conf') =~ /sendfile on/ - and $t->read_file('nginx.conf') =~ /aio threads/ and $^O eq 'linux' - and !$t->has_version('1.11.4'); - like(http_get_range('/tbig.html?s=1', 'Range: bytes=0-19'), qr/^XX000001XXXX000002XX$/ms, 'range of response received in parts'); -} - ############################################################################### sub http_get_range { diff --git a/ssl_verify_client.t b/ssl_verify_client.t --- a/ssl_verify_client.t +++ b/ssl_verify_client.t @@ -94,16 +94,8 @@ foreach my $name ('localhost', 'client') like(get('localhost'), qr/SUCCESS/, 'success'); like(get('example.com'), qr/FAILED/, 'failed'); - -# used to be "400 Bad Request" before 654d2dae97d3 (1.11.0) - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.0'); - like(get('localhost', 'example.com'), qr/421 Misdirected/, 'misdirected'); -} - ############################################################################### sub get { diff --git a/sub_filter_buffering.t b/sub_filter_buffering.t --- a/sub_filter_buffering.t +++ b/sub_filter_buffering.t @@ -71,13 +71,8 @@ like(http_get('/partial'), qr/xy$/, 'par # no partial match: an entire buffer is sent as is without buffering -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.2'); - like(http_get('/negative'), qr/xyz/, 'negative match'); -} - ############################################################################### sub http_daemon {