From: Eric Blake <eblake@redhat.com>
To: Yury Kotov <yury-kotov@yandex-team.ru>,
Juan Quintela <quintela@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
Thomas Huth <thuth@redhat.com>,
Laurent Vivier <lvivier@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: "open list:All patches CC here" <qemu-devel@nongnu.org>,
yc-core@yandex-team.ru
Subject: Re: [Qemu-devel] [PATCH 2/3] tests/libqtest: Allow to set expected exit status
Date: Tue, 27 Aug 2019 09:03:53 -0500 [thread overview]
Message-ID: <e377939e-ffa0-9000-88bf-45410611ded6@redhat.com> (raw)
In-Reply-To: <20190827120221.15725-3-yury-kotov@yandex-team.ru>
[-- Attachment #1.1: Type: text/plain, Size: 886 bytes --]
On 8/27/19 7:02 AM, Yury Kotov wrote:
In the subject: 'Allow to $verb' is not idiomatic; either 'Allow
$subject to $verb' or 'Allow ${verb}ing' sound better. In this case,
I'd go with:
tests/libqtest: Allow setting expected exit status
> Add qtest_set_expected_status function to set expected exit status of
> child process. By default expected exit status is 0.
>
> @@ -130,11 +136,12 @@ static void kill_qemu(QTestState *s)
> * fishy and should be logged with as much detail as possible.
> */
> wstatus = s->wstatus;
> - if (wstatus) {
> + if (WEXITSTATUS(wstatus) != s->expected_status) {
> if (WIFEXITED(wstatus)) {
Wrong ordering. WEXITSTATUS() is not reliable unless WIFEXITED() is true.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-08-27 14:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-27 12:02 [Qemu-devel] [PATCH 0/3] UUID validation during migration Yury Kotov
2019-08-27 12:02 ` [Qemu-devel] [PATCH 1/3] migration: Add x-validate-uuid capability Yury Kotov
2019-08-27 14:01 ` Eric Blake
2019-08-27 15:36 ` Yury Kotov
2019-08-27 16:18 ` Eric Blake
2019-09-03 11:25 ` Dr. David Alan Gilbert
2019-09-03 16:39 ` Yury Kotov
2019-09-03 17:13 ` Dr. David Alan Gilbert
2019-09-03 11:34 ` Dr. David Alan Gilbert
2019-08-27 12:02 ` [Qemu-devel] [PATCH 2/3] tests/libqtest: Allow to set expected exit status Yury Kotov
2019-08-27 13:52 ` Marc-André Lureau
2019-08-27 15:23 ` Yury Kotov
2019-08-27 14:03 ` Eric Blake [this message]
2019-08-27 15:27 ` Yury Kotov
2019-08-27 12:02 ` [Qemu-devel] [PATCH 3/3] tests/migration: Add a test for x-validate-uuid capability Yury Kotov
2019-09-03 11:21 ` [Qemu-devel] [PATCH 0/3] UUID validation during migration Dr. David Alan Gilbert
2019-09-03 11:45 ` Daniel P. Berrangé
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=e377939e-ffa0-9000-88bf-45410611ded6@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=thuth@redhat.com \
--cc=yc-core@yandex-team.ru \
--cc=yury-kotov@yandex-team.ru \
/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).