aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStafford Horne <shorne@gmail.com>2021-10-05 10:56:10 +0900
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-10-21 11:11:07 -0300
commit0ff2d30daedb6d0d00401f1f2a48a80ff99d7c25 (patch)
treef14487038381fb4ecc5daa9fd317d3a080aa15fd
parent4e32c8f5682004d0571395fe9fa1bc1b73b40f4c (diff)
downloadglibc-0ff2d30daedb6d0d00401f1f2a48a80ff99d7c25.zip
glibc-0ff2d30daedb6d0d00401f1f2a48a80ff99d7c25.tar.gz
glibc-0ff2d30daedb6d0d00401f1f2a48a80ff99d7c25.tar.bz2
iconv: Use TIMEOUTFACTOR for iconv test timeout
Currently the timeout for each iconv test is hard coded to 3 seconds. On my OpenRISC test platform this is too slow and the test fails with a HANG error. This change uses the available TIMEOUTFACTOR to compute the timeout. The default value is still 3. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
-rw-r--r--iconv/tst-iconv_prog.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/iconv/tst-iconv_prog.sh b/iconv/tst-iconv_prog.sh
index 14b7c08..2505f0f 100644
--- a/iconv/tst-iconv_prog.sh
+++ b/iconv/tst-iconv_prog.sh
@@ -32,6 +32,8 @@ $codir/iconv/iconv_prog
'
ICONV="$test_wrapper_env $run_program_env $ICONV"
+TIMEOUTFACTOR=${TIMEOUTFACTOR:-1}
+
# List of known hangs;
# Gathered by running an exhaustive 2 byte input search against glibc-2.28
hangarray=(
@@ -222,7 +224,8 @@ execute_test ()
{
eval PROG=\"$ICONV\"
echo -en "$twobyte" \
- | timeout -k 4 3 $PROG $c -f $from -t "$to" &>/dev/null
+ | timeout -k 4 $((3*$TIMEOUTFACTOR)) \
+ $PROG $c -f $from -t "$to" &>/dev/null
ret=$?
}