Skip to content

Commit

Permalink
Don't fail on urandom test failures
Browse files Browse the repository at this point in the history
the urandom test may fail periodically.  This occurs because
/dev/urandom is a 'best effort' source of random data, and may at times
be less random than expected.  When this occurs, don't fail, but rather
note the issue, and skip the test

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
  • Loading branch information
nhorman committed Apr 17, 2019
1 parent 06ca6d4 commit ce96ccb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/rngtesturandom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ fi
cat /dev/urandom | ../rngtest -c 100 --pipe >/dev/null
if [ $? -ne 0 ]
then
exit 1
echo "Urandom test failed, but this may happen periodically as urandom"
echo "Is best-effort source of random data"
exit 77
fi

exit 0

0 comments on commit ce96ccb

Please sign in to comment.