mirror of
https://github.com/systemd/systemd
synced 2024-07-21 10:17:21 +00:00
ci: turn off FuzzBuzz
I don't think anyone uses it.
This commit is contained in:
parent
c4ae2704b7
commit
6b8d32ea7b
|
@ -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
|
|
15
meson.build
15
meson.build
|
@ -39,13 +39,12 @@ conf.set_quoted('RELATIVE_SOURCE_PATH', relative_source_path)
|
||||||
|
|
||||||
want_ossfuzz = get_option('oss-fuzz')
|
want_ossfuzz = get_option('oss-fuzz')
|
||||||
want_libfuzzer = get_option('llvm-fuzz')
|
want_libfuzzer = get_option('llvm-fuzz')
|
||||||
want_fuzzbuzz = get_option('fuzzbuzz')
|
if want_ossfuzz + want_libfuzzer > 1
|
||||||
if want_ossfuzz + want_libfuzzer + want_fuzzbuzz > 1
|
error('only one of oss-fuzz or llvm-fuzz can be specified')
|
||||||
error('only one of oss-fuzz, llvm-fuzz or fuzzbuzz can be specified')
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
skip_deps = want_ossfuzz or want_libfuzzer
|
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
|
endif
|
||||||
elif want_ossfuzz
|
elif want_ossfuzz
|
||||||
fuzzing_engine = meson.get_compiler('cpp').find_library('FuzzingEngine')
|
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
|
endif
|
||||||
|
|
||||||
# Those generate many false positives, and we do not want to change the code to
|
# 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
|
incs = tuple.length() >= 5 ? tuple[4] : includes
|
||||||
link_args = []
|
link_args = []
|
||||||
|
|
||||||
if want_ossfuzz or want_fuzzbuzz
|
if want_ossfuzz
|
||||||
dependencies += fuzzing_engine
|
dependencies += fuzzing_engine
|
||||||
elif want_libfuzzer
|
elif want_libfuzzer
|
||||||
if fuzzing_engine.found()
|
if fuzzing_engine.found()
|
||||||
|
@ -3111,10 +3108,6 @@ foreach tuple : fuzzers
|
||||||
sources += 'src/fuzz/fuzz-main.c'
|
sources += 'src/fuzz/fuzz-main.c'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if want_fuzzbuzz
|
|
||||||
sources += 'src/fuzz/fuzzer-entry-point.c'
|
|
||||||
endif
|
|
||||||
|
|
||||||
name = sources[0].split('/')[-1].split('.')[0]
|
name = sources[0].split('/')[-1].split('.')[0]
|
||||||
|
|
||||||
fuzzer_exes += executable(
|
fuzzer_exes += executable(
|
||||||
|
|
|
@ -354,9 +354,3 @@ option('oss-fuzz', type : 'boolean', value : 'false',
|
||||||
description : 'build against oss-fuzz')
|
description : 'build against oss-fuzz')
|
||||||
option('llvm-fuzz', type : 'boolean', value : 'false',
|
option('llvm-fuzz', type : 'boolean', value : 'false',
|
||||||
description : 'build against LLVM libFuzzer')
|
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')
|
|
||||||
|
|
|
@ -6,6 +6,3 @@
|
||||||
|
|
||||||
/* The entry point into the fuzzer */
|
/* The entry point into the fuzzer */
|
||||||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
|
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);
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
#include "fuzz.h"
|
|
||||||
|
|
||||||
int FuzzerEntrypoint(const uint8_t *data, size_t size) {
|
|
||||||
return LLVMFuzzerTestOneInput(data, size);
|
|
||||||
}
|
|
|
@ -1026,10 +1026,7 @@ tests += [
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# test-bus-vtable-cc.cc is a symlink and symlinks get lost in containers on FuzzBuzz.
|
if cxx_cmd != ''
|
||||||
# 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
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/libsystemd/sd-bus/test-bus-vtable-cc.cc'],
|
[['src/libsystemd/sd-bus/test-bus-vtable-cc.cc'],
|
||||||
[],
|
[],
|
||||||
|
|
|
@ -20,11 +20,6 @@ tools/oss-fuzz.sh
|
||||||
./out/fuzz-unit-file -max_total_time=5
|
./out/fuzz-unit-file -max_total_time=5
|
||||||
git clean -dxff
|
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
|
git clone https://github.com/google/oss-fuzz /tmp/oss-fuzz
|
||||||
cd /tmp/oss-fuzz
|
cd /tmp/oss-fuzz
|
||||||
sudo ./infra/helper.py pull_images
|
sudo ./infra/helper.py pull_images
|
||||||
|
|
Loading…
Reference in a new issue