]>
Commit | Line | Data |
---|---|---|
90d28f05 | 1 | #!/usr/bin/env perl |
c4d3c19b | 2 | # Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. |
90d28f05 | 3 | # |
909f1a2e | 4 | # Licensed under the Apache License 2.0 (the "License"). You may not use |
90d28f05 BL |
5 | # this file except in compliance with the License. You can obtain a copy |
6 | # in the file LICENSE in the source distribution or at | |
7 | # https://www.openssl.org/source/license.html | |
8 | ||
9 | use strict; | |
10 | use warnings; | |
11 | ||
8d2214c0 | 12 | use OpenSSL::Glob; |
90d28f05 | 13 | use OpenSSL::Test qw/:DEFAULT srctop_file/; |
df0aa777 | 14 | use OpenSSL::Test::Utils; |
90d28f05 BL |
15 | |
16 | setup("test_fuzz"); | |
17 | ||
4410f9d7 | 18 | my @fuzzers = ('asn1', 'asn1parse', 'bignum', 'bndiv', 'client', 'conf', 'crl', 'server', 'x509'); |
df0aa777 MC |
19 | if (!disabled("cms")) { |
20 | push @fuzzers, 'cms'; | |
21 | } | |
49dadc1c MC |
22 | if (!disabled("ct")) { |
23 | push @fuzzers, 'ct'; | |
24 | } | |
90d28f05 BL |
25 | plan tests => scalar @fuzzers; |
26 | ||
27 | foreach my $f (@fuzzers) { | |
28 | subtest "Fuzzing $f" => sub { | |
9d740909 RL |
29 | my @dirs = glob(srctop_file('fuzz', 'corpora', $f)); |
30 | push @dirs, glob(srctop_file('fuzz', 'corpora', "$f-*")); | |
90d28f05 | 31 | |
9d740909 | 32 | plan skip_all => "No corpora for $f-test" unless @dirs; |
90d28f05 | 33 | |
9d740909 | 34 | plan tests => scalar @dirs; |
90d28f05 | 35 | |
9d740909 | 36 | foreach (@dirs) { |
90d28f05 BL |
37 | ok(run(fuzz(["$f-test", $_]))); |
38 | } | |
39 | } | |
40 | } |