Re: [PATCH] Add unit tests for timer validation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 15, 2020 at 22:47:46 +0200, Peter Krempa wrote:
> On Tue, Sep 15, 2020 at 19:01:36 +0000, Sebastian Mitterle wrote:
> > Add minimal coverage for non-x86_64 timer validation
> > from commit 2f5d8ffebe5d3d00e16a051ed62ce8a703f18e7c
> > 
> > Signed-off-by: Sebastian Mitterle <smitterl@xxxxxxxxxx>
> > ---
> >  tests/meson.build        |   1 +
> >  tests/qemuvalidatetest.c | 107 +++++++++++++++++++++++++++++++++++++++
> >  2 files changed, 108 insertions(+)
> >  create mode 100644 tests/qemuvalidatetest.c

[...]

> > +static int
> > +errorTimersNotOnX86(const void *unused G_GNUC_UNUSED)
> > +{
> > +    int ret = 0;
> > +    char *log;
> > +    char expectedError[75] = "'tsc' timer is not supported for virtType=qemu arch=s390x machine=m guests";
> 
> This is extreme overkill. We don't really validate error messages and in
> this particular case I don't really see much value.

I'd actually see more value if qemuxml2argv test supports validating
error messages so that they are not obscured.

The errors should be recorded in a file though so that
VIR_TEST_REGENERATE_OUTPUT=1 can be used to update them without copying
stuff into code.

Additionally, while validating errors we must make sure that the locale
for the errors is set to the default one so that it doesn't break
randomly on certain hosts.




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux