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

Re: [PATCH 1/9] t/: new helper for tests that pass with ort but fail with recursive

From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
Date
Oct 25, 2020, 13:49 UTC
Message-ID
<20201025134905.GB15823@danh.dev>
In-Reply-To
<CABPp-BHgJrQMNEm7-y7nStVjcAedsNKH+bHNM9V34netTN+NTQ@mail.gmail.com>
On 2020-10-24 09:53:18-0700, Elijah Newren <newren@gmail.com> wrote:
Show 35 quoted lines
> On Sat, Oct 24, 2020 at 3:49 AM Đoàn Trần Công Danh
> <congdanhqx@gmail.com> wrote:
> >
> > On 2020-10-23 16:01:16+0000, Elijah Newren via GitGitGadget <gitgitgadget@gmail.com> wrote:
> > > +test_expect_merge_algorithm () {
> > > +     status_for_recursive=$1
> > > +     shift
> > > +     status_for_ort=$1
> > > +     shift
> > > +
> > > +     if test "$GIT_TEST_MERGE_ALGORITHM" = ort
> > > +     then
> > > +             test_expect_${status_for_ort} "$@"
> > > +     else
> > > +             test_expect_${status_for_recursive} "$@"
> > > -test_expect_failure 'check symlink modify/modify' '
> > > +test_expect_merge_algorithm failure success 'check symlink modify/modify' '
> >
> > I find this series of "failure success" hard to decode without
> > understanding what it would be, then I need to keep rememberring which
> > status is corresponding with with algorithm.
> >
> > Perhaps this patch is a bit easier to read. This is largely based on
> > your patch. (I haven't read other patches, yet).
> >
> > What do you think?
> 
> It is easier to read and I think something along these lines would
> make a lot of sense if this weren't a transient change (the idea is to
> eventually drop the recursive backend in favor of ort, and then these
> can all switch to just using test_expect_success).  Maybe it still
> makes sense to make further changes here anyway, but if we do go this
> route, there are 1-2 things we can/should change:
> 
> First, while a lot of my contributions aren't that important, and the
Mine aren't that important, either
Show 5 quoted lines
> new test_expect_* function certainly falls in that category, one of
> the driving goals behind a new merge algorithm was fixing up edge and
> corner cases that were just too problematic in the recursive backend.
> Thus, the patch where I get to flip the test expectation is one that I
> care about more than most out of the (I'm guessing on this number)
Make sense.
Show 5 quoted lines
> 100+ patches that will be part of this new merge algorithm.  Having
> you take over ownership of that patch thus isn't right; we should
> instead keep my original patch and apply your suggested changes on top
> (or have a patch from you introducing a new function first, and then
> have a patch from me using it to flip test expectations on top).
You can take back the ownership, the patch was based on yours, anyway.

I wrote like that since I need to rewrite part of the message to match with my changes ;)

No need to generate extra noise of additional patch.
Show 6 quoted lines
> Second, I think that lines like
>     test_expect_merge_success recursive=failure ...
> read like a contradiction and are also confusing.  I think it'd be
> better if it read something like
>     test_expect_merge recursive=failure ort=success ...
> or something along those lines.
When I wrote the patch, I was expecting something like
	test_expect_merge_success recursive=failure,other=failure ...
in order to merge all algorithm into single parameters.
How about something like:
	test_expect_merge_success exception=recursive,other ...
Not that we have "other" algorithm to begin with.

Thanks, -- Danh

Previous: Elijah NewrenNext: Elijah Newren
Message 11 of 31 in “Support both merge backends in the testsuite, via environment variable”
  1. 0/9 Support both merge backends in the testsuite, via environment variableElijah Newren via GitGitGadget, Oct 23, 2020
  2. 2/9 merge tests: expect improved directory/file conflict handling in ortElijah Newren via GitGitGadget, Oct 23, 2020
  3. Elijah NewrenOct 23, 2020
  4. 3/9 t6416: correct expectation for rename/rename(1to2) + directory/fileElijah Newren via GitGitGadget, Oct 23, 2020
  5. 1/9 t/: new helper for tests that pass with ort but fail with recursiveElijah Newren via GitGitGadget, Oct 23, 2020
  6. Junio C HamanoOct 23, 2020
  7. Elijah NewrenOct 23, 2020
  8. Elijah NewrenOct 23, 2020
  9. Đoàn Trần Công DanhOct 24, 2020
  10. Elijah NewrenOct 24, 2020
  11. Đoàn Trần Công DanhOct 25, 2020
  12. Elijah NewrenOct 26, 2020
  13. Junio C HamanoOct 26, 2020
  14. 4/9 t6404, t6423: expect improved rename/delete handling in ort backendElijah Newren via GitGitGadget, Oct 23, 2020
  15. 5/9 t6423: expect improved conflict markers labels in the ort backendElijah Newren via GitGitGadget, Oct 23, 2020
  16. 6/9 merge tests: expect slight differences in output for recursive vs. ortElijah Newren via GitGitGadget, Oct 23, 2020
  17. Elijah NewrenOct 24, 2020
  18. 9/9 t6423: add more details about direct resolution of directoriesElijah Newren via GitGitGadget, Oct 23, 2020
  19. Elijah NewrenOct 23, 2020
  20. 7/9 t6423, t6436: note improved ort handling with dirty filesElijah Newren via GitGitGadget, Oct 23, 2020
  21. 8/9 t6423: note improved ort handling with untracked filesElijah Newren via GitGitGadget, Oct 23, 2020
  22. 0/9 Support both merge backends in the testsuite, via environment variableElijah Newren via GitGitGadget, Oct 26, 2020
  23. 7/9 t6423, t6436: note improved ort handling with dirty filesElijah Newren via GitGitGadget, Oct 26, 2020
  24. 9/9 t6423: add more details about direct resolution of directoriesElijah Newren via GitGitGadget, Oct 26, 2020
  25. 8/9 t6423: note improved ort handling with untracked filesElijah Newren via GitGitGadget, Oct 26, 2020
  26. 6/9 merge tests: expect slight differences in output for recursive vs. ortElijah Newren via GitGitGadget, Oct 26, 2020
  27. 5/9 t6423: expect improved conflict markers labels in the ort backendElijah Newren via GitGitGadget, Oct 26, 2020
  28. 4/9 t6404, t6423: expect improved rename/delete handling in ort backendElijah Newren via GitGitGadget, Oct 26, 2020
  29. 2/9 merge tests: expect improved directory/file conflict handling in ortElijah Newren via GitGitGadget, Oct 26, 2020
  30. 1/9 t/: new helper for tests that pass with ort but fail with recursiveElijah Newren via GitGitGadget, Oct 26, 2020
  31. 3/9 t6416: correct expectation for rename/rename(1to2) + directory/fileElijah Newren via GitGitGadget, Oct 26, 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.