Re: [PATCH 2/3] t1092: fix buggy sparse "blame" test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/22/2022 2:26 PM, Eric Sunshine via GitGitGadget wrote:
> From: Eric Sunshine <sunshine@xxxxxxxxxxxxxx>
> 
> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux