qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/5] tests: Use the normal yank code instead of stubs in rele


From: Lukas Straub
Subject: Re: [PATCH 1/5] tests: Use the normal yank code instead of stubs in relevant tests
Date: Mon, 22 Mar 2021 08:35:45 +0100

On Mon, 22 Mar 2021 06:20:50 +0100
Thomas Huth <thuth@redhat.com> wrote:

> On 22/03/2021 00.31, Lukas Straub wrote:
> > Use the normal yank code instead of stubs in relevant tests to
> > increase coverage and to ensure that registering and unregistering
> > of yank instances and functions is done correctly.
> > 
> > Signed-off-by: Lukas Straub <lukasstraub2@web.de>
> > ---
> >   tests/qtest/meson.build | 6 +++---
> >   tests/unit/meson.build  | 4 ++--
> >   2 files changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
> > index 66ee9fbf45..40e1f495f7 100644
> > --- a/tests/qtest/meson.build
> > +++ b/tests/qtest/meson.build
> > @@ -234,9 +234,9 @@ tpmemu_files = ['tpm-emu.c', 'tpm-util.c', 
> > 'tpm-tests.c']
> >   qtests = {
> >     'bios-tables-test': [io, 'boot-sector.c', 'acpi-utils.c', 'tpm-emu.c'],
> >     'cdrom-test': files('boot-sector.c'),
> > -  'dbus-vmstate-test': files('migration-helpers.c') + dbus_vmstate1,
> > +  'dbus-vmstate-test': ['migration-helpers.c', dbus_vmstate1, 
> > '../../monitor/yank.c'],
> >     'ivshmem-test': [rt, '../../contrib/ivshmem-server/ivshmem-server.c'],
> > -  'migration-test': files('migration-helpers.c'),
> > +  'migration-test': ['migration-helpers.c', io, '../../monitor/yank.c'],
> >     'pxe-test': files('boot-sector.c'),
> >     'qos-test': [chardev, io, qos_test_ss.apply(config_host, strict: 
> > false).sources()],
> >     'tpm-crb-swtpm-test': [io, tpmemu_files],
> 
> Is this really necessary for the qtests? I can understand the change for the 
> unit tests, but the qtests are separate programs where I could not imagine 
> that they use the yank functions in any way?

Yes, it is necessary. While the yank functions are not called in these tests,
it still checks that registering and unregistering of yank instances and
functions is done correctly. I.e. That no yank functions are registered before
the instance, that the yank instance is only unregistered after all functions
where unregistered, that the same instance is not registered twice and that
the yank instance actually exists before it is unregistered.

>   Thomas
> 
> 
> PS: Please add a proper description about the yank feature to either that 
> yank.c file or to include/qemu/yank.h ... I had a hard time to find out what 
> this code is all about until I finally looked up your cover letter of the 
> original series on the mailing list.
> 

Will do.

Regards,
Lukas Straub

-- 

Attachment: pgpECLzGmNOEG.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]