[PATCH 4/5] tests/test-elf_cntl_gelf_getshdr.c: Close fd unconditionally
Mark Wielaard
mark@klomp.org
Fri Feb 7 20:01:13 GMT 2025
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 <mark@klomp.org> 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 clarification. I think you're right about simply
> including `if (!close_fd) close (fd)` at the end. The test still
> passes for me with that change.
>
> I've dropped this patch and instead included the `if (!close_fd)...`
> change in patch 5/5 "tests: Avoid leaking file descriptors". Are you
> ok with me pushing the series with this change or would you prefer I
> repost the series?
I am fine with the series with the above change. But please commit
them in opposite order. So that --track-fds=yes is only enabled at the
end after all issues have been fixed. That way make check keeps
working between all patches even with --enable-valgrind.
Thanks,
Mark
More information about the Elfutils-devel
mailing list