On 28/11/2014 09:00, Lukáš Doktor wrote: > The benefit is, that on complex trees you'd not need to check all hooks, > only the ones which applies for given test. The cons against your idea > (if I understood it correctly) is, that your version would remove > non-suitable variants during multiplexation, my version would execute > the test up to the point where it gets to the params.get(trouble_maker) > call (where it would generate the TestNAError). > > So correct me if I'm wrong, but my impression is that for bigger trees > with lots of irrelevant hooks your variant can be actually slower. For > small trees without variants, they should be probably the same speed and > for big trees with relevant hooks yours should be faster (and generates > smaller report as it'd skip irrelevant tests).
I think we should avoid hooks as much as possible. If done right, the BDD processing should be ridiculously cheap, on the order of O(tree size). But I am not sure how you'd use the hooks, so maybe I'm misunderstanding. If you want to play with BDDs, I placed a small implementation here: https://gist.github.com/bonzini/7942680bf9818938a259 The testcases, especially testComplexApply, will teach you how to use it. The main missing thing is a topological sort, which I will add when I have some time. Paolo _______________________________________________ Virt-test-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/virt-test-devel
