From efc3f2309e1c87c67700350f7df8da508cd307cd Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 26 May 2026 11:40:15 +0200 Subject: [PATCH] GHA: fix locale tests on macOS, extend to verify test 1981 - fix macOS locale tests to clear existing variables. (Without this, the system-defined `LC_ALL` takes precedence, and the custom envs in CI are ignored.) - trigger test 1981 issue by setting `LC_TIME` to non-English, on macOS. (On Linux it'd require explicitly installing a non-English locale, I skipped this for simplicity.) ``` [...] -Time: 01/Aug/2025 08:31:43.037103 +0000 UTC[CR][LF] +Time: 01/ao%c3%bb/2025 08:31:43.037103 +0000 UTC[CR][LF] [...] FAIL 1981: '%time output with --write-out' HTTP, HTTP GET ``` Follow-up to 90a7732d467eae7c5a59fc07c5a072970926f8c6 #21749 Follow-up to 1cc8a5235f76e744433cbf28ec98ecb972158387 #17988 Follow-up to c221c0ee5935497168c52686a9d8cc87b45bbca9 #17938 Closes #21753 --- .github/workflows/linux.yml | 4 ++-- .github/workflows/macos.yml | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 49ff43037a..9546aa2cb5 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -89,7 +89,7 @@ jobs: - name: 'libressl krb5' image: ubuntu-24.04-arm install_packages: libidn2-dev libnghttp2-dev libldap-dev libkrb5-dev - install_steps: libressl-c-arm pytest codeset-test + install_steps: libressl-c-arm pytest codeset-test1 LDFLAGS: -Wl,-rpath,/home/runner/libressl/lib configure: --with-openssl=/home/runner/libressl --with-gssapi --enable-debug @@ -953,7 +953,7 @@ jobs: TFLAGS+=' --buildinfo' # only test-ci sets this by default, set it manually for test-torture fi [ -f ~/venv/bin/activate ] && source ~/venv/bin/activate - if [[ "${MATRIX_INSTALL_STEPS}" = *'codeset-test'* ]]; then + if [[ "${MATRIX_INSTALL_STEPS}" = *'codeset-test1'* ]]; then locale || true export LC_ALL=C export LC_CTYPE=C diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index e982dc81e1..dec6e5ceed 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -347,12 +347,13 @@ jobs: - name: 'mbedTLS !ldap brotli zstd MultiSSL AppleIDN' compiler: llvm@18 install: brotli mbedtls zstd - install_steps: codeset-test + install_steps: codeset-test1 generate: -DCURL_USE_MBEDTLS=ON -DCURL_DISABLE_LDAP=ON -DCURL_DEFAULT_SSL_BACKEND=mbedtls -DCURL_USE_OPENSSL=ON -DUSE_APPLE_IDN=ON -DCURL_ENABLE_NTLM=ON - name: 'GnuTLS !ldap krb5 +examples' compiler: clang install: gnutls nettle krb5 + install_steps: codeset-test2 generate: >- -DENABLE_DEBUG=ON -DCURL_USE_GNUTLS=ON -DCURL_USE_OPENSSL=OFF -DCURL_USE_GSSAPI=ON -DGSS_ROOT_DIR=/opt/homebrew/opt/krb5 @@ -560,11 +561,20 @@ jobs: TFLAGS+=' --buildinfo' # only test-ci sets this by default, set it manually for test-torture fi source ~/venv/bin/activate - if [[ "${MATRIX_INSTALL_STEPS}" = *'codeset-test'* ]]; then + if [[ "${MATRIX_INSTALL_STEPS}" = *'codeset-test1'* ]]; then locale || true - export LC_ALL=C + unset LANG + unset LC_ALL + unset LC_COLLATE + unset LC_MESSAGES + unset LC_MONETARY + unset LC_TIME export LC_CTYPE=C export LC_NUMERIC=fr_FR.UTF-8 + elif [[ "${MATRIX_INSTALL_STEPS}" = *'codeset-test2'* ]]; then + locale || true + unset LC_ALL + export LC_TIME=fr_FR fi rm -f ~/.curlrc if [ "${MATRIX_BUILD}" = 'cmake' ]; then