Skip to content

Commit

Permalink
[jvm] Fudge new test failures
Browse files Browse the repository at this point in the history
Also replaces some tabs with whitespaces in S17-supply/syntax.t
  • Loading branch information
usev6 committed Dec 22, 2017
1 parent 76b3925 commit 629b223
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 17 deletions.
2 changes: 2 additions & 0 deletions S16-io/eof.t
Expand Up @@ -70,12 +70,14 @@ subtest '.eof works right even when we seek past end and back' => {
is-deeply $fh.eof, True, "seek'ed past end";

$fh.seek: 1, SeekFromBeginning;
#?rakudo.jvm todo 'Rakudo GH #1322 not yet fixed for JVM'
is-deeply $fh.eof, False, "seek'ed back into the actual contents";

$fh.slurp;
is-deeply $fh.eof, True, "slurped contents";

$fh.seek: 3, SeekFromBeginning;
#?rakudo.jvm todo 'Rakudo GH #1322 not yet fixed for JVM'
is-deeply $fh.eof, False, "seek'ed back";

$fh.seek: 5, SeekFromEnd;
Expand Down
1 change: 1 addition & 0 deletions S17-promise/nonblocking-await.t
Expand Up @@ -272,6 +272,7 @@ PROCESS::<$SCHEDULER> := ThreadPoolScheduler.new(max_threads => 4);
}
}

#?rakudo.jvm skip 'atomicint NYI'
{ # https://github.com/rakudo/rakudo/issues/1323
# Await must be called in sink context here to trigger the covered bug.
# Gymnastics with atomic ints are just to reduce test runtime; the point
Expand Down
1 change: 1 addition & 0 deletions S17-promise/start.t
Expand Up @@ -249,6 +249,7 @@ lives-ok {
nok $wrong, 'No data races on closure interpolation in strings';
}

#?rakudo.jvm skip 'atomicint NYI'
{ # https://github.com/rakudo/rakudo/issues/1323
# Await must be called in sink context here to trigger the covered bug.
# Gymnastics with atomic ints are just to reduce test runtime; the point
Expand Down
35 changes: 19 additions & 16 deletions S17-supply/syntax.t
Expand Up @@ -613,22 +613,25 @@ lives-ok {
}

# RT #126842
lives-ok {
for ^500 {
my $channel = Channel.new;
my $p1 = start {
react {
whenever $channel {
}
}
}
my $p2 = start {
$channel.send($_) for (1..10);
$channel.close;
}
await $p1,$p2;
}
}, 'No hang or crash using react to consume channels';
#?rakudo.jvm skip 'RT #126842 hangs since rakudo commit 1a4df4e100'
{
lives-ok {
for ^500 {
my $channel = Channel.new;
my $p1 = start {
react {
whenever $channel {
}
}
}
my $p2 = start {
$channel.send($_) for (1..10);
$channel.close;
}
await $p1,$p2;
}
}, 'No hang or crash using react to consume channels';
}

# RT #128717
{
Expand Down
15 changes: 14 additions & 1 deletion S32-io/io-cathandle.t
Expand Up @@ -240,6 +240,7 @@ subtest 'gist method' => {
is-deeply $cat.gist, "IO::CatHandle(opened on @paths[1].gist())",
'opened, second handle';
$cat.read: 4;
#?rakudo.jvm todo 'fails since rakudo commit dc800d8933'
is-deeply $cat.gist, 'IO::CatHandle(closed)', 'after exhausting handles';
}

Expand All @@ -253,6 +254,7 @@ subtest 'IO method' => {
$cat.read: 4;
is-deeply $cat.IO, @paths[1], '2';
$cat.read: 4;
#?rakudo.jvm todo 'fails since rakudo commit dc800d8933'
is-deeply $cat.IO, @paths[2], '3';
$cat.read: 1000;
is-deeply $cat.IO, Nil, '4';
Expand Down Expand Up @@ -316,6 +318,7 @@ subtest 'native-descriptor method' => {
$cat.read: 4;
isa-ok $cat.native-descriptor, Int;
$cat.read: 10000;
#?rakudo.jvm todo 'fails since rakudo commit dc800d8933'
is-deeply $cat.native-descriptor, Nil, 'after exhausting handles';
}

Expand Down Expand Up @@ -493,6 +496,7 @@ subtest 'opened method' => {
is-deeply $cat.opened, True, 'second handle';

$cat.read: 4000;
#?rakudo.jvm todo 'fails since rakudo commit dc800d8933'
is-deeply $cat.opened, False, 'after exhausting all handles';
}

Expand All @@ -506,6 +510,7 @@ subtest 'path method' => {
$cat.read: 4;
is-deeply $cat.IO, @paths[1], '2';
$cat.read: 4;
#?rakudo.jvm todo 'fails since rakudo commit dc800d8933'
is-deeply $cat.IO, @paths[2], '3';
$cat.read: 1000;
is-deeply $cat.IO, Nil, '4';
Expand Down Expand Up @@ -558,7 +563,9 @@ subtest 'read method' => {
my $cat = IO::CatHandle.new: make-files Blob.new(1, 2, 3),
Blob.new(4, 5), Blob.new(6, 7, 8), Blob.new(9, 10, 11, 12, 13, 14);
is-deeply $cat.read(4), buf8.new(1, 2, 3, 4), '1';
#?rakudo.jvm todo 'fails since rakudo commit dc800d8933'
is-deeply $cat.read(5), buf8.new(5, 6, 7, 8, 9), '2';
#?rakudo.jvm todo 'fails since rakudo commit dc800d8933'
is-deeply $cat.read(5000), buf8.new(10, 11, 12, 13, 14), '3';
is-deeply $cat.read(500), buf8.new, '4';
}
Expand Down Expand Up @@ -688,6 +695,7 @@ subtest 'Str method' => {
$cat.read: 4;
is-deeply $cat.Str, @paths[1].Str, '2';
$cat.read: 4;
#?rakudo.jvm todo 'fails since rakudo commit dc800d8933'
is-deeply $cat.Str, @paths[2].Str, '3';

# Don't spec the exact content of .Str on closed handle
Expand Down Expand Up @@ -830,9 +838,13 @@ subtest 'words method' => {
if $*DISTRO.is-win {
skip "Proc/Proc::Async with cmd.exe don't quite work on Windows: RT132258";
}
elsif $*VM.name eq 'jvm' {
skip "hangs; Rakudo GH #1313";
}
else {
# https://github.com/rakudo/rakudo/issues/1313
subtest 'IO::CatHandle.read does not switch to another handle too early' => {
{
subtest 'IO::CatHandle.read does not switch to another handle too early' => {
plan 2;

my $p := run $*EXECUTABLE, '-e',
Expand All @@ -848,6 +860,7 @@ else {

is $p.out.slurp(:close), "97 98 99 100\n", 'got all elements';
is $p.err.slurp(:close), '', 'STDERR is empty';
}
}
}

Expand Down

0 comments on commit 629b223

Please sign in to comment.