From 78a32979a4b85bcdbcb56acf31bbdb59a7dfda3e Mon Sep 17 00:00:00 2001 From: Ganesh Murthy Date: Mon, 21 Oct 2024 16:30:37 -0400 Subject: [PATCH] Added build.sh to skupper-router/tests/fuzz. This will be used by the Google oss-fuzz project (#1636) --- tests/fuzz/build.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/fuzz/build.sh diff --git a/tests/fuzz/build.sh b/tests/fuzz/build.sh new file mode 100644 index 000000000..ee2e62e3f --- /dev/null +++ b/tests/fuzz/build.sh @@ -0,0 +1,23 @@ +#!/bin/bash -eu +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ +mkdir build +pushd build +cmake .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_FUZZ_TESTING=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF -DFUZZ_REGRESSION_TESTS=OFF -DCMAKE_C_FLAGS=-DQD_MEMORY_DEBUG -DRUNTIME_CHECK=asan +VERBOSE=1 make +cp tests/fuzz/fuzz_http2_decoder $OUT/ +popd +zip -j $OUT/fuzz_http2_decoder_seed_corpus.zip tests/fuzz/fuzz_http2_decoder/corpus/* tests/fuzz/fuzz_http2_decoder/crash/*