diff --git a/tools/do_manual_cover.sh b/tools/do_manual_cover.sh index 3c237ac84c296beb98d39afc1826ad4b9067d302..5dcec5f46463f845f9fd2fc7772be5f6d97abbec 100755 --- a/tools/do_manual_cover.sh +++ b/tools/do_manual_cover.sh @@ -20,13 +20,17 @@ if [ -f $MANUAL_TEST_SCRIPT ]; then echo "$MANUAL_COV_SCRIPT $ORIG_BIN $MANUAL_TEST_SCRIPT $AGGREGATE_COVERAGE" eval $MANUAL_COV_SCRIPT $ORIG_BIN $MANUAL_TEST_SCRIPT $AGGREGATE_COVERAGE - - + return $? fi +#the remainder of this file is for Anh's old manual tests +#which I will keep around for now, but ignore this code. + +return 0 + ls $MANUAL_TEST_DIR/* >/dev/null 2>/dev/null if [ ! $? -eq 0 ]; then - echo "do_manual_cover.sh: error: no manual test specifications found -- exiting" + echo "do_manual_cover.sh: no manual test specifications found -- exiting" exit 1 fi diff --git a/tools/do_p1transform.sh b/tools/do_p1transform.sh index 0f69684fdd3446c091f5edbfe74dfd3daec58d9e..2f6265abd72be61fd155b80f0d33854f9f018b5f 100755 --- a/tools/do_p1transform.sh +++ b/tools/do_p1transform.sh @@ -67,16 +67,20 @@ mkdir $P1_DIR # fi #fi +touch $EXECUTED_ADDRESSES_FINAL + # generate coverage info for manually-specified tests (if any) $PEASOUP_HOME/tools/do_manual_cover.sh +if [[ ! $? -eq 0 ]]; then + echo "ERROR: Manual coverage failed" + #continue for now, but don't encorporate manual coverage data. +else +# merge all execution traces if successfully run + cat $EXECUTED_ADDRESSES_MANUAL >> $EXECUTED_ADDRESSES_FINAL +fi echo "manual cover finished" -# merge all execution traces -touch $EXECUTED_ADDRESSES_FINAL - -cat $EXECUTED_ADDRESSES_MANUAL >> $EXECUTED_ADDRESSES_FINAL - echo "Replaying all .json files" input_cnt=0 REPLAY_DEADLINE=$(( `date +'%s'` + $COVERAGE_REPLAY_TIMEOUT )) diff --git a/tools/manual_coverage_wrapper.sh b/tools/manual_coverage_wrapper.sh index 09b91adcd73ad09928c494da32037ad587514a0c..91e6dc57e9f384e0e18d633bdebdd9bbd75267b9 100755 --- a/tools/manual_coverage_wrapper.sh +++ b/tools/manual_coverage_wrapper.sh @@ -8,7 +8,8 @@ BENCH=$1 TEST_SCRIPT=$2 MANUAL_EXE_ADDRESS_OUTPUT_FILE=$3 - +#A coverage round that takes longer than 10 minutes is assumed to be an infinite loop. +TIMEOUT_VALUE=600 PIN_BENCH=`pwd`/pin_bench COVERAGE_RESULTS_FILE=$PEASOUP_HOME/coverage_results/itrace.out @@ -33,11 +34,13 @@ eval $TEST_SCRIPT -i $PIN_BENCH $BENCH #because I now have an ignore flag, this likely won't occur, but just in case. if [ $? -ne 0 ]; then - echo "WARNING: manual coverage failed. The running manual tests reported failure with coverage instrumentation. Continuing with coverage that was collected." + echo "ERROR: manual coverage failed. The running manual tests reported failure with coverage instrumentation. Ignoring coverage results." + + exit 1 fi # sanity filter, keep only well formed addresses -cat $COVERAGE_RESULTS_FILE | sed 's/.*\(0x.*\)/\1/' >tmp +cat $COVERAGE_RESULTS_FILE | sed 's/\(.*0x.*\)/\1/' >tmp mv tmp $COVERAGE_RESULTS_FILE cp $COVERAGE_RESULTS_FILE $MANUAL_EXE_ADDRESS_OUTPUT_FILE