Skip to content

Commit 9473f14

Browse files
committed
Tests: removed TODO and try_run() checks for legacy versions.
1 parent 33678e0 commit 9473f14

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+45
-289
lines changed

Diff for: access_log_escape.t

-5
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,7 @@ http_get('/?a="1 \\ ' . pack("n", 0x1b1c) . ' "&c=2');
5757

5858
$t->stop();
5959

60-
TODO: {
61-
local $TODO = 'not yet' unless $t->has_version('1.11.8');
62-
6360
is($t->read_file('json.log'), '\"1 \\\\ \u001B\u001C \"2' . "\n", 'json');
6461
is($t->read_file('test.log'), '\x221 \x5C \x1B\x1C \x22-2' . "\n", 'default');
6562

66-
}
67-
6863
###############################################################################

Diff for: addition_buffered.t

-5
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@ $t->run();
6262

6363
# if data is buffered, there should be no interleaved data in output
6464

65-
TODO: {
66-
local $TODO = 'not yet' unless $t->has_version('1.11.5');
67-
6865
like(http_get('/proxy/body.html'), qr/^XXXXXafter$/m, 'request');
6966

70-
}
71-
7267
###############################################################################

Diff for: auth_basic.t

+2-11
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,8 @@ like(http_get_auth('/', 'crypt2', '1'), qr!401 Unauthorized!,
9595

9696
like(http_get_auth('/', 'apr1', 'password'), qr!SEETHIS!, 'apr1 md5');
9797
like(http_get_auth('/', 'plain', 'password'), qr!SEETHIS!, 'plain password');
98-
99-
SKIP: {
100-
# SHA1 may not be available unless we have OpenSSL
101-
102-
skip 'no sha1', 2 unless $t->has_module('--with-http_ssl_module')
103-
or $t->has_module('--with-sha1')
104-
or $t->has_module('--with-openssl');
105-
106-
like(http_get_auth('/', 'ssha', 'password'), qr!SEETHIS!, 'ssha');
107-
like(http_get_auth('/', 'sha', 'password'), qr!SEETHIS!, 'sha');
108-
}
98+
like(http_get_auth('/', 'ssha', 'password'), qr!SEETHIS!, 'ssha');
99+
like(http_get_auth('/', 'sha', 'password'), qr!SEETHIS!, 'sha');
109100

110101
unlike(http_get_auth('/', 'apr1', '123'), qr!SEETHIS!, 'apr1 md5 wrong');
111102
unlike(http_get_auth('/', 'plain', '123'), qr!SEETHIS!, 'plain wrong');

Diff for: config_dump.t

-5
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,10 @@ like($dump, qr!^# configuration file $d/inc.conf:$!m, 'inc.conf found');
7777
like($dump, qr!^# configuration file $d/inc2.conf:$!m, 'inc2.conf found');
7878
like($dump, qr!^# configuration file $d/map.conf:$!m, 'map.conf found');
7979

80-
TODO: {
81-
local $TODO = 'not yet' unless $t->has_version('1.11.6');
82-
8380
unlike($dump, qr!(# configuration file $d/inc.conf:).*\1!s, 'inc.conf uniq');
8481
unlike($dump, qr!(# configuration file $d/inc2.conf:).*\1!s, 'inc2.conf uniq');
8582
unlike($dump, qr!(# configuration file $d/map.conf:).*\1!s, 'map.conf uniq');
8683

87-
}
88-
8984
is(getconf($t, $dump, 'nginx.conf'), $t->read_file('nginx.conf'), 'content');
9085
is(getconf($t, $dump, 'inc.conf'), $t->read_file('inc.conf'), 'content inc');
9186
is(getconf($t, $dump, 'map.conf'), $t->read_file('map.conf'), 'content inc 2');

Diff for: geo.t

-13
Original file line numberDiff line numberDiff line change
@@ -210,15 +210,9 @@ like($r, qr/^X-Del: world/m, 'geo delete');
210210
like($r, qr/^X-Ran: loopback/m, 'geo ranges');
211211
like($r, qr/^X-RIn: loopback/m, 'geo ranges include');
212212

213-
TODO: {
214-
todo_skip 'use-after-free', 2 unless $ENV{TEST_NGINX_UNSAFE}
215-
or $t->has_version('1.11.4');
216-
217213
like(http_get('/2'), qr/^X-RDe: default/m, 'geo ranges delete');
218214
like(http_get('/2'), qr/^X-RD2: default/m, 'geo ranges delete 2');
219215

220-
}
221-
222216
like($r, qr/^X-ABe: loopback/m, 'geo ranges add before');
223217
like($r, qr/^X-AAf: loopback/m, 'geo ranges add after');
224218
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-Arg: test/m, 'geo from variable');
229223
like(http_get('/1?ip=10.0.0.1'), qr/^X-Arg: default/m, 'geo default');
230224
like(http_get('/1?ip=10.0.0.1'), qr/^X-ARa: default/m, 'geo ranges default');
231225
like(http_get('/1?ip=10.13.2.1'), qr/^X-ARa: foo2/m, 'geo ranges add');
232-
233-
TODO: {
234-
todo_skip 'use-after-free', 1 unless $ENV{TEST_NGINX_UNSAFE}
235-
or $t->has_version('1.11.4');
236-
237226
like(http_get('/1?ip=10.11.2.1'), qr/^X-ARa: default/m,
238227
'geo delete range from variable');
239228

240-
}
241-
242229
like(http_xff('192.0.2.1'), qr/^X-XFF: test/m, 'geo proxy');
243230
like(http_xff('10.0.0.1'), qr/^X-XFF: default/m, 'geo proxy default');
244231
like(http_xff('10.0.0.1, 192.0.2.1'), qr/^X-XFF: test/m, 'geo proxy long');

Diff for: h2.t

-5
Original file line numberDiff line numberDiff line change
@@ -1117,9 +1117,6 @@ undef $grace4;
11171117

11181118
# GOAWAY without awaiting active streams, further streams ignored
11191119

1120-
TODO: {
1121-
local $TODO = 'not yet' unless $t->has_version('1.11.6');
1122-
11231120
$s = Test::Nginx::HTTP2->new(port(8080));
11241121
$sid = $s->new_stream({ path => '/t1.html' });
11251122
$s->read(all => [{ sid => $sid, length => 2**16 - 1 }]);
@@ -1137,8 +1134,6 @@ $frames = $s->read(all => [{ sid => $sid2, fin => 0x4 }], wait => 0.5);
11371134
($frame) = grep { $_->{type} eq 'HEADERS' } @$frames;
11381135
is($frame, undef, 'GOAWAY with active stream - no new stream');
11391136

1140-
}
1141-
11421137
$s->h2_window(100, $sid);
11431138
$s->h2_window(100);
11441139
$frames = $s->read(all => [{ sid => $sid, fin => 0x1 }]);

Diff for: h2_auth_request.t

-6
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ $t->run();
7272

7373
my ($s, $sid, $frames, $frame);
7474

75-
TODO: {
76-
todo_skip 'use-after-free', 2 unless $ENV{TEST_NGINX_UNSAFE}
77-
or $t->has_version('1.11.7');
78-
7975
# second stream is used to induce body corruption issue
8076

8177
$s = Test::Nginx::HTTP2->new();
@@ -87,6 +83,4 @@ $frames = $s->read(all => [{ sid => $sid, fin => 1 }]);
8783
is($frame->{headers}->{'x-body'}, 'A' x 600, 'auth request body');
8884
isnt($frame->{headers}->{'x-body-file'}, undef, 'auth request body file');
8985

90-
}
91-
9286
###############################################################################

Diff for: h2_fastcgi_request_buffering.t

+1-6
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,13 @@ http {
5353
EOF
5454

5555
$t->run();
56-
57-
my $f = get_body('/chunked');
58-
plan(skip_all => 'no unbuffered request body') unless $f;
59-
$f->{http_end}();
60-
6156
$t->plan(48);
6257

6358
###############################################################################
6459

6560
# unbuffered request body to fastcgi
6661

67-
$f = get_body('/');
62+
my $f = get_body('/');
6863
ok($f->{headers}, 'request');
6964
is($f->{upload}('01234', body_more => 1), '01234', 'part');
7065
is($f->{upload}('56789'), '56789_eos', 'part 2');

Diff for: h2_max_requests.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ http {
4949
EOF
5050

5151
$t->write_file('index.html', '');
52-
$t->try_run('no http2_max_requests')->plan(5);
52+
$t->run()->plan(5);
5353

5454
###############################################################################
5555

Diff for: h2_proxy_request_buffering.t

+1-6
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,13 @@ http {
6666
EOF
6767

6868
$t->run();
69-
70-
my $f = get_body('/chunked');
71-
plan(skip_all => 'no unbuffered request body') unless $f;
72-
$f->{http_end}();
73-
7469
$t->plan(49);
7570

7671
###############################################################################
7772

7873
# unbuffered request body
7974

80-
$f = get_body('/', 'content-length' => 10);
75+
my $f = get_body('/', 'content-length' => 10);
8176
ok($f->{headers}, 'request');
8277
is($f->{upload}('01234', body_more => 1), '01234', 'part');
8378
is($f->{upload}('56789'), '56789', 'part 2');

Diff for: h2_proxy_request_buffering_ssl.t

+1-6
Original file line numberDiff line numberDiff line change
@@ -99,18 +99,13 @@ foreach my $name ('localhost') {
9999
}
100100

101101
$t->run();
102-
103-
my $f = get_body('/chunked');
104-
plan(skip_all => 'no unbuffered request body') unless $f;
105-
$f->{http_end}();
106-
107102
$t->plan(40);
108103

109104
###############################################################################
110105

111106
# unbuffered request body
112107

113-
$f = get_body('/', 'content-length' => 10);
108+
my $f = get_body('/', 'content-length' => 10);
114109
ok($f->{headers}, 'request');
115110
is($f->{upload}('01234', body_more => 1), '01234', 'part');
116111
is($f->{upload}('56789'), '56789', 'part 2');

Diff for: h2_server_tokens.t

+1-6
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ http {
8888
8989
EOF
9090

91-
$t->try_run('no server_tokens build')->plan(12);
91+
$t->run()->plan(12);
9292

9393
###############################################################################
9494

@@ -108,15 +108,10 @@ like(body('/on/404'), $re, 'http2 tokens on 404 body');
108108

109109
$re = qr/$re \Q($1)\E/ if $t->{_configure_args} =~ /--build=(\S+)/;
110110

111-
TODO: {
112-
local $TODO = 'not yet' unless $t->has_version('1.11.10');
113-
114111
like(header_server('/b/200'), qr/^$re$/, 'http2 tokens build 200');
115112
like(header_server('/b/404'), qr/^$re$/, 'http2 tokens build 404');
116113
like(body('/b/404'), qr/$re/, 'http2 tokens build 404 body');
117114

118-
}
119-
120115
###############################################################################
121116

122117
sub header_server {

Diff for: http_absolute_redirect.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ EOF
8282

8383
mkdir($t->testdir() . '/dir');
8484

85-
$t->try_run('no absolute_redirect')->plan(10);
85+
$t->run()->plan(10);
8686

8787
###############################################################################
8888

Diff for: http_resolver_cleanup.t

-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ select STDOUT; $| = 1;
2525
my $t = Test::Nginx->new()->has(qw/http proxy/);
2626

2727
plan(skip_all => 'win32') if $^O eq 'MSWin32';
28-
plan(skip_all => 'use-after-free on shutdown') unless $ENV{TEST_NGINX_UNSAFE}
29-
or $t->has_version('1.11.8');
3028

3129
$t->write_file_expand('nginx.conf', <<'EOF')->plan(1);
3230

Diff for: image_filter_webp.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ http {
6969
7070
EOF
7171

72-
$t->try_run('no WebP support')->plan(18);
72+
$t->run()->plan(18);
7373

7474
$t->write_file('webp', pack("A4LA8", "RIFF", 0x22, "WEBPVP8 ") .
7575
pack("N4", 0x16000000, 0x3001009d, 0x012a0100, 0x01000ec0) .

Diff for: mail_capability.t

-16
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,7 @@ $s->ok('pop3 capa');
160160

161161
my $caps = get_auth_caps($s);
162162
like($caps, qr/USER/, 'pop3 - user');
163-
164-
TODO: {
165-
local $TODO = 'not yet' if $t->has_version('1.11.6')
166-
and !$t->has_version('1.11.11');
167-
168163
like($caps, qr/SASL (PLAIN LOGIN|LOGIN PLAIN) CRAM-MD5/, 'pop3 - methods');
169-
170-
}
171-
172164
unlike($caps, qr/STLS/, 'pop3 - no stls');
173165

174166
# pop3 starttls
@@ -180,16 +172,8 @@ $s->send('CAPA');
180172

181173
$caps = get_auth_caps($s);
182174
like($caps, qr/USER/, 'pop3 starttls - user');
183-
184-
TODO: {
185-
local $TODO = 'not yet' if $t->has_version('1.11.6')
186-
and !$t->has_version('1.11.11');
187-
188175
like($caps, qr/SASL (PLAIN LOGIN|LOGIN PLAIN) CRAM-MD5/,
189176
'pop3 starttls - methods');
190-
191-
}
192-
193177
like($caps, qr/STLS/, 'pop3 startls - stls');
194178

195179
# pop3 starttls only

Diff for: mail_imap.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ http {
9292
EOF
9393

9494
$t->run_daemon(\&Test::Nginx::IMAP::imap_test_daemon);
95-
$t->try_run('no auth external')->plan(14);
95+
$t->run()->plan(14);
9696

9797
$t->waitforsocket('127.0.0.1:' . port(8144));
9898

Diff for: mail_pop3.t

+1-6
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ http {
9292
EOF
9393

9494
$t->run_daemon(\&Test::Nginx::POP3::pop3_test_daemon);
95-
$t->try_run('no auth external')->plan(20);
95+
$t->run()->plan(20);
9696

9797
$t->waitforsocket('127.0.0.1:' . port(8111));
9898

@@ -128,13 +128,8 @@ $s->read();
128128
$s->send('AUTH');
129129
$s->ok('auth');
130130

131-
TODO: {
132-
local $TODO = 'not yet' unless $t->has_version('1.11.11');
133-
134131
is(get_auth_caps($s), 'PLAIN:LOGIN:CRAM-MD5:EXTERNAL', 'auth capabilities');
135132

136-
}
137-
138133
# auth plain
139134

140135
$s = Test::Nginx::POP3->new();

Diff for: mail_smtp.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ http {
9090
EOF
9191

9292
$t->run_daemon(\&Test::Nginx::SMTP::smtp_test_daemon);
93-
$t->try_run('no auth external')->plan(30);
93+
$t->run()->plan(30);
9494

9595
$t->waitforsocket('127.0.0.1:' . port(8026));
9696

Diff for: map_complex.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ http {
6060
6161
EOF
6262

63-
$t->try_run('no complex value')->plan(3);
63+
$t->run()->plan(3);
6464

6565
###############################################################################
6666

Diff for: map_volatile.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ EOF
7373
mkdir($t->testdir() . '/1');
7474
mkdir($t->testdir() . '/2');
7575

76-
$t->try_run('no map volatile')->plan(2);
76+
$t->run()->plan(2);
7777

7878
###############################################################################
7979

Diff for: mp4.t

-8
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,8 @@ is(durations($t, 6, 9), '3.0 3.0', 'start end integer');
8383
is(durations($t, 2.7, 5.6), '2.9 2.9', 'start end float');
8484

8585
is(durations($t, undef, 9), '9.0 9.0', 'end integer');
86-
87-
TODO: {
88-
local $TODO = 'not yet'
89-
if $Config{myarchname} =~ /i.86/ && $t->has_module('built by gcc [56]')
90-
and !$t->has_version('1.11.6');
91-
9286
is(durations($t, undef, 5.6), '5.6 5.6', 'end float');
9387

94-
}
95-
9688
# invalid range results in ignoring end argument
9789

9890
like(http_head("$test_uri?start=1&end=1"), qr/200 OK/, 'zero range');

Diff for: mp4_ssi.t

-5
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,9 @@ $t->run()->plan(1);
6565

6666
###############################################################################
6767

68-
TODO: {
69-
local $TODO = 'not yet' unless $t->has_version('1.11.5');
70-
7168
(my $r = get('/')) =~ s/([^\x20-\x7e])/sprintf('\\x%02x', ord($1))/gmxe;
7269
unlike($r, qr/\\x0d(\\x0a)?0\\x0d(\\x0a)?\\x0d(\\x0a)?\w/, 'only final chunk');
7370

74-
}
75-
7671
###############################################################################
7772

7873
sub get {

Diff for: msie_refresh_ssi.t

-5
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,9 @@ $t->run();
5656

5757
###############################################################################
5858

59-
TODO: {
60-
local $TODO = 'not yet' unless $t->has_version('1.11.5');
61-
6259
my $r = get('/', 'User-Agent: MSIE foo');
6360
unlike($r, qr/\x0d\x0a?0\x0d\x0a?\x0d\x0a?\w/, 'only final chunk');
6461

65-
}
66-
6762
###############################################################################
6863

6964
sub get {

0 commit comments

Comments
 (0)