windows: test non-verbose builds, fix fallouts

- schannel: fix mixed-up declaration. (originally fenced infof for
  verbose, then changed to failf with the fence kept, then fence
  removed and variable marked as verbose, when in fact it's not, but
  not tested and caught in CI.
- fix two other fallouts.
- GHA/windows: disable verbose strings in a mingw job.
- appveyor: disable verbose strings in an MSVC job.
- appveyor: add way to pass any CMake option per-job.

Cherry-picked from #20387
Follow-up to 61093e2a81 #20353

Closes #20388
This commit is contained in:
Viktor Szakats 2026-01-21 13:55:32 +01:00
parent 61093e2a81
commit 59e3b693f7
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
6 changed files with 10 additions and 6 deletions

View file

@ -436,7 +436,7 @@ jobs:
env: 'x86_64' env: 'x86_64'
ver: '9.5.0' ver: '9.5.0'
url: 'https://github.com/brechtsanders/winlibs_mingw/releases/download/9.5.0-10.0.0-msvcrt-r1/winlibs-x86_64-posix-seh-gcc-9.5.0-mingw-w64msvcrt-10.0.0-r1.7z' url: 'https://github.com/brechtsanders/winlibs_mingw/releases/download/9.5.0-10.0.0-msvcrt-r1/winlibs-x86_64-posix-seh-gcc-9.5.0-mingw-w64msvcrt-10.0.0-r1.7z'
config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=OFF' config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=OFF -DCURL_DISABLE_VERBOSE_STRINGS=ON'
type: 'Release' type: 'Release'
tflags: 'skiprun' tflags: 'skiprun'
- name: 'schannel mbedtls U' # mingw-w64 6.0 - name: 'schannel mbedtls U' # mingw-w64 6.0

View file

@ -89,6 +89,7 @@ if [ "${BUILD_SYSTEM}" = 'CMake' ]; then
-DCURL_USE_SCHANNEL="${SCHANNEL}" \ -DCURL_USE_SCHANNEL="${SCHANNEL}" \
-DCURL_USE_OPENSSL="${OPENSSL}" \ -DCURL_USE_OPENSSL="${OPENSSL}" \
-DCURL_USE_LIBPSL=OFF \ -DCURL_USE_LIBPSL=OFF \
${CMAKE_OPTIONS:-} \
${options} \ ${options} \
|| { cat "${root}"/_bld/CMakeFiles/CMake* 2>/dev/null; false; } || { cat "${root}"/_bld/CMakeFiles/CMake* 2>/dev/null; false; }
[ "${APPVEYOR_BUILD_WORKER_IMAGE}" = 'Visual Studio 2013' ] && cd .. [ "${APPVEYOR_BUILD_WORKER_IMAGE}" = 'Visual Studio 2013' ] && cd ..

View file

@ -41,6 +41,7 @@ environment:
HTTP_ONLY: 'OFF' HTTP_ONLY: 'OFF'
TFLAGS: 'skiprun' TFLAGS: 'skiprun'
EXAMPLES: 'OFF' EXAMPLES: 'OFF'
CMAKE_OPTIONS: ''
matrix: matrix:
@ -53,7 +54,7 @@ environment:
PRJ_CFG: Release PRJ_CFG: Release
OPENSSL: 'ON' OPENSSL: 'ON'
SHARED: 'ON' SHARED: 'ON'
- job_name: 'CM VS2022, Release, arm64, Schannel, Static, no-DEBUGBUILD, Build-tests' - job_name: 'CM VS2022, Release, arm64, Schannel, Static, !DEBUGBUILD, Build-tests'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022' APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
PRJ_GEN: 'Visual Studio 17 2022' PRJ_GEN: 'Visual Studio 17 2022'
TARGET: '-A ARM64' TARGET: '-A ARM64'
@ -101,7 +102,7 @@ environment:
SCHANNEL: 'ON' SCHANNEL: 'ON'
SHARED: 'ON' SHARED: 'ON'
TFLAGS: 'skipall' TFLAGS: 'skipall'
- job_name: 'CM VS2019, Debug, x64, OpenSSL 3.0 + Schannel, Shared, Build-tests' - job_name: 'CM VS2019, Debug, x64, OpenSSL 3.0 + Schannel, Shared, !verbose, Build-tests'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2019' APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2019'
PRJ_GEN: 'Visual Studio 16 2019' PRJ_GEN: 'Visual Studio 16 2019'
TARGET: '-A x64' TARGET: '-A x64'
@ -109,6 +110,7 @@ environment:
OPENSSL: 'ON' OPENSSL: 'ON'
SCHANNEL: 'ON' SCHANNEL: 'ON'
SHARED: 'ON' SHARED: 'ON'
CMAKE_OPTIONS: '-DCURL_DISABLE_VERBOSE_STRINGS=ON'
- job_name: 'CM VS2022, Debug, x64, OpenSSL 3.5 + Schannel, Static, Unicode, Build-tests & examples, clang-cl' - job_name: 'CM VS2022, Debug, x64, OpenSSL 3.5 + Schannel, Static, Unicode, Build-tests & examples, clang-cl'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022' APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
PRJ_GEN: 'Visual Studio 17 2022' PRJ_GEN: 'Visual Studio 17 2022'
@ -119,7 +121,7 @@ environment:
ENABLE_UNICODE: 'ON' ENABLE_UNICODE: 'ON'
EXAMPLES: 'ON' EXAMPLES: 'ON'
TOOLSET: 'ClangCl' TOOLSET: 'ClangCl'
- job_name: 'CM VS2022, Release, x64, Schannel, Shared, Unicode, no-DEBUGBUILD, Build-tests' - job_name: 'CM VS2022, Release, x64, Schannel, Shared, Unicode, !DEBUGBUILD, Build-tests'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022' APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
PRJ_GEN: 'Visual Studio 17 2022' PRJ_GEN: 'Visual Studio 17 2022'
TARGET: '-A x64' TARGET: '-A x64'

View file

@ -614,7 +614,7 @@ static int mqtt_decode_len(size_t *lenp, unsigned char *buf, size_t buflen)
return 0; return 0;
} }
#ifdef DEBUGBUILD #if defined(DEBUGBUILD) && defined(CURLVERBOSE)
static const char *statenames[] = { static const char *statenames[] = {
"MQTT_FIRST", "MQTT_FIRST",
"MQTT_REMAINING_LENGTH", "MQTT_REMAINING_LENGTH",

View file

@ -160,6 +160,7 @@ static void mstate(struct Curl_easy *data, CURLMstate state
return; return;
#ifdef DEBUGBUILD #ifdef DEBUGBUILD
NOVERBOSE((void)lineno);
CURL_TRC_M(data, "-> [%s] (line %d)", CURL_MSTATE_NAME(state), lineno); CURL_TRC_M(data, "-> [%s] (line %d)", CURL_MSTATE_NAME(state), lineno);
#else #else
CURL_TRC_M(data, "-> [%s]", CURL_MSTATE_NAME(state)); CURL_TRC_M(data, "-> [%s]", CURL_MSTATE_NAME(state));

View file

@ -2259,7 +2259,7 @@ static CURLcode schannel_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
goto cleanup; goto cleanup;
} }
else { else {
VERBOSE(char buffer[STRERROR_LEN]); char buffer[STRERROR_LEN];
failf(data, "schannel: failed to read data from server: %s", failf(data, "schannel: failed to read data from server: %s",
Curl_sspi_strerror(sspi_status, buffer, sizeof(buffer))); Curl_sspi_strerror(sspi_status, buffer, sizeof(buffer)));
result = CURLE_RECV_ERROR; result = CURLE_RECV_ERROR;