git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC]: Test Were failing on Fedora Linux.

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 11, 2024, 03:11 UTC
Message-ID
<xmqq7c9aihvx.fsf@gitster.g>
In-Reply-To
<20241109190012.GA588841@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> I don't offhand know of a good portable way to ask the system about
> available libraries. But I guess just doing something like:
>
>   err=$(LD_PRELOAD=libc_malloc.so.0 git version 2>&1 >/dev/null)
>   if test -z "$err"
>   then
> 	...seemed to work...
>   fi
>
> would do it?

I do not necessarily view it as "asking the system about available libraries"; we are checking if we can sensibly run things with this set to LD_PRELOAD. And presumably the answer was "no" in the original report, so it is a very direct way to ensure that we are setting it to a sensible value. I like it.

The above did not work for me until I did "s/malloc/&_debug/" on the command line. At this point in the start-up sequence in the test framework, we should be able to run "git" from the PATH just fine, so it would be a good way to check if we can trigger the malloc check with the way how we expect to be able to trigger it.

Thanks.
Previous: Usman AkinyemiNext: Jeff King
Message 10 of 18 in “[RFC]: Test Were failing on Fedora Linux.”
  1. Usman AkinyemiNov 9, 2024
  2. Christian CouderNov 9, 2024
  3. Usman AkinyemiNov 9, 2024
  4. Christian CouderNov 9, 2024
  5. Andreas SchwabNov 9, 2024
  6. Usman AkinyemiNov 9, 2024
  7. Todd ZullingerNov 9, 2024
  8. Jeff KingNov 9, 2024
  9. Usman AkinyemiNov 9, 2024
  10. Junio C HamanoNov 11, 2024
  11. test-lib: check malloc debug LD_PRELOAD before usingJeff King, Nov 11, 2024
  12. Toon ClaesNov 13, 2024
  13. Jeff KingNov 14, 2024
  14. 2/1 test-lib: move malloc-debug setup after $PATH setupJeff King, Nov 14, 2024
  15. Toon ClaesNov 20, 2024
  16. Junio C HamanoNov 20, 2024
  17. Usman AkinyemiNov 9, 2024
  18. Usman AkinyemiNov 9, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.