qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] tests: switch tests to accel=kvm:tcg


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH] tests: switch tests to accel=kvm:tcg
Date: Wed, 16 Aug 2017 10:04:07 +0200

On Tue, 15 Aug 2017 17:04:35 -0300
Philippe Mathieu-Daudé <address@hidden> wrote:

> On 08/15/2017 12:47 PM, Richard Henderson wrote:
> > On 08/14/2017 08:33 AM, Cornelia Huck wrote:  
> >> On Mon, 14 Aug 2017 17:34:15 +0300
> >> "Michael S. Tsirkin" <address@hidden> wrote:
> >>  
> >>> Speed up tests on host systems with kvm support.
> >>> In particular, this fixes tests with --disable-tcg.
> >>>
> >>> Cc: Paolo Bonzini <address@hidden>
> >>> Cc: Thomas Huth <address@hidden>
> >>> Cc: Laurent Vivier <address@hidden>
> >>> Suggested-by: Cornelia Huck <address@hidden>
> >>> Signed-off-by: Michael S. Tsirkin <address@hidden>
> >>> ---
> >>>
> >>> Tested on x86 only.
> >>>
> >>>   tests/boot-serial-test.c | 2 +-
> >>>   tests/pnv-xscom-test.c   | 4 ++--
> >>>   tests/prom-env-test.c    | 2 +-
> >>>   3 files changed, 4 insertions(+), 4 deletions(-)
> >>>
> >>> diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c
> >>> index 11f48b0..c3b2e4e 100644
> >>> --- a/tests/boot-serial-test.c
> >>> +++ b/tests/boot-serial-test.c
> >>> @@ -78,7 +78,7 @@ static void test_machine(const void *data)
> >>>       fd = mkstemp(tmpname);
> >>>       g_assert(fd != -1);
> >>>   
> >>> -    args = g_strdup_printf("-M %s,accel=tcg -chardev 
> >>> file,id=serial0,path=%s"
> >>> +    args = g_strdup_printf("-M %s,accel=kvm:tcg -chardev 
> >>> file,id=serial0,path=%s"
> >>>                              " -no-shutdown -serial chardev:serial0 %s",
> >>>                              test->machine, tmpname, test->extra);  
> >>
> >> This has already been changed upstream.  
> > 
> > Ouch.  This is the only real smoke test we have for the tcg backend for the
> > host.  While it is still going to test tcg for whatever machines do not run
> > natively on the host, I can't help think we've lost testing.
> > 
> > Can we use accel=tcg:kvm instead?  
> 
> can we use the following in this test main()?
> 
> /* This test is fast fast enough to use to test the host TCG backend,
>   * so use "tcg" as default accel if available. */
> #ifdef CONFIG_TCG
> static const char *accel = "tcg";
> #else
> static const char *accel = "kvm";
> #endif

accel=tcg:kvm should already have the same effect, no?

(But adding a comment may be a good idea.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]