From efe27939b62c825433af6791ebb74809fc247182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20B=C3=B6hme?= Date: Thu, 17 Aug 2017 18:39:18 +0800 Subject: [PATCH] Update Readme.md --- Readme.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Readme.md b/Readme.md index a0a4c1b3..1e2197db 100644 --- a/Readme.md +++ b/Readme.md @@ -19,7 +19,7 @@ The easiest way to use AFLGo is as patch testing tool in OSS-Fuzz. Here is our i ```bash # Checkout source code git clone https://github.com/aflgo/aflgo.git -AFLGO=$PWD/aflgo +export AFLGO=$PWD/aflgo # Compile source code pushd $AFLGO @@ -30,20 +30,31 @@ popd ``` 3) Download subject (file-utility) and set targets (commit 69928a2) ```bash +# Clone subject repository git clone https://github.com/file/file.git + +# Checkout revision 69928a2 cd file && git checkout 69928a2 && cd .. -SUBJECT=$PWD/file +export SUBJECT=$PWD/file ``` 4) Set targets (BBtargets) ```bash -OUT=$PWD +# Setup directory containing all temporary files +export OUT=$PWD + +# Download commit-analysis tool wget https://raw.githubusercontent.com/jay/showlinenum/develop/showlinenum.awk chmod +x showlinenum.awk + +# Generate BBtargets from commits pushd $SUBJECT git diff -U0 HEAD^ HEAD > $OUT/commit.diff popd cat $OUT/commit.diff | $OUT/showlinenum.awk show_header=0 path=1 | grep -e "\.[ch]:[0-9]*:+" -e "\.cpp:[0-9]*:+" -e "\.cc:[0-9]*:+" | cut -d+ -f1 | rev | cut -c2- | rev > $OUT/BBtargets.txt +# Print extracted targets +echo "Targets:" +cat $OUT/BBtargets.txt ``` 5) Instrument subject