[PATCH 00/10] Migration Arguments cleanup

Juan Quintela posted 10 patches 4 years, 4 months ago
Test asan failed
Test checkpatch failed
Test FreeBSD failed
Test docker-mingw@fedora failed
Test docker-clang@ubuntu failed
Test docker-quick@centos7 failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191212222033.1026-1-quintela@redhat.com
Maintainers: Juan Quintela <quintela@redhat.com>, Thomas Huth <thuth@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Laurent Vivier <lvivier@redhat.com>
There is a newer version of this series
tests/migration-test.c | 265 +++++++++++++++++++++++------------------
1 file changed, 147 insertions(+), 118 deletions(-)
[PATCH 00/10] Migration Arguments cleanup
Posted by Juan Quintela 4 years, 4 months ago
Hi

This series simplify test_migrate_start() in two ways:
- simplify the command line creation, so everything that is common between
  architectures don't have to be repeated (DRY).
  Note that this bit remove lines of code.
- test_migrate_start() has two bools and two strings as arguments, it is very
  difficult to remmeber which is which and meaning.  And it is even worse to
  add new parameters.  Just pass them through one struct.

Please, review.

Juan Quintela (10):
  migration-test: Create cmd_soure and cmd_target
  migration-test: Move hide_stderr to common commandline
  migration-test: Move -machine to common commandline
  migration-test: Move memory size to common commandline
  migration-test: Move shmem handling to common commandline
  migration-test: Move -name handling to common commandline
  migration-test: Move -serial handling to common commandline
  migration-test: Move -incomming handling to common commandline
  migration-test: Rename cmd_src/dst to arch_source/arch_target
  migration-test: Use a struct for test_migrate_start parameters

 tests/migration-test.c | 265 +++++++++++++++++++++++------------------
 1 file changed, 147 insertions(+), 118 deletions(-)

-- 
2.21.0


Re: [PATCH 00/10] Migration Arguments cleanup
Posted by Laurent Vivier 4 years, 4 months ago
On 12/12/2019 23:20, Juan Quintela wrote:
> Hi
> 
> This series simplify test_migrate_start() in two ways:
> - simplify the command line creation, so everything that is common between
>   architectures don't have to be repeated (DRY).
>   Note that this bit remove lines of code.
> - test_migrate_start() has two bools and two strings as arguments, it is very
>   difficult to remmeber which is which and meaning.  And it is even worse to
>   add new parameters.  Just pass them through one struct.
> 
> Please, review.
> 
> Juan Quintela (10):
>   migration-test: Create cmd_soure and cmd_target
>   migration-test: Move hide_stderr to common commandline
>   migration-test: Move -machine to common commandline
>   migration-test: Move memory size to common commandline
>   migration-test: Move shmem handling to common commandline
>   migration-test: Move -name handling to common commandline
>   migration-test: Move -serial handling to common commandline
>   migration-test: Move -incomming handling to common commandline
>   migration-test: Rename cmd_src/dst to arch_source/arch_target
>   migration-test: Use a struct for test_migrate_start parameters
> 
>  tests/migration-test.c | 265 +++++++++++++++++++++++------------------
>  1 file changed, 147 insertions(+), 118 deletions(-)
> 

For ppc64:

Tested-by: Laurent Vivier <lvivier@redhat.com>


Re: [PATCH 00/10] Migration Arguments cleanup
Posted by Cornelia Huck 4 years, 4 months ago
On Thu, 12 Dec 2019 23:20:23 +0100
Juan Quintela <quintela@redhat.com> wrote:

> Hi
> 
> This series simplify test_migrate_start() in two ways:
> - simplify the command line creation, so everything that is common between
>   architectures don't have to be repeated (DRY).
>   Note that this bit remove lines of code.
> - test_migrate_start() has two bools and two strings as arguments, it is very
>   difficult to remmeber which is which and meaning.  And it is even worse to
>   add new parameters.  Just pass them through one struct.
> 
> Please, review.
> 
> Juan Quintela (10):
>   migration-test: Create cmd_soure and cmd_target
>   migration-test: Move hide_stderr to common commandline
>   migration-test: Move -machine to common commandline
>   migration-test: Move memory size to common commandline
>   migration-test: Move shmem handling to common commandline
>   migration-test: Move -name handling to common commandline
>   migration-test: Move -serial handling to common commandline
>   migration-test: Move -incomming handling to common commandline
>   migration-test: Rename cmd_src/dst to arch_source/arch_target
>   migration-test: Use a struct for test_migrate_start parameters
> 
>  tests/migration-test.c | 265 +++++++++++++++++++++++------------------
>  1 file changed, 147 insertions(+), 118 deletions(-)
> 

