From: Richard Levitte Date: Thu, 1 Sep 2016 19:05:34 +0000 (+0200) Subject: Move 05-test_fuzz.t to 90-test_fuzz.t X-Git-Tag: OpenSSL_1_1_0a~87 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3bcd1b249690f90bd1d2c2b401e65628fd9cacd8;p=oweals%2Fopenssl.git Move 05-test_fuzz.t to 90-test_fuzz.t This adheres much better to the documentation in test/README Reviewed-by: Rich Salz (cherry picked from commit 377ab6d183453dac5454abf62d5341a559caa264) --- diff --git a/test/recipes/05-test_fuzz.t b/test/recipes/05-test_fuzz.t deleted file mode 100755 index d152925733..0000000000 --- a/test/recipes/05-test_fuzz.t +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env perl -# Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. -# -# Licensed under the OpenSSL license (the "License"). You may not use -# this file except in compliance with the License. You can obtain a copy -# in the file LICENSE in the source distribution or at -# https://www.openssl.org/source/license.html - -use strict; -use warnings; - -use if $^O ne "VMS", 'File::Glob' => qw/glob/; -use OpenSSL::Test qw/:DEFAULT srctop_file/; -use OpenSSL::Test::Utils; - -setup("test_fuzz"); - -my @fuzzers = ('asn1', 'asn1parse', 'bignum', 'bndiv', 'conf', 'crl', 'server', 'x509'); -if (!disabled("cms")) { - push @fuzzers, 'cms'; -} -if (!disabled("ct")) { - push @fuzzers, 'ct'; -} -plan tests => scalar @fuzzers; - -foreach my $f (@fuzzers) { - subtest "Fuzzing $f" => sub { - my @files = glob(srctop_file('fuzz', 'corpora', $f, '*')); - push @files, glob(srctop_file('fuzz', 'corpora', "$f-*", '*')); - - plan skip_all => "No corpora for $f-test" unless @files; - - plan tests => scalar @files; - - foreach (@files) { - ok(run(fuzz(["$f-test", $_]))); - } - } -} diff --git a/test/recipes/90-test_fuzz.t b/test/recipes/90-test_fuzz.t new file mode 100755 index 0000000000..d152925733 --- /dev/null +++ b/test/recipes/90-test_fuzz.t @@ -0,0 +1,40 @@ +#!/usr/bin/env perl +# Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. +# +# Licensed under the OpenSSL license (the "License"). You may not use +# this file except in compliance with the License. You can obtain a copy +# in the file LICENSE in the source distribution or at +# https://www.openssl.org/source/license.html + +use strict; +use warnings; + +use if $^O ne "VMS", 'File::Glob' => qw/glob/; +use OpenSSL::Test qw/:DEFAULT srctop_file/; +use OpenSSL::Test::Utils; + +setup("test_fuzz"); + +my @fuzzers = ('asn1', 'asn1parse', 'bignum', 'bndiv', 'conf', 'crl', 'server', 'x509'); +if (!disabled("cms")) { + push @fuzzers, 'cms'; +} +if (!disabled("ct")) { + push @fuzzers, 'ct'; +} +plan tests => scalar @fuzzers; + +foreach my $f (@fuzzers) { + subtest "Fuzzing $f" => sub { + my @files = glob(srctop_file('fuzz', 'corpora', $f, '*')); + push @files, glob(srctop_file('fuzz', 'corpora', "$f-*", '*')); + + plan skip_all => "No corpora for $f-test" unless @files; + + plan tests => scalar @files; + + foreach (@files) { + ok(run(fuzz(["$f-test", $_]))); + } + } +}