mirror of
https://github.com/curl/curl.git
synced 2026-04-15 01:01:41 +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
|
|
@ -51,6 +51,7 @@ BEGIN {
|
|||
use IPC::Open2;
|
||||
use Digest::MD5;
|
||||
use File::Basename;
|
||||
use Time::HiRes;
|
||||
|
||||
use directories;
|
||||
|
||||
|
|
@ -484,7 +485,7 @@ sub sendcontrol {
|
|||
|
||||
for(@a) {
|
||||
sockfilt $_;
|
||||
portable_sleep($ctrldelay);
|
||||
Time::HiRes::sleep($ctrldelay);
|
||||
}
|
||||
}
|
||||
my $log;
|
||||
|
|
@ -521,7 +522,7 @@ sub senddata {
|
|||
# pause between each byte
|
||||
for (split(//,$l)) {
|
||||
sockfiltsecondary $_;
|
||||
portable_sleep($datadelay);
|
||||
Time::HiRes::sleep($datadelay);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3292,7 +3293,7 @@ while(1) {
|
|||
logmsg("Sleep for $delay seconds\n");
|
||||
my $twentieths = $delay * 20;
|
||||
while($twentieths--) {
|
||||
portable_sleep(0.05) unless($got_exit_signal);
|
||||
Time::HiRes::sleep(0.05) unless($got_exit_signal);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue