op/sigdispatch.t: skip tests on prodn releases

RT #89718 showed a couple of tests hanging on old linux kernels.
Until such time as someone can reliably probe for this, just
completely skip those tests on production releases.
This commit is contained in:
David Mitchell 2012-04-14 10:28:35 +01:00
parent 8341ee1e81
commit 8aed2c65ce

View File

@ -89,16 +89,24 @@ TODO:
is $gotit, 2, 'Received fifth signal';
# test unsafe signal handlers in combination with exceptions
my $action = POSIX::SigAction->new(sub { $gotit--, die }, POSIX::SigSet->new, 0);
POSIX::sigaction(&POSIX::SIGALRM, $action);
eval {
alarm 1;
my $set = POSIX::SigSet->new;
POSIX::sigprocmask(&POSIX::SIG_BLOCK, undef, $set);
is $set->ismember(&POSIX::SIGALRM), 0, "SIGALRM is not blocked on attempt $_";
POSIX::sigsuspend($set);
} for 1..2;
is $gotit, 0, 'Received both signals';
SKIP: {
# #89718: on old linux kernels, this test hangs. No-ones thought
# of a reliable way to probe for this, so for now, just skip the
# tests on production releases
skip("some OSes hang here", 3) if (int($]*1000) & 1) == 0;
my $action = POSIX::SigAction->new(sub { $gotit--, die }, POSIX::SigSet->new, 0);
POSIX::sigaction(&POSIX::SIGALRM, $action);
eval {
alarm 1;
my $set = POSIX::SigSet->new;
POSIX::sigprocmask(&POSIX::SIG_BLOCK, undef, $set);
is $set->ismember(&POSIX::SIGALRM), 0, "SIGALRM is not blocked on attempt $_";
POSIX::sigsuspend($set);
} for 1..2;
is $gotit, 0, 'Received both signals';
}
}
SKIP: {