Prasad Pandit <ppan...@redhat.com> writes:

> On Mon, 17 Feb 2025 at 21:03, Fabiano Rosas <faro...@suse.de> wrote:
>> > @@ -110,6 +129,10 @@ void migration_test_add_postcopy(MigrationTestEnv 
>> > *env)
>> >              "/migration/postcopy/recovery/double-failures/reconnect",
>> >              test_postcopy_recovery_fail_reconnect);
>> >
>> > +        migration_test_add("/migration/multifd+postcopy/plain",
>> > +                           test_multifd_postcopy);
>> > +        migration_test_add("/migration/multifd+postcopy/preempt/plain",
>> > +                           test_multifd_postcopy_preempt);
>>
>> For postcopy-tests.c I'd use /migration/postcopy/multifd so we can run
>> them all via command-line. These are also the only ones actually doing
>> postcopy migration. We need to distinguish multifd+postcopy proper from
>> merely postcopy-ram=true.
>
> * ie. repalce 'multifd+postcopy'  with '../postcopy/multifd/' only in
> postcopy-tests.c? And keep other instances unchanged?
>

Yes. Or do someting else for the others, I don't have a preference. But
we need to have this be different in a way that people expecting to test
postcopy can do that along with the rest of the postcopy tests and we
also make it more clear that postcopy is not actually being tested in
the precopy tests.

These would actually do postcopy:
postcopy/multifd
multifd/postcopy

These just enable the postcopy cap:
precopy/postcopy-ram/
multifd/postcopy-ram/

The exact names could change...

> ...
>> >
>> > +static void test_multifd_postcopy_tcp_cancel(void)
>> > +{
>> > +    postcopy_ram = true;
>> > +    test_multifd_tcp_cancel();
>> > +    postcopy_ram = false;
>>
>> You could pass this in, there's just one other caller.
>
> * Sorry, what do you mean here?

To make postcopy_ram be passed in as an argument to
test_multifd_tcp_cancel(). Having globals tend to get in the way of
refactoring stuff later. We already had issues with tmpfs being global
all over the place.

>
> Thank you.
> ---
>   - Prasad

Reply via email to