tests/test-fuzz-targets.t
author Gregory Szorc <gregory.szorc@gmail.com>
Tue, 28 Aug 2018 20:27:36 -0700
changeset 39436 2fe21c65777e
parent 38258 46dcb9f14900
child 40447 6c01fad8de32
permissions -rw-r--r--
internals: document CBOR utilization I spoke with some people at Mozilla about CBOR and they advised me that we should be careful about the subset of CBOR we use in order to mitigate security, performance, and compatibility concerns. This commit establishes a document that attempts to formalize our use of CBOR. Its main limitations are on what types are allowed. It explicitly enumerates which types are supported. Notable missing features include: * Indefinite-length arrays and maps * Text strings (bytes all the way) * Floats * Date/time types * Big integers * Use of indefinite-length byte strings for map keys, values in containers. If we have a need for any of these, we can have a discussion about them when the time comes. Differential Revision: https://phab.mercurial-scm.org/D4412
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
38248
a6347ae6168d test-fuzz-targets: look for clang-6.0 binary as well
Yuya Nishihara <yuya@tcha.org>
parents: 38247
diff changeset
     1
#require test-repo
a6347ae6168d test-fuzz-targets: look for clang-6.0 binary as well
Yuya Nishihara <yuya@tcha.org>
parents: 38247
diff changeset
     2
35670
2b9e2415f5b5 contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff changeset
     3
  $ cd $TESTDIR/../contrib/fuzz
38248
a6347ae6168d test-fuzz-targets: look for clang-6.0 binary as well
Yuya Nishihara <yuya@tcha.org>
parents: 38247
diff changeset
     4
a6347ae6168d test-fuzz-targets: look for clang-6.0 binary as well
Yuya Nishihara <yuya@tcha.org>
parents: 38247
diff changeset
     5
#if clang-libfuzzer
38247
9b681bb9df9b test-fuzz-targets: rebuild executable silently
Yuya Nishihara <yuya@tcha.org>
parents: 38205
diff changeset
     6
  $ make -s clean all
38248
a6347ae6168d test-fuzz-targets: look for clang-6.0 binary as well
Yuya Nishihara <yuya@tcha.org>
parents: 38247
diff changeset
     7
#endif
a6347ae6168d test-fuzz-targets: look for clang-6.0 binary as well
Yuya Nishihara <yuya@tcha.org>
parents: 38247
diff changeset
     8
#if no-clang-libfuzzer clang-6.0
a6347ae6168d test-fuzz-targets: look for clang-6.0 binary as well
Yuya Nishihara <yuya@tcha.org>
parents: 38247
diff changeset
     9
  $ make -s clean all CC=clang-6.0 CXX=clang++-6.0
a6347ae6168d test-fuzz-targets: look for clang-6.0 binary as well
Yuya Nishihara <yuya@tcha.org>
parents: 38247
diff changeset
    10
#endif
a6347ae6168d test-fuzz-targets: look for clang-6.0 binary as well
Yuya Nishihara <yuya@tcha.org>
parents: 38247
diff changeset
    11
#if no-clang-libfuzzer no-clang-6.0
a6347ae6168d test-fuzz-targets: look for clang-6.0 binary as well
Yuya Nishihara <yuya@tcha.org>
parents: 38247
diff changeset
    12
  $ exit 80
a6347ae6168d test-fuzz-targets: look for clang-6.0 binary as well
Yuya Nishihara <yuya@tcha.org>
parents: 38247
diff changeset
    13
#endif
a6347ae6168d test-fuzz-targets: look for clang-6.0 binary as well
Yuya Nishihara <yuya@tcha.org>
parents: 38247
diff changeset
    14
38205
24cc2969abae tests: update fuzzer tests to include both fuzzers
Augie Fackler <augie@google.com>
parents: 35670
diff changeset
    15
Just run the fuzzers for five seconds each to verify it works at all.
35670
2b9e2415f5b5 contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff changeset
    16
  $ ./bdiff -max_total_time 5
38258
46dcb9f14900 fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents: 38248
diff changeset
    17
  $ ./mpatch -max_total_time 5
38205
24cc2969abae tests: update fuzzer tests to include both fuzzers
Augie Fackler <augie@google.com>
parents: 35670
diff changeset
    18
  $ ./xdiff -max_total_time 5