diff options
Diffstat (limited to 'scripts/zloop.sh')
-rwxr-xr-x | scripts/zloop.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/zloop.sh b/scripts/zloop.sh index f285d6a25..3139bd42b 100755 --- a/scripts/zloop.sh +++ b/scripts/zloop.sh @@ -146,6 +146,15 @@ function store_core fi } +rngdpid="" +function on_exit +{ + if [ -n "$rngdpid" ]; then + kill -9 "$rngdpid" + fi +} +trap on_exit EXIT + # parse arguments # expected format: zloop [-t timeout] [-c coredir] [-- extra ztest args] coredir=$DEFAULTCOREDIR @@ -191,6 +200,9 @@ or_die rm -f ztest.history or_die rm -f ztest.ddt or_die rm -f ztest.cores +# start rngd in the background so we don't run out of entropy +or_die read -r rngdpid < <(rngd -f -r /dev/urandom & echo $!) + ztrc=0 # ztest return value foundcrashes=0 # number of crashes found so far starttime=$(date +%s) |