From: "Kyle J. McKay" <mackyle@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git mailing list <git@vger.kernel.org>
Subject: [PATCH] [BUG] test_expect_failure mailinfo -b fatals
Date: Wed, 31 May 2017 03:26:10 -0700 [thread overview]
Message-ID: <5139b7b6aa7735aefca283afef967d7@50ef27579de002095d3bc9134128513> (raw)
This subject line:
> Subject: [other] [PATCH] message
does not get along with the git mailinfo "-b" option. In fact,
it triggers a fatal bug:
> fatal: `pos + len' is too far after the end of the buffer
While I did not do any exhaustive checking, I do happen to have
a few builds of various versions of Git lying around and it
fails at least as far back as v1.7.6. (The -b option was
introduced in v1.6.6 I believe.)
At the very least this is now a "known breakage", so might
as well have the tests for it.
If someone comes along and fixes it it's a simple matter
to flip them to test_expect_success instead.
--Kyle
P.S. Oh yes, the real patch subject is below (love those >8).
-- 8< --
Subject: [PATCH] t5100: add some more mailinfo tests
Add some more simple mailinfo tests including a few that
produce:
fatal: `pos + len' is too far after the end of the buffer
Mark those as 'test_expect_failure'.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
---
Notes:
checking known breakage:
subj="$(echo "Subject: [other] [PATCH] message" |
git mailinfo -b /dev/null /dev/null)" &&
test z"$subj" = z"Subject: [other] message"
fatal: `pos + len' is too far after the end of the buffer
not ok 46 - mailinfo -b trailing [PATCH] # TODO known breakage
checking known breakage:
subj="$(echo "Subject: [PATCH] [other] [PATCH] message" |
git mailinfo -b /dev/null /dev/null)" &&
test z"$subj" = z"Subject: [other] message"
fatal: `pos + len' is too far after the end of the buffer
not ok 47 - mailinfo -b separated double [PATCH] # TODO known breakage
t/t5100-mailinfo.sh | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/t/t5100-mailinfo.sh b/t/t5100-mailinfo.sh
index 7171f675..333395c8 100755
--- a/t/t5100-mailinfo.sh
+++ b/t/t5100-mailinfo.sh
@@ -170,5 +170,46 @@ test_expect_success 'mailinfo with mailinfo.scissors config' '
test_cmp "$DATA/info0014--scissors" info0014.sc
'
+test_expect_success 'mailinfo no options' '
+ subj="$(echo "Subject: [PATCH] [other] [PATCH] message" |
+ git mailinfo /dev/null /dev/null)" &&
+ test z"$subj" = z"Subject: message"
+'
+
+test_expect_success 'mailinfo -k' '
+ subj="$(echo "Subject: [PATCH] [other] [PATCH] message" |
+ git mailinfo -k /dev/null /dev/null)" &&
+ test z"$subj" = z"Subject: [PATCH] [other] [PATCH] message"
+'
+
+test_expect_success 'mailinfo -b no [PATCH]' '
+ subj="$(echo "Subject: [other] message" |
+ git mailinfo -b /dev/null /dev/null)" &&
+ test z"$subj" = z"Subject: [other] message"
+'
+
+test_expect_success 'mailinfo -b leading [PATCH]' '
+ subj="$(echo "Subject: [PATCH] [other] message" |
+ git mailinfo -b /dev/null /dev/null)" &&
+ test z"$subj" = z"Subject: [other] message"
+'
+
+test_expect_success 'mailinfo -b double [PATCH]' '
+ subj="$(echo "Subject: [PATCH] [PATCH] message" |
+ git mailinfo -b /dev/null /dev/null)" &&
+ test z"$subj" = z"Subject: message"
+'
+
+test_expect_failure 'mailinfo -b trailing [PATCH]' '
+ subj="$(echo "Subject: [other] [PATCH] message" |
+ git mailinfo -b /dev/null /dev/null)" &&
+ test z"$subj" = z"Subject: [other] message"
+'
+
+test_expect_failure 'mailinfo -b separated double [PATCH]' '
+ subj="$(echo "Subject: [PATCH] [other] [PATCH] message" |
+ git mailinfo -b /dev/null /dev/null)" &&
+ test z"$subj" = z"Subject: [other] message"
+'
test_done
---
reply other threads:[~2017-05-31 10:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5139b7b6aa7735aefca283afef967d7@50ef27579de002095d3bc9134128513 \
--to=mackyle@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).