Skip to content

Commit

Permalink
[v6.d REVIEW] Clarify race-y SEGV tests
Browse files Browse the repository at this point in the history
That we're only watching for lack of SEGVs, not for
lack of race conditions that *are* there.

Orig: 02d698835
  • Loading branch information
zoffixznet committed Jul 15, 2018
1 parent 8b56e4c commit 5b53f95
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions integration/weird-errors.t
Expand Up @@ -208,6 +208,8 @@ eval-lives-ok '[;0]', '[;0] does not explode the compiler';
#?rakudo skip 'RT127208'
#?DOES 1
{
# Purpose of the test is to check that despite having a race
# condition we don't get a SEGV. Other failures are acceptable.
subtest 'accessing Seq from multiple threads does not segfault' => {
my $code = Q:to/CODE_END/;
my @primes = grep { .is-prime }, 1 .. *;
Expand All @@ -228,6 +230,8 @@ throws-like 「class A114672 {}; class B114672 is A114672 { has $!x = 5; 」
'no segfault';

subtest 'using a null string to access a hash does not segfault' => {
# Purpose of the test is to check that despite having a race
# condition we don't get a SEGV. Other failures are acceptable.
my $code = Q:to/CODE_END/;
class HasNativeStr { has str $.attr }
my %h;
Expand Down

0 comments on commit 5b53f95

Please sign in to comment.