qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH v5 08/13] tests: Rely more on globa


From: Markus Armbruster
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH v5 08/13] tests: Rely more on global_qtest
Date: Thu, 24 Aug 2017 14:07:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Paolo Bonzini <address@hidden> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]