]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests: pass config filename to stunnel in native format (Windows)
authorViktor Szakats <commit@vsz.me>
Fri, 23 Jan 2026 15:23:57 +0000 (16:23 +0100)
committerViktor Szakats <commit@vsz.me>
Fri, 23 Jan 2026 15:51:47 +0000 (16:51 +0100)
Fixing (Seen when enabling stunnel for Cygwin in CI):
```
=== Start of file https_stunnel.log
 [ ] Initializing inetd mode configuration
 [ ] Running on Windows 6.2
[...]
 [.] Reading configuration from file /cygdrive/d/a/curl/curl/bld/tests/log/6/server/https_stunnel.conf
 [!] Cannot open configuration file
```
Ref: https://github.com/curl/curl/actions/runs/21289677523/job/61279662459?pr=20410

Cherry-picked from #20410
Closes #20413

tests/secureserver.pl

index 0e34bf1d7c5d3e6dcc339c0f5b86f6a1cd88dac5..8471e144e7e56f0bbfc39f4bcf1677752b4e36ea 100755 (executable)
@@ -284,12 +284,19 @@ if($stunnel_version < 400) {
 #
 if($stunnel_version >= 400) {
     $socketopt = "a:SO_REUSEADDR=1";
-    if(($stunnel_version >= 534) && $tstunnel_windows) {
-        # SO_EXCLUSIVEADDRUSE is on by default on Vista or newer,
-        # but does not work together with SO_REUSEADDR being on.
-        $socketopt .= "\nsocket = a:SO_EXCLUSIVEADDRUSE=0";
+    my $conffile_cmdline;
+    if($tstunnel_windows) {
+        if($stunnel_version >= 534) {
+            # SO_EXCLUSIVEADDRUSE is on by default on Vista or newer,
+            # but does not work together with SO_REUSEADDR being on.
+            $socketopt .= "\nsocket = a:SO_EXCLUSIVEADDRUSE=0";
+        }
+        $conffile_cmdline = pathhelp::sys_native_abs_path($conffile);
+    }
+    else {
+        $conffile_cmdline = $conffile;
     }
-    $cmd  = "\"$stunnel\" $conffile ";
+    $cmd  = "\"$stunnel\" $conffile_cmdline ";
     $cmd .= ">$logfile 2>&1";
     # setup signal handler
     $SIG{INT} = \&exit_signal_handler;