wub | f482d1a | 2019-10-15 06:27:25 -0700 | [diff] [blame] | 1 | This directory contains several fuzz tests for QUIC code: |
nharper | 6153bc7 | 2019-05-08 12:04:34 -0700 | [diff] [blame] | 2 | |
wub | f482d1a | 2019-10-15 06:27:25 -0700 | [diff] [blame] | 3 | - quic_framer_fuzzer: A test for CryptoFramer::ParseMessage and |
| 4 | QuicFramer::ProcessPacket using random packet data. |
| 5 | - quic_framer_process_data_packet_fuzzer: A test for QuicFramer::ProcessPacket |
| 6 | where the packet has a valid public header, is decryptable, and contains |
| 7 | random QUIC payload. |
| 8 | |
| 9 | To build and run the fuzz tests, using quic_framer_fuzzer as an example: |
nharper | 6153bc7 | 2019-05-08 12:04:34 -0700 | [diff] [blame] | 10 | |
| 11 | ```sh |
| 12 | $ blaze build --config=asan-fuzzer //gfe/quic/test_tools/fuzzing/... |
| 13 | $ CORPUS_DIR=`mktemp -d` && echo ${CORPUS_DIR} |
| 14 | $ ./blaze-bin/gfe/quic/test_tools/fuzzing/quic_framer_fuzzer ${CORPUS_DIR} -use_counters=0 |
| 15 | ``` |
| 16 | |
wub | f482d1a | 2019-10-15 06:27:25 -0700 | [diff] [blame] | 17 | By default this fuzzes with 64 byte chunks, to test the framer with more |
| 18 | realistic size input, try 1350 (max payload size of a QUIC packet): |
nharper | 6153bc7 | 2019-05-08 12:04:34 -0700 | [diff] [blame] | 19 | |
| 20 | ```sh |
| 21 | $ ./blaze-bin/gfe/quic/test_tools/fuzzing/quic_framer_fuzzer ${CORPUS_DIR} -use_counters=0 -max_len=1350 |
| 22 | ``` |