From: Ethan Glasser-Camp <ethan.glasser.camp@gmail.com>
To: david@tethera.net, notmuch@notmuchmail.org
Subject: Re: random corpus generator, v3
Date: Sat, 20 Oct 2012 00:16:32 -0400 [thread overview]
Message-ID: <871ugt7p7j.fsf@betacantrips.com> (raw)
In-Reply-To: <1345382314-5330-1-git-send-email-david@tethera.net>
david@tethera.net writes:
> This obsoletes the series at:
>
> id:"1344888831-4301-1-git-send-email-bremner@debian.org"
>
> Changes since v2:
>
> - clean up new test-binaries and objects
>
> - remove the "set -o pipefail" leftover from debugging. Possibly this
> makes sense as a global setting, but in a seperate patch.
>
> - add hex-escape to test/basic
>
> - rebase against updated master.
Hi! This looks pretty good to me and I am for improving the test
infrastructure.
Some minor problems:
- Patch 2 doesn't apply; neither do patches 4 or 5, presumably due to changes
that weren't made due to patch 2.
- Commit message discipline: the subject line of patch 4 ends in a
period. "Seperate" is spelled by most people as "separate", though I
would encourage you to buck the trend if you are so inclined.
- In patch 4:
> + if (private_status == NOTMUCH_PRIVATE_STATUS_NO_DOCUMENT_FOUND) {
> + _notmuch_message_add_term (message, "type", "mail");
> + } else {
> + return NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID;
> + }
Why not switch the branches? That is, check for private_status !=
NOTMUCH_PRIVATE_STATUS_NO_DOCUMENT_FOUND and return immediately?
- In patch 5:
> + for (count = 0; count < num_messages; count++) {
> + int j;
> + int num_tags = random () % (max_tags + 1);
> + int this_mid_len = random () % message_id_len + 1;
This looks odd. I'm pretty sure it's correct, but my brain keeps saying,
"Why are there no parentheses on (message_id_len + 1)?" Maybe just a
comment that message ids must be at least one character long, or the
ranges of values necessary for both of these variables.
Ethan
prev parent reply other threads:[~2012-10-20 4:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-19 13:18 random corpus generator, v3 david
2012-08-19 13:18 ` [Patch v3 1/6] hex-escape: (en|de)code strings to/from restricted character set david
2012-08-19 13:18 ` [Patch v3 2/6] test/hex-xcode: new test binary david
2012-08-19 13:18 ` [Patch v3 3/6] test/hex-escaping: new test for hex escaping routines david
2012-08-19 13:18 ` [Patch v3 4/6] test: add database routines for testing david
2012-08-19 13:18 ` [Patch v3 5/6] test: add generator for random "stub" messages david
2012-09-08 13:38 ` Tomi Ollila
2012-08-19 13:18 ` [Patch v3 6/6] test: add broken roundtrip test david
2012-10-20 4:16 ` Ethan Glasser-Camp [this message]
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=871ugt7p7j.fsf@betacantrips.com \
--to=ethan.glasser.camp@gmail.com \
--cc=david@tethera.net \
--cc=notmuch@notmuchmail.org \
/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).