mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Force ztest to always use /dev/urandom
For ztest, which is solely for testing, using a pseudo random is entirely reasonable. Using /dev/urandom ensures the system entropy pool doesn't get depleted thus stalling the testing. This is a particular problem when testing in VMs. Reviewed-by: Tim Chase <tim@chase2k.com> Reviewed by: Thomas Caputi <tcaputi@datto.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #7017 Closes #7036
This commit is contained in:
@@ -148,15 +148,6 @@ 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
|
||||
@@ -205,9 +196,6 @@ 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)
|
||||
|
||||
Reference in New Issue
Block a user