From: Mark Walters Date: Tue, 8 Oct 2013 16:47:51 +0000 (+0100) Subject: Re: [PATCH 10/11] emacs: Add known-broken tests for search tagging races X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e6c4a7b7b466b9c01b1716ee00832690ba7f3e5e;p=notmuch-archives.git Re: [PATCH 10/11] emacs: Add known-broken tests for search tagging races --- diff --git a/c9/5e41f0fa17813853a9503d1aa9e51864447429 b/c9/5e41f0fa17813853a9503d1aa9e51864447429 new file mode 100644 index 000000000..61111fe57 --- /dev/null +++ b/c9/5e41f0fa17813853a9503d1aa9e51864447429 @@ -0,0 +1,130 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 15064431FAF + for ; Tue, 8 Oct 2013 09:49:13 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -1.098 +X-Spam-Level: +X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 + tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, + NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 svJ-H3Kn8jJu for ; + Tue, 8 Oct 2013 09:49:05 -0700 (PDT) +Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 419DB431FAE + for ; Tue, 8 Oct 2013 09:49:05 -0700 (PDT) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1VTaSz-0006DC-3V; Tue, 08 Oct 2013 17:49:04 +0100 +Received: from 92.40.123.1.threembb.co.uk ([92.40.123.1] helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71) + (envelope-from ) + id 1VTaSx-0001dR-Fv; Tue, 08 Oct 2013 17:49:00 +0100 +From: Mark Walters +To: Austin Clements , notmuch@notmuchmail.org +Subject: Re: [PATCH 10/11] emacs: Add known-broken tests for search tagging + races +In-Reply-To: <1381185201-25197-11-git-send-email-amdragon@mit.edu> +References: <1381185201-25197-1-git-send-email-amdragon@mit.edu> + <1381185201-25197-11-git-send-email-amdragon@mit.edu> +User-Agent: Notmuch/0.15.2+334~gafd5c6a (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Tue, 08 Oct 2013 17:47:51 +0100 +Message-ID: <87txgraevc.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Sender-Host-Address: 92.40.123.1 +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: bdadf64c4de06e38c4475b195cb32ab1 (of first 20000 bytes) +X-SpamAssassin-Score: 0.0 +X-SpamAssassin-SpamBar: / +X-SpamAssassin-Report: The QM spam filters have analysed this message to + determine if it is + spam. We require at least 5.0 points to mark a message as spam. + This message scored 0.0 points. Summary of the scoring: + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) +X-QM-Scan-Virus: ClamAV says the message is clean +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: Tue, 08 Oct 2013 16:49:13 -0000 + + +On Mon, 07 Oct 2013, Austin Clements wrote: +> These tests check that both thread-local and global search tagging +> operations are race-free. They are currently known-broken because +> they aren't race-free. +> --- +> test/emacs | 26 ++++++++++++++++++++++++++ +> 1 file changed, 26 insertions(+) +> +> diff --git a/test/emacs b/test/emacs +> index 2917189..e0dcd3c 100755 +> --- a/test/emacs +> +++ b/test/emacs +> @@ -922,4 +922,30 @@ This is a warning (see *Notmuch errors* for more details) +> This is a warning +> This is another warning" +> +> +test_begin_subtest "Search thread tag operations are race-free" +> +test_subtest_known_broken +> +add_message '[subject]="Search race test"' +> +gen_msg_id_1=$gen_msg_id +> +generate_message '[in-reply-to]="<'$gen_msg_id_1'>"' \ +> + '[references]="<'$gen_msg_id_1'>"' \ +> + '[subject]="Search race test two"' +> +test_emacs '(notmuch-search "subject:\"search race test\"") +> + (notmuch-test-wait) +> + (notmuch-poll) +> + (execute-kbd-macro "+search-thread-race-tag")' +> +output=$(notmuch search --output=messages 'tag:search-thread-race-tag') +> +test_expect_equal "$output" "id:$gen_msg_id_1" +> + +> +test_begin_subtest "Search global tag operations are race-free" +> +test_subtest_known_broken +> +generate_message '[in-reply-to]="<'$gen_msg_id_1'>"' \ +> + '[references]="<'$gen_msg_id_1'>"' \ +> + '[subject]="Re: Search race test"' +> +test_emacs '(notmuch-search "subject:\"search race test\" -subject:two") +> + (notmuch-test-wait) +> + (notmuch-poll) +> + (execute-kbd-macro "*+search-global-race-tag")' +> +output=$(notmuch search --output=messages 'tag:search-global-race-tag') +> +test_expect_equal "$output" "id:$gen_msg_id_1" +> + +> test_done + +For the global tagging test would it be worth also adding a matching +message in a different thread? + +Best wishes + +Mark + + + +> -- +> 1.8.4.rc3 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch