From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkqvC-0007U5-DR for qemu-devel@nongnu.org; Thu, 24 Aug 2017 08:07:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dkqvB-000482-FW for qemu-devel@nongnu.org; Thu, 24 Aug 2017 08:07:38 -0400 From: Markus Armbruster References: <20170818211542.5380-1-eblake@redhat.com> <20170818211542.5380-9-eblake@redhat.com> <5d84655b-d82a-956a-f434-023961b23552@redhat.com> <2ffb6aab-09a0-7136-946f-f68f7478c0f7@redhat.com> <87h8wxqunl.fsf@dusky.pond.sub.org> <874lsxnupg.fsf@dusky.pond.sub.org> <221c272d-60de-1443-1471-2266b4e1c86b@redhat.com> Date: Thu, 24 Aug 2017 14:07:28 +0200 In-Reply-To: <221c272d-60de-1443-1471-2266b4e1c86b@redhat.com> (Paolo Bonzini's message of "Thu, 24 Aug 2017 12:20:54 +0200") Message-ID: <877extjhj3.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v5 08/13] tests: Rely more on global_qtest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: John Snow , qemu-devel@nongnu.org, "open list:Floppy" Paolo Bonzini 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.