From 3d07eea28a4d86b796d14f27e7bb06fba6804900 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Wed, 9 Mar 2016 15:26:37 -0500 Subject: [PATCH] Test fix: ignore stderr when generating random string MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit tr often reports a broken pipe when the head command exits (after having received enough characters) which pollutes the test output. Signed-off-by: Jérémie Galarneau --- tests/utils/utils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index 4ee3dda87..56fe622e9 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -88,7 +88,7 @@ function validate_kernel_version () function randstring() { [ "$2" == "0" ] && CHAR="[:alnum:]" || CHAR="[:graph:]" - cat /dev/urandom | tr -cd "$CHAR" | head -c ${1:-16} + cat /dev/urandom | tr -cd "$CHAR" | head -c ${1:-16} 2>/dev/null echo } -- 2.34.1