GNU bug report logs - #17500
[PATCH] tests: port mb-non-UTF8-performance to RHEL 6.5

Previous Next

Package: grep;

Reported by: Paul Eggert <eggert <at> CS.UCLA.EDU>

Date: Thu, 15 May 2014 16:46:01 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> CS.UCLA.EDU>
To: bug-grep <at> gnu.org
Subject: [PATCH] tests: port mb-non-UTF8-performance to RHEL 6.5
Date: Thu, 15 May 2014 09:36:57 -0700
* 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
+)
 
 test $st = 1 || fail=1
 
-- 
1.9.0





This bug report was last modified 11 years and 14 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.