# HG changeset patch # User Sergey Kandaurov # Date 1511542720 -10800 # Node ID 766bcbb632ee77be00dc68343e19f4e4ec2390f1 # Parent b708848eb49a2420703e075cd10ebad10b12a622 Tests: removed TODO and try_run() checks for legacy versions. diff --git a/access_log_escape.t b/access_log_escape.t --- a/access_log_escape.t +++ b/access_log_escape.t @@ -57,12 +57,7 @@ http_get('/?a="1 \\ ' . pack("n", 0x1b1c $t->stop(); -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.8'); - is($t->read_file('json.log'), '\"1 \\\\ \u001B\u001C \"2' . "\n", 'json'); is($t->read_file('test.log'), '\x221 \x5C \x1B\x1C \x22-2' . "\n", 'default'); -} - ############################################################################### diff --git a/addition_buffered.t b/addition_buffered.t --- a/addition_buffered.t +++ b/addition_buffered.t @@ -62,11 +62,6 @@ EOF # if data is buffered, there should be no interleaved data in output -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.5'); - like(http_get('/proxy/body.html'), qr/^XXXXXafter$/m, 'request'); -} - ############################################################################### diff --git a/auth_basic.t b/auth_basic.t --- a/auth_basic.t +++ b/auth_basic.t @@ -95,17 +95,8 @@ like(http_get_auth('/', 'crypt2', '1'), like(http_get_auth('/', 'apr1', 'password'), qr!SEETHIS!, 'apr1 md5'); like(http_get_auth('/', 'plain', 'password'), qr!SEETHIS!, 'plain password'); - -SKIP: { - # SHA1 may not be available unless we have OpenSSL - - skip 'no sha1', 2 unless $t->has_module('--with-http_ssl_module') - or $t->has_module('--with-sha1') - or $t->has_module('--with-openssl'); - - like(http_get_auth('/', 'ssha', 'password'), qr!SEETHIS!, 'ssha'); - like(http_get_auth('/', 'sha', 'password'), qr!SEETHIS!, 'sha'); -} +like(http_get_auth('/', 'ssha', 'password'), qr!SEETHIS!, 'ssha'); +like(http_get_auth('/', 'sha', 'password'), qr!SEETHIS!, 'sha'); unlike(http_get_auth('/', 'apr1', '123'), qr!SEETHIS!, 'apr1 md5 wrong'); unlike(http_get_auth('/', 'plain', '123'), qr!SEETHIS!, 'plain wrong'); diff --git a/config_dump.t b/config_dump.t --- a/config_dump.t +++ b/config_dump.t @@ -77,15 +77,10 @@ like($dump, qr!^# configuration file $d/ like($dump, qr!^# configuration file $d/inc2.conf:$!m, 'inc2.conf found'); like($dump, qr!^# configuration file $d/map.conf:$!m, 'map.conf found'); -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.6'); - unlike($dump, qr!(# configuration file $d/inc.conf:).*\1!s, 'inc.conf uniq'); unlike($dump, qr!(# configuration file $d/inc2.conf:).*\1!s, 'inc2.conf uniq'); unlike($dump, qr!(# configuration file $d/map.conf:).*\1!s, 'map.conf uniq'); -} - is(getconf($t, $dump, 'nginx.conf'), $t->read_file('nginx.conf'), 'content'); is(getconf($t, $dump, 'inc.conf'), $t->read_file('inc.conf'), 'content inc'); is(getconf($t, $dump, 'map.conf'), $t->read_file('map.conf'), 'content inc 2'); diff --git a/geo.t b/geo.t --- a/geo.t +++ b/geo.t @@ -210,15 +210,9 @@ like($r, qr/^X-Del: world/m, 'geo delete like($r, qr/^X-Ran: loopback/m, 'geo ranges'); like($r, qr/^X-RIn: loopback/m, 'geo ranges include'); -TODO: { -todo_skip 'use-after-free', 2 unless $ENV{TEST_NGINX_UNSAFE} - or $t->has_version('1.11.4'); - like(http_get('/2'), qr/^X-RDe: default/m, 'geo ranges delete'); like(http_get('/2'), qr/^X-RD2: default/m, 'geo ranges delete 2'); -} - like($r, qr/^X-ABe: loopback/m, 'geo ranges add before'); like($r, qr/^X-AAf: loopback/m, 'geo ranges add after'); like($r, qr/^X-Ins: loopback/m, 'geo ranges insert'); @@ -229,16 +223,9 @@ like(http_get('/1?ip=192.0.2.1'), qr/^X- like(http_get('/1?ip=10.0.0.1'), qr/^X-Arg: default/m, 'geo default'); like(http_get('/1?ip=10.0.0.1'), qr/^X-ARa: default/m, 'geo ranges default'); like(http_get('/1?ip=10.13.2.1'), qr/^X-ARa: foo2/m, 'geo ranges add'); - -TODO: { -todo_skip 'use-after-free', 1 unless $ENV{TEST_NGINX_UNSAFE} - or $t->has_version('1.11.4'); - like(http_get('/1?ip=10.11.2.1'), qr/^X-ARa: default/m, 'geo delete range from variable'); -} - like(http_xff('192.0.2.1'), qr/^X-XFF: test/m, 'geo proxy'); like(http_xff('10.0.0.1'), qr/^X-XFF: default/m, 'geo proxy default'); like(http_xff('10.0.0.1, 192.0.2.1'), qr/^X-XFF: test/m, 'geo proxy long'); diff --git a/h2.t b/h2.t --- a/h2.t +++ b/h2.t @@ -1117,9 +1117,6 @@ undef $grace4; # GOAWAY without awaiting active streams, further streams ignored -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.6'); - $s = Test::Nginx::HTTP2->new(port(8080)); $sid = $s->new_stream({ path => '/t1.html' }); $s->read(all => [{ sid => $sid, length => 2**16 - 1 }]); @@ -1137,8 +1134,6 @@ is($frame->{last_sid}, $sid, 'GOAWAY wit ($frame) = grep { $_->{type} eq 'HEADERS' } @$frames; is($frame, undef, 'GOAWAY with active stream - no new stream'); -} - $s->h2_window(100, $sid); $s->h2_window(100); $frames = $s->read(all => [{ sid => $sid, fin => 0x1 }]); diff --git a/h2_auth_request.t b/h2_auth_request.t --- a/h2_auth_request.t +++ b/h2_auth_request.t @@ -72,10 +72,6 @@ EOF my ($s, $sid, $frames, $frame); -TODO: { -todo_skip 'use-after-free', 2 unless $ENV{TEST_NGINX_UNSAFE} - or $t->has_version('1.11.7'); - # second stream is used to induce body corruption issue $s = Test::Nginx::HTTP2->new(); @@ -87,6 +83,4 @@ todo_skip 'use-after-free', 2 unless $EN is($frame->{headers}->{'x-body'}, 'A' x 600, 'auth request body'); isnt($frame->{headers}->{'x-body-file'}, undef, 'auth request body file'); -} - ############################################################################### diff --git a/h2_fastcgi_request_buffering.t b/h2_fastcgi_request_buffering.t --- a/h2_fastcgi_request_buffering.t +++ b/h2_fastcgi_request_buffering.t @@ -53,18 +53,13 @@ http { EOF $t->run(); - -my $f = get_body('/chunked'); -plan(skip_all => 'no unbuffered request body') unless $f; -$f->{http_end}(); - $t->plan(48); ############################################################################### # unbuffered request body to fastcgi -$f = get_body('/'); +my $f = get_body('/'); ok($f->{headers}, 'request'); is($f->{upload}('01234', body_more => 1), '01234', 'part'); is($f->{upload}('56789'), '56789_eos', 'part 2'); diff --git a/h2_max_requests.t b/h2_max_requests.t --- a/h2_max_requests.t +++ b/h2_max_requests.t @@ -49,7 +49,7 @@ http { EOF $t->write_file('index.html', ''); -$t->try_run('no http2_max_requests')->plan(5); +$t->run()->plan(5); ############################################################################### diff --git a/h2_proxy_request_buffering.t b/h2_proxy_request_buffering.t --- a/h2_proxy_request_buffering.t +++ b/h2_proxy_request_buffering.t @@ -66,18 +66,13 @@ http { EOF $t->run(); - -my $f = get_body('/chunked'); -plan(skip_all => 'no unbuffered request body') unless $f; -$f->{http_end}(); - $t->plan(49); ############################################################################### # unbuffered request body -$f = get_body('/', 'content-length' => 10); +my $f = get_body('/', 'content-length' => 10); ok($f->{headers}, 'request'); is($f->{upload}('01234', body_more => 1), '01234', 'part'); is($f->{upload}('56789'), '56789', 'part 2'); diff --git a/h2_proxy_request_buffering_ssl.t b/h2_proxy_request_buffering_ssl.t --- a/h2_proxy_request_buffering_ssl.t +++ b/h2_proxy_request_buffering_ssl.t @@ -99,18 +99,13 @@ foreach my $name ('localhost') { } $t->run(); - -my $f = get_body('/chunked'); -plan(skip_all => 'no unbuffered request body') unless $f; -$f->{http_end}(); - $t->plan(40); ############################################################################### # unbuffered request body -$f = get_body('/', 'content-length' => 10); +my $f = get_body('/', 'content-length' => 10); ok($f->{headers}, 'request'); is($f->{upload}('01234', body_more => 1), '01234', 'part'); is($f->{upload}('56789'), '56789', 'part 2'); diff --git a/h2_server_tokens.t b/h2_server_tokens.t --- a/h2_server_tokens.t +++ b/h2_server_tokens.t @@ -88,7 +88,7 @@ http { EOF -$t->try_run('no server_tokens build')->plan(12); +$t->run()->plan(12); ############################################################################### @@ -108,15 +108,10 @@ like(body('/on/404'), $re, 'http2 tokens $re = qr/$re \Q($1)\E/ if $t->{_configure_args} =~ /--build=(\S+)/; -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.10'); - like(header_server('/b/200'), qr/^$re$/, 'http2 tokens build 200'); like(header_server('/b/404'), qr/^$re$/, 'http2 tokens build 404'); like(body('/b/404'), qr/$re/, 'http2 tokens build 404 body'); -} - ############################################################################### sub header_server { diff --git a/http_absolute_redirect.t b/http_absolute_redirect.t --- a/http_absolute_redirect.t +++ b/http_absolute_redirect.t @@ -82,7 +82,7 @@ EOF mkdir($t->testdir() . '/dir'); -$t->try_run('no absolute_redirect')->plan(10); +$t->run()->plan(10); ############################################################################### diff --git a/http_resolver_cleanup.t b/http_resolver_cleanup.t --- a/http_resolver_cleanup.t +++ b/http_resolver_cleanup.t @@ -25,8 +25,6 @@ select STDOUT; $| = 1; my $t = Test::Nginx->new()->has(qw/http proxy/); plan(skip_all => 'win32') if $^O eq 'MSWin32'; -plan(skip_all => 'use-after-free on shutdown') unless $ENV{TEST_NGINX_UNSAFE} - or $t->has_version('1.11.8'); $t->write_file_expand('nginx.conf', <<'EOF')->plan(1); diff --git a/image_filter_webp.t b/image_filter_webp.t --- a/image_filter_webp.t +++ b/image_filter_webp.t @@ -69,7 +69,7 @@ http { EOF -$t->try_run('no WebP support')->plan(18); +$t->run()->plan(18); $t->write_file('webp', pack("A4LA8", "RIFF", 0x22, "WEBPVP8 ") . pack("N4", 0x16000000, 0x3001009d, 0x012a0100, 0x01000ec0) . diff --git a/mail_capability.t b/mail_capability.t --- a/mail_capability.t +++ b/mail_capability.t @@ -160,15 +160,7 @@ my $s = Test::Nginx::IMAP->new(); my $caps = get_auth_caps($s); like($caps, qr/USER/, 'pop3 - user'); - -TODO: { -local $TODO = 'not yet' if $t->has_version('1.11.6') - and !$t->has_version('1.11.11'); - like($caps, qr/SASL (PLAIN LOGIN|LOGIN PLAIN) CRAM-MD5/, 'pop3 - methods'); - -} - unlike($caps, qr/STLS/, 'pop3 - no stls'); # pop3 starttls @@ -180,16 +172,8 @@ unlike($caps, qr/STLS/, 'pop3 - no stls' $caps = get_auth_caps($s); like($caps, qr/USER/, 'pop3 starttls - user'); - -TODO: { -local $TODO = 'not yet' if $t->has_version('1.11.6') - and !$t->has_version('1.11.11'); - like($caps, qr/SASL (PLAIN LOGIN|LOGIN PLAIN) CRAM-MD5/, 'pop3 starttls - methods'); - -} - like($caps, qr/STLS/, 'pop3 startls - stls'); # pop3 starttls only diff --git a/mail_imap.t b/mail_imap.t --- a/mail_imap.t +++ b/mail_imap.t @@ -92,7 +92,7 @@ http { EOF $t->run_daemon(\&Test::Nginx::IMAP::imap_test_daemon); -$t->try_run('no auth external')->plan(14); +$t->run()->plan(14); $t->waitforsocket('127.0.0.1:' . port(8144)); diff --git a/mail_pop3.t b/mail_pop3.t --- a/mail_pop3.t +++ b/mail_pop3.t @@ -92,7 +92,7 @@ http { EOF $t->run_daemon(\&Test::Nginx::POP3::pop3_test_daemon); -$t->try_run('no auth external')->plan(20); +$t->run()->plan(20); $t->waitforsocket('127.0.0.1:' . port(8111)); @@ -128,13 +128,8 @@ my $s = Test::Nginx::POP3->new(); $s->send('AUTH'); $s->ok('auth'); -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.11'); - is(get_auth_caps($s), 'PLAIN:LOGIN:CRAM-MD5:EXTERNAL', 'auth capabilities'); -} - # auth plain $s = Test::Nginx::POP3->new(); diff --git a/mail_smtp.t b/mail_smtp.t --- a/mail_smtp.t +++ b/mail_smtp.t @@ -90,7 +90,7 @@ http { EOF $t->run_daemon(\&Test::Nginx::SMTP::smtp_test_daemon); -$t->try_run('no auth external')->plan(30); +$t->run()->plan(30); $t->waitforsocket('127.0.0.1:' . port(8026)); diff --git a/map_complex.t b/map_complex.t --- a/map_complex.t +++ b/map_complex.t @@ -60,7 +60,7 @@ http { EOF -$t->try_run('no complex value')->plan(3); +$t->run()->plan(3); ############################################################################### diff --git a/map_volatile.t b/map_volatile.t --- a/map_volatile.t +++ b/map_volatile.t @@ -73,7 +73,7 @@ EOF mkdir($t->testdir() . '/1'); mkdir($t->testdir() . '/2'); -$t->try_run('no map volatile')->plan(2); +$t->run()->plan(2); ############################################################################### diff --git a/mp4.t b/mp4.t --- a/mp4.t +++ b/mp4.t @@ -83,16 +83,8 @@ is(durations($t, 6, 9), '3.0 3.0', 'star is(durations($t, 2.7, 5.6), '2.9 2.9', 'start end float'); is(durations($t, undef, 9), '9.0 9.0', 'end integer'); - -TODO: { -local $TODO = 'not yet' - if $Config{myarchname} =~ /i.86/ && $t->has_module('built by gcc [56]') - and !$t->has_version('1.11.6'); - is(durations($t, undef, 5.6), '5.6 5.6', 'end float'); -} - # invalid range results in ignoring end argument like(http_head("$test_uri?start=1&end=1"), qr/200 OK/, 'zero range'); diff --git a/mp4_ssi.t b/mp4_ssi.t --- a/mp4_ssi.t +++ b/mp4_ssi.t @@ -65,14 +65,9 @@ system('ffmpeg -loglevel quiet -y ' ############################################################################### -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.5'); - (my $r = get('/')) =~ s/([^\x20-\x7e])/sprintf('\\x%02x', ord($1))/gmxe; unlike($r, qr/\\x0d(\\x0a)?0\\x0d(\\x0a)?\\x0d(\\x0a)?\w/, 'only final chunk'); -} - ############################################################################### sub get { diff --git a/msie_refresh_ssi.t b/msie_refresh_ssi.t --- a/msie_refresh_ssi.t +++ b/msie_refresh_ssi.t @@ -56,14 +56,9 @@ EOF ############################################################################### -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.5'); - my $r = get('/', 'User-Agent: MSIE foo'); unlike($r, qr/\x0d\x0a?0\x0d\x0a?\x0d\x0a?\w/, 'only final chunk'); -} - ############################################################################### sub get { diff --git a/perl_sleep.t b/perl_sleep.t --- a/perl_sleep.t +++ b/perl_sleep.t @@ -71,12 +71,6 @@ EOF ############################################################################### like(http_get('/sleep'), qr/works/, 'perl sleep'); - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.13'); - like(http_get('/subrequest.html'), qr/works/, 'perl sleep in subrequest'); -} - ############################################################################### diff --git a/proxy.t b/proxy.t --- a/proxy.t +++ b/proxy.t @@ -79,15 +79,8 @@ unlike(http_head('/'), qr/SEE-THIS/, 'pr like(http_get('/var?b=127.0.0.1:' . port(8081) . '/'), qr/SEE-THIS/, 'proxy with variables'); like(http_get('/var?b=u/'), qr/SEE-THIS/, 'proxy with variables to upstream'); - -TODO: { -todo_skip 'heap-buffer-overflow', 1 - unless $ENV{TEST_NGINX_UNSAFE} or $t->has_version('1.11.0'); - ok(http_get("/var?b=[::]"), 'proxy with variables - no ipv6 port'); -} - like(http_get('/timeout'), qr/200 OK/, 'proxy connect timeout'); ############################################################################### diff --git a/proxy_bind.t b/proxy_bind.t --- a/proxy_bind.t +++ b/proxy_bind.t @@ -93,12 +93,6 @@ like(http_get('/'), qr/X-IP: 127.0.0.1/, like(http_get('/inherit'), qr/X-IP: 127.0.0.2/, 'bind inherit'); like(http_get('/off'), qr/X-IP: 127.0.0.1/, 'bind off'); like(http_get('/var?b=127.0.0.2'), qr/X-IP: 127.0.0.2/, 'bind var'); - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.2'); - like(http_get('/port'), qr/Port: (\d+)(?!\d).*Port: \1/s, 'bind port'); -} - ############################################################################### diff --git a/proxy_bind_transparent.t b/proxy_bind_transparent.t --- a/proxy_bind_transparent.t +++ b/proxy_bind_transparent.t @@ -64,7 +64,7 @@ http { EOF $t->write_file('index.html', ''); -$t->try_run('no proxy_bind transparent')->plan(1); +$t->run()->plan(1); ############################################################################### diff --git a/proxy_cache_bypass.t b/proxy_cache_bypass.t --- a/proxy_cache_bypass.t +++ b/proxy_cache_bypass.t @@ -93,12 +93,6 @@ like(http_get('/t2'), qr/403 Forbidden/, like(http_get('/t2'), qr/403 Forbidden/, 'error cached'); like(http_get('/t2?bypass=1'), qr/NOOP/, 'error cache bypassed'); - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.0'); - like(http_get('/t2'), qr/NOOP/, 'error cached after bypass'); -} - ############################################################################### diff --git a/proxy_cache_manager.t b/proxy_cache_manager.t --- a/proxy_cache_manager.t +++ b/proxy_cache_manager.t @@ -76,7 +76,7 @@ http { EOF $t->write_file('t.html', 'SEE-THIS'); -$t->try_run('no manager params')->plan(3); +$t->run()->plan(3); ############################################################################### diff --git a/proxy_cache_max_range_offset.t b/proxy_cache_max_range_offset.t --- a/proxy_cache_max_range_offset.t +++ b/proxy_cache_max_range_offset.t @@ -78,7 +78,7 @@ http { EOF $t->write_file('t.html', 'SEE-THIS'); -$t->try_run('no proxy_cache_max_range_offset')->plan(8); +$t->run()->plan(8); ############################################################################### diff --git a/proxy_cache_use_stale.t b/proxy_cache_use_stale.t --- a/proxy_cache_use_stale.t +++ b/proxy_cache_use_stale.t @@ -135,7 +135,7 @@ EOF $t->write_file('t9.html', 'SEE-THIS' x 1024); $t->write_file('ssi.html', 'xxx xxx'); -$t->try_run('no proxy_cache_background_update')->plan(29); +$t->run()->plan(29); ############################################################################### @@ -234,14 +234,8 @@ like($r, qr/^xxx (SEE-THIS){1024} xxx$/m # this used to access a static file in the update request like(http_get('/t2.html?if=1'), qr/STALE/, 'background update in if'); - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.11'); - like(http_get('/t2.html?if=1'), qr/HIT/, 'background update in if - updated'); -} - ############################################################################### sub get { diff --git a/proxy_method.t b/proxy_method.t --- a/proxy_method.t +++ b/proxy_method.t @@ -77,14 +77,9 @@ like(http_get('/preserve'), qr/request_m like(http_get('/const'), qr/request_method=POST/, 'proxy_method from constant'); -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.6'); - like(http_get('/var?method=POST'), qr/request_method=POST/, 'proxy_method from variable'); -} - like(http_get('/parent/child'), qr/request_method=POST/, 'proxy_method from parent'); diff --git a/proxy_protocol_port.t b/proxy_protocol_port.t --- a/proxy_protocol_port.t +++ b/proxy_protocol_port.t @@ -64,7 +64,7 @@ http { EOF $t->write_file('t', 'SEE-THIS'); -$t->try_run('no proxy_protocol_port')->plan(8); +$t->run()->plan(8); ############################################################################### diff --git a/proxy_ssl.t b/proxy_ssl.t --- a/proxy_ssl.t +++ b/proxy_ssl.t @@ -111,14 +111,8 @@ like(http_get('/ssl_reuse'), qr/200 OK.* like(http_get('/ssl_reuse'), qr/200 OK.*X-Session: r/s, 'ssl session reused'); like(http_get('/ssl_reuse'), qr/200 OK.*X-Session: r/s, 'ssl session reused 2'); like(http_get('/timeout'), qr/200 OK/, 'proxy connect timeout'); - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.6'); - like(http_get('/timeout_h'), qr/504 Gateway/, 'proxy handshake timeout'); -} - ############################################################################### sub http_daemon { diff --git a/realip_remote_addr.t b/realip_remote_addr.t --- a/realip_remote_addr.t +++ b/realip_remote_addr.t @@ -68,14 +68,8 @@ like(http_get('/1'), qr/X-Real-IP: 127.0 like(http_get('/'), qr/X-Real-IP: 127.0.0.1/m, 'request redirect'); like(http_xff('/1', '192.0.2.1'), qr/X-Real-IP: 127.0.0.1/m, 'realip'); - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.5'); - like(http_xff('/', '192.0.2.1'), qr/X-Real-IP: 127.0.0.1/m, 'realip redirect'); -} - ############################################################################### sub http_xff { diff --git a/realip_remote_port.t b/realip_remote_port.t --- a/realip_remote_port.t +++ b/realip_remote_port.t @@ -53,7 +53,7 @@ EOF $t->write_file('index.html', ''); $t->write_file('1', ''); -$t->try_run('no realip_remote_port'); +$t->run(); plan(skip_all => 'no 127.0.0.1 on host') if http_get('/') !~ /X-IP: 127.0.0.1/m; @@ -71,14 +71,9 @@ like($data, qr/X-Real-Port: $sp/, 'reque ($sp, $data) = http_sp_xff('/1', '127.0.0.1:123'); like($data, qr/X-Real-Port: $sp/, 'realip'); -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.5'); - ($sp, $data) = http_sp_xff('/', '127.0.0.1:123'); like($data, qr/X-Real-Port: $sp/, 'realip redirect'); -} - ############################################################################### sub http_sp_get { diff --git a/request_id.t b/request_id.t --- a/request_id.t +++ b/request_id.t @@ -61,7 +61,7 @@ EOF $t->write_file('index.html', ''); $t->write_file('add.html', ''); -$t->try_run('no request_id variable support')->plan(12); +$t->run()->plan(12); ############################################################################### diff --git a/server_tokens.t b/server_tokens.t --- a/server_tokens.t +++ b/server_tokens.t @@ -87,7 +87,7 @@ http { EOF -$t->try_run('no server_tokens build')->plan(12); +$t->run()->plan(12); ############################################################################### @@ -107,15 +107,10 @@ like(http_body('/on/404'), $re, 'tokens $re = qr/$re \Q($1)\E/ if $t->{_configure_args} =~ /--build=(\S+)/; -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.10'); - like(http_get_server('/b/200'), $re, 'tokens build 200'); like(http_get_server('/b/404'), $re, 'tokens build 404'); like(http_body('/b/404'), $re, 'tokens build 404 body'); -} - ############################################################################### sub http_body { diff --git a/slice.t b/slice.t --- a/slice.t +++ b/slice.t @@ -285,23 +285,12 @@ SKIP: { # slicing in named location -my $s = http_get('/cache-redirect', start => 1); -# loop protection used with limit_rate, exit loop if subrequest has lost range -unless ($t->has_version('1.11.10')) { - select undef, undef, undef, 0.2; - $t->write_file('/cache-redirect', ''); -} -$r = http_end($s); - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.10'); +$r = http_get('/cache-redirect'); like($r, qr/ 200 .*^0123456789abcdef$/ms, 'in named location'); is(scalar @{[ glob $t->testdir() . '/cach3/*' ]}, 8, 'in named location - cache entries'); -} - ############################################################################### sub get { diff --git a/ssi_delayed.t b/ssi_delayed.t --- a/ssi_delayed.t +++ b/ssi_delayed.t @@ -67,9 +67,6 @@ EOF ############################################################################### -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.13'); - # If a response sending is delayed by sendfile_max_chunk, and # then we've switched to a different subrequest, which is not yet # ready to handle corresponding write event, wev->delayed won't be @@ -79,8 +76,6 @@ local $TODO = 'not yet' unless $t->has_v like(http_get('/delayed.html'), qr/x{100}y{1024}SEE-THIS/, 'delayed'); -} - ############################################################################### sub http_daemon { diff --git a/ssl.t b/ssl.t --- a/ssl.t +++ b/ssl.t @@ -234,15 +234,9 @@ unlike(http_get('/id'), qr/body \w/, 'se like(get('/cipher', 8085), qr/^body [\w-]+$/m, 'cipher'); like(get('/client_verify', 8085), qr/^body NONE$/m, 'client verify'); like(get('/protocol', 8085), qr/^body (TLS|SSL)v(\d|\.)+$/m, 'protocol'); - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.6'); - like(cert('/issuer', 8085), qr!^body CN=issuer$!m, 'issuer'); like(cert('/subject', 8085), qr!^body CN=subject$!m, 'subject'); -} - ############################################################################### sub get { diff --git a/ssl2.t b/ssl2.t --- a/ssl2.t +++ b/ssl2.t @@ -123,7 +123,7 @@ foreach my $name ('localhost') { or die "Can't create certificate for $name: $!\n"; } -$t->try_run('no ssl_ciphers')->plan(4); +$t->run()->plan(4); ############################################################################### diff --git a/stream_access_log.t b/stream_access_log.t --- a/stream_access_log.t +++ b/stream_access_log.t @@ -103,7 +103,7 @@ stream { EOF $t->run_daemon(\&stream_daemon); -$t->try_run('no stream access_log')->plan(10); +$t->run()->plan(10); $t->waitforsocket('127.0.0.1:' . port(8080)); diff --git a/stream_access_log_escape.t b/stream_access_log_escape.t --- a/stream_access_log_escape.t +++ b/stream_access_log_escape.t @@ -54,7 +54,7 @@ stream { EOF -$t->try_run('no stream map')->plan(2); +$t->run()->plan(2); ############################################################################### @@ -62,12 +62,7 @@ http_get('/'); $t->stop(); -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.8'); - is($t->read_file('json.log'), '\" \\\\ \"foo' . "\n", 'json'); is($t->read_file('test.log'), '\x22 \x5C \x22foo-' . "\n", 'default'); -} - ############################################################################### diff --git a/stream_geo.t b/stream_geo.t --- a/stream_geo.t +++ b/stream_geo.t @@ -219,7 +219,7 @@ EOF $t->write_file('geo.conf', '127.0.0.0/8 loopback;'); $t->write_file('geo-ranges.conf', '127.0.0.0-127.255.255.255 loopback;'); -$t->try_run('no stream geo')->plan(19); +$t->run()->plan(19); ############################################################################### @@ -230,15 +230,9 @@ is($data{geo_delete}, 'world', 'geo dele is($data{geo_ranges}, 'loopback', 'geo ranges'); is($data{geo_ranges_include}, 'loopback', 'geo ranges include'); -TODO: { -todo_skip 'use-after-free', 2 unless $ENV{TEST_NGINX_UNSAFE} - or $t->has_version('1.11.4'); - is(stream('127.0.0.1:' . port(8083))->read(), 'default', 'geo ranges delete'); is(stream('127.0.0.1:' . port(8084))->read(), 'default', 'geo ranges delete 2'); -} - is($data{geo_before}, 'loopback', 'geo ranges add before'); is($data{geo_after}, 'loopback', 'geo ranges add after'); is($data{geo_insert}, 'loopback', 'geo ranges insert'); @@ -248,15 +242,9 @@ is($data{geo_insert_after}, 'loopback', is($data{geo_from_addr}, 'loopback', 'geo from addr'); is($data{geo_from_var}, 'test', 'geo from var'); -TODO: { -todo_skip 'use-after-free', 1 unless $ENV{TEST_NGINX_UNSAFE} - or $t->has_version('1.11.4'); - is(stream('127.0.0.1:' . port(8085))->read(), 'default', 'geo delete range from variable'); -} - is(stream('127.0.0.1:' . port(8081))->read(), 'default', 'geo default'); is(stream('127.0.0.1:' . port(8082))->read(), 'world', 'geo world'); is(stream('127.0.0.1:' . port(8086))->read(), 'default', 'geo ranges default'); diff --git a/stream_geo_binary.t b/stream_geo_binary.t --- a/stream_geo_binary.t +++ b/stream_geo_binary.t @@ -61,7 +61,7 @@ EOF "-127." . $_/256/256 % 256 . "." . $_/256 % 256 . "." .$_ % 256 . " " . ($_ == 1 ? "loopback" : "range$_") . ";" } (0 .. 100000))); -$t->try_run('no stream geo')->plan(2); +$t->run()->plan(2); ############################################################################### diff --git a/stream_geo_ipv6.t b/stream_geo_ipv6.t --- a/stream_geo_ipv6.t +++ b/stream_geo_ipv6.t @@ -86,7 +86,7 @@ stream { EOF -$t->try_run('no stream geo or inet6 support')->plan(6); +$t->try_run('no inet6 support')->plan(6); ############################################################################### diff --git a/stream_limit_conn_complex.t b/stream_limit_conn_complex.t --- a/stream_limit_conn_complex.t +++ b/stream_limit_conn_complex.t @@ -62,7 +62,7 @@ http { EOF $t->write_file('index.html', ''); -$t->try_run('no stream limit_conn with complex value')->plan(4); +$t->run()->plan(4); ############################################################################### diff --git a/stream_map.t b/stream_map.t --- a/stream_map.t +++ b/stream_map.t @@ -59,7 +59,7 @@ stream { EOF -$t->try_run('no stream map')->plan(5); +$t->run()->plan(5); ############################################################################### diff --git a/stream_proxy_complex.t b/stream_proxy_complex.t --- a/stream_proxy_complex.t +++ b/stream_proxy_complex.t @@ -64,7 +64,7 @@ stream { EOF -$t->try_run('no stream proxy_pass with complex value')->plan(5); +$t->run()->plan(5); ############################################################################### diff --git a/stream_proxy_ssl_name_complex.t b/stream_proxy_ssl_name_complex.t --- a/stream_proxy_ssl_name_complex.t +++ b/stream_proxy_ssl_name_complex.t @@ -78,7 +78,7 @@ foreach my $name ('localhost') { or die "Can't create certificate for $name: $!\n"; } -$t->try_run('no stream return')->plan(2); +$t->run()->plan(2); ############################################################################### diff --git a/stream_realip.t b/stream_realip.t --- a/stream_realip.t +++ b/stream_realip.t @@ -82,7 +82,7 @@ stream { EOF $t->run_daemon(\&stream_daemon); -$t->try_run('no stream proxy_protocol or inet6 support')->plan(8); +$t->try_run('no inet6 support')->plan(8); $t->waitforsocket('127.0.0.1:' . port(8081)); ############################################################################### diff --git a/stream_resolver.t b/stream_resolver.t --- a/stream_resolver.t +++ b/stream_resolver.t @@ -86,7 +86,7 @@ stream { EOF $t->run_daemon(\&dns_daemon, port(8980), $t); -$t->try_run('no stream resolver')->plan(8); +$t->run()->plan(8); $t->waitforfile($t->testdir . '/' . port(8980)); diff --git a/stream_split_clients.t b/stream_split_clients.t --- a/stream_split_clients.t +++ b/stream_split_clients.t @@ -49,7 +49,7 @@ stream { EOF -$t->try_run('no stream split_clients'); +$t->run(); $t->plan(1); ############################################################################### diff --git a/stream_ssl_preread.t b/stream_ssl_preread.t --- a/stream_ssl_preread.t +++ b/stream_ssl_preread.t @@ -173,13 +173,8 @@ is(get_short(), "127.0.0.1:$p3", 'short # allow record with older SSL version, such as 3.0 -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.8'); - is(get_oldver(), 'foo', 'older version in ssl record'); -} - $t->stop(); is($t->read_file('status.log'), "400\n", 'preread buffer full - log'); diff --git a/stream_ssl_realip.t b/stream_ssl_realip.t --- a/stream_ssl_realip.t +++ b/stream_ssl_realip.t @@ -101,7 +101,7 @@ foreach my $name ('localhost') { or die "Can't create certificate for $name: $!\n"; } -$t->try_run('no stream proxy_protocol or inet6 support')->plan(6); +$t->try_run('no inet6 support')->plan(6); ############################################################################### diff --git a/stream_ssl_variables.t b/stream_ssl_variables.t --- a/stream_ssl_variables.t +++ b/stream_ssl_variables.t @@ -90,7 +90,7 @@ foreach my $name ('localhost') { or die "Can't create certificate for $name: $!\n"; } -$t->try_run('no stream return')->plan(5); +$t->run()->plan(5); ############################################################################### diff --git a/stream_ssl_verify_client.t b/stream_ssl_verify_client.t --- a/stream_ssl_verify_client.t +++ b/stream_ssl_verify_client.t @@ -108,26 +108,14 @@ foreach my $name ('1.example.com', '2.ex or die "Can't create certificate for $name: $!\n"; } -$t->try_run('no ssl_verify_client')->plan(10); +$t->run()->plan(10); ############################################################################### -TODO: { -todo_skip 'leaves coredump', 1 unless $t->has_version('1.11.9'); - is(stream('127.0.0.1:' . port(8080))->read(), ':', 'plain connection'); -} - -TODO: { -local $TODO = 'fails on one-pass ngx_ssl_handshake' - unless $t->has_version('1.11.9'); - is(get(8081), '', 'no cert'); is(get(8082, '1.example.com'), '', 'bad optional cert'); - -} - is(get(8082), 'NONE:', 'no optional cert'); like(get(8083, '1.example.com'), qr/FAILED.*BEGIN/, 'bad optional_no_ca cert'); @@ -143,15 +131,10 @@ is($ca, '/CN=2.example.com', 'no trusted } -TODO: { -local $TODO = 'not yet, see above' unless $t->has_version('1.11.9'); - $t->stop(); is($t->read_file('status.log'), "500\n200\n", 'log'); -} - ############################################################################### sub get { diff --git a/stream_status_variable.t b/stream_status_variable.t --- a/stream_status_variable.t +++ b/stream_status_variable.t @@ -83,7 +83,7 @@ stream { EOF -$t->try_run('no stream access_log')->plan(6); +$t->run()->plan(6); ############################################################################### diff --git a/stream_udp_upstream.t b/stream_udp_upstream.t --- a/stream_udp_upstream.t +++ b/stream_udp_upstream.t @@ -88,7 +88,7 @@ EOF $t->run_daemon(\&udp_daemon, port(8984), $t); $t->run_daemon(\&udp_daemon, port(8985), $t); -$t->try_run('no stream access_log')->plan(5); +$t->run()->plan(5); $t->waitforfile($t->testdir . '/' . port(8984)); $t->waitforfile($t->testdir . '/' . port(8985)); diff --git a/stream_upstream.t b/stream_upstream.t --- a/stream_upstream.t +++ b/stream_upstream.t @@ -89,7 +89,7 @@ EOF $t->run_daemon(\&stream_daemon, port(8084)); $t->run_daemon(\&stream_daemon, port(8085)); -$t->try_run('no stream access_log')->plan(6); +$t->run()->plan(6); $t->waitforsocket('127.0.0.1:' . port(8084)); $t->waitforsocket('127.0.0.1:' . port(8085)); @@ -106,14 +106,9 @@ is(many(30, port(8083)), "$port4: 30", ' $t->run_daemon(\&stream_daemon, port(8086)); $t->waitforsocket('127.0.0.1:' . port(8086)); -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.8'); - sleep 2; # wait till fail_timeout passes is(parallel(30, port(8083)), "$port6: 30", 'recovery'); -} - $t->stop(); like($t->read_file('u.log'), qr/127.0.0.1:$port6, 127.0.0.1:$port4!0, 1!0, 4/, diff --git a/stream_variables.t b/stream_variables.t --- a/stream_variables.t +++ b/stream_variables.t @@ -76,7 +76,7 @@ stream { EOF -$t->try_run('no stream return or inet6 support')->plan(8); +$t->try_run('no inet6 support')->plan(8); ############################################################################### diff --git a/sub_filter_slice.t b/sub_filter_slice.t --- a/sub_filter_slice.t +++ b/sub_filter_slice.t @@ -71,16 +71,11 @@ EOF my $r; -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.5'); - # range filter in subrequests (subrequest_ranges) $r = get('/t', 'Range: bytes=2-4'); unlike($r, qr/\x0d\x0a?0\x0d\x0a?\x0d\x0a?\w/, 'only final chunk'); -} - TODO: { local $TODO = 'not yet'; diff --git a/upstream_hash.t b/upstream_hash.t --- a/upstream_hash.t +++ b/upstream_hash.t @@ -198,15 +198,9 @@ is(@res, 20, 'all hashed peers - bad con like(http_get('/busy'), qr/X-IP: 127.0.0.1:$p1, bad/, 'upstream name - busy'); - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.5'); - like(http_get('/cbusy'), qr/X-IP: 127.0.0.1:$p1, cbad/, 'upstream name - busy consistent'); -} - ############################################################################### # Returns true if two arrays follow consistency, i.e., they may only differ diff --git a/upstream_max_conns.t b/upstream_max_conns.t --- a/upstream_max_conns.t +++ b/upstream_max_conns.t @@ -134,7 +134,7 @@ EOF $t->run_daemon(\&http_daemon, port(8081), port(8082), port(8085)); -$t->try_run('no upstream max_conns')->plan(14); +$t->run()->plan(14); $t->waitforsocket('127.0.0.1:' . port(8081)); $t->waitforsocket('127.0.0.1:' . port(8082)); diff --git a/worker_shutdown_timeout.t b/worker_shutdown_timeout.t --- a/worker_shutdown_timeout.t +++ b/worker_shutdown_timeout.t @@ -48,7 +48,7 @@ http { EOF -$t->try_run('no worker_shutdown_timeout')->plan(1); +$t->run()->plan(1); ###############################################################################