]> git.proxmox.com Git - mirror_iproute2.git/commit
tests: read limited amount from /dev/urandom
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Wed, 10 Jan 2018 15:11:36 +0000 (16:11 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 10 Jan 2018 16:29:51 +0000 (08:29 -0800)
commit4afbeaeeafe8475d42127935fcf511aca30b2063
tree6a1465ade129b96237cf9287af56487fbe29b6cb
parenta8b970d7d241de8ea2885d6d0b72fec0f557422d
tests: read limited amount from /dev/urandom

In some test environments like e.g. Ubuntu & Debian autopkgtest it
can happen that while generating random device names the pipes
between tr and head are considered dead while processing.
That prints (non fatal) issues like:
  Running ip/link/new_link.t [iproute2-this/4.13.0-17-generic]: tr:
write error: Broken pipe
  tr: write error
  PASS

This only happens if reading an infinite amount of chars with the
read from urandom, so reading a defined amount fixes the issue.

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
testsuite/lib/generic.sh