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++) {