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

Re: t2400 on freebsd12

From
Jacob Abel <jacobabel@nullpo.dev>
Date
Jul 14, 2023, 19:45 UTC
Message-ID
<zznttv6pkjwtaoboiiz7z77of5pq7vtwk4gm7hkurkbbcnouq3@3c2yhx2tr5yw>
In-Reply-To
<CAPig+cRMXJkrEgyVtC0u2QK=5QNnJOQnXBU_rE+JiGufEYH9sg@mail.gmail.com>
On 23/07/14 12:19PM, Eric Sunshine wrote:
Show 31 quoted lines
> On Fri, Jul 14, 2023 at 2:30 AM Jacob Abel <jacobabel@nullpo.dev> wrote:
> > On 23/07/13 01:27PM, Junio C Hamano wrote:
> > > "D. Ben Knoble" <ben.knoble@gmail.com> writes:
> > > >> t2400-worktree-add.sh                            (Wstat: 256 Tests:
> > > >> 227 Failed: 27)
> > > >>   Failed tests:  50-52, 91-93, 107-109, 123-125, 139-141
> > > >>                 159-161, 175-177, 191-193, 207-209
> >>
> > > I do not offhand know how well the FreeBSD port has been maintained,
> > > or those who have (or had once in the past) stake in it are keeping
> > > an eye on it.  Anybody?
> >
> > I wrote these tests[1]. All the tests that are failing are:
> >
> > - running `git worktree add` without `--orphan` or `--quiet`.
> > - running in a repo with 1 local branch with a valid commit.
> > - running in a worktree with an invalid/unborn HEAD.
> >
> > 1. https://lore.kernel.org/git/20230517214711.12467-1-jacobabel@nullpo.dev/
> 
> I haven't been following this thread closely, but I wonder if the
> `grep` introduced by patch [3/8] of the cited patch series is
> problematic:
> 
>     grep -E "fatal:( options)? .* cannot be used together" actual
> 
> since BSD lineage regexp (including macOS) historically did not
> support the "?" repetition operator. Perhaps an easy fix would be to
> simplify this to:
> 
>     grep "cannot be used together" actual

The only tests that use the `?` operator are tests 32-38 which use `test_wt_add_excl()`. Those tests all seem to be consistently passing.

I probably should have mentioned in my original post the exact lines that were causing the error. Line numbers mentioned below are from the current head of the master branch (830b4a04c4, 'the tenth batch')

Tests 50-52 are the `test_wt_add_orphan_hint()` tests on lines 428-430 of t2400 (the fn is defined right above them). These were introduced in patch 6/8 [1].

The rest of the tests correspond to the `test_dwim_orphan('warn_bad_head', ...)` tests on lines 1039-1041 and likewise that function is defined directly above those lines. These were introduced in patch 8/8 [2] however the bulk of the test code was introduced in the previous patch (7/8) [3].

Of particular note out of the details I gave in my previous post is that these tests all cause the command to emit the bad HEAD warning. I bring this up because in that warning code (patch 8/8 [2]) there is path string manipulation and a file read (both of which could be stepping on some platform dependent behavior).

1. https://lore.kernel.org/git/20230517214711.12467-7-jacobabel@nullpo.dev/
2. https://lore.kernel.org/git/20230517214711.12467-9-jacobabel@nullpo.dev/
3. https://lore.kernel.org/git/20230517214711.12467-8-jacobabel@nullpo.dev/
Previous: Eric SunshineNext: Junio C Hamano
Message 8 of 11 in “t2400 on freebsd12”
  1. D. Ben KnobleJul 6, 2023
  2. D. Ben KnobleJul 13, 2023
  3. Junio C HamanoJul 13, 2023
  4. Eric SunshineJul 13, 2023
  5. D. Ben KnobleJul 13, 2023
  6. Jacob AbelJul 14, 2023
  7. Eric SunshineJul 14, 2023
  8. Jacob AbelJul 14, 2023
  9. Junio C HamanoJul 14, 2023
  10. Jacob AbelJul 15, 2023
  11. Eric SunshineJul 16, 2023

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.