[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Make 'uri' optional for migrate QAPI
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH] Make 'uri' optional for migrate QAPI |
Date: |
Fri, 26 Jan 2024 14:30:43 +0000 |
User-agent: |
Mutt/2.2.12 (2023-09-09) |
On Fri, Jan 26, 2024 at 07:40:12PM +0530, Het Gala wrote:
> Hi everyone, I was trying to wrap around on how to write a migration test or
> to mock migration.
> I see there are a couple of migration tests already written, but most of them
> focuses on just getting the uri and parsing uri to start the migration.
> I have a couple of questions for starters like me who is attempting to write
> test cases for the first time:
>
> 1. Do I need to make a whole new test or just edit one of the tests that is
> using uri, and instead send in 'MigrateChannel' struct and parse the
> necessary information out of it ?
I think this option is best. We have two code paths - 'uri' and
'MigrateChannel', we we just need coverage of that new path.
So modifying some of the existing test cases to use MigrateChannel
gives us that coverage without harming existing coverage. This is
more time efficient than adding extra tests.
> 2. Do I need to add tests for unix, fd too with the modified syntax ?
I don't think so. When using the legacy 'uri' syntax (which all tests
already do), we convert to MigrateChannel internally, then the rest
of migration uses the MigrateChannel. IOW, we already have coverage
of unix/fd/etc.
All we're lacking is validation that the very first entrypoint allows
MigrateChannel. We can prove that with a single test that uses
MigrateChannel
> 3. Do I also need to add test to ensure - uri and channels both
> cannot be used simultaneously ? (based on the above patch)
Yes, its a worthwhile sanity check. There are a few intentional
failure tests in migrate-test.c.
> 4. Is there updated document in Qemu to follow latest practices on how to
> write migration tests?
Not that I know of
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Re: [PATCH] Make 'uri' optional for migrate QAPI, Michael Tokarev, 2024/01/29