From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eduardo Habkost Subject: Re: [KVM-AUTOTEST PATCH] KVM test: refactor kvm_config.py Date: Thu, 10 Feb 2011 11:45:15 -0200 Message-ID: <20110210134515.GA7596@otherpad.lan.raisama.net> References: <20110209160603.GO4914@us.ibm.com> <20110209162107.GG3933@otherpad.lan.raisama.net> <20110209233101.GG26301@us.ibm.com> <4D53AC5D.4070507@redhat.com> <4D53BF23.6040808@redhat.com> <4D53C203.4000808@redhat.com> <4D53C25B.3010008@redhat.com> <4D53C412.9070003@redhat.com> <4D53C4A4.6070700@redhat.com> <4D53C619.9080907@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: autotest@test.kernel.org, Uri Lublin , kvm@vger.kernel.org To: Avi Kivity Return-path: Content-Disposition: inline In-Reply-To: <4D53C619.9080907@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autotest-bounces@test.kernel.org Errors-To: autotest-bounces@test.kernel.org List-Id: kvm.vger.kernel.org On Thu, Feb 10, 2011 at 01:03:53PM +0200, Avi Kivity wrote: > On 02/10/2011 12:57 PM, Michael Goldish wrote: > >> > >> I can't easily think of a case where this might cause confusion. The > >> purpose of this is to allow people to write: > >> > >> only qcow2..raw..rtl8139 > >> > >> without having to remember the order in which those were defined in > >> tests_base.cfg. > > > >Sorry, I meant something like > > > >only qcow2..hugepages..rtl8139 > > > >Obviously qcow2 and raw can't coexist. > > The config files describe a cartesian product, in which order matters. Mathematically speaking, the ordering in the result is different, but BA and AB are often equivalent for the user. In many situations, people don't care in which order (as an example) "qcow" and "ide" are defined on the base config, they just want to exclude the combination of "qcow" and "ide". > > [A B C] x [1 2] generates [A1 A2 B1 B2 C1 C2]; no confusion here if > you specify A..1 > > however > > [A B C] x [A B] generates [AA AB BA BB CA CB]; A..B is ambiguous If you do the above and reuse keywords, "A" is also ambiguous, "B" is also ambiguous. "A..B" being ambiguous is a consequence of "A" and "B" being ambiguous. If you don't want to be ambiguous, just use "A.B" or "B.A". > > we might require that keywords be unique. I wouldn't be against that. At least for the use cases I see, people have been assuming that keywords are unique on most "only" and "no" statements. -- Eduardo