[libvirt] [PATCH 06/17] genericxml2xml: add several graphics tests
Pavel Hrdina
phrdina at redhat.com
Fri May 6 13:21:35 UTC 2016
On Fri, May 06, 2016 at 08:43:25AM -0400, Cole Robinson wrote:
> On 05/05/2016 12:20 PM, Pavel Hrdina wrote:
> > Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> > ---
> > .../generic-graphics-vnc-listen-attr-only.xml | 28 ++++++++++++++++++++
> > ...generic-graphics-vnc-listen-element-minimal.xml | 30 ++++++++++++++++++++++
> > ...ic-graphics-vnc-listen-element-with-address.xml | 30 ++++++++++++++++++++++
> > .../generic-graphics-vnc-manual-port.xml | 28 ++++++++++++++++++++
> > .../generic-graphics-vnc-minimal.xml | 28 ++++++++++++++++++++
> > .../generic-graphics-vnc-socket-listen.xml | 30 ++++++++++++++++++++++
> > .../generic-graphics-vnc-socket.xml | 28 ++++++++++++++++++++
> > .../generic-graphics-vnc-listen-attr-only.xml | 30 ++++++++++++++++++++++
> > ...generic-graphics-vnc-listen-element-minimal.xml | 30 ++++++++++++++++++++++
> > ...ic-graphics-vnc-listen-element-with-address.xml | 30 ++++++++++++++++++++++
> > .../generic-graphics-vnc-manual-port.xml | 28 ++++++++++++++++++++
> > .../generic-graphics-vnc-minimal.xml | 28 ++++++++++++++++++++
> > .../generic-graphics-vnc-socket-listen.xml | 30 ++++++++++++++++++++++
> > .../generic-graphics-vnc-socket.xml | 28 ++++++++++++++++++++
> > tests/genericxml2xmltest.c | 7 +++++
>
> The generic XML parser doesn't have any restriction on duplicate <graphics
> type='vnc'/>, so these could be combined to possibly one XML file.
>
> I know there really isn't much precedent for that at the moment, but given the
> massive size of our test suite and the fact that much of the time is spent on
> redundant parsing and XML formatting, personally I'd like to see things move
> in that direction.
The idea itself isn't bad, but I think that it's better to have vnc and spice in
separate XML to make it clear which test failed so you know that it's vnc
graphics or spice graphics directly only from the test name.
I've tried this command on my desktop:
"time ./run tests/.libs/qemuxml2xmltest"
and considering that there are 837 test cases the output of time is:
real 0m0.821s
user 0m0.746s
sys 0m0.034s
So we don't spent that much time while parsing and formatting XML.
Pavel
More information about the libvir-list
mailing list