Fix test failures with GNU grep 2.23
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 17 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | t8005: avoid grep on non-ASCII datat/ | +8 | 12 replies | |
| 2/2 | t9200: avoid grep on non-ASCII datat/ | +1 | 5 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] Fix test failures with GNU grep 2.23
Quoted 11 lines · Jeff King
Quoted 8 lines · John Keeping
I suspect that any grep that lacks "-a" also lacks binary file handling that will break these tests. I found a Solaris grep that doesn't support "-a" and it treats these files as text.
From that perspective, it would be better to have a central place that deals with figuring out how to get grep to work for us. Perhaps we need
test_grepto get this right. We already havetest_cmp_bin()as a thin wrapper around cmp so I don't think this is completely unprecedented.
Quoted 7 lines
I think 99% of the time we are using grep for ascii text. As evidenced by the number of test failures we see with the new grep, it is a small minority that feed binary gibberish. I'd prefer if "-a" handling didn't need to pollute anything outside of this narrow range of tests (and as with my prereq suggestion, I am even find just skipping this narrow range of tests on platforms with no "-a", though falling back to running without "-a" is fine if it works).
I went with using sed in this series because it seems to be the simplest and most compatible way to extract lines from the input. We don't need any special casing to figure out if an implementation needs "-a" or if it doesn't support that option and all the implementation I tested support the constructs used here.
John Keeping (2):
t8005: avoid grep on non-ASCII data
t9200: avoid grep on non-ASCII data
t/t8005-blame-i18n.sh | 16 ++++++++-------- t/t9200-git-cvsexportcommit.sh | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-)
Signature · 1 line
2.7.1.503.g3cfa3ac