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

Re: [PATCH] test-lib: try harder to ensure a working jgit

From
Todd Zullinger <tmz@pobox.com>
Date
May 15, 2019, 01:18 UTC
Message-ID
<20190515011851.GP3654@pobox.com>
In-Reply-To
<87o945wj7w.fsf@evledraar.gmail.com>
Hi,
Ævar Arnfjörð Bjarmason wrote:
Show 27 quoted lines
> 
> On Tue, May 14 2019, Jonathan Nieder wrote:
> 
>> Todd Zullinger wrote:
>>
>>> The JGIT prereq uses 'type jgit' to determine whether jgit is present.
>>> While this should be sufficient, if the jgit found is broken we'll waste
>>> time running tests which fail due to no fault of our own.
>>>
>>> Use 'jgit --version' instead, to catch some badly broken jgit
>>> installations.
>>>
>>> Signed-off-by: Todd Zullinger <tmz@pobox.com>
>>> ---
>>> I ran into such a broken jgit on Fedora >= 30¹.  This is clearly a
>>> problem in the Fedora jgit package which will hopefully be resolved
>>> soon.  But it may be good to avoid wasting time debugging tests which
>>> fail due to a broken tool outside of our control.
>>>
>>> ¹ https://bugzilla.redhat.com/1709624
>>
>> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
>>
>> It would be nice to describe that bug in the commit message, to save
>> readers some head scratching.
> 
> FWIW the jgit in Debian testing/unstable is similarly broken right now:
[...]
Hah, small world. :)
Show 8 quoted lines
> So rather than describe specific bugs on RedHat/Debian maybe just say:
> 
>     This guards against cases where jgit is present on the system, but
>     will fail to run, e.g. because of some JRE issue, or missing Java
>     dependencies. Seeing if it gets far enough to process the
>     "--version" argument isn't perfect, but seems to be good enough in
>     practice. It's also consistent with how we detect some other
>     dependencies, see e.g. the CURL and UNZIP prerequisites.

Well said. I indeed avoided putting the detail into the commit message because it was such a Fedora-specific bug. I'll update the commit message to add more details though, borrowing liberally from^W^W^Wperhaps stealing your suggested wording.

Thanks!
-- 
Todd
Previous: Ævar Arnfjörð BjarmasonNext: Junio C Hamano
Message 9 of 11 in “test-lib: try harder to ensure a working jgit”
  1. test-lib: try harder to ensure a working jgitTodd Zullinger, May 14, 2019
  2. brian m. carlsonMay 14, 2019
  3. Jeff KingMay 14, 2019
  4. Junio C HamanoMay 15, 2019
  5. Todd ZullingerMay 15, 2019
  6. brian m. carlsonMay 15, 2019
  7. Jonathan NiederMay 14, 2019
  8. Ævar Arnfjörð BjarmasonMay 14, 2019
  9. Todd ZullingerMay 15, 2019
  10. Junio C HamanoMay 15, 2019
  11. test-lib: try harder to ensure a working jgitTodd Zullinger, May 15, 2019

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.