From: Kevin Wolf <kwolf@redhat.com>
To: Masayoshi Mizuma <msys.mizuma@gmail.com>
Cc: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH 2/2] tests/test-image-locking: Pass the fd to the argument of qemu_has_ofd_lock()
Date: Wed, 18 Nov 2020 16:44:56 +0100 [thread overview]
Message-ID: <20201118154456.GC11988@merkur.fritz.box> (raw)
In-Reply-To: <20201106040102.13892-2-msys.mizuma@gmail.com>
Am 06.11.2020 um 05:01 hat Masayoshi Mizuma geschrieben:
> From: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
>
> Pass the file descriptor of /dev/null to qemu_has_ofd_lock() because
> former patch is changed the argument.
>
> Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
> ---
> tests/test-image-locking.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/tests/test-image-locking.c b/tests/test-image-locking.c
> index ba057bd66c..2b823e1588 100644
> --- a/tests/test-image-locking.c
> +++ b/tests/test-image-locking.c
> @@ -144,14 +144,19 @@ static void test_set_perm_abort(void)
>
> int main(int argc, char **argv)
> {
> + int fd;
> +
> bdrv_init();
> qemu_init_main_loop(&error_abort);
>
> g_test_init(&argc, &argv, NULL);
>
> - if (qemu_has_ofd_lock()) {
> + fd = open("/dev/null", O_RDONLY);
> +
> + if ((fd != -1) && (qemu_has_ofd_lock(fd))) {
The parentheses are redundant.
> g_test_add_func("/image-locking/basic", test_image_locking_basic);
> g_test_add_func("/image-locking/set-perm-abort", test_set_perm_abort);
> + close(fd);
> }
Please merge this with patch 1, otherwise the build will fail with only
patch 1 applied (breaks bisectability).
Kevin
next prev parent reply other threads:[~2020-11-18 15:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-06 4:01 [PATCH 1/2] file-posix: Use OFD lock only if the filesystem supports the lock Masayoshi Mizuma
2020-11-06 4:01 ` [PATCH 2/2] tests/test-image-locking: Pass the fd to the argument of qemu_has_ofd_lock() Masayoshi Mizuma
2020-11-18 15:44 ` Kevin Wolf [this message]
2020-11-18 19:04 ` Masayoshi Mizuma
2020-11-18 15:06 ` [PATCH 1/2] file-posix: Use OFD lock only if the filesystem supports the lock Masayoshi Mizuma
2020-11-18 15:16 ` Daniel P. Berrangé
2020-11-18 19:03 ` Masayoshi Mizuma
2020-11-18 15:42 ` Kevin Wolf
2020-11-18 19:10 ` Masayoshi Mizuma
2020-11-18 19:48 ` Masayoshi Mizuma
2020-11-19 10:44 ` Kevin Wolf
2020-11-19 23:56 ` Masayoshi Mizuma
2020-11-20 15:42 ` Kevin Wolf
2021-02-10 16:43 ` Masayoshi Mizuma
2021-02-10 17:29 ` Kevin Wolf
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=20201118154456.GC11988@merkur.fritz.box \
--to=kwolf@redhat.com \
--cc=m.mizuma@jp.fujitsu.com \
--cc=msys.mizuma@gmail.com \
--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).