|
List Info
Thread: overload64.t failures
|
|
| overload64.t failures |

|
2007-10-21 03:57:47 |
The recent smoke tests show failures on some configurations
with
-Duselongdoubles or -Dusemorebits for the new test
lib/overload64.t.
(See smoke reports by Merijn and Johan.)
I can't duplicate those failures for now (on a FreeBSD box,
with
-Duse64bitint). However it looks like those tests should be
skipped.
Currently the test file begins with:
if ($Config::Config{'uvsize'} != 8) {
print "1..0 # Skip -- Perl configured with
32-bit intsn";
exit 0;
}
Maybe that needs to be changed. t/op/64bitint.t for example
uses:
eval { my $q = pack "q", 0 };
if ($ ) {
print "1..0 # Skip: no 64-bit
typesn";
exit(0);
}
although I'm not sure that's completely equivalent.
|
|
| Re: overload64.t failures |

|
2007-10-21 08:12:29 |
Rafael Garcia-Suarez wrote:
> The recent smoke tests show failures on some
configurations with
> -Duselongdoubles or -Dusemorebits for the new test
lib/overload64.t.
> (See smoke reports by Merijn and Johan.)
>
> I can't duplicate those failures for now (on a FreeBSD
box, with
> -Duse64bitint). However it looks like those tests
should be skipped.
Actually, I think they may be indicating a bug. The tests
are going
awry after a 'division by one' test:
is($oo/1, $ii, '0+ overload with division');
is($$oo, $cnt++, 'overload called once');
<<== this one fails
This indicates that, in this case, overloading is being
called
more than once.
I've emailed Merijn and Johan asking for detailed test
outputs.
Hopefully, that will give more information.
|
|
| Re: overload64.t failures |

|
2007-10-21 11:27:04 |
On Sun, 21 Oct 2007 09:12:29 -0400, "Jerry D.
Hedden" <jdhedden cpan.org>
wrote:
> Rafael Garcia-Suarez wrote:
> > The recent smoke tests show failures on some
configurations with
> > -Duselongdoubles or -Dusemorebits for the new test
lib/overload64.t.
> > (See smoke reports by Merijn and Johan.)
> >
> > I can't duplicate those failures for now (on a
FreeBSD box, with
> > -Duse64bitint). However it looks like those tests
should be skipped.
>
> Actually, I think they may be indicating a bug. The
tests are going
> awry after a 'division by one' test:
>
> is($oo/1, $ii, '0+ overload with division');
> is($$oo, $cnt++, 'overload called once');
<<== this one fails
>
> This indicates that, in this case, overloading is being
called
> more than once.
>
> I've emailed Merijn and Johan asking for detailed test
outputs.
> Hopefully, that will give more information.
What exactly?
pc09:/pro/3gl/CPAN/perl-current 125 > ./perl -Ilib
lib/overload64.t
1..100
ok 1 - 0+ overload with stringification
ok 2 - overload called once
ok 3 - 0+ overload with bit shift right
ok 4 - overload called once
ok 5 - 0+ overload with bit shift left
ok 6 - overload called once
ok 7 - 0+ overload with bitwise or
ok 8 - overload called once
ok 9 - 0+ overload with bitwise and
ok 10 - overload called once
ok 11 - 0+ overload with equality
ok 12 - overload called once
ok 13 - 0+ overload with int()
ok 14 - overload called once
ok 15 - 0+ overload with abs()
ok 16 - overload called once
ok 17 - 0+ overload with unary minus
ok 18 - overload called once
ok 19 - 0+ overload with addition
ok 20 - overload called once
ok 21 - 0+ overload with addition
ok 22 - overload called once
ok 23 - 0+ overload with addition
ok 24 - overload called once
ok 25 - 0+ overload with subtraction
ok 26 - overload called once
ok 27 - 0+ overload with subtraction
ok 28 - overload called once
ok 29 - 0+ overload with multiplication
ok 30 - overload called once
ok 31 - 0+ overload with multiplication
ok 32 - overload called once
ok 33 - 0+ overload with division
not ok 34 - overload called once
# Failed test 'overload called once'
# at lib/overload64.t line 74.
# got: '19'
# expected: '18'
ok 35 - 0+ overload with division
not ok 36 - overload called once
# Failed test 'overload called once'
# at lib/overload64.t line 76.
# got: '21'
# expected: '19'
ok 37 - 0+ overload with modulo
not ok 38 - overload called once
# Failed test 'overload called once'
# at lib/overload64.t line 79.
# got: '22'
# expected: '20'
ok 39 - 0+ overload with modulo
not ok 40 - overload called once
# Failed test 'overload called once'
# at lib/overload64.t line 81.
# got: '23'
# expected: '21'
ok 41 - 0+ overload with exponentiation
not ok 42 - overload called once
# Failed test 'overload called once'
# at lib/overload64.t line 84.
# got: '24'
# expected: '22'
ok 43 - 0+ overload with int()
ok 44 - overload called once
ok 45 - 0+ overload with abs()
ok 46 - overload called once
ok 47 - 0+ overload with unary -
ok 48 - overload called once
ok 49 - 0+ overload with addition
ok 50 - overload called once
ok 51 - 0+ overload with addition
ok 52 - overload called once
ok 53 - 0+ overload with addition
ok 54 - overload called once
ok 55 - 0+ overload with subtraction
ok 56 - overload called once
ok 57 - 0+ overload with multiplication
ok 58 - overload called once
ok 59 - 0+ overload with multiplication
ok 60 - overload called once
ok 61 - 0+ overload with division
not ok 62 - overload called once
# Failed test 'overload called once'
# at lib/overload64.t line 121.
# got: '12'
# expected: '11'
ok 63 - 0+ overload with division
not ok 64 - overload called once
# Failed test 'overload called once'
# at lib/overload64.t line 123.
# got: '14'
# expected: '12'
ok 65 - 0+ overload with modulo
not ok 66 - overload called once
# Failed test 'overload called once'
# at lib/overload64.t line 126.
# got: '15'
# expected: '13'
ok 67 - 0+ overload with modulo
not ok 68 - overload called once
# Failed test 'overload called once'
# at lib/overload64.t line 128.
# got: '16'
# expected: '14'
ok 69 - 0+ overload with exponentiation
not ok 70 - overload called once
# Failed test 'overload called once'
# at lib/overload64.t line 131.
# got: '17'
# expected: '15'
ok 71 - int() overload
ok 72 - overload called once
ok 73 - abs() overload
ok 74 - overload called once
ok 75 - neg overload
ok 76 - overload called once
ok 77 - + overload
ok 78 - overload called once
ok 79 - + overload
ok 80 - overload called once
ok 81 - + overload
ok 82 - overload called once
ok 83 - - overload
ok 84 - overload called once
ok 85 - - overload
ok 86 - overload called once
ok 87 - * overload
ok 88 - overload called once
ok 89 - * overload
ok 90 - overload called once
ok 91 - / overload
ok 92 - overload called once
ok 93 - / overload
ok 94 - overload called once
ok 95 - % overload
ok 96 - overload called once
ok 97 - % overload
ok 98 - overload called once
ok 99 - ** overload
ok 100 - overload called once
# Looks like you failed 10 tests of 100.
Exit 10
pc09:/pro/3gl/CPAN/perl-current 126 >
--
H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/
)
using & porting perl 5.6.2, 5.8.x, 5.10.x on HP-UX
10.20, 11.00, 11.11,
& 11.23, SuSE 10.1 & 10.2, AIX 5.2, and Cygwin.
http://qa.perl.org
http://mirrors.de
velooper.com/hpux/ http://www.test-smoke.org
a>
http
://www.goldmark.org/jeff/stupid-disclaimers/
|
|
| Re: overload64.t failures |

