lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1514878118-21009-2-git-send-email-christian.ehrhardt@canonical.com>
Date:   Tue,  2 Jan 2018 08:28:37 +0100
From:   Christian Ehrhardt <christian.ehrhardt@...onical.com>
To:     Netdev <netdev@...r.kernel.org>
Cc:     Luca Boccassi <bluca@...ian.org>,
        Christian Ehrhardt <christian.ehrhardt@...onical.com>
Subject: [PATCH 1/2] 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@...onical.com>
---
 testsuite/lib/generic.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testsuite/lib/generic.sh b/testsuite/lib/generic.sh
index b7de704..3645ff5 100644
--- a/testsuite/lib/generic.sh
+++ b/testsuite/lib/generic.sh
@@ -87,7 +87,7 @@ ts_qdisc_available()
 
 rand_dev()
 {
-    echo "dev-$(tr -dc "[:alpha:]" < /dev/urandom | head -c 6)"
+    echo "dev-$(head -c 250 /dev/urandom | tr -dc '[:alpha:]' | head -c 6)"
 }
 
 pr_failed()
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