From: Patrick Steinhardt <ps@pks.im>
To: git@vger.kernel.org
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
Eric Sunshine <sunshine@sunshineco.com>
Subject: [PATCH v2 0/2] t: work around bugs in Dash v0.5.13
Date: Thu, 02 Apr 2026 08:51:17 +0200 [thread overview]
Message-ID: <20260402-pks-tests-with-dash-v2-0-cd7ab11dabc0@pks.im> (raw)
In-Reply-To: <20260401-pks-tests-with-dash-v1-0-d70b5040aa5d@pks.im>
Hi,
while testing my `set -e` change for our test suite I was also playing
around with Dash v0.5.13.1 and noticed that multiple of our tests fail
with that version. As it turns out, some of these test failures are
actual bugs in Dash itself that have been introduced in v0.5.13.
There's ultimately two bugs:
- Dash inserts CTLMBCHAR byte sequences into heredocs around multibyte
characters. This bug still exists with the current "master" branch
of Dash.
- Dash may swallow some bytes when reading data, which has already
been fixed.
I've Cc'd Herbert, maintainer of Dash.
Changes in v2:
- Add comment to heredocs explaining why they should never be quoted.
- Link to v1: https://patch.msgid.link/20260401-pks-tests-with-dash-v1-0-d70b5040aa5d@pks.im
Thanks!
Patrick
---
Patrick Steinhardt (2):
t: work around multibyte bug in quoted heredocs with Dash v0.5.13
t9300: work around partial read bug in Dash v0.5.13
t/t0300-credentials.sh | 4 +++-
t/t3430-rebase-merges.sh | 6 ++++--
t/t3902-quoted.sh | 16 +++++++++-------
t/t4014-format-patch.sh | 16 ++++++++++++----
t/t4201-shortlog.sh | 4 +++-
t/t9001-send-email.sh | 12 +++++++++---
t/t9300-fast-import.sh | 32 ++++++++++++++------------------
7 files changed, 54 insertions(+), 36 deletions(-)
Range-diff versus v1:
1: 192b5b4330 ! 1: 5367e05e0f t: work around multibyte bug in quoted heredocs with Dash v0.5.13
@@ t/t0300-credentials.sh: test_expect_success 'match percent-encoded values' '
test_config credential.https://example.com.useHttpPath true &&
test_config credential.https://example.com/perú.git.helper "$HELPER" &&
- check fill <<-\EOF
++ # NOTE: do not quote this heredoc, Dash 0.5.13 has a bug with heredocs
++ # that contain multibyte chars.
+ check fill <<-EOF
url=https://example.com/per%C3%BA.git
--
@@ t/t3430-rebase-merges.sh: test_expect_success 'octopus merges' '
test "Hank" = "$(git show -s --format=%an HEAD)" &&
test "$before" != $(git rev-parse HEAD) &&
- test_cmp_graph HEAD^^.. <<-\EOF
++ # NOTE: do not quote this heredoc, Dash 0.5.13 has a bug with heredocs
++ # that contain multibyte chars.
+ test_cmp_graph HEAD^^.. <<-EOF
*-. Tüntenfüsch
- |\ \
@@ t/t3902-quoted.sh: With SP in it
EOF
-cat >expect.raw <<\EOF
++# NOTE: do not quote this heredoc, Dash 0.5.13 has a bug with heredocs
++# that contain multibyte chars.
+cat >expect.raw <<EOF
Name
-"Name and a\nLF"
@@ t/t4014-format-patch.sh: test_expect_success 'format-patch wraps extremely long
'
-cat >expect <<'EOF'
++# NOTE: do not quote this heredoc, Dash 0.5.13 has a bug with heredocs
++# that contain multibyte chars.
+cat >expect <<EOF
From: Foö Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar
Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo
@@ t/t4014-format-patch.sh: test_expect_success 'format-patch wraps extremely long
'
-cat >expect <<'EOF'
++# NOTE: do not quote this heredoc, Dash 0.5.13 has a bug with heredocs
++# that contain multibyte chars.
+cat >expect <<EOF
Subject: [PATCH] Foö
EOF
@@ t/t4014-format-patch.sh: test_expect_success 'subject lines are unencoded with -
'
-cat >expect <<'EOF'
++# NOTE: do not quote this heredoc, Dash 0.5.13 has a bug with heredocs
++# that contain multibyte chars.
+cat >expect <<EOF
Subject: [PATCH] Foö
EOF
@@ t/t4014-format-patch.sh: test_expect_success 'in-body headers trigger content en
test_when_finished "git reset --hard HEAD^" &&
git format-patch -1 --stdout --from >patch &&
- cat >expect <<-\EOF &&
++ # NOTE: do not quote this heredoc, Dash 0.5.13 has a bug with heredocs
++ # that contain multibyte chars.
+ cat >expect <<-EOF &&
From: C O Mitter <committer@example.com>
Content-Type: text/plain; charset=UTF-8
@@ t/t4201-shortlog.sh: test_expect_success 'output from user-defined format is re-
test_expect_success !MINGW,ICONV 'shortlog wrapping' '
- cat >expect <<\EOF &&
++ # NOTE: do not quote this heredoc, Dash 0.5.13 has a bug with heredocs
++ # that contain multibyte chars.
+ cat >expect <<EOF &&
A U Thor (5):
Test
@@ t/t9001-send-email.sh: test_expect_success $PREREQ 'To headers from files reset
test_expect_success $PREREQ 'setup expect' '
-cat >email-using-8bit <<\EOF
++# NOTE: do not quote this heredoc, Dash 0.5.13 has a bug with heredocs
++# that contain multibyte chars.
+cat >email-using-8bit <<EOF
From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001
Message-ID: <bogus-message-id@example.com>
@@ t/t9001-send-email.sh: test_expect_success $PREREQ '--8bit-encoding overrides se
test_expect_success $PREREQ 'setup expect' '
- cat >email-using-8bit <<-\EOF
++ # NOTE: do not quote this heredoc, Dash 0.5.13 has a bug with heredocs
++ # that contain multibyte chars.
+ cat >email-using-8bit <<-EOF
From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001
Message-ID: <bogus-message-id@example.com>
@@ t/t9001-send-email.sh: test_expect_success $PREREQ '--8bit-encoding also treats
test_expect_success $PREREQ 'setup expect' '
- cat >email-using-8bit <<-\EOF
++ # NOTE: do not quote this heredoc, Dash 0.5.13 has a bug with heredocs
++ # that contain multibyte chars.
+ cat >email-using-8bit <<-EOF
From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001
Message-ID: <bogus-message-id@example.com>
2: db99459b3f = 2: 364d37fcc7 t9300: work around partial read bug in Dash v0.5.13
---
base-commit: 270e10ad6dda3379ea0da7efd11e4fbf2cd7a325
change-id: 20260401-pks-tests-with-dash-ea71cbb36958
next prev parent reply other threads:[~2026-04-02 6:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 10:42 [PATCH 0/2] t: work around bugs in Dash v0.5.13 Patrick Steinhardt
2026-04-01 10:42 ` [PATCH 1/2] t: work around multibyte bug in quoted heredocs with " Patrick Steinhardt
2026-04-01 16:21 ` Eric Sunshine
2026-04-02 5:44 ` Patrick Steinhardt
2026-04-01 10:42 ` [PATCH 2/2] t9300: work around partial read bug in " Patrick Steinhardt
2026-04-02 6:51 ` Patrick Steinhardt [this message]
2026-04-02 6:51 ` [PATCH v2 1/2] t: work around multibyte bug in quoted heredocs with " Patrick Steinhardt
2026-05-07 5:57 ` [PATCH] parser: Fix multi-byte output in here-doc with quoted delimiter Herbert Xu
2026-05-07 7:37 ` Herbert Xu
2026-04-02 6:51 ` [PATCH v2 2/2] t9300: work around partial read bug in Dash v0.5.13 Patrick Steinhardt
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=20260402-pks-tests-with-dash-v2-0-cd7ab11dabc0@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=sunshine@sunshineco.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