[Avocado-devel] Multiplexer design recent discussions summary

Lukáš Doktor ldoktor at redhat.com
Wed Nov 25 15:39:40 UTC 2015


Dne 25.11.2015 v 15:52 Paolo Bonzini napsal(a):
>
>
> On 25/11/2015 15:45, Lukáš Doktor wrote:
>>> Snipping, because I have a question then.  Should we just forbid
>>> filter-only/filter-out of !mux paths?  What is the use case?
>> If we choose to filter-out, than yes. That would be a solution (and I
>> really like it).
>>
>> If we choose to cut the node out, than we have another problem:
>>
>> ```
>>      os: !mux
>>          fedora:
>>              desktop:
>>                  xserver: xorg
>>              kernel:
>>                  /proc/sys/vm/swappiness: 30
>>          gentoo:
>> ```
>>
>> the result is:
>>
>> 1. desktop + kernel
>> 2. gentoo
>>
>> if I cut-out `/os/fedora/desktop`, the result is:
>>
>> 1. kernel
>> 2. gentoo
>>
>> if I filter-out `/os/fedora/desktop`, the result is:
>>
>> 1. gentoo
>
> I'm not sure I understands the use case of this?
>
> Even more restrictive, filter-out and filter-only might be applied only
> to _the children of a !mux path_, so in this case only to /os/fedora and
> /os/gentoo.
Yes, that would work :-) Maybe I'm trying to be too picky and looking 
for what users might use (even by accident) and we should not generate 
something too awkward (nor too believable so they miss the problem). 
Anyway yes, that proposal would generate the same results for cutting 
and filtering.

As a result I think we should support:

cmdline:

     --mux-mux $path[:true|false] -- to set the node as mux/nomux
     --mux-inject [$path:]key:value -- to set value (and create the node)
     --mux-cut $path -- remove any node (opposite of --mux-inject)
     --mux-keep $path -- mux-cut siblings
     --mux-out $path -- remove variants containing this path
     --mux-only $path -- mux-out siblings

yaml:

     !mux -- set the node as multiplexed
     !out : $path -- ignore variants with this $path
     !only : $path -- !out siblings

The `!out` can be translated to `mux-cut` by using your logic (find the 
precursor which is a direct child of a !mux node and cut it out). So 
`!out`/`!only` can be in fact realized by cutting, should that bring 
some performance improvement.

I don't see a benefit in implementing `!cut` and `!keep`, because it 
doesn't make sense to me to allow people say "Yes, use this structure, 
but remove some nodes from the result but just for this single variant".


>
> Paolo
>
>> To me cutting makes sense on global scale as opposite to `--mux-inject`
>> and it should coexists to `--filter-out`.
>




More information about the Avocado-devel mailing list