Skip to content

Commit

Permalink
Fix SEGV test
Browse files Browse the repository at this point in the history
MVM_JIT_LOG no longer complains about failed opens. Cover
for its SEGV only.
  • Loading branch information
zoffixznet committed Oct 6, 2018
1 parent be2d4cb commit 0d98607
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions t/05-messages/moar/01-errors.t
Expand Up @@ -7,15 +7,20 @@ plan 1;

# https://github.com/rakudo/rakudo/issues/1451
subtest 'no SEGV with failed opens of MVM debug files' => {
plan +my @vars := <
MVM_SPESH_LOG MVM_JIT_LOG MVM_DYNVAR_LOG MVM_COVERAGE_LOG
plan 1 + my @vars := <
MVM_SPESH_LOG MVM_DYNVAR_LOG MVM_COVERAGE_LOG
>;
my $file := (make-temp-dir).absolute;
my $dir := (make-temp-dir).absolute;
for @vars {
(temp %*ENV){$_} = $file;
(temp %*ENV){$_} = $dir;
is-run 42.say, :out(*), :err{.contains: 'Failed to open file'},
:exitcode(1), $_;
}

{
(temp %*ENV)<MVM_JIT_LOG> = $dir;
is-run 42.say, :out(*), :err(''), :0exitcode, 'MVM_JIT_LOG';
}
}

# vim: ft=perl6 expandtab sw=4

0 comments on commit 0d98607

Please sign in to comment.