From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 69535431FBD for ; Fri, 19 Oct 2012 21:16:37 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3sWO-HQio54b for ; Fri, 19 Oct 2012 21:16:37 -0700 (PDT) Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com [209.85.212.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id EA479431FAE for ; Fri, 19 Oct 2012 21:16:36 -0700 (PDT) Received: by mail-vb0-f53.google.com with SMTP id fc21so1295322vbb.26 for ; Fri, 19 Oct 2012 21:16:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-type; bh=bTFs2kAeBpxqC1RkvGm1jgf/TvXePxGqdeQm5/4rUkc=; b=oAo+EcEJeXzUMdeDItR+PCPeMkAtiVrmS87SMJi7H+nhFvpOP6ElCYsw1pfSiEMdXh 27BEtNrJawc6640yBtpN1XYHCK1tb2M0WfASzYk004lVVprSfrOIqiVagKEduOhg6WSx x4qt7DtcIURZ9VTOQm1y0TTRvhfUOgRpjW95zRU0VnHw8GID68XkLFOsS41sdPUpaM9j Act8DfFwbEI02S/fp3qZ7jrU41sHru4VpRBx42oqifrJ+FpgxF7pYRJJ91ut7FbFB6OZ LoEwE6l3CfsnCLVmWIzbxANBu3m2Cp9UgDhXBqwgYlO/sFHcVnKPVkseNkHViAqNQbah kA6w== Received: by 10.52.29.138 with SMTP id k10mr3478866vdh.53.1350706595182; Fri, 19 Oct 2012 21:16:35 -0700 (PDT) Received: from smtp.gmail.com (p70-80.acedsl.com. [66.114.70.80]) by mx.google.com with ESMTPS id y15sm3429713vdt.9.2012.10.19.21.16.33 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 19 Oct 2012 21:16:34 -0700 (PDT) From: Ethan Glasser-Camp To: david@tethera.net, notmuch@notmuchmail.org Subject: Re: random corpus generator, v3 In-Reply-To: <1345382314-5330-1-git-send-email-david@tethera.net> References: <1345382314-5330-1-git-send-email-david@tethera.net> User-Agent: Notmuch/0.14+45~g6ea9330 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Sat, 20 Oct 2012 00:16:32 -0400 Message-ID: <871ugt7p7j.fsf@betacantrips.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Oct 2012 04:16:37 -0000 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