All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 1/1] tests/migration: Skip tests for ppc tcg
@ 2018-07-06 14:31 Dr. David Alan Gilbert (git)
  2018-07-06 14:54 ` Laurent Vivier
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2018-07-06 14:31 UTC (permalink / raw)
  To: qemu-devel, peter.maydell, quintela, lvivier

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

PPC tcg seems to be failing migration tests quite regularly;
we believe this is TCG bugs in dirty bit updating; it's
not clear why PPC fails more but lets skip for the moment.

$ ./tests/migration-test
/ppc64/migration/deprecated: OK
/ppc64/migration/bad_dest: Skipping test: kvm_hv not available OK
/ppc64/migration/postcopy/unix: Skipping test: kvm_hv not available OK
/ppc64/migration/precopy/unix: Skipping test: kvm_hv not available OK

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 tests/migration-test.c | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

v2
  use a print rather than g_test_skip since gtester is broken in
some version

diff --git a/tests/migration-test.c b/tests/migration-test.c
index 3a85446f95..331efb0fe5 100644
--- a/tests/migration-test.c
+++ b/tests/migration-test.c
@@ -360,7 +360,7 @@ static void migrate_start_postcopy(QTestState *who)
     qobject_unref(rsp);
 }
 
-static void test_migrate_start(QTestState **from, QTestState **to,
+static int test_migrate_start(QTestState **from, QTestState **to,
                                const char *uri, bool hide_stderr)
 {
     gchar *cmd_src, *cmd_dst;
@@ -385,9 +385,13 @@ static void test_migrate_start(QTestState **from, QTestState **to,
                                   accel, tmpfs, bootpath, uri);
     } else if (strcmp(arch, "ppc64") == 0) {
 
-        /* On ppc64, the test only works with kvm-hv, but not with kvm-pr */
+        /* On ppc64, the test only works with kvm-hv, but not with kvm-pr
+         * and TCG is touchy due to race conditions on dirty bits
+         * (especially on PPC for some reason)
+         */
         if (access("/sys/module/kvm_hv", F_OK)) {
-            accel = "tcg";
+            g_print("Skipping test: kvm_hv not available ");
+            return -1;
         }
         cmd_src = g_strdup_printf("-machine accel=%s -m 256M"
                                   " -name source,debug-threads=on"
@@ -424,6 +428,7 @@ static void test_migrate_start(QTestState **from, QTestState **to,
 
     *to = qtest_init(cmd_dst);
     g_free(cmd_dst);
+    return 0;
 }
 
 static void test_migrate_end(QTestState *from, QTestState *to, bool test_dest)
@@ -510,7 +515,9 @@ static void test_postcopy(void)
     char *uri = g_strdup_printf("unix:%s/migsocket", tmpfs);
     QTestState *from, *to;
 
-    test_migrate_start(&from, &to, uri, false);
+    if (test_migrate_start(&from, &to, uri, false)) {
+        return;
+    }
 
     migrate_set_capability(from, "postcopy-ram", "true");
     migrate_set_capability(to, "postcopy-ram", "true");
@@ -556,7 +563,9 @@ static void test_baddest(void)
     const char *status;
     bool failed;
 
-    test_migrate_start(&from, &to, "tcp:0:0", true);
+    if (test_migrate_start(&from, &to, "tcp:0:0", true)) {
+        return;
+    }
     migrate(from, "tcp:0:0");
     do {
         rsp = wait_command(from, "{ 'execute': 'query-migrate' }");
@@ -585,7 +594,9 @@ static void test_precopy_unix(void)
     char *uri = g_strdup_printf("unix:%s/migsocket", tmpfs);
     QTestState *from, *to;
 
-    test_migrate_start(&from, &to, uri, false);
+    if (test_migrate_start(&from, &to, uri, false)) {
+        return;
+    }
 
     /* We want to pick a speed slow enough that the test completes
      * quickly, but that it doesn't complete precopy even on a slow
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH v2 1/1] tests/migration: Skip tests for ppc tcg
  2018-07-06 14:31 [Qemu-devel] [PATCH v2 1/1] tests/migration: Skip tests for ppc tcg Dr. David Alan Gilbert (git)
@ 2018-07-06 14:54 ` Laurent Vivier
  2018-07-06 16:18 ` Peter Maydell
  2018-07-09 21:15 ` Thomas Huth
  2 siblings, 0 replies; 5+ messages in thread
From: Laurent Vivier @ 2018-07-06 14:54 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git), qemu-devel, peter.maydell, quintela

On 06/07/2018 16:31, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> PPC tcg seems to be failing migration tests quite regularly;
> we believe this is TCG bugs in dirty bit updating; it's
> not clear why PPC fails more but lets skip for the moment.
> 
> $ ./tests/migration-test
> /ppc64/migration/deprecated: OK
> /ppc64/migration/bad_dest: Skipping test: kvm_hv not available OK
> /ppc64/migration/postcopy/unix: Skipping test: kvm_hv not available OK
> /ppc64/migration/precopy/unix: Skipping test: kvm_hv not available OK
> 
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
>  tests/migration-test.c | 23 +++++++++++++++++------
>  1 file changed, 17 insertions(+), 6 deletions(-)
> 

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH v2 1/1] tests/migration: Skip tests for ppc tcg
  2018-07-06 14:31 [Qemu-devel] [PATCH v2 1/1] tests/migration: Skip tests for ppc tcg Dr. David Alan Gilbert (git)
  2018-07-06 14:54 ` Laurent Vivier
@ 2018-07-06 16:18 ` Peter Maydell
  2018-07-06 16:23   ` Dr. David Alan Gilbert
  2018-07-09 21:15 ` Thomas Huth
  2 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2018-07-06 16:18 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git)
  Cc: QEMU Developers, Juan Quintela, Laurent Vivier

