From patchwork Thu Jan 19 10:05:30 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: 1728734 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Y/gaUUR6; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NyJWN3lXXz23gL for ; Thu, 19 Jan 2023 21:18:56 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIRoK-0003wq-KB; Thu, 19 Jan 2023 05:06:21 -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 1pIRnn-0003ns-Vp for qemu-devel@nongnu.org; Thu, 19 Jan 2023 05:05:49 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pIRnm-0005EA-7Z for qemu-devel@nongnu.org; Thu, 19 Jan 2023 05:05:47 -0500 Received: by mail-wr1-x42e.google.com with SMTP id h16so1289531wrz.12 for ; Thu, 19 Jan 2023 02:05:45 -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=lp7QBocGltbT5Ch7Xv6lzQ/CjEgDd3cHtWRpI2qpHEo=; b=Y/gaUUR62ZGPWWPVIABq5eI0Osm+q3hAlZtFCnyHqIr7C/MJAuGu3R7OSzNte0s3CP JHi0aDl74mzn16a3TXi0GTV5NRAaxIHfpfWzO3tuwURXeo2Zn6tlRAVXYYGScInF/pF/ dJQAIpEfhMoDIX/qrrWTyf2IhUz4UU7Nb+0gmzaTyljUpwTnaUe9mqUwLxPFRYC77gwz mOD4KxUWa78gJhchPgCHQAi8IfqOxSQLPnDs24pSquW0afFrXcQoxRlP5iF1ohe2t693 Tugb3bHFSMmxUq0NRt4zQCaPlTWyR7uCzQXD48sPZpS17GZYLv+sIPtbRJ0hYczmmSGt 0d/w== 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=lp7QBocGltbT5Ch7Xv6lzQ/CjEgDd3cHtWRpI2qpHEo=; b=o3x9TDFs2AZmxf9n4wQA2sst5q1VPTkJjaeTrF/D8eKEY7KX+a8y7KypTwNvQ7pdPX YxrQyU3hydEtSPQOvNMVyDta1ZZWk00XYN1V5I9u+gsiuOliUSbjLL58iHanjHkdxNOY mhNdLbpoXvGOx7Ztj/Z9BdLeXkAFKeeBA096YLDpi+oPUOi3Mva8UUexGcKXUaX5J79x cMeByeCHViSi7ViL4op/rbd+2thGYc0SWYa3yP/KWbg321C54vtl0h0RK7wg1p+S6jJl xLz9SlII9gezOIZAg/YewABvXvu3jRw7GsVo7ri6GyNYVPdMOWvuRNstWpwMwJtYMfgy K9QA== X-Gm-Message-State: AFqh2kqhcRVTSk5B6+5PT/zEIUaBZqKzz3wFDW53kQv/aLwEVjJ9ZgYU xiKkqmek2x40s9CqTKBNkc88JmWhsudenXWt X-Google-Smtp-Source: AMrXdXtwwaHmPtjHwgbWViAQmCeUMoKQ0w2Cw1zXAmdm1m1043x90TmMFyi47NP/ftnb9xjnYPFRUA== X-Received: by 2002:adf:e841:0:b0:2bd:bf01:5c3 with SMTP id d1-20020adfe841000000b002bdbf0105c3mr8958364wrn.61.1674122744516; Thu, 19 Jan 2023 02:05:44 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id e1-20020adfdbc1000000b002b8fe58d6desm33743435wrj.62.2023.01.19.02.05.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 19 Jan 2023 02:05:44 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Laurent Vivier , Fabiano Rosas , Juan Quintela , "Dr. David Alan Gilbert" , Thomas Huth , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH 1/8] tests/qtest/boot-serial-test: Constify tests[] array Date: Thu, 19 Jan 2023 11:05:30 +0100 Message-Id: <20230119100537.5114-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230119100537.5114-1-philmd@linaro.org> References: <20230119100537.5114-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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=unavailable 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/boot-serial-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/boot-serial-test.c b/tests/qtest/boot-serial-test.c index b216519b62..3aef3a97a9 100644 --- a/tests/qtest/boot-serial-test.c +++ b/tests/qtest/boot-serial-test.c @@ -139,7 +139,7 @@ typedef struct testdef { const uint8_t *bios; /* Set in case we use our own mini bios */ } testdef_t; -static testdef_t tests[] = { +static const testdef_t tests[] = { { "alpha", "clipper", "", "PCI:" }, { "avr", "arduino-duemilanove", "", "T", sizeof(bios_avr), NULL, bios_avr }, { "avr", "arduino-mega-2560-v3", "", "T", sizeof(bios_avr), NULL, bios_avr}, From patchwork Thu Jan 19 10:05:31 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: 1728709 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Nq7u/Qo4; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NyJKM2vHJz23gM for ; Thu, 19 Jan 2023 21:10:15 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIRos-0004S8-BV; Thu, 19 Jan 2023 05:06:54 -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 1pIRns-0003oP-Ja for qemu-devel@nongnu.org; Thu, 19 Jan 2023 05:05:56 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pIRnq-0005EU-W0 for qemu-devel@nongnu.org; Thu, 19 Jan 2023 05:05:52 -0500 Received: by mail-wr1-x42a.google.com with SMTP id e3so1287199wru.13 for ; Thu, 19 Jan 2023 02:05:50 -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=v+iwPL/+lazU1m0c8bSWGnJ+URBRewNqB8GAi6Kwffk=; b=Nq7u/Qo4W40eyvdv//o6DL9EP9Euu+vodYC6DL6cT5Of/a4f6bpjXsPBwWREzX92Tt XPjKnju8UmiSQ+QKO/zUBX7EDN0LVBUiUVLgtnSyTzoAxgI26R10E+GjZldNtipruZQt o3a0Ynb9+b8jytB1lu0IVWHKhXK/qPCq15hyhMYV/rHaKe0swajYOFOEg0+98IJUN+6o Lq96cjnEvQ+F+r9pep5ALEq/jyFAjh5fd3F+IU4OgFQc7Th9ShZMwxWgnjw5dQrTlSEY 1+JwErMT2aff63ibi/cs87uMdxzUBrSf1O+WW8tWeVPiNei2INqwNWmQxhbaEi9XNImv 6RKg== 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=v+iwPL/+lazU1m0c8bSWGnJ+URBRewNqB8GAi6Kwffk=; b=fPlWkvX3l4woU/hmegRyPLMHnsiTnQF4Lc4E6fpjYteHb3eYka5SBPutgcY+W5AeZR qyvJqridXVaO8bfmz8ERbDEhc5gv3H1Kv/Qrlo7zBa7JnAvTh7+j2+bUTVFvU1PhDwYE UrnAztveScEBfoO5VMWHFYEeFMcTtHVYMXki2UJG91kQ4OX77uR39Ysgv+xmO+CHsrdF CWCHP7Y7wz0cAythLQNQiqSBkaSNLvsg8qkids6qW382Gc5Kfe//sNVekB/vV7KnzxFN zbJIuNgRuzGjqAhw13Ck0xYHQwvS4cGQWtjQbFGNZZWZ10uUmqCRyFAU05ZLEav+HstS agoA== X-Gm-Message-State: AFqh2kr8KRqiY4OIpKfhohp1s+/GxuIvt7ddbxRV/9kfjUj5tCOBdb9c JhpStcT8xJea1X+OtN3VTCKn0awOP/C1DNHF X-Google-Smtp-Source: AMrXdXu4qlQvGOa/xTST3eXM8w38hSBxSwTQrCZg+erpZpUIIodoONeukjASMmu2u7osMe0Nkdp67Q== X-Received: by 2002:adf:f4c6:0:b0:2be:34f5:df7 with SMTP id h6-20020adff4c6000000b002be34f50df7mr4138112wrp.46.1674122749405; Thu, 19 Jan 2023 02:05:49 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id b13-20020a05600003cd00b002be07cbefb2sm11556919wrg.18.2023.01.19.02.05.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 19 Jan 2023 02:05:49 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Laurent Vivier , Fabiano Rosas , Juan Quintela , "Dr. David Alan Gilbert" , Thomas Huth , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH 2/8] tests/qtest/boot-serial-test: Build command line using GString API Date: Thu, 19 Jan 2023 11:05:31 +0100 Message-Id: <20230119100537.5114-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230119100537.5114-1-philmd@linaro.org> References: <20230119100537.5114-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.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=unavailable 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/boot-serial-test.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/tests/qtest/boot-serial-test.c b/tests/qtest/boot-serial-test.c index 3aef3a97a9..fccf706f99 100644 --- a/tests/qtest/boot-serial-test.c +++ b/tests/qtest/boot-serial-test.c @@ -226,23 +226,25 @@ static void test_machine(const void *data) const testdef_t *test = data; g_autofree char *serialtmp = NULL; g_autofree char *codetmp = NULL; - const char *codeparam = ""; const uint8_t *code = NULL; QTestState *qts; int ser_fd; + g_autoptr(GString) cmd = g_string_new(""); ser_fd = g_file_open_tmp("qtest-boot-serial-sXXXXXX", &serialtmp, NULL); g_assert(ser_fd != -1); close(ser_fd); + g_string_append_printf(cmd, "-M %s ", test->machine); + g_string_append(cmd, "-no-shutdown "); + if (test->kernel) { code = test->kernel; - codeparam = "-kernel"; + g_string_append(cmd, "-kernel "); } else if (test->bios) { code = test->bios; - codeparam = "-bios"; + g_string_append(cmd, "-bios "); } - if (code) { ssize_t wlen; int code_fd; @@ -252,17 +254,22 @@ static void test_machine(const void *data) wlen = write(code_fd, code, test->codesize); g_assert(wlen == test->codesize); close(code_fd); + g_string_append_printf(cmd, "%s ", codetmp); } + g_string_append_printf(cmd, "-chardev file,id=serial0,path=%s " + "-serial chardev:serial0 ", serialtmp); + /* * Make sure that this test uses tcg if available: It is used as a * fast-enough smoketest for that. */ - qts = qtest_initf("%s %s -M %s -no-shutdown " - "-chardev file,id=serial0,path=%s " - "-serial chardev:serial0 -accel tcg -accel kvm %s", - codeparam, code ? codetmp : "", test->machine, - serialtmp, test->extra); + g_string_append(cmd, "-accel tcg "); + g_string_append(cmd, "-accel kvm "); + g_string_append(cmd, test->extra); + + qts = qtest_init(cmd->str); + if (code) { unlink(codetmp); } From patchwork Thu Jan 19 10:05:32 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: 1728717 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=F+7rMfdu; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NyJNr5lF0z23gM for ; Thu, 19 Jan 2023 21:13:16 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIRot-0004YP-Mi; Thu, 19 Jan 2023 05:06:55 -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 1pIRo1-0003s9-0m for qemu-devel@nongnu.org; Thu, 19 Jan 2023 05:06:01 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pIRnx-0005Em-O3 for qemu-devel@nongnu.org; Thu, 19 Jan 2023 05:06:00 -0500 Received: by mail-wm1-x333.google.com with SMTP id m15so1068436wms.4 for ; Thu, 19 Jan 2023 02:05:55 -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=+5bluXdjaCn3oQ9NGGs572QWlIZ5/vAONfTlGZhWE+Q=; b=F+7rMfdusOTDEJWqznE7TFHET01XE7DRIr9/IbCv9G5KPTdOOs+doMC8ySkQESTR5x j4qR0TKSQYNXDwgFkfjxL7+MTouMfUnUrDjQiMTgdHJZdF14l9XDnBijwieTyDbA2LID 5819HK+hko25zPbJcqlTKbTY4t4PKufJ2Cci0di6fCa4uSZ1eqJz/ybOQ20AI7Eu/579 fP8JoPVLfyMhq3R7cLZMBEeF8qziTRaO+iEqM8prkB8IO4oL7ccAvkY7kvhO1jefp3xz mmbQrhJKCI2rQdC63fdBU0LK9XFXVHBz7hd2snSdqRgEGqGNU6cW3R3mZO9ArseCoDlX PucQ== 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=+5bluXdjaCn3oQ9NGGs572QWlIZ5/vAONfTlGZhWE+Q=; b=MFpG64uNF3r9ATOfkwBC6VmZOD4nvWaA7R9V2CilD9Y1flSCBBMnSUUmvsq4fRN1iX 0UIfz1Td4gg6z6q90nHR6exh0zmlBCMjNUvqBqf//k9JyrG0XX7RXqIEy49RdmGk9xPL BkLcMrBNERa3Eig1YQ++KBwLxxe2USsGMz3Bpy/XIKw5F7DbudUB40CMoNWcFGif6jue JGMnTnl2pxc5HPA3bRuL1GSQj4ax4+6I2KhOzzgrWjHD7aUI8yDj3+KQ4z+RLbtS/UEd BD+6fiMuH7aNo8zCa/q+ak4Kw6a/hRBGpYOo6858sl4MnoC9zOUXdgrfrhnADZHfvxKm Uz1Q== X-Gm-Message-State: AFqh2kqlWOE7Mm1fobbFbVfV2gYJAeXQHXzG5C8Fjn9/u7JB3TNkcQwe 1KRJZcjdEaGFGSDHVuK9yRoyMS1x4MoDnHK6 X-Google-Smtp-Source: AMrXdXvv6+5GG/Ke9hkq10ef9xEmE4FkAl2QmS1po8OugWP/MKuej0+khbtDuTrSev0E7HPSrM/5FQ== X-Received: by 2002:a05:600c:3555:b0:3da:f4d4:4c2 with SMTP id i21-20020a05600c355500b003daf4d404c2mr9572214wmq.37.1674122754363; Thu, 19 Jan 2023 02:05:54 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id h1-20020a05600c350100b003d990372dd5sm4563111wmq.20.2023.01.19.02.05.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 19 Jan 2023 02:05:54 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Laurent Vivier , Fabiano Rosas , Juan Quintela , "Dr. David Alan Gilbert" , Thomas Huth , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH 3/8] tests/qtest/boot-serial-test: Only use available accelerators Date: Thu, 19 Jan 2023 11:05:32 +0100 Message-Id: <20230119100537.5114-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230119100537.5114-1-philmd@linaro.org> References: <20230119100537.5114-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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=unavailable 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org For example, avoid when TCG is disabled: $ make check-qtest-aarch64 ... 18/20 qemu:qtest+qtest-aarch64 / qtest-aarch64/boot-serial-test qemu-system-aarch64: -accel tcg: invalid accelerator tcg Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/boot-serial-test.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/qtest/boot-serial-test.c b/tests/qtest/boot-serial-test.c index fccf706f99..f8d0c684c2 100644 --- a/tests/qtest/boot-serial-test.c +++ b/tests/qtest/boot-serial-test.c @@ -17,6 +17,9 @@ #include "libqtest.h" #include "libqos/libqos-spapr.h" +static bool has_tcg; +static bool has_kvm; + static const uint8_t bios_avr[] = { 0x88, 0xe0, /* ldi r24, 0x08 */ 0x80, 0x93, 0xc1, 0x00, /* sts 0x00C1, r24 ; Enable tx */ @@ -264,8 +267,12 @@ static void test_machine(const void *data) * Make sure that this test uses tcg if available: It is used as a * fast-enough smoketest for that. */ - g_string_append(cmd, "-accel tcg "); - g_string_append(cmd, "-accel kvm "); + if (has_tcg) { + g_string_append(cmd, "-accel tcg "); + } + if (has_kvm) { + g_string_append(cmd, "-accel kvm "); + } g_string_append(cmd, test->extra); qts = qtest_init(cmd->str); @@ -292,6 +299,9 @@ int main(int argc, char *argv[]) const char *arch = qtest_get_arch(); int i; + has_tcg = qtest_has_accel("tcg"); + has_kvm = qtest_has_accel("kvm"); + g_test_init(&argc, &argv, NULL); for (i = 0; tests[i].arch != NULL; i++) { From patchwork Thu Jan 19 10:05:33 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: 1728708 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=nmvG/a8r; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NyJKD19mjz23gL for ; Thu, 19 Jan 2023 21:10:08 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIRor-0004NB-Jf; Thu, 19 Jan 2023 05:06:53 -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 1pIRo3-0003x3-Dy for qemu-devel@nongnu.org; Thu, 19 Jan 2023 05:06:09 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pIRo0-0005FA-TG for qemu-devel@nongnu.org; Thu, 19 Jan 2023 05:06:02 -0500 Received: by mail-wm1-x32a.google.com with SMTP id d4-20020a05600c3ac400b003db1de2aef0so851747wms.2 for ; Thu, 19 Jan 2023 02:06:00 -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=R9/wJsUKk8bQtxiGr+pYnou0gg/wwc/GqZGoP+Dlsik=; b=nmvG/a8rtLzjkSXcpCvX06nZSF+PTU0/z/yFIJu4iZS6dz6MT5Y37aKLaubQusm6lP J9tvyzRIeS+caSu4OPq2NyhomgvU2kyICCfwYdxMHiZ6vxTEYMj9aFg0r1QPdI4Ybkt6 boNAnkNYcXEdmSk/QzwnVMID1TrLKM3oo/qYJygrG9fW+DTNfePCugsOhM/hWQSQidYG LySuqo+j54XiFYb8L3hABPIalUHsmE4LveQ++vlMtXh4TD6zdq5wnhE0SM6tV3uzEFHF xO9XTNuFS/KCDRr2JZSEkZ30n3p3j0aliS7+65SHA/3AnZr7lYrdlY0QrOIMhAG2kKNz E6mQ== 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=R9/wJsUKk8bQtxiGr+pYnou0gg/wwc/GqZGoP+Dlsik=; b=vXgyuGP/KNFa+qox76m/2zY2LhNCThYSRjJATb/OPA/m8MplqFeAEnHBLf+/MOioIn 62dAe7jk2a3r0QI34UShtQXf/8O5AJD4hFViiizxH9iUz9ih7Qdg9Bnw/g/ppb4KLXu9 8T9xtmGPBrZNUI7ZNd7EuBJqGyadBSehPj01ICmCsS3EIAwsjz6TdvWuVaJlLcHB9Fi9 buPFx25EMnUcleLwDN4b1LKVgZ732Jv2x63uTFEAyQs60O2JiJ/+iSx1Dvk0rJMJ3RpX kKFHb18QbPNcGi1CoHt1xRwEs6mlTIQWZTm/B+7ZAV4L+qP2JFdH5AhPUXtAHryFG8oc Xsrw== X-Gm-Message-State: AFqh2ko0oGYnMTW7XuPp6yq05sMD6+x2BTDd2IzGH4hAqos3IgTdF81i k37qflga76OerAocOXOFciDGObgsjf8UH/Gy X-Google-Smtp-Source: AMrXdXtmkH2cP/89CnfhSRvTQg8DW3RWnshHKoBm/lVF7LlJ0VThiL6jw63upEkr3yaMJ6tPKDiE9Q== X-Received: by 2002:a05:600c:4256:b0:3da:2a78:d7a3 with SMTP id r22-20020a05600c425600b003da2a78d7a3mr9320084wmm.33.1674122759309; Thu, 19 Jan 2023 02:05:59 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id p4-20020a05600c1d8400b003da286f8332sm4712165wms.18.2023.01.19.02.05.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 19 Jan 2023 02:05:58 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Laurent Vivier , Fabiano Rosas , Juan Quintela , "Dr. David Alan Gilbert" , Thomas Huth , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH 4/8] tests/qtest/migration-test: Build command line using GString API Date: Thu, 19 Jan 2023 11:05:33 +0100 Message-Id: <20230119100537.5114-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230119100537.5114-1-philmd@linaro.org> References: <20230119100537.5114-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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=unavailable 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/migration-test.c | 85 ++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 43 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index dbde726adf..36e6074653 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -582,13 +582,13 @@ typedef struct { static int test_migrate_start(QTestState **from, QTestState **to, const char *uri, MigrateStart *args) { + g_autoptr(GString) cmd_common = NULL; g_autofree gchar *arch_source = NULL; + g_autoptr(GString) cmd_source = NULL; g_autofree gchar *arch_target = NULL; - g_autofree gchar *cmd_source = NULL; - g_autofree gchar *cmd_target = NULL; - const gchar *ignore_stderr; + g_autoptr(GString) cmd_target = NULL; + const gchar *ignore_stderr = NULL; g_autofree char *bootpath = NULL; - g_autofree char *shmem_opts = NULL; g_autofree char *shmem_path = NULL; const char *arch = qtest_get_arch(); const char *machine_opts = NULL; @@ -602,6 +602,12 @@ static int test_migrate_start(QTestState **from, QTestState **to, } got_stop = false; + + cmd_common = g_string_new(""); + g_string_append(cmd_common, "-accel tcg "); + g_string_append_printf(cmd_common, "-accel kvm%s ", + args->use_dirty_ring ? ",dirty-ring-size=4096" : ""); + bootpath = g_strdup_printf("%s/bootsect", tmpfs); if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { /* the assembled x86 boot sector should be exactly one sector large */ @@ -645,65 +651,58 @@ static int test_migrate_start(QTestState **from, QTestState **to, } else { g_assert_not_reached(); } + if (machine_opts) { + g_string_append_printf(cmd_common, " -machine %s ", machine_opts); + } + g_string_append_printf(cmd_common, "-m %s ", memory_size); if (!getenv("QTEST_LOG") && args->hide_stderr) { -#ifndef _WIN32 - ignore_stderr = "2>/dev/null"; -#else +#ifdef _WIN32 /* * On Windows the QEMU executable is created via CreateProcess() and * IO redirection does not work, so don't bother adding IO redirection * to the command line. */ - ignore_stderr = ""; +#else + ignore_stderr = "2>/dev/null"; #endif - } else { - ignore_stderr = ""; } if (args->use_shmem) { shmem_path = g_strdup_printf("/dev/shm/qemu-%d", getpid()); - shmem_opts = g_strdup_printf( + g_string_append_printf(cmd_common, "-object memory-backend-file,id=mem0,size=%s" ",mem-path=%s,share=on -numa node,memdev=mem0", memory_size, shmem_path); - } else { - shmem_path = NULL; - shmem_opts = g_strdup(""); } - cmd_source = g_strdup_printf("-accel kvm%s -accel tcg%s%s " - "-name source,debug-threads=on " - "-m %s " - "-serial file:%s/src_serial " - "%s %s %s %s", - args->use_dirty_ring ? - ",dirty-ring-size=4096" : "", - machine_opts ? " -machine " : "", - machine_opts ? machine_opts : "", - memory_size, tmpfs, - arch_source, shmem_opts, - args->opts_source ? args->opts_source : "", - ignore_stderr); if (!args->only_target) { - *from = qtest_init(cmd_source); + cmd_source = g_string_new(cmd_common->str); + g_string_append(cmd_source, "-name source,debug-threads=on "); + g_string_append_printf(cmd_source, "-serial file:%s/src_serial ", + tmpfs); + g_string_append_printf(cmd_source, "%s ", arch_source); + if (args->opts_source) { + g_string_append_printf(cmd_source, "%s ", args->opts_source); + } + if (ignore_stderr) { + g_string_append(cmd_source, ignore_stderr); + } + *from = qtest_init(cmd_source->str); } - cmd_target = g_strdup_printf("-accel kvm%s -accel tcg%s%s " - "-name target,debug-threads=on " - "-m %s " - "-serial file:%s/dest_serial " - "-incoming %s " - "%s %s %s %s", - args->use_dirty_ring ? - ",dirty-ring-size=4096" : "", - machine_opts ? " -machine " : "", - machine_opts ? machine_opts : "", - memory_size, tmpfs, uri, - arch_target, shmem_opts, - args->opts_target ? args->opts_target : "", - ignore_stderr); - *to = qtest_init(cmd_target); + cmd_target = g_string_new(cmd_common->str); + g_string_append(cmd_target, "-name target,debug-threads=on "); + g_string_append_printf(cmd_target, "-serial file:%s/dest_serial ", tmpfs); + g_string_append_printf(cmd_target, "-incoming %s ", uri); + g_string_append_printf(cmd_target, "%s ", arch_target); + if (args->opts_target) { + g_string_append_printf(cmd_target, "%s ", args->opts_target); + } + if (ignore_stderr) { + g_string_append(cmd_source, ignore_stderr); + } + *to = qtest_init(cmd_target->str); /* * Remove shmem file immediately to avoid memory leak in test failed case. From patchwork Thu Jan 19 10:05:34 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: 1728727 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=I/zNVKPI; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NyJSR6yVqz23gL for ; Thu, 19 Jan 2023 21:16:23 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIRow-0004eY-K5; Thu, 19 Jan 2023 05:06:58 -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 1pIRoA-0003yQ-EB for qemu-devel@nongnu.org; Thu, 19 Jan 2023 05:06:14 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pIRo9-0005Ft-0Z for qemu-devel@nongnu.org; Thu, 19 Jan 2023 05:06:10 -0500 Received: by mail-wm1-x32a.google.com with SMTP id fl11-20020a05600c0b8b00b003daf72fc844so3215689wmb.0 for ; Thu, 19 Jan 2023 02:06:05 -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=N/ZoZ3vSZS/no0sJwRkQRJxBLgmqJ91b3o5SbJuNG6I=; b=I/zNVKPICwtzwqbpDGV1B4kzWefhxbEpoCNtzxkIxA5cGDN2AcmJobMvQzFCeZ6d+S kqwlRbQml0WiFpSjoLbQw6UvT3H6Kjgq66hf06rREWwqYYfZJfag1umA7lnyVg61vADK nbWFT87y9LAr7TtDNYIWciw9wvu+uJ6/8ql1hKCBOOy27NbCFDArJxfs8So7HuOk5vWa Yz9oGef3yP3o7LQrITMDZGdFykSoizpBx84X9pBX1cfP3dPuWC8AACjw5ixsdFH4+zc5 pX6jQa8yaz6qlgMDe1KN57vC1XSYML/0VadAnufqWV1bEIs3WhJihkNfgtr3x9ywWfyE vYnw== 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=N/ZoZ3vSZS/no0sJwRkQRJxBLgmqJ91b3o5SbJuNG6I=; b=ONqAiNBhwySxr/Zvjva3Pl50kguPbKOLYhr7AjuV79/fbvBA+DBycKaZI/FKRH/Cuu NekPKtgeTCn0pG9yLG34+bcc0TxNoztXK1Vy5jotnUuFpcxqyn4rEEfgl/7sqv8C1jKS nGvsT93IcezhY2IBsYL2Nvgn7AleMNp61ac2O98QoE2uITguqkfTj3zy5Xi9nsGX5q0B CwcMlU3a9S8rp2FYr/OTu8RBaRkK6lvyU80ohuIwQe2n5K3SGKf9z54LxVEF3aAjMFu2 ax3QBQQnYM7fBGqlm2eAtiZ/XcudyX3ipwiP4KUjM+LA2E2fJihfSDwBK6k+MxxoGyw6 bHSQ== X-Gm-Message-State: AFqh2kolQOptuTuPdrgnVWQM+GEqcCcpjptFRuIL3SS9Q2sIGuf1XJyy SUhWQZma23wuOw/ocRtZNTLp0Y1GgofJON1V X-Google-Smtp-Source: AMrXdXssCz5FsJW9W1KRztsJIfhT6t85usxbPDDPQtbCwJt9S3dPPCmnVTFXdIEi8H+Hpo6RQAFPJw== X-Received: by 2002:a05:600c:1e1d:b0:3cf:674a:aefe with SMTP id ay29-20020a05600c1e1d00b003cf674aaefemr9723896wmb.22.1674122764506; Thu, 19 Jan 2023 02:06:04 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id o22-20020a05600c511600b003d9780466b0sm4820762wms.31.2023.01.19.02.06.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 19 Jan 2023 02:06:04 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Laurent Vivier , Fabiano Rosas , Juan Quintela , "Dr. David Alan Gilbert" , Thomas Huth , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH 5/8] tests/qtest/migration-test: Only use available accelerators Date: Thu, 19 Jan 2023 11:05:34 +0100 Message-Id: <20230119100537.5114-6-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230119100537.5114-1-philmd@linaro.org> References: <20230119100537.5114-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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=unavailable 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org For example, avoid when TCG is disabled: $ make check-qtest-aarch64 ... 20/20 qemu:qtest+qtest-aarch64 / qtest-aarch64/migration-test qemu-system-aarch64: -accel tcg: invalid accelerator tcg Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Dr. David Alan Gilbert --- tests/qtest/migration-test.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 36e6074653..1e7f1ea162 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -45,6 +45,8 @@ unsigned start_address; unsigned end_address; +static bool has_tcg; +static bool has_kvm; static bool uffd_feature_thread_id; /* @@ -604,9 +606,14 @@ static int test_migrate_start(QTestState **from, QTestState **to, got_stop = false; cmd_common = g_string_new(""); - g_string_append(cmd_common, "-accel tcg "); - g_string_append_printf(cmd_common, "-accel kvm%s ", - args->use_dirty_ring ? ",dirty-ring-size=4096" : ""); + if (has_tcg) { + g_string_append(cmd_common, "-accel tcg "); + } + if (has_kvm) { + g_string_append_printf(cmd_common, "-accel kvm%s ", + args->use_dirty_ring + ? ",dirty-ring-size=4096" : ""); + } bootpath = g_strdup_printf("%s/bootsect", tmpfs); if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { @@ -2458,12 +2465,14 @@ static bool kvm_dirty_ring_supported(void) int main(int argc, char **argv) { - const bool has_kvm = qtest_has_accel("kvm"); const bool has_uffd = ufd_version_check(); const char *arch = qtest_get_arch(); g_autoptr(GError) err = NULL; int ret; + has_tcg = qtest_has_accel("tcg"); + has_kvm = qtest_has_accel("kvm"); + g_test_init(&argc, &argv, NULL); /* From patchwork Thu Jan 19 10:05:35 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: 1728736 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=sU/mku+8; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NyJbP1WDgz23h6 for ; Thu, 19 Jan 2023 21:22:23 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIRov-0004eP-Qh; Thu, 19 Jan 2023 05:06:57 -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 1pIRoC-0003z6-SZ for qemu-devel@nongnu.org; Thu, 19 Jan 2023 05:06:15 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pIRoB-0005HV-Bt for qemu-devel@nongnu.org; Thu, 19 Jan 2023 05:06:12 -0500 Received: by mail-wm1-x333.google.com with SMTP id o17-20020a05600c511100b003db021ef437so840796wms.4 for ; Thu, 19 Jan 2023 02:06:10 -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=vGJD4ga3J8xHyk3OZlII0Hth91GC6i661lSTuntqoMY=; b=sU/mku+8bdAPvPh/NwGYZAIvmwLPGFZ3THFdmBM7LeshJlWO5fDPuyFzYLHBRshbLu 9p5TKwQAmNc1mcTFJOeu9pYx34ALHT5bwEyQoQVWSZWdxMwp1GxJZx5IEtBVXhumN97m m+9fohXi5pvZDEjvZbGQaNsHZH7xpvWFgGe2/I64RgTjd2v8pEQp4SrcHzolhdQKoXn/ G9wfg4olJdyZGqc1o/f6eYezrY5/Obpp7K0TR+14pij+LnncAAdnhP6sAKpU69pHqjdD 9jI9QO47sVmj6d27s94IS82Bf1psyz0NJeyJfETSw+Ls8rf1s2QJDkPXVzSqxriPKUeR kGDA== 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=vGJD4ga3J8xHyk3OZlII0Hth91GC6i661lSTuntqoMY=; b=24sH3Pt6ButAhI/bfCqCZjed2BiGrM3A5lYzJHwuLvjnA5F9jpoKyjSfPmQjnkB0ST zw6p+RAjwuPYBGs1kTK0bX1eKf/ErbCV+re5yO/qHeqiG7sKyVlkh27NbPgLUzqAXdXn 3blWiEJDMlw02dM4hY391nneV9XQqGQb8ktyW3HWOLOGLC0YS9T0oZSNvMHe1JvDzbe0 QAhXuOizNyvVdfNaZ2BYdkCvnbLEY43kT8DPZ6jVukhtIjgQLQOlYQeztEoDtl9rzxGw R3ALpRBeWW5MrIy7Sj+rPjEpQHmzIiq1ataKjSlrYNYfsQpI6uz88hxME1kymDcna6GU eMCw== X-Gm-Message-State: AFqh2kp7eRL4K/nUemxVrNVwxCRNwK+3pzHCIy63vyGrB2IZfyYFnL+j gv1DJ5ln2VF79+kdBYQEq306S//S+7D6XQYu X-Google-Smtp-Source: AMrXdXtXFCIYSPd9+rhX3Kp0bPwFLaMtXXUQF1Gou/sEwCDxpwYLxszGIdV7ReP8qs1DBNbUFlUk7A== X-Received: by 2002:a05:600c:3b29:b0:3da:f678:1322 with SMTP id m41-20020a05600c3b2900b003daf6781322mr10067606wms.38.1674122769486; Thu, 19 Jan 2023 02:06:09 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id bh25-20020a05600c3d1900b003c65c9a36dfsm4526130wmb.48.2023.01.19.02.06.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 19 Jan 2023 02:06:09 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Laurent Vivier , Fabiano Rosas , Juan Quintela , "Dr. David Alan Gilbert" , Thomas Huth , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [RFC PATCH 6/8] tests/qtest/libqtest: Allow checking for HVF accelerator Date: Thu, 19 Jan 2023 11:05:35 +0100 Message-Id: <20230119100537.5114-7-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230119100537.5114-1-philmd@linaro.org> References: <20230119100537.5114-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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=unavailable 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé --- RFC: CONFIG_HVF is poisoned. We could pass host config definitions to qtest using: diff --git a/meson.build b/meson.build @@ -2547,6 +2547,7 @@ foreach target : target_dirs accel_kconfig = [] foreach sym: accelerators + config_host_data.set(sym + '_QTEST', '') if sym == 'CONFIG_TCG' or target in accelerator_targets.get(sym, []) config_target += { sym: 'y' } config_all += { sym: 'y' } Then test for CONFIG_HVF_QTEST ... --- tests/qtest/libqtest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index 6b2216cb20..31650bdc9f 100644 --- a/tests/qtest/libqtest.c +++ b/tests/qtest/libqtest.c @@ -901,6 +901,8 @@ bool qtest_has_accel(const char *accel_name) } } } + } else if (g_str_equal(accel_name, "hvf")) { + return true; /* XXX CONFIG_HVF is poisoned... */ } else { /* not implemented */ g_assert_not_reached(); From patchwork Thu Jan 19 10:05:36 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: 1728715 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=DRlkFpm4; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NyJN02qGyz23gM for ; Thu, 19 Jan 2023 21:12:32 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIRos-0004V8-Ti; Thu, 19 Jan 2023 05:06:54 -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 1pIRoG-00042s-Vg for qemu-devel@nongnu.org; Thu, 19 Jan 2023 05:06:21 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pIRoF-0005Db-FE for qemu-devel@nongnu.org; Thu, 19 Jan 2023 05:06:16 -0500 Received: by mail-wr1-x432.google.com with SMTP id r9so1323634wrw.4 for ; Thu, 19 Jan 2023 02:06:15 -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=SkoelqvlvrsqhEevYhEIlMsDmCtwS6JCJdP3XdXAQaY=; b=DRlkFpm4Ujwik5d5delbdEAW7f3wEd9Sn4dA1gs8+gOTt1BEmEgkIPvtU4GjoV3+fY pI85suLacZ02B3qtWWwjbQ6k0Oua7ZL+l9OdsLcEJjSCy/WA9xpgPI3F41VlWAnXMYUv C5A7xWnaI49Fl9gZ141fFRAUOAx9lXlZJ90lV8TOWXZpFIJTs85SJ9epjCtZNbanEZ18 T/sfHNTjmwcmGGr4GWkVQVz+LOP9Va5YGM3V89RXe/P0x3l+4B+Wx5q8YdwSraR0tR27 R1FgxbS8cfH0jPaeV64aZlLD1kY66FFBZo3kuBIs0pMeBxKXnO2YbDSn7iishF9lb9q1 lypA== 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=SkoelqvlvrsqhEevYhEIlMsDmCtwS6JCJdP3XdXAQaY=; b=CAZc2QGHHrQ7Lq/g/+puOp/KxwpAMaHr6JgEutLAo9/i5LYpa7jvEccAB72hVRZspF Ve727R3XPaNwZy1zCoCvVwKApl7zVAB1c/8nF1w7a8cq3Tc+C1Tom5mcmMwiv4NPx3Ak S5YjQT9bDh+OmAer2tX/g7l4hxpsW0oGxsCsRvE6oZkLrZKpn583ftVUq37WfBBfIt9y rBIG0unGO0uh1tOPBMt5CsSYFvYXQK0tLofpPhYWFoRkvlZLuzo14MliVw4uSj0Fn2Ds hxPa3ctVcec7P1jtQO8ONyGL4fXEk4OAXkNeGj5W2Mcyvnfqt0yx0KNaiK7UkiyAv7Vf whhw== X-Gm-Message-State: AFqh2krCFVL3DNQpJ+AoYvLsQr8iJluDxIObku54kafhRr4TKvxima0r KJ92iNs50BabAgOSmz2X49wjkaCpjMcJ8kOw X-Google-Smtp-Source: AMrXdXtFRV6Ltwk7KwW1YBEN46/o8csF+2zKeubCveTym0yzQTOjrg//mdn02u5XmK48+dmSBL8K4g== X-Received: by 2002:a05:6000:108a:b0:2bd:e8b2:4da8 with SMTP id y10-20020a056000108a00b002bde8b24da8mr4462105wrw.35.1674122774481; Thu, 19 Jan 2023 02:06:14 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id j15-20020adfd20f000000b002be2a4b521fsm5490774wrh.45.2023.01.19.02.06.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 19 Jan 2023 02:06:14 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Laurent Vivier , Fabiano Rosas , Juan Quintela , "Dr. David Alan Gilbert" , Thomas Huth , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH 7/8] tests/qtest/boot-serial-test: Allow running with HVF Date: Thu, 19 Jan 2023 11:05:36 +0100 Message-Id: <20230119100537.5114-8-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230119100537.5114-1-philmd@linaro.org> References: <20230119100537.5114-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/boot-serial-test.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/qtest/boot-serial-test.c b/tests/qtest/boot-serial-test.c index f8d0c684c2..4a2cbcf8e8 100644 --- a/tests/qtest/boot-serial-test.c +++ b/tests/qtest/boot-serial-test.c @@ -19,6 +19,7 @@ static bool has_tcg; static bool has_kvm; +static bool has_hvf; static const uint8_t bios_avr[] = { 0x88, 0xe0, /* ldi r24, 0x08 */ @@ -273,6 +274,9 @@ static void test_machine(const void *data) if (has_kvm) { g_string_append(cmd, "-accel kvm "); } + if (has_hvf) { + g_string_append(cmd, "-accel hvf "); + } g_string_append(cmd, test->extra); qts = qtest_init(cmd->str); @@ -301,6 +305,7 @@ int main(int argc, char *argv[]) has_tcg = qtest_has_accel("tcg"); has_kvm = qtest_has_accel("kvm"); + has_hvf = qtest_has_accel("hvf"); g_test_init(&argc, &argv, NULL); From patchwork Thu Jan 19 10:05:37 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: 1728729 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=epe6N7EK; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NyJSw5hDFz23gL for ; Thu, 19 Jan 2023 21:16:47 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIRou-0004ai-Bk; Thu, 19 Jan 2023 05:06:56 -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 1pIRoN-00047h-Up for qemu-devel@nongnu.org; Thu, 19 Jan 2023 05:06:27 -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 1pIRoM-0005Iv-Bx for qemu-devel@nongnu.org; Thu, 19 Jan 2023 05:06:23 -0500 Received: by mail-wr1-x42d.google.com with SMTP id b5so1363098wrn.0 for ; Thu, 19 Jan 2023 02:06:20 -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=tLwGuTl8bFyv/J/EkEe4pO8+RMjvvODUvba2H4Ltn/w=; b=epe6N7EKDuPqfmzoHL/51kuAnQZSSLwXtAc7yW8a4O28igvEgHUViuzZ5DvTZYYld4 NeUkksS6L553DGeBoqLqvv9gRh5De7zXNy18tc/YWHdtwkFerkX80yuc979CB6c5GrEW qvl4rXFPyMeof/rb9y4St5cpiSWW1FCdJm+T2gYUzbzYybOa1xd1dR/33chXEEa87eZt CPZFSyKtNi42ijKA4mKYttHg5FEqFzasqV7rOIhVx2zVdKbK8bd0xTf9K/KGa3yRfre7 eMgDKYvqRKz1TCIsONTMW7LESzDuuuWzLyByHXIc2F8ds54XhkEL9bqyGcpv9mc8lElZ MJ4Q== 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=tLwGuTl8bFyv/J/EkEe4pO8+RMjvvODUvba2H4Ltn/w=; b=oyT05RvWNz9n26zX4G7lerBKSOml+NJht5dR++oPbt04fJR5dvsr/9Mnfy+5WrsUwt 2Db/5Tn93W0YeuzaFjGu4ySsB0Q0nj8THN5xcxXPjLOAlYpbq2RBYwLcR1ySTM6OK77s Xb4Kkjcp+1wytier4ztl4pIUzeDUJQ5N0NFwLSD9lDv25/JPwriHl4mUSdl2bpMyxA02 mns9PlAsYa/5af7OCRk4Q2eXu4ju/H3NFtVmNAHqnH6wRC1Cplgi383OIFujfQgvl7iW MAUeccsB/f3UelTSzrldYYSZWwI51vXpz1FAKLsJwbIpqcGgIDvRoGkA6l4dXMDMXSiP Ywpg== X-Gm-Message-State: AFqh2krjRMaXkkLoIZK0AbWu1UzZxqOZWbTwl+npul5+DdAA6uqcAwCK ldmICvqGjlzj6Hup/tfjZOrQGpnaIFWz2oKX X-Google-Smtp-Source: AMrXdXvPuje4PxaV6Yl3w0kExms+6aUCdQGfRdAmgqzP5gVJzuiQxxxC05CNXUui+9nsUESTpkxRsQ== X-Received: by 2002:a5d:6e42:0:b0:2bd:fcd3:44c7 with SMTP id j2-20020a5d6e42000000b002bdfcd344c7mr8542787wrz.29.1674122779596; Thu, 19 Jan 2023 02:06:19 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id o15-20020a5d62cf000000b002bbedd60a9asm27608453wrv.77.2023.01.19.02.06.18 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 19 Jan 2023 02:06:19 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Laurent Vivier , Fabiano Rosas , Juan Quintela , "Dr. David Alan Gilbert" , Thomas Huth , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH 8/8] tests/qtest/migration-test: Allow running with HVF Date: Thu, 19 Jan 2023 11:05:37 +0100 Message-Id: <20230119100537.5114-9-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230119100537.5114-1-philmd@linaro.org> References: <20230119100537.5114-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=unavailable 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/migration-test.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 1e7f1ea162..7a0fcfb81d 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -47,6 +47,7 @@ unsigned start_address; unsigned end_address; static bool has_tcg; static bool has_kvm; +static bool has_hvf; static bool uffd_feature_thread_id; /* @@ -614,6 +615,9 @@ static int test_migrate_start(QTestState **from, QTestState **to, args->use_dirty_ring ? ",dirty-ring-size=4096" : ""); } + if (has_hvf) { + g_string_append(cmd_common, "-accel hvf "); + } bootpath = g_strdup_printf("%s/bootsect", tmpfs); if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { @@ -2472,6 +2476,7 @@ int main(int argc, char **argv) has_tcg = qtest_has_accel("tcg"); has_kvm = qtest_has_accel("kvm"); + has_hvf = qtest_has_accel("hvf"); g_test_init(&argc, &argv, NULL);