From: Patrick Steinhardt Date: Fri, 20 Feb 2026 08:25:58 GMT Subject: [PATCH v4 0/5] Fix tests with missing iconv(1) executable Message-ID: <20260220-b4-pks-ci-msvc-iconv-fixes-v4-0-e0e6bbcaeb5b@pks.im> In-Reply-To: <20260209-b4-pks-ci-msvc-iconv-fixes-v1-0-1e3167cd8828@pks.im> Hi, I recently noticed that the MSVC-based tests in GitLab CI started to fail. The root cause is that the iconv(1) executable cannot be found on this platform anymore. This isn't entirely surprising: we depend on the Git for Windows environment to provide necessary shell tools, and that environment of course is not a fully fledged MSYS2 installation. In any case, this patch series fixes those issues by building on top of the ICONV prerequisite. If the prereq isn't found, then we also don't assume that the iconv(1) executable exists. An alternative strategy would be to introduce a new ICONV_EXECUTABLE prereq. But given that Git doesn't perform any kind of reencoding itself in case the ICONV support isn't built into it I found it to not be worth the additional hassle. In any case, this patch series causes the MSVC jobs to pass again on GitLab CI. Changes in v4: - Use `test_grep !` instead of `! test_grep`. - Another commit message typo fix. - Link to v3: https://lore.kernel.org/r/20260218-b4-pks-ci-msvc-iconv-fixes-v3-0-08c1ff3ffc9a@pks.im Changes in v3: - Split out the changes for the ICONV prerequisite into a standalone commit. - Link to v2: https://lore.kernel.org/r/20260217-b4-pks-ci-msvc-iconv-fixes-v2-0-25491bc8dbf8@pks.im Changes in v2: - Extend the ICONV prerequisite to cover the new semantics and add a NEEDSWORK comment. - Mention the upstream issue in Git for Windows. - Link to v1: https://lore.kernel.org/r/20260209-b4-pks-ci-msvc-iconv-fixes-v1-0-1e3167cd8828@pks.im Thanks! Patrick --- Patrick Steinhardt (5): t: don't set ICONV prereq when iconv(1) is missing t40xx: don't use iconv(1) without ICONV prereq t4205: improve handling of ICONV prerequisite t5550: add ICONV prereq to tests that use "$HTTPD_URL/error" t6006: don't use iconv(1) without ICONV prereq t/t4041-diff-submodule-option.sh | 8 +++-- t/t4059-diff-submodule-not-initialized.sh | 8 +++-- t/t4060-diff-submodule-option-diff-format.sh | 8 +++-- t/t4205-log-pretty-formats.sh | 50 ++++++++++++++++------------ t/t5550-http-fetch-dumb.sh | 20 +++++------ t/t6006-rev-list-format.sh | 29 +++++++++++----- t/test-lib.sh | 12 ++++++- 7 files changed, 88 insertions(+), 47 deletions(-) Range-diff versus v3: 1: 3cfc78f873 = 1: ac36dae86b t: don't set ICONV prereq when iconv(1) is missing 2: 768d0c8de1 = 2: 4b461caa9b t40xx: don't use iconv(1) without ICONV prereq 3: b552d77cf4 = 3: ad9278cab4 t4205: improve handling of ICONV prerequisite 4: 7f35641968 ! 4: 863488c534 t5550: add ICONV prereq to tests that use "$HTTPD_URL/error" @@ Commit message t5550: add ICONV prereq to tests that use "$HTTPD_URL/error" We've got a bunch of tests in t5550 that connect to "$HTTPD_URL/error" - to ensure that error messages are proprely forwarded. This URL executes + to ensure that error messages are properly forwarded. This URL executes the "t/lib-httpd/error.sh" script, which in turn depends on the iconv(1) executable to reencode the message. @@ t/t5550-http-fetch-dumb.sh: test_expect_success 'fetch can handle previously-fet test_expect_success 'did not use upload-pack service' ' - ! grep "/git-upload-pack" "$HTTPD_ROOT_PATH/access.log" -+ ! test_grep "/git-upload-pack" "$HTTPD_ROOT_PATH/access.log" ++ test_grep ! "/git-upload-pack" "$HTTPD_ROOT_PATH/access.log" ' -test_expect_success 'git client shows text/plain errors' ' @@ t/t5550-http-fetch-dumb.sh: test_expect_success 'fetch can handle previously-fet +test_expect_success ICONV 'git client does not show html errors' ' test_must_fail git clone "$HTTPD_URL/error/html" 2>stderr && - ! grep "this is the error message" stderr -+ ! test_grep "this is the error message" stderr ++ test_grep ! "this is the error message" stderr ' -test_expect_success 'git client shows text/plain with a charset' ' @@ t/t5550-http-fetch-dumb.sh: ja;q=0.95, zh;q=0.94, sv;q=0.93, pt;q=0.92, nb;q=0.9 test_expect_success 'git client send an empty Accept-Language' ' GIT_TRACE_CURL=true LANGUAGE= git ls-remote "$HTTPD_URL/dumb/repo.git" 2>stderr && - ! grep "^=> Send header: Accept-Language:" stderr -+ ! test_grep "^=> Send header: Accept-Language:" stderr ++ test_grep ! "^=> Send header: Accept-Language:" stderr ' test_expect_success 'remote-http complains cleanly about malformed urls' ' 5: c8e69ff135 = 5: 58533d4b58 t6006: don't use iconv(1) without ICONV prereq --- base-commit: 3e0db84c88c57e70ac8be8c196dfa92c5d656fbc change-id: 20260209-b4-pks-ci-msvc-iconv-fixes-13de4801643f