git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Andreas Schwab <schwab@suse.de>, Jeff King <peff@peff.net>,
	Johannes Sixt <j6t@kdbg.org>,
	git@vger.kernel.org
Subject: Re: [PATCH v2] t6026-merge-attr: don't fail if sleep exits early
Date: Thu, 10 Nov 2016 22:55:35 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1611102254340.24684@virtualbox> (raw)
In-Reply-To: <xmqqbmxn6t11.fsf@gitster.mtv.corp.google.com>

Hi all,

On Thu, 10 Nov 2016, Junio C Hamano wrote:

> Andreas Schwab <schwab@suse.de> writes:
> 
> > Commit 5babb5bdb3 ("t6026-merge-attr: clean up background process at end
> > of test case") added a kill command to clean up after the test, but this
> > can fail if the sleep command exits before the cleanup is executed.
> > Ignore the error from the kill command.
> >
> > Explicitly check for the existence of the pid file to test that the merge
> > driver was actually called.
> >
> > Signed-off-by: Andreas Schwab <schwab@suse.de>
> > ---
> 
> OK.  sleep.pid is a reasonable easy-to-access side effect we can
> observe to make sure that the sleep-one-second merge driver was
> indeed invoked, which was missing from the earlier round.

No, this is incorrect. The condition that we need to know applies is that
the script is still running, and blocking if the bug reappears.

It is not enough to test that the script *started* running. If it exits
too early, the problematic condition is never tested, and the test is
useless.

Ciao,
Johannes

  reply	other threads:[~2016-11-10 21:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-08 17:03 [PATCH] t6026-merge-attr: don't fail if sleep exits early Andreas Schwab
2016-11-08 20:05 ` Jeff King
2016-11-09 13:47   ` Johannes Schindelin
2016-11-09 14:36     ` Andreas Schwab
2016-11-09 15:31       ` Jeff King
2016-11-10  8:31         ` [PATCH v2] " Andreas Schwab
2016-11-10 19:20           ` Junio C Hamano
2016-11-10 21:55             ` Johannes Schindelin [this message]
2016-11-10 22:30               ` Junio C Hamano
2016-11-10 22:35                 ` Jeff King
2016-11-10 22:55                   ` Junio C Hamano
2016-11-10 23:03                     ` Jeff King

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

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

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1611102254340.24684@virtualbox \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=peff@peff.net \
    --cc=schwab@suse.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.
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 NNTP newsgroup(s).