Re: [PATCH 4/5] tests/test-elf_cntl_gelf_getshdr.c: Close fd unconditionally

2025-02-07 Thread Mark Wielaard
Hi Aaron, On Tue, Feb 04, 2025 at 05:00:21PM -0500, Aaron Merey wrote: > On Mon, Feb 3, 2025 at 8:36 AM Mark Wielaard wrote: > > So I don't think close should be called unconditionally. Maybe the > > correct solution is to do if (!close_fd) close (fd); after elf_end? > > Thanks for the clarific

Re: [PATCH 4/5] tests/test-elf_cntl_gelf_getshdr.c: Close fd unconditionally

2025-02-04 Thread Aaron Merey
Hi Mark, On Mon, Feb 3, 2025 at 8:36 AM Mark Wielaard wrote: > > I think this subtly changes what is being tested here. If I remember > correctly this tests that gelf_getshdr works correctly even when the > underlying fd is closed and the file is either mmapped or elf_cntl > with ELF_C_FDREAD is

Re: [PATCH 4/5] tests/test-elf_cntl_gelf_getshdr.c: Close fd unconditionally

2025-02-03 Thread Mark Wielaard
Hi Aaron, On Thu, Jan 30, 2025 at 09:35:53PM -0500, Aaron Merey wrote: > test-elf_cntl_gelf_getshdr conditionally closes a file descriptor > depending on a command line argument. This causes an error when run > under valgrind --track-fds=yes. > > Fix this by unconditionally closing the fd. I thi

[PATCH 4/5] tests/test-elf_cntl_gelf_getshdr.c: Close fd unconditionally

2025-01-30 Thread Aaron Merey
test-elf_cntl_gelf_getshdr conditionally closes a file descriptor depending on a command line argument. This causes an error when run under valgrind --track-fds=yes. Fix this by unconditionally closing the fd. Signed-off-by: Aaron Merey --- tests/test-elf_cntl_gelf_getshdr.c | 20 +-