summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-11-05 21:54:36 +0100
committerRichard Levitte <levitte@openssl.org>2020-11-07 12:24:49 +0100
commit914079d1c33cd775f15801663c36ee31c66554fa (patch)
tree95d3e1ecda95dcc8b115d6c28e017ce351e11dfe /test
parent5800d0414be113b6d710c1a23a8097842cfc675b (diff)
Fix test/recipes/80-test_ca.t to skip_all properly in a subtest
It's perfectlt ok to 'plan skip_all' in a subtest, but in that case, it must really be inside the subtest. Fixes #13330 Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13331)
Diffstat (limited to 'test')
-rw-r--r--test/recipes/80-test_ca.t20
1 files changed, 11 insertions, 9 deletions
diff --git a/test/recipes/80-test_ca.t b/test/recipes/80-test_ca.t
index d32dcf312f..4b145264ad 100644
--- a/test/recipes/80-test_ca.t
+++ b/test/recipes/80-test_ca.t
@@ -113,16 +113,18 @@ test_revoke('both_generalizedtime', {
sub test_revoke {
my ($filename, $opts) = @_;
- # Before Perl 5.12.0, the range of times Perl could represent was limited by
- # the size of time_t, so Time::Local was hamstrung by the Y2038 problem -
- # Perl 5.12.0 onwards use an internal time implementation with a guaranteed
- # >32-bit time range on all architectures, so the tests involving post-2038
- # times won't fail provided we're running under that version or newer
- if ($] < 5.012000) {
- plan skip_all => 'Perl >= 5.12.0 required to run certificate revocation tests';
- }
-
subtest "Revoke certificate and generate CRL: $filename" => sub {
+ # Before Perl 5.12.0, the range of times Perl could represent was
+ # limited by the size of time_t, so Time::Local was hamstrung by the
+ # Y2038 problem
+ # Perl 5.12.0 onwards use an internal time implementation with a
+ # guaranteed >32-bit time range on all architectures, so the tests
+ # involving post-2038 times won't fail provided we're running under
+ # that version or newer
+ plan skip_all =>
+ 'Perl >= 5.12.0 required to run certificate revocation tests'
+ if $] < 5.012000;
+
$ENV{CN2} = $filename;
ok(
run(app(['openssl',