|
2007-10-21 14:17:04 |
On Oct 21 2007, Jerry D. Hedden wrote:
> Actually, I think they may be indicating a bug. The
tests are going
> awry after a 'division by one' test:
>
> is($oo/1, $ii, '0+ overload with division');
> is($$oo, $cnt++, 'overload called once');
<<== this one fails
>
> This indicates that, in this case, overloading is being
called
> more than once.
Attached patch should fix that.
--
Rick Delaney
rick bort.ca
|
|
|
| Re: overload64.t failures |

|
2007-10-21 14:24:07 |
On Oct 21 2007, Rafael Garcia-Suarez wrote:
> The recent smoke tests show failures on some
configurations with
> -Duselongdoubles or -Dusemorebits for the new test
lib/overload64.t.
> (See smoke reports by Merijn and Johan.)
>
> I can't duplicate those failures for now (on a FreeBSD
box, with
> -Duse64bitint). However it looks like those tests
should be skipped.
> Currently the test file begins with:
>
> if ($Config::Config{'uvsize'} != 8) {
> print "1..0 # Skip -- Perl configured with
32-bit intsn";
> exit 0;
> }
I wonder if they need to be skipped anywhere at all. With
the patch I
just sent I can get them all to pass (32-bit Linux) except:
not ok 67 - 0+ overload with modulo
# Failed test '0+ overload with modulo'
# at lib/overload64.t line 128.
# got: '-0'
# expected: '0'
The way the tests are written, if things are consistent then
they should
pass whether the large int (36028797018963971) is stored in
an NV or an
IV. I haven't looked at this mod failure yet.
--
Rick Delaney
rick bort.ca
|
|
| Re: overload64.t failures |