On 6 July 2018 at 15:31, Dr. David Alan Gilbert (git)
<dgilbert@redhat.com> wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> PPC tcg seems to be failing migration tests quite regularly;
> we believe this is TCG bugs in dirty bit updating; it's
> not clear why PPC fails more but lets skip for the moment.
>
> $ ./tests/migration-test
> /ppc64/migration/deprecated: OK
> /ppc64/migration/bad_dest: Skipping test: kvm_hv not available OK
> /ppc64/migration/postcopy/unix: Skipping test: kvm_hv not available OK
> /ppc64/migration/precopy/unix: Skipping test: kvm_hv not available OK
>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
>  tests/migration-test.c | 23 +++++++++++++++++------
>  1 file changed, 17 insertions(+), 6 deletions(-)
>

Applied to master, thanks -- hopefully this will reduce the
number of spurious test failures I encounter.

-- PMM

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH v2 1/1] tests/migration: Skip tests for ppc tcg
  2018-07-06 16:18 ` Peter Maydell
@ 2018-07-06 16:23   ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 5+ messages in thread
From: Dr. David Alan Gilbert @ 2018-07-06 16:23 UTC (permalink / raw)
  To: Peter Maydell; +Cc: QEMU Developers, Juan Quintela, Laurent Vivier

* Peter Maydell (peter.maydell@linaro.org) wrote:
> On 6 July 2018 at 15:31, Dr. David Alan Gilbert (git)
> <dgilbert@redhat.com> wrote:
> > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> >
> > PPC tcg seems to be failing migration tests quite regularly;
> > we believe this is TCG bugs in dirty bit updating; it's
> > not clear why PPC fails more but lets skip for the moment.
> >
> > $ ./tests/migration-test
> > /ppc64/migration/deprecated: OK
> > /ppc64/migration/bad_dest: Skipping test: kvm_hv not available OK
> > /ppc64/migration/postcopy/unix: Skipping test: kvm_hv not available OK
> > /ppc64/migration/precopy/unix: Skipping test: kvm_hv not available OK
> >
> > Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> > ---
> >  tests/migration-test.c | 23 +++++++++++++++++------
> >  1 file changed, 17 insertions(+), 6 deletions(-)
> >
> 
> Applied to master, thanks -- hopefully this will reduce the
> number of spurious test failures I encounter.

Yes; although note I believe the failures are actually real TCG
errors that do need fixing, so not actually spurious as such.

Dave

> -- PMM
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH v2 1/1] tests/migration: Skip tests for ppc tcg
  2018-07-06 14:31 [Qemu-devel] [PATCH v2 1/1] tests/migration: Skip tests for ppc tcg Dr. David Alan Gilbert (git)
  2018-07-06 14:54 ` Laurent Vivier
  2018-07-06 16:18 ` Peter Maydell
@ 2018-07-09 21:15 ` Thomas Huth
  2 siblings, 0 replies; 5+ messages in thread
From: Thomas Huth @ 2018-07-09 21:15 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git),
	qemu-devel, peter.maydell, quintela, lvivier

On 06.07.2018 16:31, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> PPC tcg seems to be failing migration tests quite regularly;
> we believe this is TCG bugs in dirty bit updating; it's
> not clear why PPC fails more but lets skip for the moment.
> 
> $ ./tests/migration-test
> /ppc64/migration/deprecated: OK
> /ppc64/migration/bad_dest: Skipping test: kvm_hv not available OK
> /ppc64/migration/postcopy/unix: Skipping test: kvm_hv not available OK
> /ppc64/migration/precopy/unix: Skipping test: kvm_hv not available OK
> 
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
>  tests/migration-test.c | 23 +++++++++++++++++------
>  1 file changed, 17 insertions(+), 6 deletions(-)
> 
> v2
>   use a print rather than g_test_skip since gtester is broken in
> some version
> 
> diff --git a/tests/migration-test.c b/tests/migration-test.c
> index 3a85446f95..331efb0fe5 100644
> --- a/tests/migration-test.c
> +++ b/tests/migration-test.c
> @@ -360,7 +360,7 @@ static void migrate_start_postcopy(QTestState *who)
>      qobject_unref(rsp);
>  }
>  
> -static void test_migrate_start(QTestState **from, QTestState **to,
> +static int test_migrate_start(QTestState **from, QTestState **to,
>                                 const char *uri, bool hide_stderr)
>  {
>      gchar *cmd_src, *cmd_dst;
> @@ -385,9 +385,13 @@ static void test_migrate_start(QTestState **from, QTestState **to,
>                                    accel, tmpfs, bootpath, uri);
>      } else if (strcmp(arch, "ppc64") == 0) {
>  
> -        /* On ppc64, the test only works with kvm-hv, but not with kvm-pr */
> +        /* On ppc64, the test only works with kvm-hv, but not with kvm-pr
> +         * and TCG is touchy due to race conditions on dirty bits
> +         * (especially on PPC for some reason)
> +         */
>          if (access("/sys/module/kvm_hv", F_OK)) {
> -            accel = "tcg";
> +            g_print("Skipping test: kvm_hv not available ");
> +            return -1;

That "Skipping test: ..." message is now popping up a couple of times
during "make check-qtest" here on my x86 laptop. That's kind of ugly.
Could you maybe turn that into a g_debug() instead?

 Thomas

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-07-09 21:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-06 14:31 [Qemu-devel] [PATCH v2 1/1] tests/migration: Skip tests for ppc tcg Dr. David Alan Gilbert (git)
2018-07-06 14:54 ` Laurent Vivier
2018-07-06 16:18 ` Peter Maydell
2018-07-06 16:23   ` Dr. David Alan Gilbert
2018-07-09 21:15 ` Thomas Huth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.