git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: David Turner <dturner@twopensource.com>,
	git mailing list <git@vger.kernel.org>,
	Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: [PATCH] fsck: exit with non-zero status upon error from fsck_obj()
Date: Tue, 09 Sep 2014 15:21:42 -0700	[thread overview]
Message-ID: <xmqqvbowigeh.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <xmqq4mwgjvt6.fsf_-_@gitster.dls.corp.google.com> (Junio C. Hamano's message of "Tue, 09 Sep 2014 15:03:33 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> From: Jeff King <peff@peff.net>
> Date: Fri, 29 Aug 2014 16:31:46 -0400
>
> Upon finding a corrupt loose object, we forgot to note the error to
> signal it with the exit status of the entire process.
>
> [jc: adjusted t1450 and added another test]

Spoke too soon.  If found another instance where we expected fsck to
notice a corruption.  We'd need to squash this in.

By the way, Jonathan, with dbedf8bf (t1450 (fsck): remove dangling
objects, 2010-09-06) you added a 'test_might_fail git fsck' to the
1450 test that catches an object corruption.  Do you remember if
there was some flakiness in this test that necessitated it, or is it
merely "I think this should fail, but it does not, and we may fix it
some day but I am not doing that in this patch?"  Assuming that it
is the latter, I am including an update to 1450 as well.

There is another test_might_fail that runs "git rev-list" in the
same test, but that is not part of the said patch and unrelated to
the current topic, so I didn't dig further; we may want to audit the
hits from "git grep test_might_fail t/" as a separate topic (hint,
hint).


 t/t1450-fsck.sh        | 2 +-
 t/t4212-log-corrupt.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh
index c8dff9c..0de755c 100755
--- a/t/t1450-fsck.sh
+++ b/t/t1450-fsck.sh
@@ -69,7 +69,7 @@ test_expect_success 'object with bad sha1' '
 	git update-ref refs/heads/bogus $cmt &&
 	test_when_finished "git update-ref -d refs/heads/bogus" &&
 
-	test_might_fail git fsck 2>out &&
+	test_must_fail git fsck 2>out &&
 	cat out &&
 	grep "$sha.*corrupt" out
 '
diff --git a/t/t4212-log-corrupt.sh b/t/t4212-log-corrupt.sh
index 58b792b..67bd8ec 100755
--- a/t/t4212-log-corrupt.sh
+++ b/t/t4212-log-corrupt.sh
@@ -14,7 +14,7 @@ test_expect_success 'setup' '
 '
 
 test_expect_success 'fsck notices broken commit' '
-	git fsck 2>actual &&
+	test_must_fail git fsck 2>actual &&
 	test_i18ngrep invalid.author actual
 '
 

  parent reply	other threads:[~2014-09-09 22:21 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-27 22:10 git fsck exit code? David Turner
2014-08-29 18:53 ` Jeff King
2014-08-29 19:21   ` Junio C Hamano
2014-08-29 20:18     ` David Turner
2014-08-29 20:31       ` Jeff King
2014-08-29 20:47         ` Junio C Hamano
2014-09-09 22:03         ` [PATCH] fsck: exit with non-zero status upon error from fsck_obj() Junio C Hamano
2014-09-09 22:07           ` Jeff King
2014-09-12  3:38             ` [PATCH] fsck: return non-zero status on missing ref tips Jeff King
2014-09-12  4:29               ` Jeff King
2014-09-12  4:38                 ` Jeff King
2014-09-12  4:58                 ` Junio C Hamano
2014-09-12  5:12                   ` Jeff King
2014-09-15 14:42                   ` Michael Haggerty
2014-09-15 14:57                 ` Michael Haggerty
2014-09-09 22:21           ` Junio C Hamano [this message]
2014-09-09 22:29             ` [PATCH] fsck: exit with non-zero status upon error from fsck_obj() Jonathan Nieder
2014-08-31 18:54       ` git fsck exit code? Øyvind A. Holm
2014-09-01 11:54         ` Øyvind A. Holm
2014-09-01 18:17         ` David Turner
2014-09-09 22:09           ` 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

  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=xmqqvbowigeh.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=dturner@twopensource.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=peff@peff.net \
    /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).