[vim/vim] tests: Fix Test_glob_symlinks() in Windows UCRT (PR #18962)

3 views
Skip to first unread message

MURAOKA Taro

unread,
Dec 18, 2025, 10:10:04 AM (14 hours ago) Dec 18
to vim/vim, Subscribed

Problem: tests: Test_glob_symlinks() fails with UCRT on Windows.

For Test_glob_symlinks() to succeed, vim_stat() (which is actually mswin_stat_impl()) must fail on broken symlinks. However, in this case, the UCRT's _wstat() is used, and it succeeds on the broken symlinks. As a result, Test_glob_symlinks() fails.

Solution: Don't use UCRT's _wstat()

Note: The current Windows CI uses MSVCRT, which does not address this issue. To use UCRT, we need to install Windows Kits 10 or later if you are using MSVC. Also, in an MSYS2 environment, we need to set MSYSTEM=UCRT64.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/18962

Commit Summary

  • 2e854ce tests: Fix Test_glob_symlinks() in Windows UCRT

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18962@github.com>

Christian Brabandt

unread,
Dec 18, 2025, 2:56:30 PM (9 hours ago) Dec 18
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18962)

Ähm, shouldn't we skip the test when UCRT is defined? It seems wrong to remove _stat() just because it is able to handle broken symlinks.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18962/c3671996711@github.com>

MURAOKA Taro

unread,
Dec 18, 2025, 7:57:50 PM (4 hours ago) Dec 18
to vim/vim, Subscribed
koron left a comment (vim/vim#18962)

shouldn't we skip the test when UCRT is defined? It seems wrong to remove _stat() just because it is able to handle broken symlinks.

I don't think so.
Because, the remaining code in mswin_stat_impl() that directly uses the Win32API works correctly not only in MSVCRT but also in UCRT.

It would be better to add UCRT tests to CI matrix.
I'll try adding UCRT to the CI matrix later.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18962/c3672960413@github.com>

Reply all
Reply to author
Forward
0 new messages