diff mbox series

[1/3] tests/qtest/migration-test: Quieten ppc64 QEMU warnigns

Message ID 20240525031330.196609-2-npiggin@gmail.com (mailing list archive)
State New, archived
Headers show
Series tests/qtest/migration-test: Improve and enable on ppc64 | expand

Commit Message

Nicholas Piggin May 25, 2024, 3:13 a.m. UTC
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 tests/qtest/migration-test.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Thomas Huth May 27, 2024, 7:32 a.m. UTC | #1
On 25/05/2024 05.13, Nicholas Piggin wrote:
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
>   tests/qtest/migration-test.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
> index b7e3406471..c13535c37d 100644
> --- a/tests/qtest/migration-test.c
> +++ b/tests/qtest/migration-test.c
> @@ -21,6 +21,7 @@
>   #include "chardev/char.h"
>   #include "crypto/tlscredspsk.h"
>   #include "qapi/qmp/qlist.h"
> +#include "libqos/libqos-spapr.h"

It's a little bit unfortunate to include a libqos header in a non-qos test 
... so in case you respin, maybe add a comment at the end of the line like:

   /* just for PSERIES_DEFAULT_CAPABILITIES */

?

>   #include "migration-helpers.h"
>   #include "tests/migration/migration-test.h"
> @@ -742,7 +743,8 @@ static int test_migrate_start(QTestState **from, QTestState **to,
>                                         "until'", end_address, start_address);
>           machine_alias = "pseries";
>           machine_opts = "vsmt=8";
> -        arch_opts = g_strdup("-nodefaults");
> +        arch_opts = g_strdup_printf("-nodefaults "
> +                        "-machine " PSERIES_DEFAULT_CAPABILITIES);
>       } else if (strcmp(arch, "aarch64") == 0) {
>           memory_size = "150M";
>           machine_alias = "virt";

  Reviewed-by: Thomas Huth <thuth@redhat.com>
Nicholas Piggin May 27, 2024, 11:26 a.m. UTC | #2
On Mon May 27, 2024 at 5:32 PM AEST, Thomas Huth wrote:
> On 25/05/2024 05.13, Nicholas Piggin wrote:
> > Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> > ---
> >   tests/qtest/migration-test.c | 4 +++-
> >   1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
> > index b7e3406471..c13535c37d 100644
> > --- a/tests/qtest/migration-test.c
> > +++ b/tests/qtest/migration-test.c
> > @@ -21,6 +21,7 @@
> >   #include "chardev/char.h"
> >   #include "crypto/tlscredspsk.h"
> >   #include "qapi/qmp/qlist.h"
> > +#include "libqos/libqos-spapr.h"
>
> It's a little bit unfortunate to include a libqos header in a non-qos test 
> ... so in case you respin, maybe add a comment at the end of the line like:
>
>    /* just for PSERIES_DEFAULT_CAPABILITIES */
>
> ?

Same as other uses of it by the looks. Could just put it in a new
header in tests/qtest/ppc-util.h or something?

Thanks,
Nick

>
> >   #include "migration-helpers.h"
> >   #include "tests/migration/migration-test.h"
> > @@ -742,7 +743,8 @@ static int test_migrate_start(QTestState **from, QTestState **to,
> >                                         "until'", end_address, start_address);
> >           machine_alias = "pseries";
> >           machine_opts = "vsmt=8";
> > -        arch_opts = g_strdup("-nodefaults");
> > +        arch_opts = g_strdup_printf("-nodefaults "
> > +                        "-machine " PSERIES_DEFAULT_CAPABILITIES);
> >       } else if (strcmp(arch, "aarch64") == 0) {
> >           memory_size = "150M";
> >           machine_alias = "virt";
>
>   Reviewed-by: Thomas Huth <thuth@redhat.com>
Thomas Huth May 27, 2024, 11:37 a.m. UTC | #3
On 27/05/2024 13.26, Nicholas Piggin wrote:
> On Mon May 27, 2024 at 5:32 PM AEST, Thomas Huth wrote:
>> On 25/05/2024 05.13, Nicholas Piggin wrote:
>>> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>>> ---
>>>    tests/qtest/migration-test.c | 4 +++-
>>>    1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
>>> index b7e3406471..c13535c37d 100644
>>> --- a/tests/qtest/migration-test.c
>>> +++ b/tests/qtest/migration-test.c
>>> @@ -21,6 +21,7 @@
>>>    #include "chardev/char.h"
>>>    #include "crypto/tlscredspsk.h"
>>>    #include "qapi/qmp/qlist.h"
>>> +#include "libqos/libqos-spapr.h"
>>
>> It's a little bit unfortunate to include a libqos header in a non-qos test
>> ... so in case you respin, maybe add a comment at the end of the line like:
>>
>>     /* just for PSERIES_DEFAULT_CAPABILITIES */
>>
>> ?
> 
> Same as other uses of it by the looks. Could just put it in a new
> header in tests/qtest/ppc-util.h or something?

Yes, that would be cleaner, indeed.

  Thanks,
   Thomas
diff mbox series

Patch

diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index b7e3406471..c13535c37d 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -21,6 +21,7 @@ 
 #include "chardev/char.h"
 #include "crypto/tlscredspsk.h"
 #include "qapi/qmp/qlist.h"
+#include "libqos/libqos-spapr.h"
 
 #include "migration-helpers.h"
 #include "tests/migration/migration-test.h"
@@ -742,7 +743,8 @@  static int test_migrate_start(QTestState **from, QTestState **to,
                                       "until'", end_address, start_address);
         machine_alias = "pseries";
         machine_opts = "vsmt=8";
-        arch_opts = g_strdup("-nodefaults");
+        arch_opts = g_strdup_printf("-nodefaults "
+                        "-machine " PSERIES_DEFAULT_CAPABILITIES);
     } else if (strcmp(arch, "aarch64") == 0) {
         memory_size = "150M";
         machine_alias = "virt";