mirror of
https://github.com/curl/curl.git
synced 2026-07-24 09:37:25 +03:00
runtests: assume Time::HiRes, drop Perl Win32 dependency
`Time::HiRes` was already used unconditionally before this patch in
`servers.pm`. This package, and functions used by runtests (`sleep` and
`gettimeofday`) are supported by the minimum Perl version required for
curl:
https://perldoc.perl.org/5.8.0/Time::HiRes
- Drop the `portable_sleep()` wrapper in favor of `Time::HiRes::sleep()`.
- Use `Time::HiRes` unconditionally in `serverhelp.pm`.
- Stop using the `Win32` package where available. It was included
to provide a Windows fallback for `Time::HiRes::sleep()`. It was never
actually called, but the dependency may have loaded `Win32.dll`, which
often appears in failed fork operations in GHA logs.
Ref: a6fed41f6f #5054 #5034
Ref: https://github.com/curl/curl/discussions/14854
Closes #18287
This commit is contained in:
parent
c24d4be057
commit
be01b60ce5
6 changed files with 18 additions and 68 deletions
|
|
@ -39,6 +39,7 @@ use warnings;
|
|||
use 5.006;
|
||||
|
||||
use File::Basename;
|
||||
use Time::HiRes;
|
||||
|
||||
BEGIN {
|
||||
use base qw(Exporter);
|
||||
|
|
@ -84,9 +85,6 @@ use Storable qw(
|
|||
use pathhelp qw(
|
||||
exe_ext
|
||||
);
|
||||
use processhelp qw(
|
||||
portable_sleep
|
||||
);
|
||||
use servers qw(
|
||||
checkcmd
|
||||
initserverconfig
|
||||
|
|
@ -419,7 +417,7 @@ sub waitlockunlock {
|
|||
my $lockretry = $serverlogslocktimeout * 20;
|
||||
my @locks;
|
||||
while((@locks = logslocked()) && $lockretry--) {
|
||||
portable_sleep(0.05);
|
||||
Time::HiRes::sleep(0.05);
|
||||
}
|
||||
if(($lockretry < 0) &&
|
||||
($serverlogslocktimeout >= $defserverlogslocktimeout)) {
|
||||
|
|
@ -1092,7 +1090,7 @@ sub singletest_clean {
|
|||
}
|
||||
}
|
||||
|
||||
portable_sleep($postcommanddelay) if($postcommanddelay);
|
||||
Time::HiRes::sleep($postcommanddelay) if($postcommanddelay);
|
||||
|
||||
my @killtestservers = getpart("client", "killserver");
|
||||
if(@killtestservers) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue