ci: turn off FuzzBuzz

I don't think anyone uses it.
This commit is contained in:
Evgeny Vereshchagin 2020-03-30 06:42:19 +00:00 committed by Zbigniew Jędrzejewski-Szmek
parent c4ae2704b7
commit 6b8d32ea7b
7 changed files with 5 additions and 67 deletions

View File

@ -1,33 +0,0 @@
base: ubuntu:16.04
language: c
setup:
- sudo bash -c "echo 'deb-src http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse' >>/etc/apt/sources.list"
- sudo apt-get update -y
- sudo apt-get build-dep -y systemd
- sudo apt-get install -y python3-pip
- sudo apt-get install -y libfdisk-dev libp11-kit-dev libssl-dev libpwquality-dev
- pip3 install meson ninja
- export PATH="$HOME/.local/bin/:$PATH"
- CC=$FUZZ_CC CXX=$FUZZ_CXX meson -Dfuzzbuzz=true -Dfuzzbuzz-engine-dir=$(dirname "$FUZZ_ENGINE") -Dfuzzbuzz-engine=$(cut -d. -f1 <(basename "$FUZZ_ENGINE")) -Db_lundef=false ./build
- ninja -v -C ./build fuzzers
environment:
targets:
- name: fuzz-compress
harness:
binary: ./build/fuzz-compress
- name: fuzz-unit-file
harness:
binary: ./build/fuzz-unit-file
corpus: ./test/fuzz/fuzz-unit-file
- name: fuzz-journald-syslog
harness:
binary: ./build/fuzz-journald-syslog
corpus: ./test/fuzz/fuzz-journald-syslog
- name: fuzz-netdev-parser
harness:
binary: ./build/fuzz-netdev-parser
corpus: ./test/fuzz/fuzz-netdev-parser
- name: fuzz-network-parser
harness:
binary: ./build/fuzz-network-parser
corpus: ./test/fuzz/fuzz-network-parser

View File

@ -39,13 +39,12 @@ conf.set_quoted('RELATIVE_SOURCE_PATH', relative_source_path)
want_ossfuzz = get_option('oss-fuzz')
want_libfuzzer = get_option('llvm-fuzz')
want_fuzzbuzz = get_option('fuzzbuzz')
if want_ossfuzz + want_libfuzzer + want_fuzzbuzz > 1
error('only one of oss-fuzz, llvm-fuzz or fuzzbuzz can be specified')
if want_ossfuzz + want_libfuzzer > 1
error('only one of oss-fuzz or llvm-fuzz can be specified')
endif
skip_deps = want_ossfuzz or want_libfuzzer
fuzzer_build = want_ossfuzz or want_libfuzzer or want_fuzzbuzz
fuzzer_build = want_ossfuzz or want_libfuzzer
#####################################################################
@ -322,8 +321,6 @@ if want_libfuzzer
endif
elif want_ossfuzz
fuzzing_engine = meson.get_compiler('cpp').find_library('FuzzingEngine')
elif want_fuzzbuzz
fuzzing_engine = meson.get_compiler('cpp').find_library(get_option('fuzzbuzz-engine'), dirs: get_option('fuzzbuzz-engine-dir'))
endif
# Those generate many false positives, and we do not want to change the code to
@ -3099,7 +3096,7 @@ foreach tuple : fuzzers
incs = tuple.length() >= 5 ? tuple[4] : includes
link_args = []
if want_ossfuzz or want_fuzzbuzz
if want_ossfuzz
dependencies += fuzzing_engine
elif want_libfuzzer
if fuzzing_engine.found()
@ -3111,10 +3108,6 @@ foreach tuple : fuzzers
sources += 'src/fuzz/fuzz-main.c'
endif
if want_fuzzbuzz
sources += 'src/fuzz/fuzzer-entry-point.c'
endif
name = sources[0].split('/')[-1].split('.')[0]
fuzzer_exes += executable(

View File

@ -354,9 +354,3 @@ option('oss-fuzz', type : 'boolean', value : 'false',
description : 'build against oss-fuzz')
option('llvm-fuzz', type : 'boolean', value : 'false',
description : 'build against LLVM libFuzzer')
option('fuzzbuzz', type : 'boolean', value : 'false',
description : 'build against FuzzBuzz')
option('fuzzbuzz-engine', type : 'string',
description : 'the name of the FuzzBuzz fuzzing engine')
option('fuzzbuzz-engine-dir', type : 'string',
description : 'the directory where the FuzzBuzz fuzzing engine is')

View File

@ -6,6 +6,3 @@
/* The entry point into the fuzzer */
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
/* https://docs.fuzzbuzz.io/developer-documentation/porting-targets-to-fuzzbuzz/libfuzzer-targets */
int FuzzerEntrypoint(const uint8_t *data, size_t size);

View File

@ -1,5 +0,0 @@
#include "fuzz.h"
int FuzzerEntrypoint(const uint8_t *data, size_t size) {
return LLVMFuzzerTestOneInput(data, size);
}

View File

@ -1026,10 +1026,7 @@ tests += [
]
# test-bus-vtable-cc.cc is a symlink and symlinks get lost in containers on FuzzBuzz.
# The issue has been reported to the developers of FuzzBuzz and hopefully will be fixed soon.
# In the meantime, let's just skip the symlink there.
if cxx_cmd != '' and not want_fuzzbuzz
if cxx_cmd != ''
tests += [
[['src/libsystemd/sd-bus/test-bus-vtable-cc.cc'],
[],

View File

@ -20,11 +20,6 @@ tools/oss-fuzz.sh
./out/fuzz-unit-file -max_total_time=5
git clean -dxff
wget https://app.fuzzbuzz.io/releases/cli/latest/linux/fuzzbuzz
chmod +x fuzzbuzz
./fuzzbuzz validate
./fuzzbuzz target test fuzz-unit-file --all
git clone https://github.com/google/oss-fuzz /tmp/oss-fuzz
cd /tmp/oss-fuzz
sudo ./infra/helper.py pull_images