Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #41453] [BUG] Test failure in t/pmc/object-meths.t

3 views
Skip to first unread message

James Keenan

unread,
Feb 5, 2007, 8:31:11 PM2/5/07
to bugs-bi...@rt.perl.org
# New Ticket Created by James Keenan
# Please include the string: [perl #41453]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41453 >


Running 'make test' tonight, for the first time I experienced a
failure in a test *other than* t/examples/shootout.t (see http://
rt.perl.org/rt3/Ticket/Display.html?id=41185 for that problem). The
test file in question is t/pmc/object-meths.t. Here is the output of
t/harness on that file:

#####
[parrot] 533 $ perl t/harness t/pmc/object-meths.t
t/pmc/object-meths....NOK 36/36
# Failed test (t/pmc/object-meths.t at line 1149)
# got: 'init was called
# WTF!
# '
# expected: 'init was called
# init was called
# '
# Looks like you failed 1 test of 36.
t/pmc/object-meths....dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 36
Failed 1/36 tests, 97.22% okay (less 2 skipped tests: 33
okay, 91.67%)
Failed Test Stat Wstat Total Fail List of Failed
------------------------------------------------------------------------
-------
t/pmc/object-meths.t 1 256 36 1 36
2 subtests skipped.
Failed 1/1 test scripts. 1/36 subtests failed.
Files=1, Tests=36, 4 wallclock secs ( 1.31 cusr + 1.77 csys = 3.08
CPU)
Failed 1/1 test programs. 1/36 subtests failed.


######
Here is the block of code in that file beginning at line 1149:

ir_output_is( <<'CODE', <<'OUTPUT', "init calls" );
.sub main :main
.local pmc cl, o
cl = newclass 'MyClass'
o = new 'MyClass'
o = new 'MyClass', $P0
.end

.namespace ['MyClass']

.sub init :method :vtable
.param pmc initializer :optional
print "init was called\n"
.end

.sub init_pmc :method :vtable
.param pmc initializer
print "WTF!\n"
.end
CODE
init was called
init was called
OUTPUT

#####
kid51

James Keenan via RT

unread,
Feb 5, 2007, 8:34:25 PM2/5/07
to perl6-i...@perl.org
Should have included 'myconfig' with the original report. It is now attached.

kid51

myconfig

Allison Randal

unread,
Feb 6, 2007, 11:54:15 AM2/6/07
to perl6-i...@perl.org
This is a failing test Leo added in r16783. It looks to me like calling:

> o = new 'MyClass', $P0

actually should call init_pmc, rather than init, even when $P0 is null.
Leo, are you saying the choice between init and init_pmc should be
based on the content of the argument rather than the signature of the call?

Allison

Leopold Toetsch

unread,
Feb 6, 2007, 2:26:04 PM2/6/07
to perl6-i...@perl.org, Allison Randal

No. I was saying that there should be just one init :vtable that is called
with any arguments (or none) according to pdd03 calling convs.

> Allison

my 2¢
leo

James Keenan

unread,
Feb 6, 2007, 6:57:50 PM2/6/07
to parrotbug...@parrotcode.org

Okay. So (a) are people experiencing this on other OSes? (b) how do
we fix it?

Allison Randal via RT

unread,
Feb 17, 2007, 6:35:06 AM2/17/07
to perl6-i...@perl.org
James Keenan wrote:

> Okay. So (a) are people experiencing this on other OSes? (b) how do
> we fix it?

This was a feature request submitted as a failing test. I've changed the
test to reflect current behavior in r17026, and submitted the feature
request as a separate ticket #41528.

Allison

0 new messages