提交 5cf6d7c5 编写于 作者: D David Benjamin 提交者: Matt Caswell

Don't test quite so many of them.

Avoid making the CI blow up.
Reviewed-by: NRich Salz <rsalz@openssl.org>
Reviewed-by: NMatt Caswell <matt@openssl.org>
上级 8523288e
...@@ -34,18 +34,22 @@ my $proxy = TLSProxy::Proxy->new( ...@@ -34,18 +34,22 @@ my $proxy = TLSProxy::Proxy->new(
(!$ENV{HARNESS_ACTIVE} || $ENV{HARNESS_VERBOSE}) (!$ENV{HARNESS_ACTIVE} || $ENV{HARNESS_VERBOSE})
); );
plan tests => 1 + 256;
my $bad_padding_offset = -1; my $bad_padding_offset = -1;
# Test 1: Maximally-padded records are accepted. # TODO: We could test all 256 values, but then the log file gets too large for
# CI. See https://github.com/openssl/openssl/issues/1440.
my @test_offsets = (0, 128, 254, 255);
plan tests => 1 + scalar(@test_offsets);
# Test that maximally-padded records are accepted.
$proxy->start() or plan skip_all => "Unable to start up Proxy for tests"; $proxy->start() or plan skip_all => "Unable to start up Proxy for tests";
ok(TLSProxy::Message->success(), "Maximally-padded record test"); ok(TLSProxy::Message->success(), "Maximally-padded record test");
# Tests 2 through 257: Invalid padding. # Test that invalid padding is rejected.
for ($bad_padding_offset = 0; $bad_padding_offset < 256; foreach my $offset (@test_offsets) {
$bad_padding_offset++) {
$proxy->clear(); $proxy->clear();
$bad_padding_offset = $offset;
$proxy->start() or plan skip_all => "Unable to start up Proxy for tests";; $proxy->start() or plan skip_all => "Unable to start up Proxy for tests";;
ok(TLSProxy::Message->fail(), "Invalid padding byte $bad_padding_offset"); ok(TLSProxy::Message->fail(), "Invalid padding byte $bad_padding_offset");
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册