Skip to content

Commit

Permalink
Fuzz-test: Handle ABRT.
Browse files Browse the repository at this point in the history
Trap ABRT and try to pass it on to our runners.

Change-Id: I6e5a9fd63822c9bc84e116b3574abc4ccca448f5
Reviewed-on: https://code.wireshark.org/review/26227
Reviewed-by: Gerald Combs <gerald@wireshark.org>
  • Loading branch information
geraldcombs committed Mar 2, 2018
1 parent 51165cf commit 184ef02
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tools/fuzz-test.sh
Expand Up @@ -37,6 +37,9 @@ MIN_PLUGINS=0
# Did we catch a signal?
DONE=0

# Currently running children
RUNNER_PIDS=

# Perform a two pass analysis on the capture file?
TWO_PASS=

Expand Down Expand Up @@ -152,8 +155,20 @@ echo "($HOWMANY)"
echo ""

# Clean up on <ctrl>C, etc
trap "DONE=1; echo 'Caught signal'" HUP INT TERM
trap_all() {
DONE=1
echo 'Caught signal'
}

trap_abrt() {
for RUNNER_PID in $RUNNER_PIDS ; do
kill -ABRT $RUNNER_PID
done
trap_all
}

trap trap_all HUP INT TERM
trap trap_abrt ABRT

# Iterate over our capture files.
PASS=0
Expand Down

0 comments on commit 184ef02

Please sign in to comment.