From: Jérémie Galarneau Date: Wed, 9 Mar 2016 20:26:37 +0000 (-0500) Subject: Test fix: ignore stderr when generating random string X-Git-Tag: v2.8.0-rc1~97 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3d07eea28a4d86b796d14f27e7bb06fba6804900;p=lttng-tools.git Test fix: ignore stderr when generating random string 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 --- 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 }