Re: [PATCH 2/2] diff tests: rewrite flakyness-causing test "aid"

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

 



Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes:

> On Tue, Apr 13 2021, Matheus Tavares Bernardino wrote:
> ...
>>> >>         actual="$pfx-diff.$test"
>>> >>
>>> >>         test_expect_$status "git $cmd # magic is ${magic:-(not used)}" '
>>> >> +               test_when_finished "rm $actual" &&
>>> >
>>> > Nit: before these two patches, "$actual" was only removed when the
>>> > test succeeded. So, in case of failure, the failed output files would
>>> > still be there for debugging. It might be interesting to keep this
>>> > behavior and only remove "$actual" at the end of the test.
> ...
> Ah, yes that's a problem we should solve, but I think we should not put
> off migration to test_when_finished because of that.
>
> The whole reason we use it is to clean up the work area for the next
> test.
>
> Thus if we do:
>
>     git something >expected &&
>     test_cmp expected actual &&
>     rm expected actual

Isn't it a poor example to use to argue for your particular change,
where $actual in the original is designed to be unique among tests,
in order to ensure that $actual files left after test pieces fail
would not interfere with the tests that come later?  IOW, there is
not a reason to remove $actual until the end of the test sequence,
is there?




[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