From patchwork Tue May 2 12:14:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 678378 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp474440wrs; Tue, 2 May 2023 05:23:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ66oq3NIGfa9m3IBMjULwHXLpm/VwgSm1hvg8JN2OvsLuB8HyPjFEfLagV6lZ+I1xjiwEz9 X-Received: by 2002:a05:622a:138f:b0:3f0:a426:5f29 with SMTP id o15-20020a05622a138f00b003f0a4265f29mr28132799qtk.11.1683030239599; Tue, 02 May 2023 05:23:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683030239; cv=none; d=google.com; s=arc-20160816; b=j6iFftfFc+G64EsFpEpeGre1zAOlEDcJQ39fQCgk2plBg6b18TMDllu60sF/0Nqd2h R7pJ4FzOJUfnIkyLMMYA2+o56TLgy3DKFzVelESLSGsjc1NFtKH4w6RY0Lo/4yEke/v0 9/tuknRwkuJbLZeSm4ezHOSZAj0nSGXRvgsZ8wBqRxRnSeTtb0qLAlyht9ECO3pFoQER zvYA7bU3BmYDHheZBmE2bS/R5ep32EBnNtA8nT2Qn3KhiLFxNQqjsNj1m0TqXKw9y7GA LgimMr9MWSBTF5pEOLbg/pZFdJAcZ9wAM//gzxlqZmWQNfy3742bbXHi8eeHDXJXk/Dk ovcw== 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:to:from :dkim-signature; bh=75oLMFi9woiIKO0B/bZIkTS8BOscsn8EIfRIdrclRkQ=; b=CGL59xhyTYCoamdtMae6viS7faecHCB/j7czhQv1mmrImd5eZl3llqz9DahB+G8BzL 1joQ+J7SWpfsTFq256Boy+LmsNVh9Z2ZFDG71suyA1hrMoLjTM90QBaa8L/1KEaFfUZJ vWT9TwI6CAKeLbvgCuQtmMTFrnH/hPNgzd/M2QuAJG9KvaS4qI2n+ecOO7s2lD5LG9KW n1exzSpj1oPGmarxmPCr0Nf2DDvfpHdEir9KsDE3LmXHPZHRAOhvqHVzIKDjJVW07nbj 5ByNSIak2mV/t11kGkF+zbeloQLTuH6AzACWoIV3y3hNV9lAixSSrrAVjCaJ0qcVmkRK R92g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Tw1L3qgY; 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 o138-20020a374190000000b0074e309b5c23si16476106qka.121.2023.05.02.05.23.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 May 2023 05:23:59 -0700 (PDT) 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=Tw1L3qgY; 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 1ptouw-0003uC-LB; Tue, 02 May 2023 08:15:38 -0400 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 1ptouZ-0003lY-Ej for qemu-devel@nongnu.org; Tue, 02 May 2023 08:15:15 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ptouT-00030T-Qk for qemu-devel@nongnu.org; Tue, 02 May 2023 08:15:15 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-3f199696149so22771835e9.0 for ; Tue, 02 May 2023 05:15:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683029704; x=1685621704; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=75oLMFi9woiIKO0B/bZIkTS8BOscsn8EIfRIdrclRkQ=; b=Tw1L3qgYPwOgXXLuZprEYYv1r6hVTRe80fBgkx0cL77fGyBHc8dLTM11ZT9ih743mC TzlfpJGOB0qJ7jMLHDTBfTKpy/lGv74JGEnzxsYUV48zFihBF8wnA0SEn2bJkYH0BXgb wb2l6wGBN/evM+ZwfIx5Ln2srJ05sVAgfHovi2b/VChQE8JZCZV0sjH3/RLrxY1GOdyg c15+ZPnacrhZEJfFEXpBTuHg6PhZ+qFpObB4vmF3+jh1z/xGpVqExfdQ+ZVd9f8be+CU aef3ON1XbEZ9B3H/iTkU/SC6ihQlT+gttSSdx+l0HAc+LuxWVFfVbnyry6g4HLh2O4d6 F4Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683029704; x=1685621704; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=75oLMFi9woiIKO0B/bZIkTS8BOscsn8EIfRIdrclRkQ=; b=TPmaag+c1YPt1v4Bhk5VwTFmt2oTkjYwU+H2Yl8WsEt0hrTpbNHwd/NYSz5z0IB4E/ KGUNkyBaX0RxcCab/B0+hsfv+tyDlDwz5Ts+bGH8872Z/aqHjTAO6lBNjUjpGd3j0xEd U/6PtFNQuf1MllICYBffU8NAeoYj/k3dJtWV2uf9PWnOTXqcYSrWenMD7WEJNo/ONUcL c52YITZHtrK1LHWd8+jfvpkW5zTYuP4T13OJC6qXtl2dhgtBsoYBoNs4NuloyiCIGtGh c7dViUnejKHeTj/01qf+Rj4irJ616ipN8KXJmVTWynvtUBbKmr6F8j/01LECj6K4RGin 1MOw== X-Gm-Message-State: AC+VfDwWCk0M7TQRCQOr01z+70rpFw7kLwzmbOnfivyl76dMXDtkIXQV F4euuKeNkixfvjgCOlpXO8NYzT7DPTmwSou4O8g= X-Received: by 2002:a7b:c7d0:0:b0:3f1:75b3:60df with SMTP id z16-20020a7bc7d0000000b003f175b360dfmr11613238wmk.41.1683029704054; Tue, 02 May 2023 05:15:04 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id g10-20020a7bc4ca000000b003f171234a08sm35040330wmk.20.2023.05.02.05.15.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 05:15:03 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 06/35] tests/qtest: Adjust and document query-cpu-model-expansion test for arm Date: Tue, 2 May 2023 13:14:30 +0100 Message-Id: <20230502121459.2422303-7-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230502121459.2422303-1-peter.maydell@linaro.org> References: <20230502121459.2422303-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x332.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, T_SCC_BODY_TEXT_LINE=-0.01 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 From: Fabiano Rosas We're about to move the 32-bit CPUs under CONFIG_TCG, so adjust the query-cpu-model-expansion test to check against the cortex-a7, which is already under CONFIG_TCG. That allows the next patch to contain only code movement. (All the test cares about is that the CPU type it's checking is one which definitely doesn't work under KVM.) While here add comments clarifying what we're testing. Signed-off-by: Fabiano Rosas Acked-by: Thomas Huth Message-id: 20230426180013.14814-7-farosas@suse.de Suggested-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- tests/qtest/arm-cpu-features.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c index 1cb08138ad1..3fc33fc24dd 100644 --- a/tests/qtest/arm-cpu-features.c +++ b/tests/qtest/arm-cpu-features.c @@ -506,9 +506,23 @@ static void test_query_cpu_model_expansion_kvm(const void *data) QDict *resp; char *error; - assert_error(qts, "cortex-a15", - "We cannot guarantee the CPU type 'cortex-a15' works " - "with KVM on this host", NULL); + /* + * When using KVM, only the 'host' and 'max' CPU models are + * supported. Test that we're emitting a suitable error for + * unsupported CPU models. + */ + if (qtest_has_accel("tcg")) { + assert_error(qts, "cortex-a7", + "We cannot guarantee the CPU type 'cortex-a7' works " + "with KVM on this host", NULL); + } else { + /* + * With a KVM-only build the 32-bit CPUs are not present. + */ + assert_error(qts, "cortex-a7", + "The CPU type 'cortex-a7' is not a " + "recognized ARM CPU type", NULL); + } assert_has_feature_enabled(qts, "host", "aarch64");