Skip to content

Commit bf99dbd

Browse files
committed
ci: find Git for Windows's CA bundle, and run test_handshake_timeout on Windows
The runner image win22/20261004.326 (Git for Windows 2.56) has no mingw64/etc/ssl/certs/ca-bundle.crt, so the openkal job on Windows failed at the cp before the program ran, on every branch. Git is asked for its http.sslcainfo, and the install searched for a ca-bundle.crt after that. The handshake deadline waits through poll_fd, which is WSAPoll under Windows Sockets; the hermetic list now runs its test there.
1 parent 3013b98 commit bf99dbd

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,26 @@ jobs:
288288
# "Platforms"), so the program is given a bundle: Git for Windows's, copied
289289
# beside it, because openkal resolves a relative name against the working
290290
# directory and names no absolute path.
291+
#
292+
# Git is asked where its bundle is, and the install searched after that,
293+
# rather than the directory named: the runner image that brought Git for
294+
# Windows 2.56 has no `mingw64/etc/ssl/certs/ca-bundle.crt`, and the job
295+
# failed there before the program ran.
291296
- name: Run above openkal
292297
run: |
293298
set -o pipefail
294-
cp "/c/Program Files/Git/mingw64/etc/ssl/certs/ca-bundle.crt" ca-bundle.crt
299+
git --version
300+
ca=$(git config --system --get http.sslcainfo || true)
301+
if [ -n "$ca" ]; then ca=$(cygpath -u "$ca"); fi
302+
if [ ! -f "$ca" ]; then
303+
ca=$(find "/c/Program Files/Git" -path '*/ssl/certs/ca-bundle.crt' -print -quit)
304+
fi
305+
if [ ! -f "$ca" ]; then
306+
echo "::error::no CA bundle in the Git for Windows install"
307+
exit 1
308+
fi
309+
echo "CA bundle: $ca"
310+
cp "$ca" ca-bundle.crt
295311
SSL_CERT_FILE=ca-bundle.crt ./smoke.exe 2>&1 | tee run.log
296312
grep -q '^cancellation: ok' run.log
297313
@@ -352,7 +368,7 @@ jobs:
352368
- name: The hermetic tests
353369
run: |
354370
set -o pipefail
355-
for t in test_framing test_tls_verify test_pool test_proxy test_cancel; do
371+
for t in test_framing test_tls_verify test_pool test_proxy test_cancel test_handshake_timeout; do
356372
mcpp test "$t" 2>&1 | tee "$t.log"
357373
grep -q "^$t \.\.\. ok" "$t.log"
358374
done

0 commit comments

Comments
 (0)