qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 4/4] [NOT FOR MERGE] tests/qtest/migration: Adapt tests to


From: Fabiano Rosas
Subject: Re: [PATCH v3 4/4] [NOT FOR MERGE] tests/qtest/migration: Adapt tests to use older QEMUs
Date: Thu, 11 Jan 2024 10:58:49 -0300

Peter Xu <peterx@redhat.com> writes:

> On Wed, Jan 10, 2024 at 11:42:18AM -0300, Fabiano Rosas wrote:
>> Peter Xu <peterx@redhat.com> writes:
>> 
>> > On Tue, Jan 09, 2024 at 11:46:32AM -0300, Fabiano Rosas wrote:
>> >> Hm, it would be better to avoid the extra maintenance task at the start
>> >> of every release, no? It also blocks us from doing n-2 even
>> >> experimentally.
>> >
>> > See my other reply, on whether we can use "n-1" for migration-test.  If
>> > that can work for us, then IIUC we can avoid either "since:" or any
>> > relevant flag, neither do we need to unmask tests after each releases.  All
>> > old tests should always "just work" with a new qemu binary.
>> 
>> Hmm.. There are some assumptions here:
>> 
>> 1) New code will always be compatible with old tests. E.g. some
>>    patchseries changed code and changed a test to match the new
>>    code. Then we'd need a flag like 'since' anyway to mark that the new
>>    QEMU cannot be used with the old test.
>> 
>>    (if new QEMU is not compatible with old tests without any good
>>    reason, then that's just a regression I think)
>
> Exactly what you are saying here.  We can't make new QEMU not working on
> old tests.

Ok, so we need to forbid breaking changes to tests from now on. I'll try
to add some words in the docs about this.

>
> One way to simplify the understanding is, we can imagine the old tests as
> "some user currently using the old QEMU, and who would like to migrate to
> the master QEMU binary".  Such user only uses exactly the same cmdline we
> used for testing migration-test in exactly that n-1 qemu release binary.
>
> If we fail that old test, it means we can already fail such an user.
> That's destined a regression to me, no?  Or, do you have a solid example?

For instance, we used to not issue the SETUP event on incoming. If a
test (or user app) expected to see the ACTIVE or FAILED states, then
would it be a regression to now start issuing the SETUP event at the
proper place?

Anyway, it's pointless to give examples because we either allow old
tests to be changed or we don't. If we don't then that's solved. If we
do, we'll always have space for the situation I mentioned in 1) above.

> The only thing I can think of is, when we want to e.g. obsolete a QEMU
> cmdline that is used in migration-test.  But then that cmdline needs to be
> declared obsolete first for a few releases (let's say, 4), and before that
> deadline we should already rewrite migration-test to not use it, and as
> long as we do it in 3 releases I suppose nothing will be affected.
>
>> 
>> 2) There would not be issues when fixing bugs/refactoring
>>    tests. E.g. old tests had a bug that is now fixed, but since we're
>>    not using the new tests, the bug is always there until next
>>    release. This could block the entire test suite, specially with
>>    concurrency bugs which can start triggering due to changes in timing.
>
> Yes this might be a problem.  Note that the old tests we're using will be
> exactly the same test we released previous QEMU.  I am "assuming" that the
> test case is as stable as the released QEMU, since we kept running it for
> all pulls in CI runs.  If we see anything flaky, we should mark it
> especially right before the release, then the released tests will be
> considerably stable.

It's not just the test case. The whole test infrastructure could change
entirely. But let's maybe cross that bridge when we get to it.

>
> The worst case is we still keep a knob in the CI file, and we can turn off
> n-1 -> n tests for the CI for some release if there's some unfortunate
> accident. But I hope in reality that can be avoided.
>
>> 
>> 3) New code that can only be reached via new tests cannot cause
>>    regressions. E.g. new code is added but is kept under a machine
>>    property or migration capability. That code will only show the
>>    regression after the new test enables that cap/property. At that
>>    point it's too late because it was already released.
>
> I can't say I fully get the point here.  New code, if with a new cap with
> it, should run exactly like the old code if the cap is not turned on.  I
> suppose that's the case for when we only run n-1 version of migration-test.
> IMHO it's the same issue as 1) above, that we just should not break it, and
> if we do, that's exactly what we want to capture and fix in master, not n-1
> branch.
>
> But as I said, perhaps I didn't really get the issue you wanted to describe..

if (cap_foo()) {
   <do something bad>
}

This^ only executes once we have a test that enables cap_foo. If the
"something bad" is something that breaks compatibility, then we'll miss
it when using n-1 migration-test.

Now that I think about it, should we parameterize the CI so we can
actually switch between old migration-tests and new migration-tests? So
we make the default what you suggest, but still have the ability to
trigger a job every once in a while that uses the new tests.



reply via email to

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