blob: d914fb95093ffda7f3fc09b4e59b5f86017ea091 [file] [log] [blame] [view]
wubf482d1a2019-10-15 06:27:25 -07001This directory contains several fuzz tests for QUIC code:
nharper6153bc72019-05-08 12:04:34 -07002
wubf482d1a2019-10-15 06:27:25 -07003- 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
9To build and run the fuzz tests, using quic_framer_fuzzer as an example:
nharper6153bc72019-05-08 12:04:34 -070010
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
wubf482d1a2019-10-15 06:27:25 -070017By default this fuzzes with 64 byte chunks, to test the framer with more
18realistic size input, try 1350 (max payload size of a QUIC packet):
nharper6153bc72019-05-08 12:04:34 -070019
20```sh
21$ ./blaze-bin/gfe/quic/test_tools/fuzzing/quic_framer_fuzzer ${CORPUS_DIR} -use_counters=0 -max_len=1350
22```