Re: execinfo: Add tests.

2024-05-13 Thread Collin Funk
On 5/13/24 8:12 AM, Bruno Haible wrote: > For a new file that is not based on another file, it's sufficient to say > "New file." No need to go into the details of what the file contains. > The reason is that the purpose of a ChangeLog is "so that people investigating > bugs in the future will know

Re: execinfo: Add tests.

2024-05-13 Thread Bruno Haible
Hi Collin, In the ChangeLog entry: + * tests/test-execinfo.c (test_backtrace): New function. Simply test that + the symbols defined in execinfo.h can be used. + (main): Use it. For a new file that is not based on another file, it's sufficient to say "New file." No need to go in

Re: execinfo: Add tests.

2024-05-12 Thread Bruno Haible
Hi Collin, > The reasoning for printing the backtrace was so that the output can be > compared with the BSD implementation or various linker flags, etc. > Seemed like it might be helpful. Yes, of course it is helpful. Some functions have a specification that leaves a lot of room to the implementa

Re: execinfo: Add tests.

2024-05-12 Thread Collin Funk
On 5/12/24 4:39 AM, Collin Funk wrote: > I left backtrace_symbols_fd untested because I did not see too much > benefit in testing it. Its job is similar enough to backtrace_symbols > but would require thinking about module dependencies and headers for > create () and unlink (), or similar. I forgo

Re: execinfo: Add tests.

2024-05-12 Thread Collin Funk
Hi Bruno, On 5/12/24 3:43 AM, Bruno Haible wrote: > Reading through your test, I notice that when size == 0 && symbols != NULL, > the symbols pointer is not freed. So I went to look deeper. > > Reading through the documentation at > https://www.gnu.org/software/libc/manual/html_node/Backtraces.ht

Re: execinfo: Add tests.

2024-05-12 Thread Bruno Haible
Hi Collin, > I've pushed a basic test for execinfo. Since BSD needs to link to > -lexecinfo unlike glibc. Should catch any bugs that occur there or if > another system adds it as a library. Thanks. Reading through your test, I notice that when size == 0 && symbols != NULL, the symbols pointer is

execinfo: Add tests.

2024-05-11 Thread Collin Funk
20:46:12 -0700 Subject: [PATCH] execinfo: Add tests. * modules/execinfo-tests: New file. * tests/test-execinfo.c (test_backtrace): New function. Simply test that the symbols defined in execinfo.h can be used. (main): Use it. --- ChangeLog | 8 +++ modules/execinfo-tests