Re: testsuite/print_long_arg_list

Stan Shebs
1999-04-08T13:44:00Z

Date: Wed, 7 Apr 1999 18:49:38 +0200 (CEST)
From: "Philippe De Muyter" <phdm@macqel.be>

Running the testsuite with gdb-4.17.87 on m68k-motorola-sysv, I got
(among others) the following failure :

print_long_arg_list (a=22.219999999999998, b=33.332999999999998, c=0, d=-25, e=1
[...]

Looking at the expected result, I see :

gdb_expect {
-re ".*print_long_arg_list \\(a=22.219999999999999, b=33.332999999999998
[...]

For me, the differences are in the last digits of some float or double numbers.
Isn't the test too strict ?

I'm no floating-point expert, but I do know that you're supposed to be
careful about ignoring the last digit. On the other hand, GDB just
uses a printf %g to display float values, so the output is going to
depend on the system's C library as much as GDB's correctness. In fact,
"a" is actually 22.22 in the sources, so even the expected test result
isn't what it should be.

My inclination is to relax the match here. What does everybody else
think?

Stan