From 46578cb103e49558b6b3c3ef1addf0efdfa13a8c Mon Sep 17 00:00:00 2001 From: Mohana Datta Yelugoti Date: Fri, 14 Aug 2020 08:52:43 +0000 Subject: [PATCH] scripts: Add a new script to rebuild testbench Currently, the testbench is built using the script named 'host-build-all.sh' under scripts directory. But the name of the script, it's git history doesn't refer to what the script is currently doing now. The newly written script adds option to build the testbench. This script was written in mind to remove the old script used to build the testbench (i.e host-build-all.sh). The script also adds an option to build the testbench with AFL instrumentation. AFL fuzzer works well when the code it's trying to fuzz is instrumented properly. The instrumentation helps the fuzzer in generating unique inputs which cover different paths in the code graph. When the option is set, testbench is built using a compiler AFL provides, which does the instrumentation work. Signed-off-by: Mohana Datta Yelugoti --- scripts/rebuild-testbench.sh | 58 ++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100755 scripts/rebuild-testbench.sh diff --git a/scripts/rebuild-testbench.sh b/scripts/rebuild-testbench.sh new file mode 100755 index 000000000..cdee49c90 --- /dev/null +++ b/scripts/rebuild-testbench.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2020, Mohana Datta Yelugoti + +# fail on any errors +set -e + +print_usage() +{ + cat <