Re: [PATCH] getusershell: Add tests.

2024-05-17 Thread Collin Funk
On 5/17/24 6:45 AM, Bruno Haible wrote: >> It also looks like musl will return empty lines (getline () with >> length 1), which I believe is incorrect from the FreeBSD man page >> description. > > So, once you have a musl libc VM yourself, you are ready for reporting > your first musl libc bug. The

Re: [PATCH] getusershell: Add tests.

2024-05-17 Thread Bruno Haible
Hi Collin, > I remember you saying a few days ago saying that "every function is > worth testing", so here is more evidence. :) :-) > It appears that musl doesn't check for comments which explains that > failure [2]. > > It also looks like musl will return empty lines (getline () with > length

Re: [PATCH] getusershell: Add tests.

2024-05-17 Thread Collin Funk
Hi Bruno, On 5/17/24 5:59 AM, Bruno Haible wrote: > The test fails on Alpine Linux. > > > FAIL: test-getusershell > === > > ../../gltests/test-getusershell.c:53: assertion 'ptr[0] != '#'' failed > Aborted (core dumped) > FAIL test-getusershell (exit status: 134) Hahaha, I a

Re: [PATCH] getusershell: Add tests.

2024-05-17 Thread Bruno Haible
Hi Collin, > + getusershell: Add tests. > + * modules/getusershell-tests: New file. > + * tests/test-getusershell.c: New file. The test fails on Alpine Linux. FAIL: test-getusershell === ../../gltests/test-getusershell.c:53: assertion 'ptr[0] != '#'' failed Abor

Re: [PATCH] getusershell: Add tests.

2024-05-15 Thread Bruno Haible
Hi Collin, > Should all glibc functions have a signature check? For these ones I > was conflicted on adding them since they are not standardized, but > provided on BSD and glibc. If Gnulib is not the only implementation, then yes it is advisable to have the signature check. For example, if on so

Re: [PATCH] getusershell: Add tests.

2024-05-15 Thread Collin Funk
Hi Bruno, On 5/15/24 3:06 AM, Bruno Haible wrote: > I'm adding a signature test. (So far, we have a signature test for these > functions only in C++ mode, in tests/test-unistd-c++.cc.) Thanks! I would have added them if I saw them there. Should all glibc functions have a signature check? For the

Re: [PATCH] getusershell: Add tests.

2024-05-15 Thread Bruno Haible
Thanks. I'm adding a signature test. (So far, we have a signature test for these functions only in C++ mode, in tests/test-unistd-c++.cc.) 2024-05-15 Bruno Haible getusershell tests: Verify the function declarations. * tests/test-getusershell.c: Include signature.h. (

[PATCH] getusershell: Add tests.

2024-05-15 Thread Collin Funk
* modules/getusershell-tests: New file. * tests/test-getusershell.c: New file. --- ChangeLog | 6 +++ modules/getusershell-tests | 12 + tests/test-getusershell.c | 96 ++ 3 files changed, 114 insertions(+) create mode 100644 modules/getu