From: Christian Ehrhardt <hidden> Date: 2018-01-10 15:11:40
Hi,
while working on Debian bug [1] and the Ubuntu counterpart of it
I found that the tests can throw a broken pipe warning.
I kept the associated check-and-retry of the length separate to
discuss the changes individually - feel free to squash them on
commit if preferred.
*Updates in v2*
tag with --subject-prefix='PATCH iproute2' to trigger the right
review queues in patchwork as requested by Luca Bocassi.
[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879854
Christian Ehrhardt (2):
tests: read limited amount from /dev/urandom
tests: make sure rand_dev suffix has 6 chars
testsuite/lib/generic.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--
2.7.4
From: Christian Ehrhardt <hidden> Date: 2018-01-10 15:11:40
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 <redacted>
---
testsuite/lib/generic.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Christian Ehrhardt <hidden> Date: 2018-01-10 15:11:41
The change to limit the read size from /dev/urandom is a tradeoff.
Reading too much can trigger an issue, but so it could if the
suggested 250 random chars would not contain enough [:alpha:] chars.
If they contain:
a) >=6 all is ok
b) [1-5] the devname would be shorter than expected (non fatal).
c) 0 things would break
In loops of hundreds of thousands it always was (a) for my, but since
if occuring in a test it might be hard to track what happened avoid
this issue by retrying on the length condition.
Signed-off-by: Christian Ehrhardt <redacted>
---
testsuite/lib/generic.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
From: Stephen Hemminger <stephen@networkplumber.org> Date: 2018-01-10 16:31:22
On Wed, 10 Jan 2018 16:11:35 +0100
Christian Ehrhardt [off-list ref] wrote:
Hi,
while working on Debian bug [1] and the Ubuntu counterpart of it
I found that the tests can throw a broken pipe warning.
I kept the associated check-and-retry of the length separate to
discuss the changes individually - feel free to squash them on
commit if preferred.
*Updates in v2*
tag with --subject-prefix='PATCH iproute2' to trigger the right
review queues in patchwork as requested by Luca Bocassi.
[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879854
Christian Ehrhardt (2):
tests: read limited amount from /dev/urandom
tests: make sure rand_dev suffix has 6 chars
testsuite/lib/generic.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Looks good. Applied.
The method of generating a name seems a bit overly complex.
Maybe using something like pwgen would be easier.