From patchwork Thu Dec 12 22:20:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 11289465 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 206AD109A for ; Thu, 12 Dec 2019 22:26:29 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E15AE2173E for ; Thu, 12 Dec 2019 22:26:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="RV2EP3VN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E15AE2173E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:37905 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifWuh-0003xU-UR for patchwork-qemu-devel@patchwork.kernel.org; Thu, 12 Dec 2019 17:26:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55411) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifWpJ-0005dr-OG for qemu-devel@nongnu.org; Thu, 12 Dec 2019 17:20:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifWpI-0007MD-HB for qemu-devel@nongnu.org; Thu, 12 Dec 2019 17:20:53 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:32731 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ifWpI-0007LB-CI for qemu-devel@nongnu.org; Thu, 12 Dec 2019 17:20:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576189251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O6/0Q3j2l+4PNvSN8GNivdWEfANnGpdF14b3fgeO7Io=; b=RV2EP3VNSmt/9HopcPAFdNhVYmF9OWmVJOtwwNS4Gi673fr8Y18Ze4pIi+OIFMWtdNYP81 aRlnXBy4/v/EjQc7f5YmIFS8hP5p13NNSZE9zpsg+cbr/Mdg0xTtccQnE3iKqv1sXA7pA7 VnpxR1Uy3KszmyuA5WTqoeX3VpPoFQY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-98-pjC52Ux4OyyZT5SnLLEhBw-1; Thu, 12 Dec 2019 17:20:50 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C2E57800053 for ; Thu, 12 Dec 2019 22:20:49 +0000 (UTC) Received: from secure.mitica (ovpn-116-25.ams2.redhat.com [10.36.116.25]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4686910013A1; Thu, 12 Dec 2019 22:20:48 +0000 (UTC) From: Juan Quintela To: qemu-devel@nongnu.org Subject: [PATCH 07/10] migration-test: Move -serial handling to common commandline Date: Thu, 12 Dec 2019 23:20:30 +0100 Message-Id: <20191212222033.1026-8-quintela@redhat.com> In-Reply-To: <20191212222033.1026-1-quintela@redhat.com> References: <20191212222033.1026-1-quintela@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: pjC52Ux4OyyZT5SnLLEhBw-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Paolo Bonzini , Thomas Huth , "Dr. David Alan Gilbert" , Juan Quintela Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Juan Quintela --- tests/migration-test.c | 41 ++++++++++++++++------------------------- 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/tests/migration-test.c b/tests/migration-test.c index a83e43b7b6..85e270ca39 100644 --- a/tests/migration-test.c +++ b/tests/migration-test.c @@ -579,13 +579,10 @@ static int test_migrate_start(QTestState **from, QTestState **to, machine_type = ""; machine_args = ""; memory_size = "150M"; - cmd_src = g_strdup_printf(" -serial file:%s/src_serial" - " -drive file=%s,format=raw", - tmpfs, bootpath); - cmd_dst = g_strdup_printf(" -serial file:%s/dest_serial" - " -drive file=%s,format=raw" + cmd_src = g_strdup_printf("-drive file=%s,format=raw", bootpath); + cmd_dst = g_strdup_printf("-drive file=%s,format=raw" " -incoming %s", - tmpfs, bootpath, uri); + bootpath, uri); start_address = X86_TEST_MEM_START; end_address = X86_TEST_MEM_END; } else if (g_str_equal(arch, "s390x")) { @@ -593,28 +590,22 @@ static int test_migrate_start(QTestState **from, QTestState **to, machine_type = ""; machine_args = ""; memory_size = "128M"; - cmd_src = g_strdup_printf(" -serial file:%s/src_serial -bios %s", - tmpfs, bootpath); - cmd_dst = g_strdup_printf(" -serial file:%s/dest_serial -bios %s" + cmd_src = g_strdup_printf("-bios %s", bootpath); + cmd_dst = g_strdup_printf("-bios %s" " -incoming %s", - tmpfs, bootpath, uri); + bootpath, uri); start_address = S390_TEST_MEM_START; end_address = S390_TEST_MEM_END; } else if (strcmp(arch, "ppc64") == 0) { machine_type = ""; machine_args = ",vsmt=8"; memory_size = "256M"; - cmd_src = g_strdup_printf("-nodefaults" - " -serial file:%s/src_serial" - " -prom-env 'use-nvramrc?=true' -prom-env " + cmd_src = g_strdup_printf("-nodefaults " + "-prom-env 'use-nvramrc?=true' -prom-env " "'nvramrc=hex .\" _\" begin %x %x " "do i c@ 1 + i c! 1000 +loop .\" B\" 0 " - "until'", tmpfs, end_address, - start_address); - cmd_dst = g_strdup_printf(" -serial file:%s/dest_serial" - " -incoming %s", - tmpfs, uri); - + "until'", end_address, start_address); + cmd_dst = g_strdup_printf(" -incoming %s", uri); start_address = PPC_TEST_MEM_START; end_address = PPC_TEST_MEM_END; } else if (strcmp(arch, "aarch64") == 0) { @@ -623,14 +614,12 @@ static int test_migrate_start(QTestState **from, QTestState **to, machine_args = "gic-version=max"; memory_size = "150M"; cmd_src = g_strdup_printf("-cpu max " - "-serial file:%s/src_serial " "-kernel %s", - tmpfs, bootpath); + bootpath); cmd_dst = g_strdup_printf("-cpu max " - "-serial file:%s/dest_serial " "-kernel %s " "-incoming %s", - tmpfs, bootpath, uri); + bootpath, uri); start_address = ARM_TEST_MEM_START; end_address = ARM_TEST_MEM_END; @@ -661,10 +650,11 @@ static int test_migrate_start(QTestState **from, QTestState **to, cmd_source = g_strdup_printf("-machine %saccel=kvm:tcg%s " "-name source,debug-threads=on " + "-serial file:%s/src_serial " "-m %s " "%s %s %s %s", machine_type, machine_args, - memory_size, + tmpfs, memory_size, cmd_src, shmem_opts, opts_src, ignore_stderr); g_free(cmd_src); *from = qtest_init(cmd_source); @@ -673,9 +663,10 @@ static int test_migrate_start(QTestState **from, QTestState **to, cmd_target = g_strdup_printf("-machine %saccel=kvm:tcg%s " "-name target,debug-threads=on " "-m %s " + "-serial file:%s/dest_serial " "%s %s %s %s", machine_type, machine_args, - memory_size, + tmpfs, memory_size, cmd_dst, shmem_opts, opts_dst, ignore_stderr); g_free(cmd_dst); *to = qtest_init(cmd_target);