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

Re: [RFC PATCH v2] t4210: detect REG_ILLSEQ dynamically

From
Eric Sunshine <sunshine@sunshineco.com>
Date
May 13, 2020, 20:40 UTC
Message-ID
<CAPig+cTeUh6MP4LLvgx1BEr7csWG_o+1H_RZS=Curx4pGLSAcA@mail.gmail.com>
In-Reply-To
<20200513180213.45866-1-carenas@gmail.com>

On Wed, May 13, 2020 at 2:02 PM Carlo Marcelo Arenas Belón <carenas@gmail.com> wrote:

Show 5 quoted lines
> [...]
> The description of the first test which wasn't accurate has been corrected,
> and unlike the original fix from 7187c7bbb8, all added entries to test-lib
> are no longer needed and only the 2 affected engines will have their tests
> suppressed.

I see this paragraph was updated in response to my question about why those additional test-lib.sh variable assignments were being dropped by the patch. However, this explanation gives no actual detail about why those assignments are unneeded, thus their removal is just as much of a head-scratcher as was v1 in which the commit message did not talk about them at all.

Show 12 quoted lines
> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
> ---
> @@ -41,16 +41,21 @@ int cmd__regex(int argc, const char **argv)
> +       ret = regcomp(&r, pat, flags);
> +       if (ret) {
> +               if (!silent) {
> +                       regerror(ret, &r, errbuf, sizeof(errbuf));
> +                       die("failed regcomp() for pattern '%s' (%s)",
> +                               pat, errbuf);
> +               } else
> +                       return 1;
> +       }

This is pure nit, and I wouldn't necessarily want to see a re-roll just for this, but you could lose an indentation level and make the code a bit easier to grok by structuring it like this:

    if (ret) {
        if (silent)
            return 1;
        regerror(...);
        die(...);
    }
Previous: Carlo Marcelo Arenas BelónNext: Junio C Hamano
Message 8 of 17 in “t4210: detect REG_ILLSEQ dynamically”
  1. t4210: detect REG_ILLSEQ dynamicallyCarlo Marcelo Arenas Belón, May 13, 2020
  2. Eric SunshineMay 13, 2020
  3. Junio C HamanoMay 13, 2020
  4. Carlo Marcelo Arenas BelónMay 13, 2020
  5. Junio C HamanoMay 13, 2020
  6. Carlo Marcelo Arenas BelónMay 13, 2020
  7. t4210: detect REG_ILLSEQ dynamicallyCarlo Marcelo Arenas Belón, May 13, 2020
  8. Eric SunshineMay 13, 2020
  9. Junio C HamanoMay 15, 2020
  10. Carlo Marcelo Arenas BelónMay 15, 2020
  11. t4210: detect REG_ILLSEQ dynamicallyCarlo Marcelo Arenas Belón, May 15, 2020
  12. Junio C HamanoMay 15, 2020
  13. Junio C HamanoMay 15, 2020
  14. 0/2 auto detect REG_ILLSEQCarlo Marcelo Arenas Belón, May 18, 2020
  15. 1/2 t/helper: teach test-regex to report pattern errors (like REG_ILLSEQ)Carlo Marcelo Arenas Belón, May 18, 2020
  16. Junio C HamanoMay 18, 2020
  17. 2/2 t4210: detect REG_ILLSEQ dynamically and skip affected testsCarlo Marcelo Arenas Belón, May 18, 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.