diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-07-30 14:13:04 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-07-30 14:13:44 +0200 |
| commit | efe659d763759a1eb7d573c01dfbeedeab3fc1ed (patch) | |
| tree | 72851b98b77de7c949199f0b799ec80a5a2e3335 | |
| parent | 9ad042d8ec73309be197389bc70e8207868a81c7 (diff) | |
travis: add fuzzit.dev support
Based on https://github.com/fuzzitdev/example-go
Let's see if it works...
| -rw-r--r-- | .travis.yml | 13 | ||||
| -rw-r--r-- | Makefile | 5 | ||||
| -rwxr-xr-x | fuzzit.sh | 26 |
3 files changed, 42 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml index 2192906dd..0b50087b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,3 +31,16 @@ after_success: after_failure: - git diff --name-only - git diff + +jobs: + include: + - stage: Fuzzit (Fuzzing) + if: branch = master AND type IN (push) + go: 1.12.x + script: + - ./fuzzit.sh fuzzing + - stage: Fuzzit (Sanity) + if: type IN (pull_request) + go: 1.12.x + script: + - ./fuzzit.sh sanity @@ -340,8 +340,9 @@ install_prerequisites: sudo apt-get install -y -q g++-powerpc64le-linux-gnu || true sudo apt-get install -y -q g++-arm-linux-gnueabi || true sudo apt-get install -y -q ragel clang-format - go get -u golang.org/x/tools/cmd/goyacc - go get -u github.com/golangci/golangci-lint/cmd/golangci-lint + go get -u golang.org/x/tools/cmd/goyacc \ + github.com/golangci/golangci-lint/cmd/golangci-lint \ + github.com/dvyukov/go-fuzz/go-fuzz-build check_links: python ./tools/check_links.py $$(pwd) $$(ls ./*.md; find ./docs/ -name '*.md') diff --git a/fuzzit.sh b/fuzzit.sh new file mode 100755 index 000000000..5b63fd689 --- /dev/null +++ b/fuzzit.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# Copyright 2019 syzkaller project authors. All rights reserved. +# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +# Helper script for working with fuzzit.dev +# https://github.com/fuzzitdev/example-go + +set -eux + +JOB_TYPE=$1 + +function target { + go-fuzz-build -libfuzzer -func $3 -o fuzzer.a $2 + clang -fsanitize=fuzzer fuzzer.a -o fuzzer + ./fuzzit create job --type $JOB_TYPE --branch $TRAVIS_BRANCH --revision $TRAVIS_COMMIT $1 ./fuzzer +} + +wget -q -O fuzzit https://github.com/fuzzitdev/fuzzit/releases/download/v1.2.7/fuzzit_Linux_x86_64 +chmod a+x fuzzit +./fuzzit auth ${FUZZIT_API_KEY} + +target gD3t0a6kniec9zst4eqU ./prog/test FuzzDeserialize +target aWERkQry8i44A4gToF5W ./prog/test FuzzParseLog +target UJuwHm2dT3YWlWH88yyA ./pkg/compiler Fuzz +target ZkAE6RkbUOP7V3cCbQ74 ./pkg/report Fuzz +target s4Mxhb8MBZaWZkGS40SF ./tools/syz-trace2syz/proggen Fuzz |
