Re: [PATCH] Better cleanup in TLS tests for -13beta2

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Felix Lechner <felix(dot)lechner(at)lease-up(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Better cleanup in TLS tests for -13beta2
Date: 2020-06-29 19:37:54
Message-ID: 43A89479-01D7-44C4-B75B-28F8E9DB292E@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 29 Jun 2020, at 21:27, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Hmm ... so I guess my reaction to both of these is "what guarantees
> that we get to the part of the script that does the unlinks?".
> I've certainly seen lots of TAP tests fail to complete. Could we
> do the cleanup in an END block or the like? (I'm a poor enough
> Perl programmer to be uncertain what's the best way, but I know
> Perl has constructs like that.)

If execution calls die() during testing, then we wont reach the clean up
portion at the end but we would if we did it as part of END which is (unless my
memory is too fogged) guaranteed to be the last code to run before the
interpreter exits.

That being said, we do retain temporary files on such failures on purpose in
our TestLib since 88802e068017bee8cea7a5502a712794e761c7b5 and a few follow-up
commits since, should these be handled differently? They are admittedly less
"unknown" as compared to other files as they are copies, but famous last words
have been spoken about bugs that can never happen.

cheers ./daniel

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-06-29 19:51:48 Re: [PATCH] Better cleanup in TLS tests for -13beta2
Previous Message Tom Lane 2020-06-29 19:27:49 Re: [PATCH] Better cleanup in TLS tests for -13beta2