From: Junio C Hamano <gitster@pobox.com>
To: "Martin Ågren" <martin.agren@gmail.com>
Cc: "Randall S. Becker" <rsbecker@nexbridge.com>,
Denton Liu <liu.denton@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH] t3200: don't grep for `strerror()` string
Date: Sat, 18 Jul 2020 10:59:00 -0700 [thread overview]
Message-ID: <xmqqtuy4bt7f.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20200718094840.31269-1-martin.agren@gmail.com> ("Martin Ågren"'s message of "Sat, 18 Jul 2020 11:48:40 +0200")
Martin Ågren <martin.agren@gmail.com> writes:
> In 6b7093064a ("t3200: test for specific errors", 2020-06-15), we
> learned to grep stderr to ensure that the failing `git branch`
> invocations fail for the right reason. In two of these tests, we grep
> for "File exists", expecting the string to show up there since config.c
> calls `error_errno()`, which ends up including `strerror(errno)` in the
> error message.
>
> But as we saw in 4605a73073 ("t1091: don't grep for `strerror()`
> string", 2020-03-08), there exists at least one implementation where
> `strerror()` yields a slightly different string than the one we're
> grepping for. In particular, these tests fail on the NonStop platform.
>
> Similar to 4605a73073, grep for the beginning of the string instead to
> avoid relying on `strerror()` behavior.
>
> Reported-by: Randall S. Becker <rsbecker@nexbridge.com>
> Signed-off-by: Martin Ågren <martin.agren@gmail.com>
> ---
Yup, that looks like a good description and a fix to check only the
parts of the message we write, ignoring what the system library may
add.
> Hi Randall,
>
> Does this fix the test for you?
>
> Martin
Hopefully it would ;-)
next prev parent reply other threads:[~2020-07-18 17:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-17 20:24 [ANNOUNCE] Git v2.28.0-rc1 Junio C Hamano
2020-07-17 21:21 ` Randall S. Becker
2020-07-18 9:48 ` [PATCH] t3200: don't grep for `strerror()` string Martin Ågren
2020-07-18 17:59 ` Junio C Hamano [this message]
2020-07-18 20:07 ` Martin Ågren
2020-07-19 17:09 ` Randall S. Becker
2020-07-19 17:23 ` Randall S. Becker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqtuy4bt7f.fsf@gitster.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=liu.denton@gmail.com \
--cc=martin.agren@gmail.com \
--cc=rsbecker@nexbridge.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).