From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: John Snow <jsnow@redhat.com>,
qemu-devel@nongnu.org, "open list:Floppy" <qemu-block@nongnu.org>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v5 08/13] tests: Rely more on global_qtest
Date: Thu, 24 Aug 2017 14:07:28 +0200 [thread overview]
Message-ID: <877extjhj3.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <221c272d-60de-1443-1471-2266b4e1c86b@redhat.com> (Paolo Bonzini's message of "Thu, 24 Aug 2017 12:20:54 +0200")
Paolo Bonzini <pbonzini@redhat.com> writes:
> On 24/08/2017 12:09, Markus Armbruster wrote:
>> Cut-and-paste cuts both ways (pardon the pun):
>>
>> initialize with QTestState A
>> frobnicate with QTestState A
>> glomnify with QTestState A
>> frobnicate with QTestState A
>> initialize with QTestState B
>> boingboing with QTestState B
>> finalize with QTestState A
>> finalize with QTestState A
>>
>> Uh, forgot to frobnicate after boingboing, let me fix that real quick!
>>
>> initialize with QTestState A
>> frobnicate with QTestState A
>> glomnify with QTestState A
>> frobnicate with QTestState A
>> initialize with QTestState B
>> boingboing with QTestState B
>> frobnicate with QTestState A
>> finalize with QTestState A
>> finalize with QTestState A
>>
>> Spot the pasto.
>>
>> This hasty paste would simply work with global_qtest. I'm not claiming
>> there are cases that are just the opposite. I'm just challenging your
>> apparent claim that the long forms help with avoiding or catching
>> pastos. Can you explain how they help more than they hurt?
>
> A pasto without global_qtest is local.
>
> But cut-and-paste that involves _assigning_ global_qtest, even if it
> doesn't have cut-and-paste mistakes, may create a mess of functions
> knowing^Wbelieving they know what global_qtest is.
>
> Assigning global_qtest means the short-form functions have effectively
> dynamic binding. In a perfect world, global_qtest would be static and
> the create-and-assign-global would assert(!global_qtest). Then >1 VM ->
> don't use the short forms.
No consensus, status quo wins by default.
Since I find work of maintaining that status quo quite aggravating, I'll
do my best to dump it one someone with different sensibilities.
next prev parent reply other threads:[~2017-08-24 12:07 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-18 21:15 [Qemu-devel] [PATCH v5 00/13] Preliminary libqtest cleanups Eric Blake
2017-08-18 21:15 ` [Qemu-devel] [PATCH v5 01/13] test-qga: Kill broken and dead QGA_TEST_SIDE_EFFECTING code Eric Blake
2017-08-18 21:15 ` [Qemu-devel] [PATCH v5 02/13] qtest: Don't perform side effects inside assertion Eric Blake
2017-08-18 21:33 ` Philippe Mathieu-Daudé
2017-08-18 21:39 ` Eric Blake
2017-08-18 21:52 ` Philippe Mathieu-Daudé
2017-08-18 21:58 ` Eric Blake
2017-08-18 22:03 ` Eric Blake
2017-08-18 21:15 ` [Qemu-devel] [PATCH v5 03/13] libqtest: Remove dead qtest_instances variable Eric Blake
2017-08-18 21:33 ` Philippe Mathieu-Daudé
2017-08-18 21:15 ` [Qemu-devel] [PATCH v5 04/13] libqtest: Let socket_send() compute length Eric Blake
2017-08-18 21:15 ` [Qemu-devel] [PATCH v5 05/13] libqtest: Use qemu_strtoul() Eric Blake
2017-08-18 21:36 ` Philippe Mathieu-Daudé
2017-08-18 21:15 ` [Qemu-devel] [PATCH v5 06/13] libqtest: Topologically sort functions Eric Blake
2017-08-18 21:15 ` [Qemu-devel] [PATCH v5 07/13] libqtest: Inline qtest_query_target_endianness() Eric Blake
2017-08-18 21:46 ` Philippe Mathieu-Daudé
2017-08-18 22:08 ` Eric Blake
2017-08-18 21:15 ` [Qemu-devel] [PATCH v5 08/13] tests: Rely more on global_qtest Eric Blake
2017-08-18 21:33 ` John Snow
2017-08-19 16:34 ` [Qemu-devel] [Qemu-block] " Paolo Bonzini
2017-08-23 19:26 ` Eric Blake
2017-08-23 20:02 ` Paolo Bonzini
2017-08-23 21:30 ` Eric Blake
2017-08-23 21:50 ` Paolo Bonzini
2017-08-24 7:42 ` Markus Armbruster
2017-08-24 8:52 ` Paolo Bonzini
2017-08-24 10:09 ` Markus Armbruster
2017-08-24 10:20 ` Paolo Bonzini
2017-08-24 12:07 ` Markus Armbruster [this message]
2017-08-18 21:15 ` [Qemu-devel] [PATCH v5 09/13] libqtest: Shorten a couple more qtest_* functions Eric Blake
2017-08-18 21:15 ` [Qemu-devel] [PATCH v5 10/13] libqtest: Drop qtest_init() and qtest_qmp_discard_response() Eric Blake
2017-08-18 21:15 ` [Qemu-devel] [PATCH v5 11/13] libqtest: Drop many static inline qtest_ wrappers Eric Blake
2017-08-18 21:15 ` [Qemu-devel] [PATCH v5 12/13] libqtest: Use global_qtest in qtest_sendf() and qtest_rsp() Eric Blake
2017-08-18 21:15 ` [Qemu-devel] [PATCH v5 13/13] numa-test: Use hmp() Eric Blake
2017-08-18 21:56 ` Philippe Mathieu-Daudé
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=877extjhj3.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=jsnow@redhat.com \
--cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.