Skip Menu |
Report information
Id: 128041
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: bartolin [at] gmx.de
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: JVM



Subject: [JVM] Failing tests for equivalence of Buf objects
Download (untitled) / with headers
text/plain 915b
Starting with rakudo commit fe2be65806 two tests in S16-io/supply.t start to fail with rakudo-j. The following rakudo commit 463e7589a1 seems to change the code path for the tests in question, but also makes them fail. Only if one reverts both commits, the tests pass again. The following code is a shortened version of one of the failing tests. Probably it could be golfed further. $ perl6-j -e 'my $f = "foo"; spurt($f,"a"); my $h = open($f); my $s = $h.Supply(:size(1),:bin); my $x; $s.tap( { $x = $_ } ); $h.close; my $y = Buf[uint8].new(ord "a"); say $x; say $y; say $x eqv $y' Buf[uint8]:0x<61> Buf[uint8]:0x<61> False On rakudo-m the last comparison returns True: $ perl6-m -e 'my $f = "foo"; spurt($f,"a"); my $h = open($f); my $s = $h.Supply(:size(1),:bin); my $x; $s.tap( { $x = $_ } ); $h.close; my $y = Buf[uint8].new(ord "a"); say $x; say $y; say $x eqv $y' Buf[uint8]:0x<61> Buf[uint8]:0x<61> True
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 1.1k
On Sat, 30 Apr 2016 11:16:44 -0700, bartolin@gmx.de wrote: Show quoted text
> Starting with rakudo commit fe2be65806 two tests in S16-io/supply.t > start to fail with rakudo-j. The following rakudo commit 463e7589a1 > seems to change the code path for the tests in question, but also > makes them fail. Only if one reverts both commits, the tests pass > again. > > The following code is a shortened version of one of the failing tests. > Probably it could be golfed further. > > $ perl6-j -e 'my $f = "foo"; spurt($f,"a"); my $h = open($f); my $s = > $h.Supply(:size(1),:bin); my $x; $s.tap( { $x = $_ } ); $h.close; my > $y = Buf[uint8].new(ord "a"); say $x; say $y; say $x eqv $y' > Buf[uint8]:0x<61> > Buf[uint8]:0x<61> > False > > On rakudo-m the last comparison returns True: > > $ perl6-m -e 'my $f = "foo"; spurt($f,"a"); my $h = open($f); my $s = > $h.Supply(:size(1),:bin); my $x; $s.tap( { $x = $_ } ); $h.close; my > $y = Buf[uint8].new(ord "a"); say $x; say $y; say $x eqv $y' > Buf[uint8]:0x<61> > Buf[uint8]:0x<61> > True
Golfed it a bit (buf8 is what the Supply uses): <Zoffix> r: dd buf8 eqv Buf[uint8] <camelia> rakudo-moar 0c6281: OUTPUT: «Bool::True␤» <camelia> ..rakudo-jvm fb4f16: OUTPUT: «Bool::False␤»
Download (untitled) / with headers
text/plain 31.4k

Message body is not shown because it is too large.

Download (untitled) / with headers
text/plain 627b
I meant... https://irclog.perlgeek.de/perl6-dev/2017-03-20#i_14297315 21:28 bartolin r: use nqp; say nqp::eqaddr(buf8.WHAT,Buf[uint8].WHAT) # RT #130914 21:28 synopsebot6 Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=130914 21:28 camelia rakudo-moar 0c6281: OUTPUT: «1␤» 21:28 ..rakudo-jvm fb4f16: OUTPUT: «0␤» 21:28 bartolin j: use nqp; say nqp::jvmeqaddr(buf8.WHAT,Buf[uint8].WHAT) 21:28 camelia rakudo-jvm fb4f16: OUTPUT: «1␤» 21:28 IOninja cool 21:28 Why is there a separate op for that? 21:29 * bartolin has no idea 21:30 it looks like jvmeqaddr isn't used anywhere (neither nqp nor rakudo)


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org