Skip to content

Commit 04b65a3

Browse files
newrengitster
authored andcommitted
t7518: fix flaky grep invocation
t7518.1 added in commit 862e80a ("ident: handle NULL email when complaining of empty name", 2017-02-23), was trying to make sure that the test with an empty ident did not segfault and did not result in glibc quiety translating a NULL pointer into a name of "(null)". It did the latter by ensuring that a grep for "null" didn't appear in the output, but on one automatic CI run I observed the following output: fatal: empty ident name (for <runner@fv-az128-670.gcliasfzo2nullsdbrimjtbyhg.cx.internal.cloudapp.net>) not allowed Note that 'null' appears as a substring of the domain name, found within 'gcliasfzo2nullsdbrimjtbyhg'. Tighten the test by searching for "(null)" rather than "null". Signed-off-by: Elijah Newren <[email protected]> Reviewed-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 47ae905 commit 04b65a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t7518-ident-corner-cases.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ test_expect_success 'empty name and missing email' '
1313
sane_unset GIT_AUTHOR_EMAIL &&
1414
GIT_AUTHOR_NAME= &&
1515
test_must_fail git commit --allow-empty -m foo 2>err &&
16-
test_i18ngrep ! null err
16+
test_i18ngrep ! "(null)" err
1717
)
1818
'
1919

0 commit comments

Comments
 (0)