From: David Bremner <david@tethera.net>
To: Tomi Ollila <tomi.ollila@iki.fi>,
Rob Browning <rlb@defaultvalue.org>,
notmuch@notmuchmail.org
Subject: Re: [PATCH 1/2] test/raw: add some messages likely to be multiples of buffer size
Date: Sun, 05 May 2019 07:49:16 -0300 [thread overview]
Message-ID: <875zqpgor7.fsf@tethera.net> (raw)
In-Reply-To: <m2pnoxp65m.fsf@guru.guru-group.fi>
Tomi Ollila <tomi.ollila@iki.fi> writes:
> On Sun, May 05 2019, Tomi Ollila wrote:
>
>> On Sat, May 04 2019, David Bremner wrote:
>>
>>>
>>> +test_python <<EOF
>>> +from email.message import EmailMessage
>>> +for pow in range(12,21):
>>
>> .......................^ space. i.e. (12, 21)
>>
>> from 4KiB to 1MiB. uh, perhaps I should have kept my fingers crossed.
>> (that said, my range would have been 10, 17 (1024 - 65536))
>
> except that...
>
> if fread(3) (and friends) used 1024 byte buffer, for 4096 byte message
> it would read full buffer 4 times (and not yet noticing EOF), and then
> next fread() would return 0 (and now flag EOF)...
I originally started from a 1024 byte message, but it was a bit messy to
mark some sizes as broken and others not. Perhaps that's not a good
reason in retrospect, since the the fact that >= 4096 is broken is
specific to some libc (and kernel?). This means that if
someome has a libc where the buffer size is bigger then 4096, this test
might return non-zero. My take away from that is that I should probably
squash these two commits into one.
d
next prev parent reply other threads:[~2019-05-05 10:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-27 21:07 [PATCH 1/1] cli/show: avoid empty write to stdout in format_part_raw Rob Browning
2019-04-28 16:29 ` v2 format_raw fix David Bremner
2019-04-28 16:29 ` [PATCH 1/2] test: notmuch show --format=raw for 4096 byte messages David Bremner
2019-05-01 19:55 ` Tomi Ollila
2019-05-01 20:12 ` David Bremner
2019-04-28 16:29 ` [PATCH 2/2] cli/show: avoid empty write to stdout in format_part_raw David Bremner
2019-05-05 0:10 ` v3 raw output of messages with size multiples of stdio buffer size David Bremner
2019-05-05 0:10 ` [PATCH 1/2] test/raw: add some messages likely to be multiples of " David Bremner
2019-05-05 9:18 ` Tomi Ollila
2019-05-05 10:06 ` Tomi Ollila
2019-05-05 10:49 ` David Bremner [this message]
2019-05-05 15:15 ` Daniel Kahn Gillmor
2019-05-05 0:10 ` [PATCH 2/2] cli/show: avoid empty write to stdout in format_part_raw David Bremner
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: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875zqpgor7.fsf@tethera.net \
--to=david@tethera.net \
--cc=notmuch@notmuchmail.org \
--cc=rlb@defaultvalue.org \
--cc=tomi.ollila@iki.fi \
/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://yhetil.org/notmuch.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).