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.7.2~10 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=81a8f4ac80a32277cab60d6d5269a9b454c8f2a0;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 }