Re: [KVM-AUTOTEST PATCH] KVM test: refactor kvm_config.py

Michael Goldish
2011-02-09T10:07:17Z

On 02/09/2011 11:28 AM, Avi Kivity wrote:
> On 02/09/2011 03:50 AM, Michael Goldish wrote:
>> This is a reimplementation of the dict generator. It is much faster
>> than the
>> current implementation and uses a very small amount of memory.
>> Running time
>> and memory usage scale polynomially with the number of defined variants,
>> compared to exponentially in the current implementation.
>>
>> Instead of regular expressions in the filters, the following syntax is
>> used:
>>
>> , means OR
>> .. means AND
>> . means IMMEDIATELY-FOLLOWED-BY
>>
>> Example:
>>
>> only qcow2..Fedora.14, RHEL.6..raw..boot, smp2..qcow2..migrate..ide
>>
>
>
> Is it not possible to keep the old syntax? Breaking people's scripts is
> bad.

No, because the old syntax uses regexps and there's no clean way to
prune tree branches early if those are supported.

For users who have their own tests_base.cfg (if there are any), we may
have to keep the old parser as an alternative, or detect the presence of
an incompatible cfg file and warn about it. Does that sound like a good
idea?