On 12/06/2012 12:17 PM, Guido Günther wrote:
On Wed, Dec 05, 2012 at 02:15:17PM -0500, Laine Stump wrote:
> This resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=767057
>
> It was possible to define a network with <forward mode='bridge'> that
> had both a bridge device and a forward device defined. These two are
> mutually exclusive by definition (if you are using a bridge device,
> then this is a host bridge, and if you have a forward dev defined,
> this is using macvtap). It was also possible to put <ip>, <dns>, and
> <domain> elements in this definition, although those aren't supported
> by the current driver (although it's conceivable that some other
> driver might support that).
>
> The items that are invalid by definition, are now checked in the XML
> parser (since they will definitely *always* be wrong), and the others
> are checked in networkValidate() in the network driver (since, as
> mentioned, it's possible that some other network driver, or even this
> one, could some day support setting those).
I'd be great if the testsuite would check that those invalid
combinations don't creep back in.
I've had that thought about a few things lately, but the tests that are
part of make check don't currently have any trappings for doing negative
tests, which makes it easy to do nothing about it :-)
Should somebody (I don't have time right now, but if someone else does
....) be adding such a capability to the libvirt-internal tests, or is
that better just delegated to tests in libvirt-tck?