diff options
author | Karl Williamson <khw@cpan.org> | 2020-12-10 08:58:53 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-12-12 08:37:02 -0700 |
commit | f976811211b19d3e1f072386ee414913ba94287f (patch) | |
tree | 9b7c42fd5ab1d9cd6c69aab9c3bfced46bd5bb00 /dist | |
parent | a83cff23716a9cfd29d7aa4f1bee292d6c3eec48 (diff) | |
download | perl-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.t | 6 |
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); } |