Re: [PATCH 2/3] t/t5400-send-pack.sh: add test_when_finished commands

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

 



Ãvar ArnfjÃrà Bjarmason <avarab@xxxxxxxxx> writes:

> diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
> index 656ab1a..0357610 100755
> --- a/t/t5400-send-pack.sh
> +++ b/t/t5400-send-pack.sh
> @@ -90,7 +90,8 @@ test_expect_success 'refuse deleting push with denyDeletes' '
>  	    git config receive.denyDeletes true &&
>  	    git branch extra master
>  	) &&
> -	test_must_fail git send-pack ./victim :extra master
> +	test_must_fail git send-pack ./victim :extra master &&
> +	test_when_finished "(cd victim && git config --unset receive.denyDeletes)"
>  '

I agree that you are trying to do a good thing, but does this
implementation work in practice?  If somebody breaks send-pack in such a
way that this push succeeds, doesn't the &&-chain will prevent your
"when-finished" hook to be registered to begin with?  IOW, wouldn't you
want to have when-finished as _early_ as possible, before any test that
might fail to help us identify a new breakage?

The same comment applies to other two hunks in the patch.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]