fuzz

package module
v0.0.0-...-3e5e6e1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2021 License: MIT Imports: 2 Imported by: 0

README

Fuzz Tests

Fuzzing Genji with go-fuzz.

Quick Start

  1. Install go-fuzz

    go install github.com/dvyukov/go-fuzz/go-fuzz-build github.com/dvyukov/go-fuzz/go-fuzz
    
  2. Download the initial corpus

    git clone https://github.com/genjidb/go-fuzz-corpus testdata/fuzz
    
  3. Build the test program with necessary instrumentation

    go-fuzz-build -func FuzzParseQuery
    

    This will produce fuzz-fuzz.zip archive.

  4. Run the fuzzer.

    go-fuzz -workdir=testdata/fuzz/FuzzParseQuery
    

    The results will be written to testdata/fuzz/FuzzParseQuery. Note that go-fuzz runs forever until manually stopped.

    Example output:

    …
    2020/10/14 12:03:58 workers: 2, corpus: 166 (13s ago), crashers: 2, restarts: 1/9663, execs: 1526845 (16418/sec), cover: 924, uptime: 1m33s
    …
    

    Here, corpus is number of interesting inputs the fuzzer has discovered, and crashers is number of discovered bugs (check out testdata/fuzz/FuzzParseQuery/crashers dir).

See README file from go-fuzz for more information.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FuzzParseQuery

func FuzzParseQuery(data []byte) int

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL