On Thu, Apr 13, 2017 at 09:35:08PM +0200, SZEDER Gábor wrote:
> >> diff --git a/t/test-lib.sh b/t/test-lib.sh
> >> index 13b569682..d7fa15a69 100644
> >> --- a/t/test-lib.sh
> >> +++ b/t/test-lib.sh
> >> @@ -763,7 +763,7 @@ test_done () {
> >>
> >> test -d "$remove_trash" &&
>
> I'm not sure under what circumstances the trash dir could be missing at
> this point...
Yeah, I don't really see the point of that line. Our whole goal is to
remove it anyway.
> >> cd "$(dirname "$remove_trash")" &&
> >> - rm -rf "$(basename "$remove_trash")"
> >> + rm -rf "$(basename "$remove_trash")" || exit 1
>
> ... but when it is already removed, then I think we should not exit
> with error here.
> Nothing that a pair of {} wouldn't handle.
I suppose so. It might be worth being picky just on the principle that
if it _is_ gone that's unexpected and we'd prefer somebody notice and
figure out why.
> > Replacing it the "exit 1" with a "die" that has a message is probably a
> > good idea, though.
>
> If we can't 'cd' or 'rm -rf', then they will tell us why they failed
> anyway, most likely including the name of the trash directory.
> Do we really need more error messages than that?
I just meant something like "tests passed but test cleanup failed;
aborting" so that the user has a better idea what is going on. But since
it shouldn't happen, maybe that doesn't matter.
-Peff