On Wed, May 22, 2019 at 12:34:18 +0200, Ján Tomko wrote:
On Wed, May 22, 2019 at 10:33:39AM +0200, Andrea Bolognani wrote:
> On Tue, 2019-05-21 at 16:15 +0200, Ján Tomko wrote:
> > On Mon, May 20, 2019 at 01:37:47PM +0200, Andrea Bolognani wrote:
> > > diff --git a/tests/qemuxml2argvdata/intel-iommu-machine.xml
b/tests/qemuxml2argvdata/intel-iommu-machine.xml
> > > index 90aba16156..85027cd938 100644
> > > --- a/tests/qemuxml2argvdata/intel-iommu-machine.xml
> > > +++ b/tests/qemuxml2argvdata/intel-iommu-machine.xml
> > > @@ -5,7 +5,7 @@
> > > <currentMemory unit='KiB'>219100</currentMemory>
> > > <vcpu placement='static'>1</vcpu>
> > > <os>
> > > - <type arch='x86_64'
machine='q35'>hvm</type>
> > > + <type arch='x86_64'
machine='pc-q35-2.6'>hvm</type>
> >
> > Given that this is the only difference between intel-iommu-machine.xml
> > and intel-iommu.xml, could you delete intel-iommu-machine.xml
> > and use DO_TEST_CAPS_VER with 2.6.0?
> >
> > We won't be able to reuse the XML file due to only striping the machine
> > aliases for latest XML files, but it will show we use the same input
> > file.
>
> I'm not sure I fully understand what you're suggesting... Do you mean
> squashing in something like the diff below?
>
Yes.
> Personally I like the idea of using the same input file for different
> DO_TEST*() calls, highlighting how the environment is the only thing
> causing differences in the output. That said, in the past I've been
> told (I think by Peter?) doing so is not a good idea, so I've avoided
> it since.
>
For xml->argv test, the outputs are very different. But the xml->xml
test only changes the machine type, which is IMO not worth including
another input file.
Note that the xml->argv code specifically deletes the default machine
type alias in the 'latest' tests capability data so that the
substitution is skipped. This is to avoid having change the files every
time we bump the latest caps file.
For specific version tests we do want to do this so that we can also
excercise the default machine type code. This means also we should do
the same in the XML2XML tests.
If the files differ only in the machine type default I don't think it's
worth having (except the case when we are specifically testing machine
type substitution).