From nobody Tue Oct 28 12:12:50 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 151518931613750.92646359494847; Fri, 5 Jan 2018 13:55:16 -0800 (PST) Received: from localhost ([::1]:60436 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eXZxL-0003cD-87 for importer@patchew.org; Fri, 05 Jan 2018 16:55:15 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eXZvA-0002M1-Q1 for qemu-devel@nongnu.org; Fri, 05 Jan 2018 16:53:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eXZv9-0003BX-Ev for qemu-devel@nongnu.org; Fri, 05 Jan 2018 16:53:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59632) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eXZv9-00039z-0F for qemu-devel@nongnu.org; Fri, 05 Jan 2018 16:52:59 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 15C0861D0D for ; Fri, 5 Jan 2018 21:52:58 +0000 (UTC) Received: from secure.mitica (ovpn-116-55.ams2.redhat.com [10.36.116.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id B09E2605DE; Fri, 5 Jan 2018 21:52:54 +0000 (UTC) From: Juan Quintela To: qemu-devel@nongnu.org Date: Fri, 5 Jan 2018 22:52:38 +0100 Message-Id: <20180105215246.908-4-quintela@redhat.com> In-Reply-To: <20180105215246.908-1-quintela@redhat.com> References: <20180105215246.908-1-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 05 Jan 2018 21:52:58 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v4 03/11] tests: Consolidate accelerators declaration X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, dgilbert@redhat.com, peterx@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- tests/migration-test.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/migration-test.c b/tests/migration-test.c index 32f3bb86a8..d81f22118b 100644 --- a/tests/migration-test.c +++ b/tests/migration-test.c @@ -434,27 +434,29 @@ static void test_migrate_start(QTestState **from, QTe= stState **to, gchar *cmd_src, *cmd_dst; char *bootpath =3D g_strdup_printf("%s/bootsect", tmpfs); const char *arch =3D qtest_get_arch(); + const char *accel =3D "kvm:tcg"; =20 got_stop =3D false; =20 if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { init_bootfile_x86(bootpath); - cmd_src =3D g_strdup_printf("-machine accel=3Dkvm:tcg -m 150M" + cmd_src =3D g_strdup_printf("-machine accel=3D%s -m 150M" " -name pcsource,debug-threads=3Don" " -serial file:%s/src_serial" " -drive file=3D%s,format=3Draw", - tmpfs, bootpath); - cmd_dst =3D g_strdup_printf("-machine accel=3Dkvm:tcg -m 150M" + accel, tmpfs, bootpath); + cmd_dst =3D g_strdup_printf("-machine accel=3D%s -m 150M" " -name pcdest,debug-threads=3Don" " -serial file:%s/dest_serial" " -drive file=3D%s,format=3Draw" " -incoming %s", - tmpfs, bootpath, uri); + accel, tmpfs, bootpath, uri); } else if (strcmp(arch, "ppc64") =3D=3D 0) { - const char *accel; =20 /* On ppc64, the test only works with kvm-hv, but not with kvm-pr = */ - accel =3D access("/sys/module/kvm_hv", F_OK) ? "tcg" : "kvm:tcg"; + if (access("/sys/module/kvm_hv", F_OK)) { + accel =3D "tcg"; + } init_bootfile_ppc(bootpath); cmd_src =3D g_strdup_printf("-machine accel=3D%s -m 256M" " -name pcsource,debug-threads=3Don" --=20 2.14.3