From patchwork Thu Jan 19 14:58: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: 644088 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp257033pvb; Thu, 19 Jan 2023 07:00:06 -0800 (PST) X-Google-Smtp-Source: AMrXdXuLilmrn75Rz4JBHJQP7yYE9KGJOH4/027nFq5EHZ3ACkGHrk/T8aVhWNVZNGMauoYwCplp X-Received: by 2002:ac8:71c4:0:b0:3a7:f3f0:483 with SMTP id i4-20020ac871c4000000b003a7f3f00483mr13877786qtp.60.1674140406520; Thu, 19 Jan 2023 07:00:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674140406; cv=none; d=google.com; s=arc-20160816; b=pY5M4vQ0zJMTnK/qt30lhvaSC9sA3x54NMqUtYI8HNZDk1m/W+30QGnUKQRxTi7D0q xuYa41KlJRMTJIjdXcKyFHu/QBywEWYpWKxXDrE/tOVVyM+9Vryt/0P446AnZmRWz9/V cVrCK0Qb5UzeK84HV5B57K8P2ohkZm09PsAZgFhl/0tfhtI2hax6hrFdFNLpkDcxOZlr 2DgEEPyqE2PpJBYc832MvAWPeA+my4zwXsZ8NLhxpQfsENW9MRez75QrAU5s0+EcUOV7 yTMQYrVdtI708UOHrZwOhzrS6NJWqXoiojx+95MXLQN9a2J/tMOLTVbPsvgw3mCCf569 Qtuw== 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=CThcQ4IXwzbhuIEPH7wu+o1eE9qqn2LCOFCtuelW+qs=; b=DNc3f01JvTWRrA4F1tDMJtFqw+3ynK2E84xniTauHrZmyKAHawAKEaSWXMcqp3HCcH lhOOugiyvjo0HRL/60QKZYv9pI+EKlLAFMJSJcnVhhlYmr0SW2hX0MU4/0r1V7fZuk0x yok74PK9qEO5R32o/3ckFxx7M1s7pYji+jAUTuQH81B7yb9Dxv3Ufy/1+25Mr/+a3drQ H++znybxDQVLWoRUOSN4lXN6wHkvVwnTzDH5I0rnXr1Qdh24gOP4MReSurMDVYUKP6HX M7L/3ykCygPpoaipGXeTcNxQuR7yced1/uuryCYtIzC6kqbGoTqlkfR/Fs75I75NqGd7 Cosw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eoQBug3d; 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 z1-20020a05620a260100b006f8a0f33593si22826825qko.319.2023.01.19.07.00.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Jan 2023 07:00:06 -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=eoQBug3d; 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 1pIWNc-0006Fz-VY; Thu, 19 Jan 2023 09:59:05 -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 1pIWNa-0006FZ-QU for qemu-devel@nongnu.org; Thu, 19 Jan 2023 09:59:02 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pIWNZ-0003Xh-5j for qemu-devel@nongnu.org; Thu, 19 Jan 2023 09:59:02 -0500 Received: by mail-wm1-x32d.google.com with SMTP id o17-20020a05600c511100b003db021ef437so1456122wms.4 for ; Thu, 19 Jan 2023 06:59: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=CThcQ4IXwzbhuIEPH7wu+o1eE9qqn2LCOFCtuelW+qs=; b=eoQBug3deQoyR+Jfv0vaED0GlQGC5kNRSzN4lBMPYsNU1mAzqbi8ZVvMpbok2KB1kq D/w1Qjuv6V21C9ScLlk2lJwfzcp2CoFKHTgGfad4rd0R229bqIj+JA0U2+g7ud4Xt0OJ iGPbGQkKlkDfNvDftYSymT9DW/cJN/wXxUscQTaumWncryWR3RZTN0csMhLpOlPQYbQe l/NFOMe18pwpkEM3vv8p6R8wCsDvdGrLhobvUjnU0cOvaVo6Q8aKgUmrWCeV3kYHAWtA UAPQg5P33ZYBZ7UuOt5GvrXh0/V7W9TX4JLKDSZkhcKDsouC51UWoSD2tYJrFVoHRpNi i7rw== 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=CThcQ4IXwzbhuIEPH7wu+o1eE9qqn2LCOFCtuelW+qs=; b=KriKsurGOY0P523FJ20y9G7zTscVOvZw+VXdPKHGwxK3ia7ciF2JVhxkUfEmLhdmUE 5KOwRgheKrXvB7+NknHXvMi2bgPOPBE/owNkh6zabqa+eMeZj1qlysesg+rKAVyexIWM QiflzUgTZDgRwtqwAT9bBQVJsONJTjExZD7P6KAF4ry4rzMcR2ykdGqZSoiqzTN4LgGb BvYG7PO39jWSVsJxUlZj5oS3VSvwUVfCmZlftysKozboFlt4EGGqslFbxoUjWfrdjkAB JzC3NSaf5z3URzfmVF7orp4mkha3ghEK9oPxPLRVl8zr/0lfvLr0zvuriCd3ya4ziwyv w8tQ== X-Gm-Message-State: AFqh2kpgpMkbPKiKgN5+Bg7/le9nD+Deje/zx0EjgxNzfbo+UVsdScVM fYVtSdcYwgkRUo+G+rew6FWoVHGfSAqg7qdd X-Received: by 2002:a05:600c:3d16:b0:3cf:8b22:76b3 with SMTP id bh22-20020a05600c3d1600b003cf8b2276b3mr10243748wmb.0.1674140340296; Thu, 19 Jan 2023 06:59:00 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id q24-20020a05600c331800b003d1de805de5sm4793780wmp.16.2023.01.19.06.58.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 19 Jan 2023 06:58:59 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Juan Quintela , Laurent Vivier , Paolo Bonzini , "Dr. David Alan Gilbert" , qemu-arm@nongnu.org, Fabiano Rosas , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 04/11] tests/qtest/boot-serial-test: Only use available accelerators Date: Thu, 19 Jan 2023 15:58:31 +0100 Message-Id: <20230119145838.41835-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230119145838.41835-1-philmd@linaro.org> References: <20230119145838.41835-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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 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é Reviewed-by: Fabiano Rosas Reviewed-by: Richard Henderson --- 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 92890b409d..f375b16dae 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 */ @@ -257,8 +260,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); @@ -285,6 +292,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++) {