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

Re: [PATCH] Make some commit hashes in tests reproducible

From
Han-Wen Nienhuys <hanwen@google.com>
Date
Jul 8, 2020, 05:06 UTC
Message-ID
<CAFQ2z_PzBeubuhzPDJHG1VYbKhgLMaVdY1JMCfw1x8jOar10Wg@mail.gmail.com>
In-Reply-To
<xmqqfta33y0m.fsf@gitster.c.googlers.com>
On Tue, Jul 7, 2020 at 9:50 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
>
> "Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> > From: Han-Wen Nienhuys <hanwen@google.com>
> >
> > Adds test_tick to t5801-remote-helpers.sh and t3203-branch-output.sh
>
> That can be read from the patch.  Also the subject tells us a half
> of what you want to achieve with this change (by the way, your
> subject is malformatted and lacks the <area>: prefix; perhaps
> "[PATCH] tests: make commit object names reproducible" or something),
> but the readers are left hanging without knowing what motivated the
> change.  Do any test pieces in these scripts change their behaviour
> based on what exact object names are assigned to them, making them
> flaky and hard to test, and if so which one and in what way?

You're right, I forgot to provide a piece of the puzzle. These tests have been failing either legitimately or flakily with reftable.

I built a GIT_DEBUG_REFS functionality, which dumps ref backend interactions onto stderr. This should be reworked to use the tracing functionality, but you can look at the patch in my reftable series.

When a test fails with reftable, the easiest way to debug is running it both with and without GIT_DEBUG_REFS=1, and running a diff on the output.

This needs the commit SHA1s to be deterministic, or the SHA1s will generate spurious diffs.

I agree with Jeff, that a more structural approach to making sha1s deterministic would be preferable.

-- 
Han-Wen Nienhuys - Google Munich
I work 80%. Don't expect answers from me on Fridays.
--
Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Previous: Jeff King
Message 8 of 8 in “Make some commit hashes in tests reproducible”
  1. Make some commit hashes in tests reproducibleHan-Wen Nienhuys via GitGitGadget, Jul 7, 2020
  2. Junio C HamanoJul 7, 2020
  3. Jeff KingJul 7, 2020
  4. Junio C HamanoJul 7, 2020
  5. Jeff KingJul 7, 2020
  6. Junio C HamanoJul 7, 2020
  7. Jeff KingJul 7, 2020
  8. Han-Wen NienhuysJul 8, 2020

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.