|
2007-10-21 14:33:03 |
On Oct 21 2007, Rick Delaney wrote:
> On Oct 21 2007, Jerry D. Hedden wrote:
> > Actually, I think they may be indicating a bug.
The tests are going
> > awry after a 'division by one' test:
> >
> > is($oo/1, $ii, '0+ overload with division');
> > is($$oo, $cnt++, 'overload called once');
<<== this one fails
> >
> > This indicates that, in this case, overloading is
being called
> > more than once.
>
> Attached patch should fix that.
Sorry, `make test` was still running when I sent that. It
should be
correct but there is a failure for t/lib/warnings.t.
Haven't looked at
it yet.
--
Rick Delaney
rick bort.ca
|
|
| Re: overload64.t failures |

|
2007-10-21 15:13:51 |
On Oct 21 2007, Rick Delaney wrote:
> > Attached patch should fix that.
>
> Sorry, `make test` was still running when I sent that.
It should be
> correct but there is a failure for t/lib/warnings.t.
Haven't looked at
> it yet.
Here's a better patch that doesn't change the order of
warnings.
--
Rick Delaney
rick bort.ca
|
|
|
| Re: overload64.t failures |

|
2007-10-21 15:20:02 |
On 21/10/2007, Rick Delaney <rick bort.ca> wrote:
> On Oct 21 2007, Rick Delaney wrote:
> > > Attached patch should fix that.
> >
> > Sorry, `make test` was still running when I sent
that. It should be
> > correct but there is a failure for
t/lib/warnings.t. Haven't looked at
> > it yet.
>
> Here's a better patch that doesn't change the order of
warnings.
Thanks, applied as #32157.
|
|
| Re: overload64.t failures |

|
2007-11-05 12:06:16 |
On Sun, Oct 21, 2007 at 09:12:29AM -0400, Jerry D. Hedden
wrote:
> Rafael Garcia-Suarez wrote:
> > The recent smoke tests show failures on some
configurations with
> > -Duselongdoubles or -Dusemorebits for the new test
lib/overload64.t.
> > (See smoke reports by Merijn and Johan.)
> >
> > I can't duplicate those failures for now (on a
FreeBSD box, with
> > -Duse64bitint). However it looks like those tests
should be skipped.
>
> Actually, I think they may be indicating a bug. The
tests are going
> awry after a 'division by one' test:
>
> is($oo/1, $ii, '0+ overload with division');
> is($$oo, $cnt++, 'overload called once');
<<== this one fails
>
> This indicates that, in this case, overloading is being
called
> more than once.
I don't think that we document anywhere that overloading is
called exactly
once. Unlike magic, I'm not even sure if it's possible (in
the general case)
to get it right. With magic, you're supposed to call
SvGETMAGIC() once (per
logical operation on the value) and then look at the results
cached via
the SvIVX/SvNVX/SvPVX slots and Sv*OK. [As I understand it]
With overloading, you're just supposed to get the value
whenever you need it.
[As I understand it].
Arguably this is either a design bug, or there's a
documentation bug in that
the documentation should be pretty clear that overloading
values needs to be
done with functions that are idempotent.
[Or maybe I'm missing something]
[Also, if I'm not missing something, it's probably too late
to fix this now.
Does Parrot's design cope well with the most primitive data
type being one
that can have "active" data?]
Nicholas Clark
|
|
| Re: overload64.t failures |

|
2007-11-05 13:27:10 |
Moin,
On Monday 05 November 2007 19:06:16 Nicholas Clark wrote:
> On Sun, Oct 21, 2007 at 09:12:29AM -0400, Jerry D.
Hedden wrote:
> > Rafael Garcia-Suarez wrote:
> > > The recent smoke tests show failures on some
configurations with
> > > -Duselongdoubles or -Dusemorebits for the new
test
[skip]
> > Actually, I think they may be indicating a bug.
The tests are
> > going awry after a 'division by one' test:
> >
> > is($oo/1, $ii, '0+ overload with division');
> > is($$oo, $cnt++, 'overload called once');
<<== this one
> > fails
> >
> > This indicates that, in this case, overloading is
being called
> > more than once.
>
> I don't think that we document anywhere that
overloading is called
> exactly once. Unlike magic, I'm not even sure if it's
possible (in
> the general case) to get it right. With magic, you're
supposed to
> call SvGETMAGIC() once (per logical operation on the
value) and then
> look at the results cached via the SvIVX/SvNVX/SvPVX
slots and Sv*OK.
> [As I understand it]
>
> With overloading, you're just supposed to get the value
whenever you
> need it. [As I understand it].
I am not sure, but in case of:
$a++;
the overload code is supposed to call '++' exactly once on
$a. Not
twice. Nor shall it call it thrice. Four is right out. And
so on
Or are you saying that while '++' is called only once, that
other,
not-modifying overload methods like stringification can be
called in
addition or even multiple times during the increment
operation?
All the best,
Tels
--
Signed on Mon Nov 5 20:25:10 2007 with key 0x93B84C15.
View my photo gallery: http://bloodgate.com/phot
os
PGP key on http://bloodgate.com/te
ls.asc or per email.
"Retsina?" - "Ja, Papa?" -
"Rasenmähen." - "Is gut, Papa."
|
|
|
|