git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Thomas Rast <trast@inf.ethz.ch>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: git@vger.kernel.org, "SZEDER Gábor" <szeder@ira.uka.de>
Subject: Re: [PATCH v2 2/2] send-email: add test for duplicate utf8 name
Date: Thu, 20 Jun 2013 14:48:15 +0200	[thread overview]
Message-ID: <87vc597xtc.fsf@linux-k42r.v.cablecom.net> (raw)
In-Reply-To: <20130620124502.GA24172@redhat.com> (Michael S. Tsirkin's message of "Thu, 20 Jun 2013 15:45:02 +0300")

"Michael S. Tsirkin" <mst@redhat.com> writes:

> On Thu, Jun 20, 2013 at 02:41:37PM +0200, Thomas Rast wrote:
>> "Michael S. Tsirkin" <mst@redhat.com> writes:
>> 
>> > Verify that author name is not duplicated if it matches
>> > sender, even if it is in utf8.
>> 
>> Small nit: if you make two patches out of it, add the tests first with
>> test_expect_failure.  Then flip it to test_expect_success in the actual
>> code change.  That makes it easy to verify that the test actually checks
>> the right thing, and that it was your code change that fixed it.
>
> I did this by reverting 1/2 and rerunning.
>
> But applying in reverse order means bisect can give us
> a setup where some tests fail, I thought it's a
> good idea to avoid that.

That's why you need to test_expect_*failure* in the commit that adds the
tests -- essentially saying "I know this is broken!".

Yes, it's a roundabout way.  But splitting code and tests in the way you
just posted is equally roundabout, while not having the benefit that one
can check out the commit at patch 1 and verify that it is indeed broken
(showing up as "still have known breakage").

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  reply	other threads:[~2013-06-20 12:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20 12:27 [PATCH v2 1/2] send-email: sanitize author when writing From line Michael S. Tsirkin
2013-06-20 12:27 ` [PATCH v2 2/2] send-email: add test for duplicate utf8 name Michael S. Tsirkin
2013-06-20 12:41   ` Thomas Rast
2013-06-20 12:45     ` Michael S. Tsirkin
2013-06-20 12:48       ` Thomas Rast [this message]
2013-06-20 12:53         ` Michael S. Tsirkin
2013-06-20 19:20   ` Junio C Hamano

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: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vc597xtc.fsf@linux-k42r.v.cablecom.net \
    --to=trast@inf.ethz.ch \
    --cc=git@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=szeder@ira.uka.de \
    /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://80x24.org/mirrors/git.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).