summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorH.Merijn Brand <h.m.brand@xs4all.nl>2004-11-05 13:07:16 +0000
committerH.Merijn Brand <h.m.brand@xs4all.nl>2004-11-05 13:07:16 +0000
commit80b2a6875ff4c6d50022d6618abf6aa340ea38d3 (patch)
tree13fc1a68ce805217c27209ce0f42811b0f8349e5 /ext
parentf265d4dfe284890d5302420b249c71f5ed34f66a (diff)
downloadperl-80b2a6875ff4c6d50022d6618abf6aa340ea38d3.tar.gz
Skip failing thread/wait tests on HP-UX 10.20
These will never ever be fixed, since 10.20 is obsolete perl583delta describes this. The quote is included in wait.t p4raw-id: //depot/perl@23474
Diffstat (limited to 'ext')
-rw-r--r--ext/threads/shared/t/wait.t60
1 files changed, 42 insertions, 18 deletions
diff --git a/ext/threads/shared/t/wait.t b/ext/threads/shared/t/wait.t
index d1b7c0ae99..451af2a789 100644
--- a/ext/threads/shared/t/wait.t
+++ b/ext/threads/shared/t/wait.t
@@ -29,6 +29,16 @@ sub ok {
print "${not}ok " . ($Base + $offset) . " - $text\n";
}
+# The two skips later on in these tests refer to this quote from the
+# pod/perl583delta.pod:
+#
+# =head1 Platform Specific Problems
+#
+# The regression test ext/threads/shared/t/wait.t fails on early RedHat 9
+# and HP-UX 10.20 due to bugs in their threading implementations.
+# RedHat users should see https://rhn.redhat.com/errata/RHBA-2003-136.html
+# and consider upgrading their glibc.
+
sub forko (&$$); # To prevent deadlock from underlying pthread_* bugs (as in
# stock RH9 glibc/NPTL) or from our own errors, we run tests
# in separately forked and alarmed processes.
@@ -195,16 +205,23 @@ SYNC_SHARED: {
sub ctw_fail {
my $to = shift;
- $test =~ /twain/ ? lock($lock) : lock($cond);
- ok(1,1, "$test: obtained initial lock");
- my $ok;
- for ($test) {
- $ok=cond_timedwait($cond, time() + $to), last if /simple/;
- $ok=cond_timedwait($cond, time() + $to, $cond), last if /repeat/;
- $ok=cond_timedwait($cond, time() + $to, $lock), last if /twain/;
- die "$test: unknown test\n";
+ if ($^O eq "hpux" && $Config{osvers} <= 10.20) {
+ # The lock obtaining would pass, but the wait will not.
+ ok(1,1, "$test: obtained initial lock");
+ ok(2,0, "# SKIP see perl583delta");
+ }
+ else {
+ $test =~ /twain/ ? lock($lock) : lock($cond);
+ ok(1,1, "$test: obtained initial lock");
+ my $ok;
+ for ($test) {
+ $ok=cond_timedwait($cond, time() + $to), last if /simple/;
+ $ok=cond_timedwait($cond, time() + $to, $cond), last if /repeat/;
+ $ok=cond_timedwait($cond, time() + $to, $lock), last if /twain/;
+ die "$test: unknown test\n";
+ }
+ ok(2,!defined($ok), "$test: timeout");
}
- ok(2,!defined($ok), "$test: timeout");
}
} # -- SYNCH_SHARED block
@@ -322,16 +339,23 @@ SYNCH_REFS: {
sub ctw_fail2 {
my $to = shift;
- $test =~ /twain/ ? lock($lock) : lock($cond);
- ok(1,1, "$test: obtained initial lock");
- my $ok;
- for ($test) {
- $ok=cond_timedwait($cond, time() + $to), last if /simple/;
- $ok=cond_timedwait($cond, time() + $to, $cond), last if /repeat/;
- $ok=cond_timedwait($cond, time() + $to, $lock), last if /twain/;
- die "$test: unknown test\n";
+ if ($^O eq "hpux" && $Config{osvers} <= 10.20) {
+ # The lock obtaining would pass, but the wait will not.
+ ok(1,1, "$test: obtained initial lock");
+ ok(2,0, "# SKIP see perl583delta");
+ }
+ else {
+ $test =~ /twain/ ? lock($lock) : lock($cond);
+ ok(1,1, "$test: obtained initial lock");
+ my $ok;
+ for ($test) {
+ $ok=cond_timedwait($cond, time() + $to), last if /simple/;
+ $ok=cond_timedwait($cond, time() + $to, $cond), last if /repeat/;
+ $ok=cond_timedwait($cond, time() + $to, $lock), last if /twain/;
+ die "$test: unknown test\n";
+ }
+ ok(2,!$ok, "$test: timeout");
}
- ok(2,!$ok, "$test: timeout");
}
} # -- SYNCH_REFS block