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: 644060 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp128833pvb; Thu, 19 Jan 2023 02:18:55 -0800 (PST) X-Google-Smtp-Source: AMrXdXuDDcwqkYCOgv1huaOHoOb4k8djFpOKMYHLB/BXUO9CNwKPPaYmH7yq7mLu1vpVNmaEiyAA X-Received: by 2002:a05:6214:118f:b0:535:59ca:6c6c with SMTP id t15-20020a056214118f00b0053559ca6c6cmr586169qvv.39.1674123535098; Thu, 19 Jan 2023 02:18:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674123535; cv=none; d=google.com; s=arc-20160816; b=uG/1gLfT7lM6gJh+G7Qkyw4thZ9a1b3aYJzH/mjcgglZsXtwkbC/TbE91gfrGuXqOC VVThdMeVP0zym6B1iaRw/0uYDuBsXRTdVEZpQ7YsK9+3GrAZae3iGZt4E9IZ38hS9h7V crshopz7Nis83y2hhk91MMoiUw83MuoLWyfdLHkRgNMy25ga29kMKOWAyROlLhRqyvw5 CqO+qiyPLMuMGVNHdsZElaPZ8EzUYBh5W0O15YUshWzJ28F5ocY48c+RNDIREsDHEpX1 +GROF6APAxtrkRdF6U7BkwKKd5Qx3MSMC7DjwIxNd3Q+HQY9Qyyq9C4u4X5IugSZpDxS 3P8Q== 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=lp7QBocGltbT5Ch7Xv6lzQ/CjEgDd3cHtWRpI2qpHEo=; b=XE2pwxy1AeIukWXI5VpsSaM2BZhYTAdfQR+d3nOe2jlpn440PxgyImLALSnLtmVQa/ 1pLK32X0Haf9OlJ+q090ZYUH23bDSkWRgc2SsD6sQElBvBWy9DyNbx+CuOIcD37Pnusm vwxeFhOq2qsltCC7RMl8EQPiWayTIvjl3F6YQQnVW2MYe9jO0Y45T5z75CCYcH3AVWs8 J/azcaw3NPEH1OP7TLxt8067nKr4V3UhQLZi6pw+uQ0WSY36gduflOdckOl2ISLEoBFA kDt8BTTwkniBdIZX3wRf6BEWIvZi43jsSMHuM1gDzGgmzxlZ3YjJLpF1ngci01mqiYTn 7oYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Y/gaUUR6"; 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 3-20020a0562140cc300b00531ccabdd60si24465700qvx.389.2023.01.19.02.18.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Jan 2023 02:18:55 -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="Y/gaUUR6"; 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 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-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.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: 644054 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp125502pvb; Thu, 19 Jan 2023 02:10:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXtqVO53rbPR/j+iCnhbjgObv5VELBJtpmxCgEMt0mQsHX82H1d7Ewei5Uss10jvvk4ty4Y8 X-Received: by 2002:a05:622a:260a:b0:3ad:96d:98db with SMTP id ci10-20020a05622a260a00b003ad096d98dbmr14263279qtb.62.1674123014208; Thu, 19 Jan 2023 02:10:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674123014; cv=none; d=google.com; s=arc-20160816; b=LcSRU1oZQl9bpXbdgE6lm785U9aPwra5YQOnL5KCBtrx82lJGXoncJL4VJDTvg+cTx 3Jaqpirv5TMMAteOrYPSKspqXhX6HDtBtn5UKgpfVuG50rWyiqAbYuHxoCX+DK68/+Bc 7b+AJD5SM58T973kSDwg5rSsUxLBwDUgZdoH2mIOprxi/oR5L+02i16QqLO9Sy73Pefd JIBA5Z24P5DQz5GPrEzi/kEF4qcRp/EJVn747GM0RSyQtWE7rpA296ZV1WfHjo2kVYei zudulG8HNtlOOUlK5QGst9XlP8mDYOxyvrfV9wr0JudLLrx6MTpcjpf1FCdtZzgiH30K Sf+g== 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=v+iwPL/+lazU1m0c8bSWGnJ+URBRewNqB8GAi6Kwffk=; b=YSbFbPxjebiiDJkGFm4YDyPEjTNeHjZy1zAVRXwFP0A86iw/lwJ6+/xZeAElaEGaP8 CUP6E3hnd/0GAYBfOjS/LPPN2a0BsrpdJ84LAcpBXyW5aHoDqPwy83uQfbNBwVPu7EMo 9b/cYbNdWB+K//qWnU+wTU6XQQK5L+9cLaTupPDIYwW6M8FXGk53bIvIfAq8ZhBVLnbe F1mso/fasEXlSgi06AcLy7DjUbpoIpx6TYu4F9bVX4McO4D+VDQ8jYsr522GpiC6FU56 ZZ/9VZld7zoH+HU3kTpSSRigs7fXdCwzPyYoM5OOTA8laTQYuZCK5BYk+V1aRdlITTDV yjag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Nq7u/Qo4"; 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 cd8-20020a05622a418800b003b637d3beadsi5872959qtb.612.2023.01.19.02.10.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Jan 2023 02:10:14 -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="Nq7u/Qo4"; 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 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-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.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: 644056 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp126628pvb; Thu, 19 Jan 2023 02:13:15 -0800 (PST) X-Google-Smtp-Source: AMrXdXtRCpBgbL9AHaD5Dw6gBrPNdnAA/rRFl9ffGhrZsF8Wd4EUCErWV2DsJbkbRGYyBz3FUQAS X-Received: by 2002:ac8:4f47:0:b0:3b0:3b56:58c9 with SMTP id i7-20020ac84f47000000b003b03b5658c9mr13225941qtw.30.1674123195402; Thu, 19 Jan 2023 02:13:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674123195; cv=none; d=google.com; s=arc-20160816; b=I1/e5Ye7Jw4NrsiQFHVaNjdSmhijWxmz7rPu7QvcU4g/K3duMkmlDkNVBNxBpEYt9F dTJkJ44tILHj0gNpD0ziHw38tOkaO8nES6J1vOFs+9bbVkGhHX/SQcy37Kdrc/J/HKAn +f22JMCKIIEwi3D3YawaPcDyfzql7GyvvvAlkXjwZB+7xEixuOjp3HKY10qy97h0LJn1 hRAdTy3gh5BVgTbxfUyQ4H1p5rPpknzwOBggaNZ4DcCmZh3zl7i01soh6RqKS/OeMnLO g08zCYrwsT/VzBqtPa4kxW86tyrCHPVED+UBcfyd83dzZyrW5N/1sqTZ5QaK5m5kvxLl UlIQ== 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=+5bluXdjaCn3oQ9NGGs572QWlIZ5/vAONfTlGZhWE+Q=; b=rvZdpsem9yr41USR3pqvCG+wDd37hzjaVn3WaGGIgB+4lBl0cZe5qb7GlAh05gntPJ tdipvfbN/zwAf7nbAhciHm4m16p+W/CHMmkr6eH3aB/uukPLgJEeaL0QHqChLP+GNGLo vIsMuL2JVcJguByJvaiDmyeq5wpkwARaP9LKGVgELlSNyb8GsOfuWBvg58+IOtjcfXbv WLBkg39H/vAOcOZcvniLTY2JnVZRZVLkSnNvKAZM72jyJOsXMo68wpZhm8B8oSPlGUlP AFMDKPeH61be8AsEzAKG65QXaZFdtAR6ylypBuvgOuuLHv5vR0U/hGqMHXhVdOcfzET7 l0Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F+7rMfdu; 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 h23-20020ac87157000000b003b6373c4ba7si5792364qtp.536.2023.01.19.02.13.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Jan 2023 02:13:15 -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=F+7rMfdu; 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 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-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.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: 644053 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp125449pvb; Thu, 19 Jan 2023 02:10:07 -0800 (PST) X-Google-Smtp-Source: AMrXdXuXGeIcVLDOijCjC8FhoKP8XD7IwuaoXsYLaXNaSZI3kitKq7Q5sbjcMXgIyxzuXEidpQWt X-Received: by 2002:a05:6214:188e:b0:4c6:eca0:4870 with SMTP id cx14-20020a056214188e00b004c6eca04870mr42053704qvb.30.1674123007478; Thu, 19 Jan 2023 02:10:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674123007; cv=none; d=google.com; s=arc-20160816; b=BBQ8moWxBPR2//rECU6vyCvSHYieCx5i1vRYlmJvFp9USNauP90vca6z0QYIj9R83x kBluKzrMalodik05UQSVbGJt/CskaoSle9MbFMgt5ImP1TGsYjKTDe0RCkVIJmRBR2pW NB2BPMvQdYlSOk811pwfdEjFat7ROygHIlAc4y7nPD17S7mhLlEI7IFCt5jRdmlzOU8V s6GbUFUX+NBHKTQqSc74VhVbxzpS9KvtJg1OabINF+O0muzOWt1DUftHiCGCJpHezcCo 5UkvqyfLa+NK7jYhWSRIR7ExfzAuQ2CmztROkSZXXr3W+PESBjV0x4mxsHmlY6aFPxbW aC1Q== 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=R9/wJsUKk8bQtxiGr+pYnou0gg/wwc/GqZGoP+Dlsik=; b=kMfOAs4rMkMt0RdtTmOpwFTNNhOtB4psCk91lwmsqeCCZB/BeZ1Sil7c5u5HSfIIie kAF0O+9VBlz4lte/HWxSU6OtYqZkKxjeH/+X+B/xfP8s+VztpyQwSzqxWTubPDWSSeGo 9F3j9Rlchf9vOCDvpJUxrkZ41MdiFY+bDLnEUSNclZHqUWmgWYh/3uWNLd9rPTE9x5n3 Z3CtfB4oNYqyASDChbXkXd0Jo8yahavuJrmxGAPaIt6fo5VpNleAoTjdzTe+keBXOHPQ jDxAe3Zs/vqFN7dVw1lvPtIVjfz27893N3jibUnuASIfskGcZ0OVH8a6CbZY8dexwd2Y VMvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="nmvG/a8r"; 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 o12-20020ad45c8c000000b0053432250abesi13316040qvh.210.2023.01.19.02.10.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Jan 2023 02:10:07 -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="nmvG/a8r"; 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 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-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.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: 644058 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp127864pvb; Thu, 19 Jan 2023 02:16:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXuYGpThBYCj1N9YuPy/FQLHoa5trMDCtZphP6gSpOJLFJd5uKC5k1cSsuv2wbsU/ZafzqcM X-Received: by 2002:ac8:45c4:0:b0:3b6:34b0:fc9c with SMTP id e4-20020ac845c4000000b003b634b0fc9cmr13770225qto.42.1674123382590; Thu, 19 Jan 2023 02:16:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674123382; cv=none; d=google.com; s=arc-20160816; b=HZf6s6uFa5eAxFufx4p5vOo2j9R66wx9wQBKA2YM9y2ZQT4LxQow+OgrHAJt4Yn2FU CGAm5H8TxjRBu0SO9Ru1D5Pr3FpvWPM3CZqZB8VsleM2mvmExrs5sPWABEVXhLtGfWi+ DWri+VdayobVckDKJG2WQ5QKsPiz2i3Ddrk+QsDzK88tJ5C6Qliiu8OTukesIrypLJxr Qe8YUWWzAvZNPzdLcCi2aDM5zJZy3qFRKvj83vUELpq/mR/LM/Zrow7slnkLKYe3olhM ef+rQbDGhNBDRNIvcIXdvKUS0dFvTcTd+azsV3IGsvB49cpg+2nDZBocW0xWLu0XuySd aRSA== 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=N/ZoZ3vSZS/no0sJwRkQRJxBLgmqJ91b3o5SbJuNG6I=; b=xToR918l0B7s+/cOlBm8+M3d8GzyEARYCxUP0NRP+KyWSheYjhHg7KZkjHpmlrirBO rpnYntCSyVzha38ilCPxOAcHwE1S6x8JCyjdoLWiT+WDIcopGwNOomxTLycU/wbLbYaq UzIqtEZGztUEws82vBZJ0BtFUIrOxqFQi1iPIcAgWgsyjeXJxpBeeoN5Ep0zh3nlEffe 7VFkuou4kTLenXzCxr10kju7m/chM2TmRb6I8PO0Rr99DnBqenpOYaRXgELh7s30HD3l RxXCnA7v93oI0pYwR8fTXzTDcXFxGtHu/l2fcdb32DAg1g0IvxAMeu9G2BPHKsVvX9K5 x70Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="I/zNVKPI"; 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 ef14-20020a05620a808e00b00705de800a8fsi14906878qkb.82.2023.01.19.02.16.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Jan 2023 02:16:22 -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="I/zNVKPI"; 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 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-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.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: 644061 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp130236pvb; Thu, 19 Jan 2023 02:22:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXsCejStB+difWxsz6LaUhAxb/JD4SMclnCdokjIxS9aR0rDh4xk8FD6wj4ZMLgKgtqoiilG X-Received: by 2002:adf:d0c5:0:b0:2be:34fa:7bdb with SMTP id z5-20020adfd0c5000000b002be34fa7bdbmr4059585wrh.39.1674123741901; Thu, 19 Jan 2023 02:22:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674123741; cv=none; d=google.com; s=arc-20160816; b=rE4b7g2ogtNJQk5ECDAfPf8566iT9QN0so/lbeFagu48msodJnPks296ZU0Ib6J4Rv DMZJOZEemV76GqW1g2TPDVK+ha1uq6bph+BOOu5up2/1o9WvFOlb0IfoiHHXf2pEjbvZ HlGZ4nGnNR9zxyPsANJdFiBNuWwrp3+Y3J30tc6ss6fVCd7WENcGbf3xP2mQWcSOBdEh 6g6n7R/wjkw9ZFrAUtOZvRaUJHVpWcSRWhW/nblsr82OOsiSgCpJd0cAgE8NSqDpw0kl EKwevTq7v+E7PTW/hSNjSBCf5OK/mGAou+58PuSk7S23uZydvvxScrGnVQ3/Cc/HTOZ3 1qng== 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=vGJD4ga3J8xHyk3OZlII0Hth91GC6i661lSTuntqoMY=; b=Ek7ET+fZomf+OFUnsqQqJHT15cToqx1AM1aiiTU3vDeXHM/TcTu7DPK+QjOJUIBNAB STwDWQ5JEe0Loy5TM7Cu/lUCRT+VySr5PsQSWfAbBzvbzFlqqMkeptvG+wjv0rFDRPp1 ILNI4FOD343C/frhw724k+Rg5hu2xZ2fgegXJVnkpp9UbnXYJMd7OXyZziFhrZo9qDS/ uTVdjm9w07A6VMwRsFo3UnCBxfZn5kVFMeHkEN7rhLY5pjf7U85gxwmWOsrg9y1c/Uun YoRL/X5+mi2JYs0qFMqJsoDJDn2ezqSAXQ35gWFURlqoS33TfLnD8QZvJEtAWUfXHVVh CmtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="sU/mku+8"; 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 bx25-20020a5d5b19000000b002bdef61c931si14845656wrb.1059.2023.01.19.02.22.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Jan 2023 02:22:21 -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="sU/mku+8"; 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 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-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.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: 644055 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp126359pvb; Thu, 19 Jan 2023 02:12:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXum013RIwpYPi/eVoGaF/2UKHzZcqtZ/IX02WGrsLD4fG/YGyTxFzLw9gSUEhn+vigKQqxL X-Received: by 2002:a0c:dd86:0:b0:532:17e8:4980 with SMTP id v6-20020a0cdd86000000b0053217e84980mr16920988qvk.31.1674123150985; Thu, 19 Jan 2023 02:12:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674123150; cv=none; d=google.com; s=arc-20160816; b=ayTWh2ffpbYzxKc2BHR9Zdv5UYDwriLziF/kdkheZ+qpAnriBF2178PPtfH8OWzYvd bxJ1x2sfSaHq+/WAKW6OzrRBGE0YoCJ0KSpQeLcRLDn+9lJngbrgoEKxlxhZMcQYsQqo 4JN7K5cyo6d9UFzlk7LDw7qme4OB3x/vsehTpiJUgtpmfr4H/W/ZKOJ/nvRIHW+iAban USN+nmj+Qzc0eju/6ns1ApTg487MxaxgwnZYSj/DzH95izqjq46nJHQG3wiY6T3Udg64 c+ixKPYH8HWEdj3yxmtOv8+TgvIN2rvvAzDvp8wpmqRbDd2SexkfaJoiwG6m9gKRh2l+ VRcg== 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=SkoelqvlvrsqhEevYhEIlMsDmCtwS6JCJdP3XdXAQaY=; b=pXJWhz76ddo+tuSGwVJRxk8lWrDlc25VLQoM1yBbCMn1EF0IukGjyto5EisGYjpePL EEWH8SneKKikxueY1l/IH5SVXpzRtc3nks8xrJoB+QDLZJYPlah0PGmwnyrXseo+jiwW yIYPuK7uuJf0I5g0dWbfh+JxD6sLBwDblM6kJtI5TuvwJkHUJ5cLCkAhJCDKh3EiMgq4 eCUhJnQuWaOLODKCATgWZTRst3Vo67JDHfYmoD6SMncte3V+5A3ftF4BiqFrjlEuHzbE otI4Vzm/wWQckgBXgOWpk/CheeK4z7EGUzgwAzd2B+Kp5OTNbKgNTybnb0pOkczd2OGu wu/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DRlkFpm4; 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 b5-20020a379905000000b006ff1cf821eesi6350788qke.194.2023.01.19.02.12.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Jan 2023 02:12:30 -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=DRlkFpm4; 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 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-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.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: 644059 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp128031pvb; Thu, 19 Jan 2023 02:16:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXtRjcOZ2bccWeaaBbosvTLJh3EEJeHR7sgHgcvMadipEBV8Xmmm1rYSXOOhtyVakS0CN9mW X-Received: by 2002:a05:6214:4413:b0:535:1c41:35d9 with SMTP id oj19-20020a056214441300b005351c4135d9mr15718901qvb.18.1674123406166; Thu, 19 Jan 2023 02:16:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674123406; cv=none; d=google.com; s=arc-20160816; b=sqoOPrsTSNnr/3K5bUpHZX9tZrxoZH5IVMgfimuYXpfLxI2c5wRJJ1tmnaCYNPb2fz JE4SupSzv3UAjz83twemGKWtxgmfq2cOwQAEuwQ+WqUJmLNOPN9H9sCs2su/nIlfQEWq Xo+JC93b0LmGPSfjBG7voTq4vCT8kHXn+bmcDSFopo5nViMRY9uWODimgTa/X4Qjb0eB B4nMJds49pnCT8BHcHRMCGDIq6Xgt0oY0PN2f/uvOCD7FYWfs+iTrWxFcjnvWpx2q/pn cKrEHkZVDcnuuBClPGVDWwOJj2FIf5lwqPfCGEW3RBYn90HE/vTrDbjx3nVaRE0+Vr5V vmVw== 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=tLwGuTl8bFyv/J/EkEe4pO8+RMjvvODUvba2H4Ltn/w=; b=SymtTFvcdkFYjMVl1j4yJlGyNLFUAjjL9s9FqnMjnHEmoS8dzXgqZtQX+BkhmP8LbI 1Lf0U3AeV4AxIoy6moUfjGHkDlVAaT/tXTfl9je4Z8NgVoU5N0jQsghBwp77nKCEVFzu C+E2CNiC+yRClpwsoMBXYfj5NiiacplBmPRwatOvAMr0fzeSYuvg1ft35qQ5GcLwrbvv 86joQ6YuvVYs5Qzgc97uIpntCLDAP+h8TTh6vmo5JcwC29JnJ5AlRUir4RP9AKfLJIGF GEZTp0W7hdd3n9d/2zzfHzNtX5nyeYmrT109B6eaAIkzWJ611SagHtrCvhLrewYIpxDm AIXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=epe6N7EK; 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 kj2-20020a056214528200b00531b8525701si20699390qvb.371.2023.01.19.02.16.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Jan 2023 02:16:46 -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=epe6N7EK; 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 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-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.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);