summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-12-10 08:58:53 -0700
committerKarl Williamson <khw@cpan.org>2020-12-12 08:37:02 -0700
commitf976811211b19d3e1f072386ee414913ba94287f (patch)
tree9b7c42fd5ab1d9cd6c69aab9c3bfced46bd5bb00 /dist
parenta83cff23716a9cfd29d7aa4f1bee292d6c3eec48 (diff)
downloadperl-f976811211b19d3e1f072386ee414913ba94287f.tar.gz
dist/threads/t/libc.t: Add timer to avoid deadlock
This test file can deadlock if there are bugs. Add a timeout to keep the test from hanging indefinitely.
Diffstat (limited to 'dist')
-rw-r--r--dist/threads/t/libc.t6
1 files changed, 6 insertions, 0 deletions
diff --git a/dist/threads/t/libc.t b/dist/threads/t/libc.t
index 4f6f6ed3ae..65958949f6 100644
--- a/dist/threads/t/libc.t
+++ b/dist/threads/t/libc.t
@@ -9,6 +9,12 @@ BEGIN {
skip_all(q/Perl not compiled with 'useithreads'/);
}
+ my $time_out_factor = $ENV{PERL_TEST_TIME_OUT_FACTOR} || 1;
+ $time_out_factor = 1 if $time_out_factor < 1;
+
+ # Guard against bugs that result in deadlock
+ watchdog(1 * 60 * $time_out_factor);
+
plan(11);
}