Re: vim testsuite: Test_platform_name

2025-02-02 Thread Yuqian Yang
On 2025-02-03 15:52, Samuel Thibault wrote: Better not ask Debian maintainers. In the end it has to land to upstream, so better just take it there. Got it! :) -- Yuqian Yang

Re: vim testsuite: Test_platform_name

2025-02-02 Thread Samuel Thibault
Yuqian Yang, le lun. 03 févr. 2025 15:39:32 +0800, a ecrit: > > Ok I will send a patch to vim to exclude has('bsd') using > > defined(__GNU__), do you think adding a has() (maybe has('hurd')?) for > > Hurd > > should also be submitted with the patch? > > I think that needs to be discussed with vim

Re: vim testsuite: Test_platform_name

2025-02-02 Thread Samuel Thibault
Zhaoming Luo, le lun. 03 févr. 2025 15:12:07 +0800, a ecrit: > On Mon, Feb 03, 2025 at 07:32:42AM +0100, Samuel Thibault wrote: > > Hello, > > > > Zhaoming Luo, le lun. 03 févr. 2025 12:58:13 +0800, a ecrit: > > > So the story in short is that vim thinks it is compiled for bsd kernel. > > > You ca

Re: vim testsuite: Test_platform_name

2025-02-02 Thread Samuel Thibault
Zhaoming Luo, le lun. 03 févr. 2025 14:44:33 +0800, a ecrit: > On Mon, Feb 03, 2025 at 07:32:42AM +0100, Samuel Thibault wrote: > > Hello, > > > > Zhaoming Luo, le lun. 03 févr. 2025 12:58:13 +0800, a ecrit: > > > So the story in short is that vim thinks it is compiled for bsd kernel. > > > You ca

Re: vim testsuite: Test_platform_name

2025-02-02 Thread Yuqian Yang
Ok I will send a patch to vim to exclude has('bsd') using defined(__GNU__), do you think adding a has() (maybe has('hurd')?) for Hurd should also be submitted with the patch? I think that needs to be discussed with vim maintainer. Debian has its own package patch system. If upstream does not

Re: vim testsuite: Test_platform_name

2025-02-02 Thread Yuqian Yang
Feb 3, 2025 14:39:39 Zhaoming Luo : Ok, maybe I should try to be more patient :-). Thanks anyway. Actually you don't have to unless it's worth it. I just used to work by finding/fixing codes on large code base, so I might be a little quicker. And I am also curious about why BSD is defined her

Re: vim testsuite: Test_platform_name

2025-02-02 Thread Zhaoming Luo
On Mon, Feb 03, 2025 at 07:32:42AM +0100, Samuel Thibault wrote: > Hello, > > Zhaoming Luo, le lun. 03 févr. 2025 12:58:13 +0800, a ecrit: > > So the story in short is that vim thinks it is compiled for bsd kernel. > > You can reproduce the issue by running `:echo has('bsd')` in vim on > > Hurd. T

Re: vim testsuite: Test_platform_name

2025-02-02 Thread Zhaoming Luo
On Mon, Feb 03, 2025 at 07:39:25AM +0100, Samuel Thibault wrote: > Yuqian Yang, le lun. 03 févr. 2025 14:37:16 +0800, a ecrit: > > On 2025-02-03 14:24, Zhaoming Luo wrote: > > > Cool how to you find it? > > > > Not a very wise way. Track codes, search with grep or other tools. > > > > gcc preproc

Re: vim testsuite: Test_platform_name

2025-02-02 Thread Zhaoming Luo
On Mon, Feb 03, 2025 at 07:32:42AM +0100, Samuel Thibault wrote: > Hello, > > Zhaoming Luo, le lun. 03 févr. 2025 12:58:13 +0800, a ecrit: > > So the story in short is that vim thinks it is compiled for bsd kernel. > > You can reproduce the issue by running `:echo has('bsd')` in vim on > > Hurd. T

Re: vim testsuite: Test_platform_name

2025-02-02 Thread Samuel Thibault
Samuel Thibault, le lun. 03 févr. 2025 07:39:25 +0100, a ecrit: > Yuqian Yang, le lun. 03 févr. 2025 14:37:16 +0800, a ecrit: > > On 2025-02-03 14:24, Zhaoming Luo wrote: > > > Cool how to you find it? > > > > Not a very wise way. Track codes, search with grep or other tools. > > > > gcc preproce

Re: vim testsuite: Test_platform_name

2025-02-02 Thread Samuel Thibault
Yuqian Yang, le lun. 03 févr. 2025 14:37:16 +0800, a ecrit: > On 2025-02-03 14:24, Zhaoming Luo wrote: > > Cool how to you find it? > > Not a very wise way. Track codes, search with grep or other tools. > > gcc preprocessor can do this with gcc -E. But it does not work for > system headers. You

Re: vim testsuite: Test_platform_name

2025-02-02 Thread Zhaoming Luo
On Mon, Feb 03, 2025 at 02:37:16PM +0800, Yuqian Yang wrote: > On 2025-02-03 14:24, Zhaoming Luo wrote: > > Cool how to you find it? > > Not a very wise way. Track codes, search with grep or other tools. Ok, maybe I should try to be more patient :-). Thanks anyway. > > gcc preprocessor can do th

Re: vim testsuite: Test_platform_name

2025-02-02 Thread Yuqian Yang
On 2025-02-03 14:24, Zhaoming Luo wrote: Cool how to you find it? Not a very wise way. Track codes, search with grep or other tools. gcc preprocessor can do this with gcc -E. But it does not work for system headers. -- Yuqian Yang

Re: vim testsuite: Test_platform_name

2025-02-02 Thread Samuel Thibault
Hello, Zhaoming Luo, le lun. 03 févr. 2025 12:58:13 +0800, a ecrit: > So the story in short is that vim thinks it is compiled for bsd kernel. > You can reproduce the issue by running `:echo has('bsd')` in vim on > Hurd. The implementation of `has()` is in [2]. The `has('bsd')` is > covered by `#if

Re: vim testsuite: Test_platform_name

2025-02-02 Thread Zhaoming Luo
On Mon, Feb 03, 2025 at 02:14:14PM +0800, Yuqian Yang wrote: > On 2025-02-03 12:58, Zhaoming Luo wrote: > > > ... I haven't found a > > practical method to track where the BSD macro is defined during > > compilation. > > It is defined in `/usr/include/x86_64-gnu/bits/param.h'. > > The including

Re: vim testsuite: Test_platform_name

2025-02-02 Thread Yuqian Yang
On 2025-02-03 12:58, Zhaoming Luo wrote: ... I haven't found a practical method to track where the BSD macro is defined during compilation. It is defined in `/usr/include/x86_64-gnu/bits/param.h'. The including chain is, vim/src/evalfunc.c vim/src/os_unix.h /usr/include/x86_64-gnu/sys/param.

vim testsuite: Test_platform_name

2025-02-02 Thread Zhaoming Luo
Hi, This test failed is quite interesting. (source code [0]) Error log after running "make test_functions": ``` ... 1 FAILED: Found errors in Test_platform_name(): command line..script /home/1speaker/vim/src/testdir/runtest.vim[617]..function RunTheTest[57]..Test_platform_name line 18: Expected