[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 05/10] qemu-iotests: define functions used in _c
Re: [Qemu-block] [PATCH 05/10] qemu-iotests: define functions used in _cleanup() before its use
Fri, 1 Dec 2017 21:43:32 +0100
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
On 2017-11-16 18:38, Cleber Rosa wrote:
> The functions used in _cleanup() come from common.rc, which currently
> gets sourced after _cleanup() is defined and registered as a signal
> handler. When _cleanup() is executed, it has no valid references to
> those functions, as BASH won't resolve the reference at that time.
> While at it, also fix some tabs versus spaces indentation in
> _cleanup() in a few tests.
> Signed-off-by: Cleber Rosa <address@hidden>
No real objection apart from that I can't quite reproduce the issue.
When I test it, _cleanup() seems to be executed either way. And if I put
trap foo 2
kill -2 $$
in a file foo.sh and
in a file bar.sh, and then execute foo.sh, I get the "42" output.
Soo... It does seem to work for me?
(I mean, the patch still makes sense to me in theory, so I guess I might
take it anyway)
Description: OpenPGP digital signature
|[Prev in Thread]
||[Next in Thread]|
- Re: [Qemu-block] [PATCH 05/10] qemu-iotests: define functions used in _cleanup() before its use,
Max Reitz <=