[PATCH 10/11] emacs: Add known-broken tests for search tagging races

Mark Walters markwalters1009 at gmail.com
Tue Oct 8 09:47:51 PDT 2013


On Mon, 07 Oct 2013, Austin Clements <amdragon at MIT.EDU> 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 at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


More information about the notmuch mailing list