diff mbox series

[v4,02/11] tests: Migration ppc test was missing arguments

Message ID 20180105215246.908-3-quintela@redhat.com
State New
Headers show
Series Add make check tests for Migration | expand

Commit Message

Juan Quintela Jan. 5, 2018, 9:52 p.m. UTC
Argument file is also needed there.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 tests/migration-test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Peter Xu Jan. 10, 2018, 6:25 a.m. UTC | #1
On Fri, Jan 05, 2018 at 10:52:37PM +0100, Juan Quintela wrote:
> Argument file is also needed there.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>

Reviewed-by: Peter Xu <peterx@redhat.com>

Does it also mean this?

Fixes: aaf89c8a49a8c ("test: port postcopy test to ppc64")

> ---
>  tests/migration-test.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/migration-test.c b/tests/migration-test.c
> index 0448bc77dc..32f3bb86a8 100644
> --- a/tests/migration-test.c
> +++ b/tests/migration-test.c
> @@ -464,8 +464,9 @@ static void test_migrate_start(QTestState **from, QTestState **to,
>          cmd_dst = g_strdup_printf("-machine accel=%s -m 256M"
>                                    " -name pcdest,debug-threads=on"
>                                    " -serial file:%s/dest_serial"
> +                                  " -drive file=%s,if=pflash,format=raw"
>                                    " -incoming %s",
> -                                  accel, tmpfs, uri);
> +                                  accel, tmpfs, bootpath, uri);
>      } else {
>          g_assert_not_reached();
>      }
> -- 
> 2.14.3
>
Juan Quintela Jan. 10, 2018, 8:47 a.m. UTC | #2
Peter Xu <peterx@redhat.com> wrote:
> On Fri, Jan 05, 2018 at 10:52:37PM +0100, Juan Quintela wrote:
>> Argument file is also needed there.
>> 
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>
> Reviewed-by: Peter Xu <peterx@redhat.com>
>
> Does it also mean this?
>
> Fixes: aaf89c8a49a8c ("test: port postcopy test to ppc64")

Dunno.  I was trying to consolidate the command line options for ppc and
x86 when I found this problem.  I haven't tested of ppc.

Thanks, Juan.
Laurent Vivier Jan. 10, 2018, 9:21 a.m. UTC | #3
On 10/01/2018 09:47, Juan Quintela wrote:
> Peter Xu <peterx@redhat.com> wrote:
>> On Fri, Jan 05, 2018 at 10:52:37PM +0100, Juan Quintela wrote:
>>> Argument file is also needed there.
>>>
>>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>>
>> Reviewed-by: Peter Xu <peterx@redhat.com>
>>
>> Does it also mean this?
>>
>> Fixes: aaf89c8a49a8c ("test: port postcopy test to ppc64")
> 
> Dunno.  I was trying to consolidate the command line options for ppc and
> x86 when I found this problem.  I haven't tested of ppc.

