Fri 10 Aug 2007 04:50:32 AM UTC, comment #15:
>All tests now pass on x86_64.
Wonderful. Thanks so much for investigation and verification (and patience).
I checked this in.
|
Fri 10 Aug 2007 04:17:08 AM UTC, comment #14:
Yep.
That does the trick.
All tests now pass on x86_64.
|
Fri 10 Aug 2007 03:20:04 AM UTC, comment #13:
Thanks John.
I've prepared similar fixes for the other two affected tests. I'm attaching the patch here as a new file. If you can verify that this works on x86-64 (it's fine on x86-32 here), I'll check it in.
(file #13638)
|
Fri 10 Aug 2007 02:21:57 AM UTC, comment #12:
OK. I tested it. on a 32bit and a 64 bit machine.
./tests/formats/num-in.sh now passes.
Btw, It's a bit annoying that I have to do "export PERL=perl" in order to run individual tests from a shell.
|
Fri 10 Aug 2007 12:18:19 AM UTC, comment #11:
>I haven't tested the patch at all
I'd appreciate it if you could test the new version (file #13636) so that I can make sure it works on x86-64 before going further.
(Assuming that a new version of something works better than the old version without testing it is a bad idea.)
|
Fri 10 Aug 2007 12:12:31 AM UTC, comment #10:
>Err... Did you inadvertently attach the wrong file?
Yes. Here's the fixed version.
(file #13636)
|
Fri 10 Aug 2007 12:09:35 AM UTC, comment #9:
Err... Did you inadvertently attach the wrong file? There doesn't seem to be any difference between file #13633 and what I remember of #13623
> Are you OK with this otherwise? If so I'll cook up similar changes to the other affected tests.
I haven't tested the patch at all, but I can't see any other problems with it.
|
Thu 09 Aug 2007 03:46:43 PM UTC, comment #8:
>This function doesn't appear to use $modulo
I'm a moron.
I've replaced the patch and the expected results.
Are you OK with this otherwise? If so I'll cook up similar changes to the other affected tests.
(file #13632, file #13633)
|
Thu 09 Aug 2007 05:46:11 AM UTC, comment #7:
This function doesn't appear to use $modulo
+sub my_rand {
+ my ($modulo) = @_;
+ my ($a) = 16807;
+ my ($m) = 2147483647;
+ my ($tmp) = $a * $seed;
+ $seed = $tmp - $m * int ($tmp / $m);
+ return $seed / $m;
+}
|
Thu 09 Aug 2007 05:16:34 AM UTC, comment #6:
>the my_rand subroutine which generates the cases is not as
>platform invariant as it might be:
Brilliant observation. Thank you for figuring this out.
What would you say to a solution like the one I'm attaching. Note that I'm actually attaching two files: a patch against tests/formats/num-in.sh plus a replacement for tests/formats/num-in.expect.gz.
If you like this patch I'll cook up similar changes to the other affected tests.
(file #13623, file #13624)
|
Thu 09 Aug 2007 01:34:52 AM UTC, comment #5:
Forget most of what I said previously. Further investigation shows that the problem is simply the my_rand subroutine which generates the cases is not as platform invariant as it might be:
sub my_rand {
my ($modulo) = @_;
$next = ($next * 1103515245 + 12345) % (2**32);
return int ($next / 65536) % $modulo;
}
If $next starts at a large value, then the multiplication leads to precision errors on the 32 bit machines, and thus a different sequence of numbers.
|
Wed 08 Aug 2007 12:41:55 PM UTC, comment #4:
I've been doing a little digging into the first test failure. My initial suspicion is that the x86_64 machine is correct, and the test (and 32 bit machine) is wrong.
It seems that the '-' sign is causing problems again. When a date such as "30 6 1680 -4:50" is encountered, the '-' sign is being treated as a minus. Presumably it's supposed to be a seperator ??
So in this case, the resultant time is 29-JUN-1680 19:10:00 (4 hours and 50 minutes before midnight on 30 June).
|
Wed 08 Aug 2007 10:42:45 AM UTC, comment #3:
I can confirm that the same three tests fail on
2.6.20-1.2948.fc6 #1 SMP Fri Apr 27 19:18:54 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
|
Thu 02 Aug 2007 03:11:29 AM UTC, comment #2:
I may not have an opportunity to re-test this on GNU/Linux x86-64 before release. If anyone else has such a machine handy I'd appreciate it if you could pass along your results.
|
Wed 07 Feb 2007 02:04:45 PM UTC, comment #1:
Interesting: These tests all pass on OBSD x86-64.
|
Wed 07 Feb 2007 05:29:51 AM UTC, original submission:
tests/formats/date-in.sh. tests/formats/num-in.sh, and tests/formats/time-in.sh fail on GNU/Linux on x86-64. Output attached.
|