git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Derrick Stolee <derrickstolee@github.com>
To: Eric Sunshine via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org
Cc: Jeff King <peff@peff.net>, Elijah Newren <newren@gmail.com>,
	Fabian Stelzer <fs@gigacodes.de>,
	Lessley Dennington <lessleydennington@gmail.com>,
	Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH 2/3] t1092: fix buggy sparse "blame" test
Date: Mon, 22 Aug 2022 16:09:54 -0400	[thread overview]
Message-ID: <39b64f22-702a-80f0-af5d-50bb2dcdddfc@github.com> (raw)
In-Reply-To: <7b0784056f3cc0c96e9543ae44d0f5a7b0bf85fa.1661192802.git.gitgitgadget@gmail.com>

On 8/22/2022 2:26 PM, Eric Sunshine via GitGitGadget wrote:
> From: Eric Sunshine <sunshine@sunshineco.com>
> 
> This test wants to verify that `git blame` errors out when asked to
> blame a file _not_ in the sparse checkout. However, the very first file
> it asks to blame _is_ present in the checkout, thus `test_must_fail git
> blame $file` gives an unexpected result (the "blame" succeeds). This
> problem went unnoticed because the test invokes `test_must_fail git
> blame $file` in loop but forgets to break out of the loop early upon
> failure, thus the failure gets swallowed.
> 
> Fix the test by having it not ask to blame a file present in the sparse
> checkout, and instead only blame files not present, as intended. While
> at it, also add the missing `|| return 1` which allowed this bug to go
> unnoticed.

Thank you for catching this!

-Stolee

  reply	other threads:[~2022-08-22 20:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-22 18:26 [PATCH 0/3] tests: fix broken &&-chains & abort loops on error Eric Sunshine via GitGitGadget
2022-08-22 18:26 ` [PATCH 1/3] t2407: fix broken &&-chains in compound statement Eric Sunshine via GitGitGadget
2022-08-22 18:26 ` [PATCH 2/3] t1092: fix buggy sparse "blame" test Eric Sunshine via GitGitGadget
2022-08-22 20:09   ` Derrick Stolee [this message]
2022-08-22 18:26 ` [PATCH 3/3] t: detect and signal failure within loop Eric Sunshine via GitGitGadget
2022-08-22 20:22   ` Junio C Hamano
2022-08-22 20:59     ` Junio C Hamano
2022-08-23  6:30       ` Johannes Sixt
2022-08-23  3:05   ` Elijah Newren
2022-08-28  4:50     ` Eric Sunshine

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=39b64f22-702a-80f0-af5d-50bb2dcdddfc@github.com \
    --to=derrickstolee@github.com \
    --cc=fs@gigacodes.de \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=lessleydennington@gmail.com \
    --cc=newren@gmail.com \
    --cc=peff@peff.net \
    --cc=sunshine@sunshineco.com \
    /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).