I don't think it is needed. I think the content of the nvram is migrated
(otherwise the test wouldn't work at all).

The nvram is created by default, we need the command line parameter only
to populate it from a file.

Thanks,
Laurent
Laurent Vivier Jan. 10, 2018, 10:12 a.m. UTC | #4
On 10/01/2018 10:21, Laurent Vivier wrote:
> On 10/01/2018 09:47, Juan Quintela wrote:
>> Peter Xu <peterx@redhat.com> wrote:
>>> On Fri, Jan 05, 2018 at 10:52:37PM +0100, Juan Quintela wrote:
>>>> Argument file is also needed there.
>>>>
>>>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>>>
>>> Reviewed-by: Peter Xu <peterx@redhat.com>
>>>
>>> Does it also mean this?
>>>
>>> Fixes: aaf89c8a49a8c ("test: port postcopy test to ppc64")
>>
>> Dunno.  I was trying to consolidate the command line options for ppc and
>> x86 when I found this problem.  I haven't tested of ppc.
> 
> I don't think it is needed. I think the content of the nvram is migrated
> (otherwise the test wouldn't work at all).
> 
> The nvram is created by default, we need the command line parameter only
> to populate it from a file.

A better change would be to use "-prom-env" instead of "-driver
if=pflash". I can send the patch if you want to add it in your series.

Thanks,
Laurent
Juan Quintela Jan. 10, 2018, 10:43 a.m. UTC | #5
Laurent Vivier <lvivier@redhat.com> wrote:
> On 10/01/2018 10:21, Laurent Vivier wrote:
>> On 10/01/2018 09:47, Juan Quintela wrote:
>>> Peter Xu <peterx@redhat.com> wrote:
>>>> On Fri, Jan 05, 2018 at 10:52:37PM +0100, Juan Quintela wrote:
>>>>> Argument file is also needed there.
>>>>>
>>>>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>>>>
>>>> Reviewed-by: Peter Xu <peterx@redhat.com>
>>>>
>>>> Does it also mean this?
>>>>
>>>> Fixes: aaf89c8a49a8c ("test: port postcopy test to ppc64")
>>>
>>> Dunno.  I was trying to consolidate the command line options for ppc and
>>> x86 when I found this problem.  I haven't tested of ppc.
>> 
>> I don't think it is needed. I think the content of the nvram is migrated
>> (otherwise the test wouldn't work at all).
>> 
>> The nvram is created by default, we need the command line parameter only
>> to populate it from a file.
>
> A better change would be to use "-prom-env" instead of "-driver
> if=pflash". I can send the patch if you want to add it in your series.

Told the command line and I will add to the line.

And using the same command in both sides makes easier to see that it is
correct.

Later, Juan.
Laurent Vivier Jan. 10, 2018, 11:03 a.m. UTC | #6
On 10/01/2018 11:43, Juan Quintela wrote:
> Laurent Vivier <lvivier@redhat.com> wrote:
>> On 10/01/2018 10:21, Laurent Vivier wrote:
>>> On 10/01/2018 09:47, Juan Quintela wrote:
>>>> Peter Xu <peterx@redhat.com> wrote:
>>>>> On Fri, Jan 05, 2018 at 10:52:37PM +0100, Juan Quintela wrote:
>>>>>> Argument file is also needed there.
>>>>>>
>>>>>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>>>>>
>>>>> Reviewed-by: Peter Xu <peterx@redhat.com>
>>>>>
>>>>> Does it also mean this?
>>>>>
>>>>> Fixes: aaf89c8a49a8c ("test: port postcopy test to ppc64")
>>>>
>>>> Dunno.  I was trying to consolidate the command line options for ppc and
>>>> x86 when I found this problem.  I haven't tested of ppc.
>>>
>>> I don't think it is needed. I think the content of the nvram is migrated
>>> (otherwise the test wouldn't work at all).
>>>
>>> The nvram is created by default, we need the command line parameter only
>>> to populate it from a file.
>>
>> A better change would be to use "-prom-env" instead of "-driver
>> if=pflash". I can send the patch if you want to add it in your series.
> 
> Told the command line and I will add to the line.
> 
> And using the same command in both sides makes easier to see that it is
> correct.
> 
> Later, Juan.
> 

("-machine accel=%s -m 256M"
 " -name pcsource,debug-threads=on"
 " -serial file:%s/src_serial"
 " -prom-env '"
 "boot-command=hex .\" _\" begin %x %x "
 "do i c@ 1 + i c! 1000 +loop .\" B\" 0 "
 "until'",  accel, tmpfs, end_address, start_address);

Don't forget to remove include of "hw/nvram/chrp_nvram.h",
MIN_NVRAM_SIZE and init_bootfile_ppc().

Thanks,
Laurent
diff mbox series

Patch

diff --git a/tests/migration-test.c b/tests/migration-test.c
index 0448bc77dc..32f3bb86a8 100644
--- a/tests/migration-test.c
+++ b/tests/migration-test.c
@@ -464,8 +464,9 @@  static void test_migrate_start(QTestState **from, QTestState **to,
         cmd_dst = g_strdup_printf("-machine accel=%s -m 256M"
                                   " -name pcdest,debug-threads=on"
                                   " -serial file:%s/dest_serial"
+                                  " -drive file=%s,if=pflash,format=raw"
                                   " -incoming %s",
-                                  accel, tmpfs, uri);
+                                  accel, tmpfs, bootpath, uri);
     } else {
         g_assert_not_reached();
     }