* Re: [PATCH] t/eml.t: ignore newer Email::MIME behavior
2021-12-30 19:17 14% ` [PATCH] t/eml.t: ignore newer Email::MIME behavior Eric Wong
@ 2022-01-02 14:14 8% ` Uwe Kleine-König
0 siblings, 0 replies; 2+ results
From: Uwe Kleine-König @ 2022-01-02 14:14 UTC (permalink / raw)
To: Eric Wong; +Cc: Lucas Nussbaum, 1002219, meta, Debian Perl Group
[-- Attachment #1.1: Type: text/plain, Size: 2491 bytes --]
Hello Eric,
On 12/30/21 20:17, Eric Wong wrote:
> Uwe Kleine-König <uwe@kleine-koenig.org> wrote:
>> Hello,
>>
>> adding the Debian Perl Group to Cc, maybe they can help here.
>> (for context look at https://bugs.debian.org/1002219)
>>
>> On 12/30/21 10:12, Uwe Kleine-König wrote:
>>> I got a bug report against the public-inbox 1.6.1 package about a
>>> failing test, see below for the whole output. I didn't have time yet to
>>> look into it, so this is just a heads up to make you aware. If someone
>>> has a hint what to do, this would be greatly appreciated. Maybe just
>>> updating to 1.7 will help?
>>>
>>> Best regards
>>> Uwe
>>>
>>> On 12/21/21 17:34, Lucas Nussbaum wrote:
>>>>> # Failed test 'filename decoded'
>>>>> # at t/eml.t line 407.
>>>>> # got: '=?utf-8?q?vtpm-makefile.patch?='
>>>>> # expected: 'vtpm-makefile.patch'
>>>>> # Looks like you failed 1 test of 146.
>>>>> t/eml.t ......................
>>
>> I can reproduce this problem with 1.6.1 checked out. I played a bit around
>> (suffering from my weak perl foo) and found that when I downgrade
>> libemail-mime-perl from 1.952-1 (i.e. Debian unstable's version) to 1.949-1
>> (i.e. Debian stable's version), this works.
>>
>> The reproducer is:
>>
>> $ perl -e 'use Email::MIME; print Email::MIME->new("Content-Type:
>> text/x-patch; name=\"=?utf-8?q?vtpm-fakefile.patch?=\"\nContent-Disposition:
>> attachment; filename=\"=?utf-8?q?vtpm-makefile.patch?=\"\n\n")->filename;'
>>
>> which emits "vtpm-makefile.patch" with 1.949-1 (as public-inbox expects),.
>> but =?utf-8?q?vtpm-makefile.patch?= with 1.952-1.
>>
>> So the key question is: Is the test correct and his is a regression in
>> libemail-mime-perl, or is the test wrong and we need to fix the test (and
>> PublicInbox::Eml)?
>
> I thought I sent a fix to this; but I nuked the root FS on one of
> my workstations on accident :< Still recovering...
Oh, good luck in restoring your precious data.
Thanks for your patch. I just uploaded public-inbox with this change to
fix the bug.
I still wonder if this is a regression in Email::MIME, or just a wrong
expectation. In the first case I'd open a bug against libemail-mime-perl.
Bisecting in https://github.com/rjbs/Email-MIME.git yields
https://github.com/rjbs/Email-MIME/commit/8a7cffd2b1091ff1a750d541a85e1813a6747b72
as breaking commit. So this looks like an intended change.
Best regards
Uwe
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [relevance 8%]
* [PATCH] t/eml.t: ignore newer Email::MIME behavior
@ 2021-12-30 19:17 14% ` Eric Wong
2022-01-02 14:14 8% ` Uwe Kleine-König
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-12-30 19:17 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: Lucas Nussbaum, 1002219, meta, Debian Perl Group
Uwe Kleine-König <uwe@kleine-koenig.org> wrote:
> Hello,
>
> adding the Debian Perl Group to Cc, maybe they can help here.
> (for context look at https://bugs.debian.org/1002219)
>
> On 12/30/21 10:12, Uwe Kleine-König wrote:
> > I got a bug report against the public-inbox 1.6.1 package about a
> > failing test, see below for the whole output. I didn't have time yet to
> > look into it, so this is just a heads up to make you aware. If someone
> > has a hint what to do, this would be greatly appreciated. Maybe just
> > updating to 1.7 will help?
> >
> > Best regards
> > Uwe
> >
> > On 12/21/21 17:34, Lucas Nussbaum wrote:
> > > > # Failed test 'filename decoded'
> > > > # at t/eml.t line 407.
> > > > # got: '=?utf-8?q?vtpm-makefile.patch?='
> > > > # expected: 'vtpm-makefile.patch'
> > > > # Looks like you failed 1 test of 146.
> > > > t/eml.t ......................
>
> I can reproduce this problem with 1.6.1 checked out. I played a bit around
> (suffering from my weak perl foo) and found that when I downgrade
> libemail-mime-perl from 1.952-1 (i.e. Debian unstable's version) to 1.949-1
> (i.e. Debian stable's version), this works.
>
> The reproducer is:
>
> $ perl -e 'use Email::MIME; print Email::MIME->new("Content-Type:
> text/x-patch; name=\"=?utf-8?q?vtpm-fakefile.patch?=\"\nContent-Disposition:
> attachment; filename=\"=?utf-8?q?vtpm-makefile.patch?=\"\n\n")->filename;'
>
> which emits "vtpm-makefile.patch" with 1.949-1 (as public-inbox expects),
> but =?utf-8?q?vtpm-makefile.patch?= with 1.952-1.
>
> So the key question is: Is the test correct and his is a regression in
> libemail-mime-perl, or is the test wrong and we need to fix the test (and
> PublicInbox::Eml)?
I thought I sent a fix to this; but I nuked the root FS on one of
my workstations on accident :< Still recovering...
--------------8<-------------
Subject: [PATCH] t/eml.t: ignore newer Email::MIME behavior
Once again, our message parser class matches the more tolerant
behavior of older Email::MIME releases in order to handle
ancient messages.
This fixes <https://bugs.debian.org/1002219>, but dropping
Email::MIME entirely from the test suite may be prudent in
the future.
---
t/eml.t | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/t/eml.t b/t/eml.t
index 2d8993a5..2e6a441f 100644
--- a/t/eml.t
+++ b/t/eml.t
@@ -417,13 +417,14 @@ Content-Type: text/x-patch; name="=?utf-8?q?vtpm-fakefile.patch?="
Content-Disposition: attachment; filename="=?utf-8?q?vtpm-makefile.patch?="
EOF
- is($cls->new($s)->filename, 'vtpm-makefile.patch', 'filename decoded');
+ is($cls->new($s)->filename, 'vtpm-makefile.patch',
+ "filename decoded ($cls)") if $cls ne 'PublicInbox::MIME';
$s =~ s/^Content-Disposition:.*$//sm;
is($cls->new($s)->filename, 'vtpm-fakefile.patch',
"filename fallback ($cls)") if $cls ne 'PublicInbox::MIME';
is($cls->new($s)->content_type,
'text/x-patch; name="vtpm-fakefile.patch"',
- 'matches Email::MIME output, "correct" or not');
+ qq[matches Email::MIME output, "correct" or not ($cls)]);
$s = <<'EOF';
Content-Type: multipart/foo; boundary=b
^ permalink raw reply related [relevance 14%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
[not found] <YcICMPpA2SE5k5ZL@xanadu.blop.info>
2021-12-30 9:12 ` Bug#1002219: public-inbox: FTBFS: dh_auto_test: error: make -j4 test TEST_VERBOSE=1 returned exit code 2 Uwe Kleine-König
2021-12-30 18:49 ` Uwe Kleine-König
2021-12-30 19:17 14% ` [PATCH] t/eml.t: ignore newer Email::MIME behavior Eric Wong
2022-01-02 14:14 8% ` Uwe Kleine-König
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.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).