This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] benchtests: Set float type on --threshold argument

On 05/10/18 3:10 AM, wrote:
From: Leonardo Sandoval <>

Otherwise, we see the following runtime error when using the parameter:

   File "./glibc/benchtests/scripts/", line 46, in do_compare
     if d > threshold:
TypeError: '>' not supported between instances of 'float' and 'str'

	* benchtests/scripts/ (main): set float type on
	threshold argument.

Looks good to me.


  benchtests/scripts/ | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/benchtests/scripts/ b/benchtests/scripts/
index 88e8911d812..f4b7742f903 100755
--- a/benchtests/scripts/
+++ b/benchtests/scripts/
@@ -175,7 +175,7 @@ if __name__ == '__main__':
                          help='JSON file to validate source/dest files (default: %(default)s)')
-    parser.add_argument('--threshold', default=10.0, help='Only print those with equal or higher threshold (default: %(default)s)')
+    parser.add_argument('--threshold', default=10.0, type=float, help='Only print those with equal or higher threshold (default: %(default)s)')
args = parser.parse_args()

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]