On Sun, Feb 16, 2025 at 10:30:17AM +0100, Samuel Thibault wrote: > Hello, > > Zhaoming Luo, le dim. 16 févr. 2025 15:59:41 +0800, a ecrit: > > In the test[0] of vim. I think the issue is that the sleep time is not > > long enough. Sleep for 200ms is possible to pass the test, though the > > possibility is not that high. I think sleep for 2 seconds might be a > > good option. > > Indeed, file timestamps still have 1s-granularity for now. > > > Should we just submit a patch to Debian? > > As usual, better submit usptream. There is no reason for Debian to > maintain such a patch for upstream code. > Indeed, this is about the backward compactability of vim.
Vim should use has('nanotime') to wrap it, just like [0]. The issue I have now is that Vim set has('nanotime') == 1 when it finds st_mtim.tv_nse of struct stat[1][2], and indeed we have it in glibc[3], so from the perspective of Hurd, we do support nanotime. However, our current filesystem driver ext2fs does not support the sub-second precision. Maybe we can propose adding a ./configure option to manually turn off the has('nanotime')? [0]: https://github.com/vim/vim/blob/master/src/testdir/test_filechanged.vim#L15-L18 [1]: https://github.com/vim/vim/blob/master/src/configure.ac#L3972-L3995 [2]: https://github.com/vim/vim/blob/master/src/evalfunc.c#L7030-L7035 [3]: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/mach/hurd/bits/stat.h;h=fcaa12334845e2759c4dc13cf410f39c4442b494;hb=HEAD#l60 Best, Zhaoming