From patchwork Fri Jan 20 08:23:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 644626 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp658318pvb; Fri, 20 Jan 2023 00:25:26 -0800 (PST) X-Google-Smtp-Source: AMrXdXvy7Hpa1Ff/RfqzZ9gTdEhMIbrxNw9YXJNlIfjvqqAyidqCFi8mQ13dIS5G903E6YZIeKJN X-Received: by 2002:ac8:7517:0:b0:3b6:98c7:48fd with SMTP id u23-20020ac87517000000b003b698c748fdmr2208119qtq.15.1674203126182; Fri, 20 Jan 2023 00:25:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674203126; cv=none; d=google.com; s=arc-20160816; b=YWRO29Ms2Wr+WapIxFbEscWKiF8iw8VAh9JHZMidttG/arl3a5BofUPmCk5wqX2mOO N9bBcJizUtBqBB4pksyCltrTvkx0XQ0TtXiuXjtoyZ1UYxSNH2VMF480StVhcD6l0SRY yKSAYKbvgB3NwpSNE3xkrrlj1MiqEOsBzc7aKLaUsMhpodaTjElMQUEcMMOHg1ggzwpg N2FPPouapiorFNXqglsZM84C6d6xeFkCIvIzY1wNku64J1lVihZbWDrJ0smNoIv7uHV/ I8/zwNRJyB3w4NnqvkEsJn/zN4xIolsJqMkpPSwW+uu8QxsaVy42s338GfTAX5ZjVy/l wA6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=W5TXNXh3AquUKHDIlWKH1U7Rhf/WLE5rFLgjN1F2D1o=; b=aLuVjIQdS3HB0Roto+7VUsXEUbLmsPFwonUjMLj5She94JPnsuGXkx97HuRPDbLHAh zhNXasXfY/ldO3LAZHQcis3CqcKgRdkK5S7HmG0pXFUDlMl5CWiORJ3dDEMZ44QTE5SH Rj1dSiC8/xa8pt1c6C/ikOrY9B+lPxb17D+guHR9BQwHTdmrTjY0gumlQ3A6aUPQOuIp yKg/P/vFq/zJHxsJd1eYkipZ7ChELKgK7cAoT8qNywmyiwAH+gnRLoi1LBjf+3RLU7/P U7FLmEaYzlbHrcCBZq3+OMcZKri/L+Sp4yuS7LJp7jsiwlyccJaa6HrwoIM7215+9PdW 8gog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m+LYgICb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s12-20020ac8758c000000b003b53591e4e3si10250806qtq.353.2023.01.20.00.25.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Jan 2023 00:25:26 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m+LYgICb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pImhM-00058n-U8; Fri, 20 Jan 2023 03:24:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pImhL-0004zF-CZ for qemu-devel@nongnu.org; Fri, 20 Jan 2023 03:24:31 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pImhJ-0004aS-RB for qemu-devel@nongnu.org; Fri, 20 Jan 2023 03:24:31 -0500 Received: by mail-wr1-x42d.google.com with SMTP id b5so4182365wrn.0 for ; Fri, 20 Jan 2023 00:24:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=W5TXNXh3AquUKHDIlWKH1U7Rhf/WLE5rFLgjN1F2D1o=; b=m+LYgICbB3UFgva2MXKv+qAr8r7Oq0PXc7tul9i4gg3Q/F9UhvTonjUMBspmItaCqX hMq3q7Rj35P7cRKzQT4KGysEppzXmAs8sYgRrhpQWuxl9vNEWOpR5hrBXdx08NnojJWy 5kjbKLwb2x3F8sk6dfHV0zgFpupBp5sHK5kgcpPzx3kXOsMOJEru80ppnyANl9WmWwjP zABs3FVzfNK0OVnxDpvlcucXuWppqxDEzUAbh1NdE9Sd51j/wtbH+bcFOtMH6lpGOmkZ jIUfHoaqRi9VCMIx1DAh7tGQJRzkmrMLKy9WfbWIrVF+SeScEmGcOnacVdWsM78Raw2p mOxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W5TXNXh3AquUKHDIlWKH1U7Rhf/WLE5rFLgjN1F2D1o=; b=KJZk1fKo5pUrJYPFTftvL19OVB5F1mFrxE57psT7Z+EV3gU3evSsXSKoKkfF/0eMMB k/eVkdxhtZNmU/pcXERa4etjlreDdZmGa5IUq07QtV6iC7DqDsKS89Ah+oa0QHHzGHgu z0c3i6nBDmzzahx/eqoZ2yqwKFbz/6k5hrhNKRRPmYHKsgHAbqS5bURyc2Z7v4GPWVgX z7bOS+9Zz2LWagSfkxmC/URbgDIMgY2OjpO6tXJCY/2S1mv8W3sxxm9gBiLMMD7MXWE+ 7HPoZJzVm5L17spLDKKF/6ZNigbsK3yOH/by6Zrydf/PRpY6QFw4pPhMSpTBVrv9U3DY +hHg== X-Gm-Message-State: AFqh2kp9hsQ8CnZO+/U93Pk7PKRIJoGjTUMlnfyPTriix8SDLKdIfeqQ 2D1HvEg+SMKovhLyPxvR+2JSMRikbaC/vBrk X-Received: by 2002:a05:6000:608:b0:2bd:db84:d663 with SMTP id bn8-20020a056000060800b002bddb84d663mr8787590wrb.5.1674203068931; Fri, 20 Jan 2023 00:24:28 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id l5-20020adfe9c5000000b002238ea5750csm21286817wrn.72.2023.01.20.00.24.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 20 Jan 2023 00:24:28 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , "Dr. David Alan Gilbert" , Thomas Huth , Fabiano Rosas , Juan Quintela , Laurent Vivier , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v3 09/11] tests/qtest/migration-test: Build command line using GString API (3/4) Date: Fri, 20 Jan 2023 09:23:39 +0100 Message-Id: <20230120082341.59913-10-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230120082341.59913-1-philmd@linaro.org> References: <20230120082341.59913-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Part 3/4: Convert accelerator options. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela --- tests/qtest/migration-test.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 670097a956..1ed3505c91 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -603,6 +603,13 @@ static int test_migrate_start(QTestState **from, QTestState **to, got_stop = false; cmd_common = g_string_new(""); + /* KVM first */ + if (args->use_dirty_ring) { + g_string_append(cmd_common, "-accel kvm,dirty-ring-size=4096 "); + } else { + g_string_append(cmd_common, "-accel kvm "); + } + g_string_append(cmd_common, "-accel tcg "); bootpath = g_strdup_printf("%s/bootsect", tmpfs); if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { @@ -678,12 +685,10 @@ static int test_migrate_start(QTestState **from, QTestState **to, if (!args->only_target) { g_autofree gchar *cmd_source = NULL; - cmd_source = g_strdup_printf("-accel kvm%s -accel tcg %s " + cmd_source = g_strdup_printf("%s " "-name source,debug-threads=on " "-serial file:%s/src_serial " "%s %s %s", - args->use_dirty_ring ? - ",dirty-ring-size=4096" : "", cmd_common->str, tmpfs, arch_source, @@ -692,13 +697,11 @@ static int test_migrate_start(QTestState **from, QTestState **to, *from = qtest_init(cmd_source); } - cmd_target = g_strdup_printf("-accel kvm%s -accel tcg %s " + cmd_target = g_strdup_printf("%s " "-name target,debug-threads=on " "-serial file:%s/dest_serial " "-incoming %s " "%s %s %s", - args->use_dirty_ring ? - ",dirty-ring-size=4096" : "", cmd_common->str, tmpfs, uri, arch_target,