From: Max Reitz <mreitz@redhat.com>
To: Cleber Rosa <crosa@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 05/10] qemu-iotests: define functions used in _cleanup() before its use
Date: Fri, 1 Dec 2017 21:43:32 +0100 [thread overview]
Message-ID: <171a26fc-bd4a-79d1-72d6-3165b050f3f5@redhat.com> (raw)
In-Reply-To: <20171116173810.16457-6-crosa@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 999 bytes --]
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 <crosa@redhat.com>
> ---
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
#!/bin/bash
foo() {
bar
}
trap foo 2
. ./bar.sh
kill -2 $$
in a file foo.sh and
#!/bin/bash
bar() {
echo 42
}
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)
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
next prev parent reply other threads:[~2017-12-01 20:43 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-16 17:38 [Qemu-devel] [PATCH 00/10] I/O tests cleanups Cleber Rosa
2017-11-16 17:38 ` [Qemu-devel] [PATCH 01/10] qemu-iotests: make execution of tests agnostic to test type Cleber Rosa
2017-11-17 7:25 ` [Qemu-devel] [Qemu-block] " Paolo Bonzini
2017-11-17 13:15 ` Cleber Rosa
2017-12-01 20:16 ` Max Reitz
2017-11-16 17:38 ` [Qemu-devel] [PATCH 02/10] qemu-iotests: fix filename containing checks Cleber Rosa
2017-12-01 20:17 ` Max Reitz
2017-11-16 17:38 ` [Qemu-devel] [PATCH 03/10] qemu-iotests: be strict with expected output Cleber Rosa
2017-12-01 20:25 ` Max Reitz
2017-11-16 17:38 ` [Qemu-devel] [PATCH 04/10] qemu-iotests: include (source) filters from common.rc Cleber Rosa
2017-12-01 20:28 ` Max Reitz
2017-11-16 17:38 ` [Qemu-devel] [PATCH 05/10] qemu-iotests: define functions used in _cleanup() before its use Cleber Rosa
2017-12-01 20:43 ` Max Reitz [this message]
2017-12-01 21:03 ` Eric Blake
2017-11-16 17:38 ` [Qemu-devel] [PATCH 06/10] qemu-iotests: turn owner variable into a comment Cleber Rosa
2017-11-17 7:19 ` [Qemu-devel] [Qemu-block] " Paolo Bonzini
2017-11-17 13:18 ` Cleber Rosa
2017-11-17 17:59 ` Eric Blake
2017-11-16 17:38 ` [Qemu-devel] [PATCH 07/10] qemu-iotests: remove the concept of $seq.full (and boiler plate code) Cleber Rosa
2017-12-01 20:52 ` Max Reitz
2017-11-16 17:38 ` [Qemu-devel] [PATCH 08/10] qemu-iotests: clean up double comment characters Cleber Rosa
2017-12-01 20:53 ` Max Reitz
2017-11-16 17:38 ` [Qemu-devel] [PATCH 09/10] qemu-iotests: remove unused "here" variable Cleber Rosa
2017-11-17 18:03 ` Eric Blake
2017-12-01 20:55 ` Max Reitz
2017-11-16 17:38 ` [Qemu-devel] [PATCH 10/10] qemu-iotests: add section on how to write a new I/O test Cleber Rosa
2017-12-01 21:12 ` Max Reitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=171a26fc-bd4a-79d1-72d6-3165b050f3f5@redhat.com \
--to=mreitz@redhat.com \
--cc=crosa@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).