Skip to content

Commit

Permalink
add jqf-blind to eval
Browse files Browse the repository at this point in the history
  • Loading branch information
hoanglam-nguyen committed Jul 29, 2024
1 parent 14b24a9 commit e035d7b
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 2 deletions.
72 changes: 72 additions & 0 deletions bin/jqf-blind
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/bin/bash

# Figure out script absolute path
pushd `dirname $0` > /dev/null
BIN_DIR=`pwd`
popd > /dev/null

ROOT_DIR=`dirname $BIN_DIR`

print_usage() {
echo "Usage: $0 [-c CLASSPATH] [-v] TEST_CLASS TEST_METHOD [OUT_DIR [SEED_FILES...]]"
}

while getopts ":c:r:vt:dfsbm:uq" opt; do
case $opt in
/?)
echo "Invalid option: -$OPTARG" >&2
print_usage >&1
exit 1
;;
c)
export CLASSPATH="$OPTARG"
;;
r)
export JVM_OPTS="$JVM_OPTS -Djqf.guidance.STATS_REFRESH_TIME_PERIOD=$OPTARG"
;;
v)
export JVM_OPTS="$JVM_OPTS -Djqf.logCoverage=true"
;;
t)
export JVM_OPTS="$JVM_OPTS -Djqf.ei.TIMEOUT=$OPTARG"
;;
d)
debug=true
;;
f)
export JVM_OPTS="$JVM_OPTS -DuseFastNonCollidingCoverageInstrumentation=true"
;;
s)
export JVM_OPTS="$JVM_OPTS -Djqf.guidance.TRACK_SEMANTIC_COVERAGE=true"
;;
b)
export JVM_OPTS="$JVM_OPTS -Djqf.guidance.LOG_BRANCH_HIT_COUNTS=true"
;;
m)
export JVM_OPTS="$JVM_OPTS -Djqf.guidance.METRICS=$OPTARG"
;;
u)
export JVM_OPTS="$JVM_OPTS -Djqf.ei.LOG_UNIQUE_PATH_INPUTS=true"
;;
q)
export JVM_OPTS="$JVM_OPTS -Djqf.ei.DISABLE_LOG_QUEUE=true"
;;
esac
done
shift $((OPTIND-1))

# Check arguments
if [ $# -lt 2 ]; then
print_usage >&1
exit 1
fi

# Disable coverage guidance
export JVM_OPTS="$JVM_OPTS -Djqf.ei.TOTALLY_RANDOM=true"

# Run the Zest input driver
if [ "$debug" = true ] ; then
$ROOT_DIR/scripts/jqf-debug-driver.sh edu.berkeley.cs.jqf.fuzz.ei.ZestDriver $@
else
$ROOT_DIR/scripts/jqf-driver.sh edu.berkeley.cs.jqf.fuzz.ei.ZestDriver $@
fi
8 changes: 6 additions & 2 deletions run-experiments.sbatch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#SBATCH --cpus-per-task=1
#SBATCH --mem-per-cpu=16G
#SBATCH --time=03:15:00
#SBATCH --array=1-400%40
#SBATCH --array=1-600%40

# Ensure tasks are only run on gruenau[3-6]
#SBATCH --constraint=ivybridge
Expand All @@ -21,7 +21,7 @@ timeout=181m

declare -a config
index=1
for fuzzer in 'zest' 'bedivfuzz'
for fuzzer in 'zest' 'bedivfuzz' 'blind'
do
for subject in 'ant.ProjectBuilderTest' 'bcel.ParserTest' 'chocopy.SemanticAnalysisTest' 'closure.CompilerTest' 'imageio.PngReaderTest' 'maven.ModelReaderTest' 'nashorn.CompilerTest' 'pngj.PngReaderTest' 'rhino.CompilerTest' 'tomcat.WebXmlTest'
do
Expand Down Expand Up @@ -54,6 +54,10 @@ elif [[ "$fuzzer" == "bedivfuzz" ]]; then
timeout $timeout bin/jqf-bedivfuzz -r 3000 -h 0.1 -m UPATHS:BEDIV -f -c $(scripts/examples_classpath.sh) edu.berkeley.cs.jqf.examples.$subject testWithSplitGenerator /vol/tmp/nguyehoa/$output_dir
PID=$!
wait $PID
elif [[ "$fuzzer" == "blind" ]]; then
timeout $timeout bin/jqf-blind -r 3000 -m UPATHS:BEDIV -f -c $(scripts/examples_classpath.sh) edu.berkeley.cs.jqf.examples.$subject testWithGenerator /vol/tmp/nguyehoa/$output_dir
PID=$!
wait $PID
else
echo "Unknown fuzzer: $fuzzer"
fi
Expand Down

0 comments on commit e035d7b

Please sign in to comment.