On Thu, May 15, 2014 at 9:36 AM, Paul Eggert <[email protected]> wrote:
> * tests/mb-non-UTF8-performance (timeout): Use an integer,
> as 'timeout 1.234' doesn't work in EUC locales.
> ---
>  tests/mb-non-UTF8-performance | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tests/mb-non-UTF8-performance b/tests/mb-non-UTF8-performance
> index 4ce3271..b6d43da 100755
> --- a/tests/mb-non-UTF8-performance
> +++ b/tests/mb-non-UTF8-performance
> @@ -32,7 +32,11 @@ stop=$(hi_res_time_)
>
>  # Use a multiple of the LC_ALL=C duration as the timeout for the JP/EUC test.
>  # A multiple of 3 seems to be enough for i5,i7, but AMD needs >25.
> -timeout=$($AWK 'BEGIN { print 30 * ('$stop' - '$start')}' < /dev/null)
> +# Use an integer; some 'timeout' implementations have trouble with
> +# floating-point in JP_EUC locales.
> +timeout=$(
> +  $AWK 'BEGIN { print 1 + int (30 * ('$stop' - '$start'))}' < /dev/null
> +)

Good catch/patch.  Thanks.



Reply via email to