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

Re: Test failures when Git is built with libpcre and grep is built without it

From
Jeff King <peff@peff.net>
Date
Jan 2, 2017, 06:53 UTC
Message-ID
<20170102065351.7ymrm77asjbghgdg@sigill.intra.peff.net>
In-Reply-To
<58688C9F.4000605@adelielinux.org>
On Sat, Dec 31, 2016 at 10:59:11PM -0600, A. Wilcox wrote:
Show 12 quoted lines
> I'm attempting to package Git for our new Linux distribution and I
> have run in to a failure on our PowerPC builder while running the test
> suite.
> 
> The PowerPC builder runs a tiny version of grep(1) that was not built
> with PCRE.  As such, grep -P returns 2 and prints:
> 
> grep: support for the -P option is not compiled into this
> - --disable-perl-regexp binary
> 
> However, our Git build *does* link against libpcre.  This causes a
> tests numbered 142 and 143 to fail in t7810-grep.sh.

If we are using "grep -P" in our test suite, it should definitely be marked with a prerequisite that is independent of the LIBPCRE one.

But I can't find any such place in our test suite. Grepping for "grep.*-P" doesn't turn up any hits, and dropping this into my PATH as "grep":

    #!/bin/sh
    case "$*" in
    *-P*|*perl-regex*)
      echo >&2 "Pretending not to understand -P"
      exit 1
    esac
    exec /bin/grep "$@"

doesn't break anything. We do call "git grep -P", of course, but that should be using the internal libpcre (once upon a time we would invoke an external grep, but that feature has been gone for years).

Can you show us the output of "./t7810-grep.sh -v -i"?
-Peff
Previous: Torsten BögershausenNext: A. Wilcox
Message 3 of 12 in “Test failures when Git is built with libpcre and grep is built without it”
  1. A. WilcoxJan 1, 2017
  2. Torsten BögershausenJan 1, 2017
  3. Jeff KingJan 2, 2017
  4. A. WilcoxJan 9, 2017
  5. Jeff KingJan 9, 2017
  6. Andreas SchwabJan 9, 2017
  7. Jeff KingJan 9, 2017
  8. A. WilcoxJan 10, 2017
  9. Szabolcs NagyJan 10, 2017
  10. Jeff KingJan 11, 2017
  11. t7810: avoid assumption about invalid regex syntaxJeff King, Jan 11, 2017
  12. Junio C HamanoJan 11, 2017

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.