I gave this a go on s390x, and the migration test still seems to work
fine there. So, feel free to add

Tested-by: Cornelia Huck <cohuck@redhat.com> #s390x


Re: [PATCH 00/10] Migration Arguments cleanup
Posted by Paolo Bonzini 4 years, 4 months ago
On 12/12/19 23:20, Juan Quintela wrote:
> Hi
> 
> This series simplify test_migrate_start() in two ways:
> - simplify the command line creation, so everything that is common between
>   architectures don't have to be repeated (DRY).
>   Note that this bit remove lines of code.
> - test_migrate_start() has two bools and two strings as arguments, it is very
>   difficult to remmeber which is which and meaning.  And it is even worse to
>   add new parameters.  Just pass them through one struct.
> 
> Please, review.
> 
> Juan Quintela (10):
>   migration-test: Create cmd_soure and cmd_target
>   migration-test: Move hide_stderr to common commandline
>   migration-test: Move -machine to common commandline
>   migration-test: Move memory size to common commandline
>   migration-test: Move shmem handling to common commandline
>   migration-test: Move -name handling to common commandline
>   migration-test: Move -serial handling to common commandline
>   migration-test: Move -incomming handling to common commandline
>   migration-test: Rename cmd_src/dst to arch_source/arch_target
>   migration-test: Use a struct for test_migrate_start parameters
> 
>  tests/migration-test.c | 265 +++++++++++++++++++++++------------------
>  1 file changed, 147 insertions(+), 118 deletions(-)
> 

I have picked up this series and rebased the -accel changes on top.

Paolo


Re: [PATCH 00/10] Migration Arguments cleanup
Posted by Juan Quintela 4 years, 4 months ago
Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 12/12/19 23:20, Juan Quintela wrote:
>> Hi
>> 
>> This series simplify test_migrate_start() in two ways:
>> - simplify the command line creation, so everything that is common between
>>   architectures don't have to be repeated (DRY).
>>   Note that this bit remove lines of code.
>> - test_migrate_start() has two bools and two strings as arguments, it is very
>>   difficult to remmeber which is which and meaning.  And it is even worse to
>>   add new parameters.  Just pass them through one struct.
>> 
>> Please, review.
>> 
>> Juan Quintela (10):
>>   migration-test: Create cmd_soure and cmd_target
>>   migration-test: Move hide_stderr to common commandline
>>   migration-test: Move -machine to common commandline
>>   migration-test: Move memory size to common commandline
>>   migration-test: Move shmem handling to common commandline
>>   migration-test: Move -name handling to common commandline
>>   migration-test: Move -serial handling to common commandline
>>   migration-test: Move -incomming handling to common commandline
>>   migration-test: Rename cmd_src/dst to arch_source/arch_target
>>   migration-test: Use a struct for test_migrate_start parameters
>> 
>>  tests/migration-test.c | 265 +++++++++++++++++++++++------------------
>>  1 file changed, 147 insertions(+), 118 deletions(-)
>> 
>
> I have picked up this series and rebased the -accel changes on top.

Thanks.

about the accel and the machine type, .... it feel so weird that we only
need to add a machine type for aarch64.

Later, Juan.


Re: [PATCH 00/10] Migration Arguments cleanup
Posted by Paolo Bonzini 4 years, 4 months ago
On 16/12/19 16:46, Juan Quintela wrote:
>> I have picked up this series and rebased the -accel changes on top.
> Thanks.
> 
> about the accel and the machine type, .... it feel so weird that we only
> need to add a machine type for aarch64.

Yes, it is.  For now I have resolved the conflict to something like

    ...
    machine_opts = "virt,gic_ver=max";

and then if machine_opts is NULL I don't need to add "-machine" at all, so

   "...%s%s " ...,
   machine_opts ? " -machine" : NULL,
   machine_opts ? machine_opts : NULL,
   ...

Paolo

Paolo