From patchwork Mon Apr 24 09:22:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 676559 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp2054628wrs; Mon, 24 Apr 2023 02:24:40 -0700 (PDT) X-Google-Smtp-Source: AKy350agjro7Xj84d4dqOubTWTHtoIqY6Sbhl2MpSHJctyEAqX5iysh428x+Zc8GBi1vJjgJuGqe X-Received: by 2002:a05:622a:345:b0:3e3:8ed5:a470 with SMTP id r5-20020a05622a034500b003e38ed5a470mr21549219qtw.1.1682328279914; Mon, 24 Apr 2023 02:24:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682328279; cv=none; d=google.com; s=arc-20160816; b=rThCqle7PhgNn51Qbog0UAjiUSExEElmeCCRTzPuy2zAz6IzN1PDsW3YwqMpuSRYpV KQmMCBOI4n4zPMmR0l9djPhVs4HQvt77p7lbouKeyp7NO8certnA5gxYM0teo5WtGtVb FmLqFwwr3b8XFJwbOthgpUYnjahdJKG7iZvVOPbJW/xnh6mOJE1o/MZsrZbSwXUz2wsc 5kU7ADXHTPIacRrqHuSQlJAeBdOWchqtvF6lPuXFEz1v0jaTP7NYpn4eTlRdtQ2NZCWu 6iCMWbstTwpP+3uff7QK82KyjvYyNmIj/2RW21LI1V7h1NAlMmik6gvm8YCmn6u/a/Wf 3QqQ== 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=rKJ6jFTTTSxD6Aty0rAW8PYU4/632z+CMGqhH5MMkms=; b=Y6wAeD8sfnluUIpeCUS3PLux6a1jF015Tgnzdumr+OY4pvOxPnZqOCNuj641ejKWjK 10XYYFknU49ykb9yCJdf1aOq4rBeWL0a7o/IRep5IKzzGLlj9Zh4hxU2Or9aj4wIry6e jcGWLPFSKRJTXDmn0t8joO+i+ZQblAYap2XwfOQDj+y/+QZniO49CpnEaExkMW8fKEdz 77BxJqlk9p3ijSlQN0QGGyZ0Mv2Im/ybAFmdroEetBZhZmWSyS36bsM5pqfqUz/Z7q9n EvbnNm3Jzyn1t4C6NRZBulJP/d15ExYPNyr2/a0BsZ7757hJIw9u0GXXVW651agav0HD 1t8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ilz9bhQ3; 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 q18-20020a05622a031200b003b9bd1f1dedsi6984492qtw.612.2023.04.24.02.24.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Apr 2023 02:24:39 -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=ilz9bhQ3; 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 1pqsPQ-00074K-QG; Mon, 24 Apr 2023 05:22:56 -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 1pqsPO-000729-5m for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:22:54 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqsPM-0004jv-6y for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:22:53 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-3f19afc4f60so10495885e9.1 for ; Mon, 24 Apr 2023 02:22:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682328170; x=1684920170; 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=rKJ6jFTTTSxD6Aty0rAW8PYU4/632z+CMGqhH5MMkms=; b=ilz9bhQ38wsEoy4GCgG1j4/fd5ahzhxGLrPR6jUiKYXcQQwOHcJ8a4/XTQB8z1NrR6 j9+iRpmE5VtK9XGKoSOw+BVQyj8PzKoWv3w3WgrL1ycJa8I4NALvne6lxTiBgOeMCe// 4fcaUvkTcIjtdS3S+miFTu7FxmnYE72h49qbPLLkhiPD2xIuYlauX4F06k7cuyBcOQI3 wtmc8Cw/c2Au5W4QD7mByU5mSGyXUkXJmcnh+4EoVdh/cSQaTX54RGdaXAAGY7aRGWgX yQgbmhwY0t58mWMd01PsOXIWZWZzCG9YvNX8a31wYu0rQXMhz2PZs/B9aJUDwKE63Oyt zM9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682328170; x=1684920170; 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=rKJ6jFTTTSxD6Aty0rAW8PYU4/632z+CMGqhH5MMkms=; b=NTr2ZYf5+4intUytiEMI/X9TEf7SmREwEXSq3orVMLogSeGOTAbIkn6n18NZB4ml0P a/Vq0JGv+IUD0C1TD299Q8ZDGBDWrzgab/pYY+nuiIDR5ieMcfIQ5IttjLZlZoBrdwD1 PfQ6KZxyIVttC6ImZmJt8bB8ESSvbHNtKTgbmdcYwJuzV8Z2LlI5DZyGFB56PBN9y9CT dA7tGkeW5Z4UOsCv9qv9tvAlnpJicV45jPd6f98VcdyALFXa9YCpqhjMqx1SEKNgZln/ KqjaobknRL4DlcLxAQXTEf3nL8dAnHWVSaoG6BvBDlTuy07XxVwz0xUrxguNhs1ay9hH 7lgg== X-Gm-Message-State: AAQBX9ewfEFaAxmBN9QMlLP7oonGQjjjSXwH9b+JFY4qCcdjPFaaZHFW LB6mztt2/0yQlXwVNLYnp+iyzg== X-Received: by 2002:a7b:cc8f:0:b0:3f1:819d:d050 with SMTP id p15-20020a7bcc8f000000b003f1819dd050mr7046909wma.37.1682328170545; Mon, 24 Apr 2023 02:22:50 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id hg7-20020a05600c538700b003f1940fe278sm8182665wmb.7.2023.04.24.02.22.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 02:22:50 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 954F61FFB8; Mon, 24 Apr 2023 10:22:49 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , "Edgar E. Iglesias" , Paolo Bonzini , Aurelien Jarno , Peter Maydell , Juan Quintela , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Richard Henderson , Joel Stanley , Leif Lindholm , Markus Armbruster , Radoslaw Biernacki , Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , John Snow , Andrew Jeffery , David Hildenbrand , Bastian Koppelmann , Max Filippov , qemu-s390x@nongnu.org, Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P=2E_Berrang=C3=A9?= , qemu-arm@nongnu.org, Eduardo Habkost , Ilya Leoshkevich , Kautuk Consul , Hariharan T S Subject: [PATCH 01/18] tests/requirements.txt: bump up avocado-framework version to 101.0 Date: Mon, 24 Apr 2023 10:22:32 +0100 Message-Id: <20230424092249.58552-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424092249.58552-1-alex.bennee@linaro.org> References: <20230424092249.58552-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.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=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 From: Kautuk Consul Avocado version 101.0 has a fix to re-compute the checksum of an asset file if the algorithm used in the *-CHECKSUM file isn't the same as the one being passed to it by the avocado user (i.e. the avocado_qemu python module). In the earlier avocado versions this fix wasn't there due to which if the checksum wouldn't match the earlier checksum (calculated by a different algorithm), the avocado code would start downloading a fresh image from the internet URL thus making the test-cases take longer to execute. Bump up the avocado-framework version to 101.0. Signed-off-by: Kautuk Consul Tested-by: Hariharan T S Reviewed-by: Thomas Huth Message-Id: <20230417134321.3627231-2-alex.bennee@linaro.org> Message-Id: <20230327115030.3418323-2-kconsul@linux.vnet.ibm.com> Message-Id: <20230330101141.30199-10-alex.bennee@linaro.org> --- v2 - limit --max-parallel-tasks $(JOBS_OPTION:-j%=%) --- tests/Makefile.include | 18 +++++++++++------- tests/requirements.txt | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 9422ddaece..a4de0ad5a2 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -138,14 +138,18 @@ get-vm-image-fedora-31-%: check-venv # download all vm images, according to defined targets get-vm-images: check-venv $(patsubst %,get-vm-image-fedora-31-%, $(FEDORA_31_DOWNLOAD)) +JOBS_OPTION=$(lastword -j1 $(filter-out -j, $(filter -j%,$(MAKEFLAGS)))) + check-avocado: check-venv $(TESTS_RESULTS_DIR) get-vm-images - $(call quiet-command, \ - $(TESTS_PYTHON) -m avocado \ - --show=$(AVOCADO_SHOW) run --job-results-dir=$(TESTS_RESULTS_DIR) \ - $(if $(AVOCADO_TAGS),, --filter-by-tags-include-empty \ - --filter-by-tags-include-empty-key) \ - $(AVOCADO_CMDLINE_TAGS) \ - $(if $(GITLAB_CI),,--failfast) $(AVOCADO_TESTS), \ + $(call quiet-command, \ + $(TESTS_PYTHON) -m avocado \ + --show=$(AVOCADO_SHOW) run --job-results-dir=$(TESTS_RESULTS_DIR) \ + $(if $(AVOCADO_TAGS),, \ + --filter-by-tags-include-empty \ + --filter-by-tags-include-empty-key) \ + --max-parallel-tasks $(JOBS_OPTION:-j%=%) \ + $(AVOCADO_CMDLINE_TAGS) \ + $(if $(GITLAB_CI),,--failfast) $(AVOCADO_TESTS), \ "AVOCADO", "tests/avocado") check-acceptance-deprecated-warning: diff --git a/tests/requirements.txt b/tests/requirements.txt index 0ba561b6bd..a6f73da681 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -2,5 +2,5 @@ # in the tests/venv Python virtual environment. For more info, # refer to: https://pip.pypa.io/en/stable/user_guide/#id1 # Note that qemu.git/python/ is always implicitly installed. -avocado-framework==88.1 +avocado-framework==101.0 pycdlib==1.11.0 From patchwork Mon Apr 24 09:22:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 676556 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp2054530wrs; Mon, 24 Apr 2023 02:24:23 -0700 (PDT) X-Google-Smtp-Source: AKy350ZGnLHrgl4B3Q6hrwYyAh+NEcxE0FCiuRrDfB6294ZzaYYuwkSV463hgZXr2lOmgzZmM2jj X-Received: by 2002:a05:6214:c8a:b0:5f1:6b15:46cd with SMTP id r10-20020a0562140c8a00b005f16b1546cdmr18663940qvr.40.1682328263158; Mon, 24 Apr 2023 02:24:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682328263; cv=none; d=google.com; s=arc-20160816; b=uIarx9PC+T1TrSHEjFThSZnnrv49IuzcmAT/yXNBXc2nGcaff+8MpVZAS/SyIotHu5 jpDmPudOyFYvAnuacAwoIqC+S4Y12pDd92jHi+Dpjxi1632yPAg5Qb+EBCCDv8nso5rs Cpcbv3Tp/lY2NOCX1AkflZLmYVJO5lfSHG9+yAl2YL7KzYBT7xZD3wDmv8lnxAkqDJgq 9KpOgOxaNrW/AKLueht06Dz/0AASRQEBbZf1QuAr3ldWZrqfQg+uA8TS5xaPhUgx2pm2 GYw777I9InADnbMJLM3kXogjD51Wwu94UtHaj98orlijCuEpbZrQ++hBIm2s+vBI9qAt xcNA== 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=blXnV5I8slYMdOD9wjky+sTVJVxiXjflhfvbDxIY+qc=; b=ltlGt08oLlcr9+YdABOWeBx/F55kHA/n+VUNFObeVPi9KS0RqHhCI+Se7o32CXK7oH XDhx7h56/oxtStJiQz2fAfkMVkgubXHmu2E0Co1rCp83w41LD8EqbHf4hTdw3u+Wr88O ardUwxlQdtTQzrBuORuChZBewMIm6QGcB5ZMHUAPt0RsKO2aRcSnzq6Sbhabe1hkH5Pf rbBGuDFfSqRpYtUss5TGQFMQtKKEHQvwi5DdjCmr+wZDifmvTREby9LEbedKSPOP5rjo xoDzDbbx5JPGqyWPtkYvOI/KR5cGlX95anPvLDbyI7Rqhe47t2yip7LETZcLY8XZkJ1M 9ubQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QFrTguKC; 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 i7-20020ad45c67000000b0057049fa63cesi6879442qvh.570.2023.04.24.02.24.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Apr 2023 02:24:23 -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=QFrTguKC; 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 1pqsPV-00079U-Kt; Mon, 24 Apr 2023 05:23:01 -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 1pqsPT-00077I-D5 for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:22:59 -0400 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 1pqsPN-0004l1-Ta for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:22:59 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-2f27a9c7970so3797984f8f.2 for ; Mon, 24 Apr 2023 02:22:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682328172; x=1684920172; 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=blXnV5I8slYMdOD9wjky+sTVJVxiXjflhfvbDxIY+qc=; b=QFrTguKCLt2FepLRh0bEe/X1w0ZAlEps11McUj0leDuAh79ndrZ2Y5NuOCMwPrJxQ/ 56wJncPKJiE4qIwh2yxsxrxO8EK6/vVchaTXdkmCknKON9QLw6mXwQ4uo1pbhOfgfQyU 3S1lkS75cUh1xxErX+Dtk5/+dCFw3bgQwVdzDIo4tYkYCJCWT4LGnDKul/FeOjT3cN5y iDe4WrNkwYwxPQV4XEzNVEDJwDTAi+NLO6jOMirEELwUxMy1mtKMoY1u38DEIED7p7zi x0pYF3PdVUs6kBOY4t6JKmytSR/YLLdTNBX7vK5hVb7UA4UuC9tyDGL+5rDTb2++Zw4d MBow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682328172; x=1684920172; 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=blXnV5I8slYMdOD9wjky+sTVJVxiXjflhfvbDxIY+qc=; b=f5uIuKpEaA47+laBwDa7JJd6SFdY7Owk1kvDhlVbSSQw5V6tCRJrk+n7dMt5vosRKv rXESgjBOFYs/FEg/2/2Rp2e4FkU06WBzmdvA93pJmfOcyjJRzrplpxNL/pIucQhWuJBH bTMwU/0l9EFjjLtysC+5N7AHbjh9pIiag9OxI8Eed25/dwXR3UwWVncf+L3RcM1f5KE5 2NIhV0jTMkdViMkMcqx/fS1qbAIulyLF5djvsrNycva8LbKbrirG5RYhnhC8D62yvqik i/C2BYYWIfITvUZTcBY2qXN0ndxXkjsTRcbEVG5qWiSAkMy9v9PyAtn73oltWXcvchgD oIwA== X-Gm-Message-State: AAQBX9fC6x45h79q6JAUP6HH+Laot+ko+1w5jvtIztXnwwmwyIwXu+U9 17NFZacYyk/YV0esdjac249diw== X-Received: by 2002:adf:dfc3:0:b0:2fe:f2d1:dcab with SMTP id q3-20020adfdfc3000000b002fef2d1dcabmr9261648wrn.58.1682328172140; Mon, 24 Apr 2023 02:22:52 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id x9-20020a5d60c9000000b002fbdb797483sm10291054wrt.49.2023.04.24.02.22.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 02:22:50 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B01711FFBA; Mon, 24 Apr 2023 10:22:49 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , "Edgar E. Iglesias" , Paolo Bonzini , Aurelien Jarno , Peter Maydell , Juan Quintela , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Richard Henderson , Joel Stanley , Leif Lindholm , Markus Armbruster , Radoslaw Biernacki , Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , John Snow , Andrew Jeffery , David Hildenbrand , Bastian Koppelmann , Max Filippov , qemu-s390x@nongnu.org, Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P=2E_Berrang=C3=A9?= , qemu-arm@nongnu.org, Eduardo Habkost , Ilya Leoshkevich Subject: [PATCH 02/18] tests/avocado: use the new snapshots for testing Date: Mon, 24 Apr 2023 10:22:33 +0100 Message-Id: <20230424092249.58552-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424092249.58552-1-alex.bennee@linaro.org> References: <20230424092249.58552-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@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, 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 The tuxboot images now have a stable snapshot URL so we can enable the checksums and remove the avocado warnings. We will have to update as old snapshots retire but that won't be too frequent. Signed-off-by: Alex Bennée Acked-by: Thomas Huth --- tests/avocado/tuxrun_baselines.py | 170 +++++++++++++++++++++++++----- 1 file changed, 144 insertions(+), 26 deletions(-) diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_baselines.py index d343376faa..e8749717e9 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -77,20 +77,33 @@ def wait_for_console_pattern(self, success_message, vm=None): failure_message='Kernel panic - not syncing', vm=vm) - def fetch_tuxrun_assets(self, dt=None): + def fetch_tuxrun_assets(self, csums=None, dt=None): """ Fetch the TuxBoot assets. They are stored in a standard way so we use the per-test tags to fetch details. """ - base_url = f"https://storage.tuxboot.com/{self.tuxboot}/" - kernel_image = self.fetch_asset(base_url + self.image) - disk_image_zst = self.fetch_asset(base_url + "rootfs.ext4.zst") + base_url = f"https://storage.tuxboot.com/20230331/{self.tuxboot}/" + + # empty hash if we weren't passed one + csums = {} if csums is None else csums + ksum = csums.get(self.image, None) + isum = csums.get("rootfs.ext4.zst", None) + + kernel_image = self.fetch_asset(base_url + self.image, + asset_hash = ksum, + algorithm = "sha256") + disk_image_zst = self.fetch_asset(base_url + "rootfs.ext4.zst", + asset_hash = isum, + algorithm = "sha256") cmd = f"{self.zstd} -d {disk_image_zst} -o {self.workdir}/rootfs.ext4" process.run(cmd) if dt: - dtb = self.fetch_asset(base_url + dt) + dsum = csums.get(dt, None) + dtb = self.fetch_asset(base_url + dt, + asset_hash = dsum, + algorithm = "sha256") else: dtb = None @@ -149,7 +162,9 @@ def run_tuxtest_tests(self, haltmsg): else: self.vm.wait() - def common_tuxrun(self, dt=None, + def common_tuxrun(self, + csums=None, + dt=None, drive="virtio-blk-device", haltmsg="reboot: System halted", console_index=0): @@ -158,7 +173,7 @@ def common_tuxrun(self, dt=None, special with the command line we can process most things using the tag metadata. """ - (kernel, disk, dtb) = self.fetch_tuxrun_assets(dt) + (kernel, disk, dtb) = self.fetch_tuxrun_assets(csums, dt) self.prepare_run(kernel, disk, drive, dtb, console_index) self.vm.launch() @@ -182,7 +197,11 @@ def test_arm64(self): :avocado: tags=console:ttyAMA0 :avocado: tags=shutdown:nowait """ - self.common_tuxrun() + sums = {"Image" : + "ce95a7101a5fecebe0fe630deee6bd97b32ba41bc8754090e9ad8961ea8674c7", + "rootfs.ext4.zst" : + "bbd5ed4b9c7d3f4ca19ba71a323a843c6b585e880115df3b7765769dbd9dd061"} + self.common_tuxrun(csums=sums) def test_arm64be(self): """ @@ -194,7 +213,11 @@ def test_arm64be(self): :avocado: tags=console:ttyAMA0 :avocado: tags=shutdown:nowait """ - self.common_tuxrun() + sums = { "Image" : + "e0df4425eb2cd9ea9a283e808037f805641c65d8fcecc8f6407d8f4f339561b4", + "rootfs.ext4.zst" : + "e6ffd8813c8a335bc15728f2835f90539c84be7f8f5f691a8b01451b47fb4bd7"} + self.common_tuxrun(csums=sums) def test_armv5(self): """ @@ -206,7 +229,15 @@ def test_armv5(self): :avocado: tags=console:ttyAMA0 :avocado: tags=shutdown:nowait """ - self.common_tuxrun(drive="virtio-blk-pci", + sums = { "rootfs.ext4.zst" : + "17177afa74e7294da0642861f08c88ca3c836764299a54bf6d1ce276cb9712a5", + "versatile-pb.dtb" : + "0bc0c0b0858cefd3c32b385c0d66d97142ded29472a496f4f490e42fc7615b25", + "zImage" : + "c95af2f27647c12265d75e9df44c22ff5228c59855f54aaa70f41ec2842e3a4d" } + + self.common_tuxrun(csums=sums, + drive="virtio-blk-pci", dt="versatile-pb.dtb") def test_armv7(self): @@ -219,7 +250,12 @@ def test_armv7(self): :avocado: tags=console:ttyAMA0 :avocado: tags=shutdown:nowait """ - self.common_tuxrun() + sums = { "rootfs.ext4.zst" : + "ab1fbbeaddda1ffdd45c9405a28cd5370c20f23a7cbc809cc90dc9f243a8eb5a", + "zImage" : + "4c7a22e9f15875bec06bd2a29d822496571eb297d4f22694099ffcdb19077572" } + + self.common_tuxrun(csums=sums) def test_armv7be(self): """ @@ -232,7 +268,12 @@ def test_armv7be(self): :avocado: tags=console:ttyAMA0 :avocado: tags=shutdown:nowait """ - self.common_tuxrun() + sums = {"rootfs.ext4.zst" : + "42ed46dd2d59986206c5b1f6cf35eab58fe3fd20c96b41aaa16b32f3f90a9835", + "zImage" : + "7facc62082b57af12015b08f7fdbaf2f123ba07a478367853ae12b219afc9f2f" } + + self.common_tuxrun(csums=sums) def test_i386(self): """ @@ -243,7 +284,12 @@ def test_i386(self): :avocado: tags=image:bzImage :avocado: tags=shutdown:nowait """ - self.common_tuxrun(drive="virtio-blk-pci") + sums = {"bzImage" : + "a3e5b32a354729e65910f5a1ffcda7c14a6c12a55e8213fb86e277f1b76ed956", + "rootfs.ext4.zst" : + "f15e66b2bf673a210ec2a4b2e744a80530b36289e04f5388aab812b97f69754a" } + + self.common_tuxrun(csums=sums, drive="virtio-blk-pci") def test_mips32(self): """ @@ -256,7 +302,12 @@ def test_mips32(self): :avocado: tags=root:sda :avocado: tags=shutdown:nowait """ - self.common_tuxrun(drive="driver=ide-hd,bus=ide.0,unit=0") + sums = { "rootfs.ext4.zst" : + "fc3da0b4c2f38d74c6d705123bb0f633c76ed953128f9d0859378c328a6d11a0", + "vmlinux" : + "bfd2172f8b17fb32970ca0c8c58f59c5a4ca38aa5855d920be3a69b5d16e52f0" } + + self.common_tuxrun(csums=sums, drive="driver=ide-hd,bus=ide.0,unit=0") def test_mips32el(self): """ @@ -268,7 +319,12 @@ def test_mips32el(self): :avocado: tags=root:sda :avocado: tags=shutdown:nowait """ - self.common_tuxrun(drive="driver=ide-hd,bus=ide.0,unit=0") + sums = { "rootfs.ext4.zst" : + "e799768e289fd69209c21f4dacffa11baea7543d5db101e8ce27e3bc2c41d90e", + "vmlinux" : + "8573867c68a8443db8de6d08bb33fb291c189ca2ca671471d3973a3e712096a3" } + + self.common_tuxrun(csums=sums, drive="driver=ide-hd,bus=ide.0,unit=0") def test_mips64(self): """ @@ -280,7 +336,12 @@ def test_mips64(self): :avocado: tags=root:sda :avocado: tags=shutdown:nowait """ - self.common_tuxrun(drive="driver=ide-hd,bus=ide.0,unit=0") + sums = { "rootfs.ext4.zst" : + "69d91eeb04df3d8d172922c6993bb37d4deeb6496def75d8580f6f9de3e431da", + "vmlinux" : + "09010e51e4b8bcbbd2494786ffb48eca78f228e96e5c5438344b0eac4029dc61" } + + self.common_tuxrun(csums=sums, drive="driver=ide-hd,bus=ide.0,unit=0") def test_mips64el(self): """ @@ -291,7 +352,12 @@ def test_mips64el(self): :avocado: tags=root:sda :avocado: tags=shutdown:nowait """ - self.common_tuxrun(drive="driver=ide-hd,bus=ide.0,unit=0") + sums = { "rootfs.ext4.zst" : + "fba585368f5915b1498ed081863474b2d7ec4e97cdd46d21bdcb2f9698f83de4", + "vmlinux" : + "d4e08965e2155c4cccce7c5f34d18fe34c636cda2f2c9844387d614950155266" } + + self.common_tuxrun(csums=sums, drive="driver=ide-hd,bus=ide.0,unit=0") def test_ppc32(self): """ @@ -302,7 +368,12 @@ def test_ppc32(self): :avocado: tags=image:uImage :avocado: tags=shutdown:nowait """ - self.common_tuxrun(drive="virtio-blk-pci") + sums = { "rootfs.ext4.zst" : + "8885b9d999cc24d679542a02e9b6aaf48f718f2050ece6b8347074b6ee41dd09", + "uImage" : + "1a68f74b860fda022fb12e03c5efece8c2b8b590d96cca37a8481a3ae0b3f81f" } + + self.common_tuxrun(csums=sums, drive="virtio-blk-pci") def test_ppc64(self): """ @@ -316,7 +387,12 @@ def test_ppc64(self): :avocado: tags=extradev:driver=spapr-vscsi :avocado: tags=root:sda """ - self.common_tuxrun(drive="scsi-hd") + sums = { "rootfs.ext4.zst" : + "1d953e81a4379e537fc8e41e05a0a59d9b453eef97aa03d47866c6c45b00bdff", + "vmlinux" : + "f22a9b9e924174a4c199f4c7e5d91a2339fcfe51c6eafd0907dc3e09b64ab728" } + + self.common_tuxrun(csums=sums, drive="scsi-hd") def test_ppc64le(self): """ @@ -329,7 +405,12 @@ def test_ppc64le(self): :avocado: tags=extradev:driver=spapr-vscsi :avocado: tags=root:sda """ - self.common_tuxrun(drive="scsi-hd") + sums = { "rootfs.ext4.zst" : + "b442678c93fb8abe1f7d3bfa20556488de6b475c22c8fed363f42cf81a0a3906", + "vmlinux" : + "979eb61b445a010fb13e2b927126991f8ceef9c590fa2be0996c00e293e80cf2" } + + self.common_tuxrun(csums=sums, drive="scsi-hd") def test_riscv32(self): """ @@ -337,7 +418,14 @@ def test_riscv32(self): :avocado: tags=machine:virt :avocado: tags=tuxboot:riscv32 """ - self.common_tuxrun() + sums = { "Image" : + "89599407d7334de629a40e7ad6503c73670359eb5f5ae9d686353a3d6deccbd5", + "fw_jump.elf" : + "f2ef28a0b77826f79d085d3e4aa686f1159b315eff9099a37046b18936676985", + "rootfs.ext4.zst" : + "7168d296d0283238ea73cd5a775b3dd608e55e04c7b92b76ecce31bb13108cba" } + + self.common_tuxrun(csums=sums) def test_riscv64(self): """ @@ -345,7 +433,14 @@ def test_riscv64(self): :avocado: tags=machine:virt :avocado: tags=tuxboot:riscv64 """ - self.common_tuxrun() + sums = { "Image" : + "cd634badc65e52fb63465ec99e309c0de0369f0841b7d9486f9729e119bac25e", + "fw_jump.elf" : + "6e3373abcab4305fe151b564a4c71110d833c21f2c0a1753b7935459e36aedcf", + "rootfs.ext4.zst" : + "b18e3a3bdf27be03da0b285e84cb71bf09eca071c3a087b42884b6982ed679eb" } + + self.common_tuxrun(csums=sums) def test_s390(self): """ @@ -355,7 +450,13 @@ def test_s390(self): :avocado: tags=image:bzImage :avocado: tags=shutdown:nowait """ - self.common_tuxrun(drive="virtio-blk-ccw", + sums = { "bzImage" : + "0414e98dd1c3dafff8496c9cd9c28a5f8d04553bb5ba37e906a812b48d442ef0", + "rootfs.ext4.zst" : + "88c37c32276677f873a25ab9ec6247895b8e3e6f8259134de2a616080b8ab3fc" } + + self.common_tuxrun(csums=sums, + drive="virtio-blk-ccw", haltmsg="Requesting system halt") # Note: some segfaults caused by unaligned userspace access @@ -370,9 +471,14 @@ def test_sh4(self): :avocado: tags=root:sda :avocado: tags=console:ttySC1 """ + sums = { "rootfs.ext4.zst" : + "3592a7a3d5a641e8b9821449e77bc43c9904a56c30d45da0694349cfd86743fd", + "zImage" : + "29d9b2aba604a0f53a5dc3b5d0f2b8e35d497de1129f8ee5139eb6fdf0db692f" } + # The test is currently too unstable to do much in userspace # so we skip common_tuxrun and do a minimal boot and shutdown. - (kernel, disk, dtb) = self.fetch_tuxrun_assets() + (kernel, disk, dtb) = self.fetch_tuxrun_assets(csums=sums) # the console comes on the second serial port self.prepare_run(kernel, disk, @@ -395,7 +501,13 @@ def test_sparc64(self): :avocado: tags=root:sda :avocado: tags=shutdown:nowait """ - self.common_tuxrun(drive="driver=ide-hd,bus=ide.0,unit=0") + + sums = { "rootfs.ext4.zst" : + "ad2f1dc436ab51583543d25d2c210cab478645d47078d30d129a66ab0e281d76", + "vmlinux" : + "e34313e4325ff21deaa3d38a502aa09a373ef62b9bd4d7f8f29388b688225c55" } + + self.common_tuxrun(csums=sums, drive="driver=ide-hd,bus=ide.0,unit=0") def test_x86_64(self): """ @@ -407,4 +519,10 @@ def test_x86_64(self): :avocado: tags=root:sda :avocado: tags=shutdown:nowait """ - self.common_tuxrun(drive="driver=ide-hd,bus=ide.0,unit=0") + sums = { "bzImage" : + "2bc7480a669ee9b6b82500a236aba0c54233debe98cb968268fa230f52f03461", + "rootfs.ext4.zst" : + "b72ac729769b8f51c6dffb221113c9a063c774dbe1d66af30eb593c4e9999b4b" } + + self.common_tuxrun(csums=sums, + drive="driver=ide-hd,bus=ide.0,unit=0") From patchwork Mon Apr 24 09:22:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 676552 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp2054379wrs; Mon, 24 Apr 2023 02:23:57 -0700 (PDT) X-Google-Smtp-Source: AKy350bltwuVzUAWAuDwStUJIzV8dxzbpbKfZkYuTBcq91WyFkmHuePTqwgoedltznVMXBUBEjRv X-Received: by 2002:a05:6214:d67:b0:5f4:4e3d:2bee with SMTP id 7-20020a0562140d6700b005f44e3d2beemr24536417qvs.17.1682328237318; Mon, 24 Apr 2023 02:23:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682328237; cv=none; d=google.com; s=arc-20160816; b=o5POMKZTvCs3Bom4cHqRUT3ZypWm9cJ9aQA9u3Ul5eYqQ3cBmn9X/v2PPnfu7T3yXE aNRQZFj7ATjq46a2nLHL9o2VY1Z9qDrdi3jeBfy70p8TWDb6EX7OEFaCj0gtHpt68jGt yTg1iOw5jMXW+B7MP3vQxZS0MwLJmw98NKk+WbCEzJ6cjZJqZ6skXtlY3OUcDoajqUbi BS/+oMqNjle+73OOmvgZUjkI6aQlPfLP1G0BzPtCXMLBfH21I0vKaVpdirAswz0IXgW1 pPl2qSf1HlUbgUD1TqWu3utKhROXCgcZmuKxdkfWoPZSV+5qRUKdAbI8r+uGg3f+4q6X 1DTA== 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=hTkRfH0Ve1ZP8J8LCPrqWJSboaa1eNljgxtDfB/bOpY=; b=hZDDBQdcEGGgntas5WMiynfWnyuCkQnYF16evPQknCN8aZUFzh7nTsSfv/fLHu9M78 BbKziwY0/7ixYbS60wfoJN5v3J77wMz7ArY6FSb/8aV3mh+vzF2bqCcAHQHp6jyEXfqT b0xy3q1owGaMkDjsnlxpkaE3msGbHVYzJdU+CthBPlRkwpfvx35StGpG+lyhJFRvftb4 1c8WJCIrRvWpVG7sOky53nGQbQ8WVq8bxfsfIgZS0XjUUDyYhpKsQ4TCcBg1jfCLRNyJ 0SFuNcxXhXTjasxLjQcNKKt6yccbJh3dW3cPcKQWpGuld7LuX+1EWMfnkdV7D8aTaOSl kdRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x1d9VaF+; 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 gm11-20020a056214268b00b0056e61f96a16si202601qvb.183.2023.04.24.02.23.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Apr 2023 02:23:57 -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=x1d9VaF+; 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 1pqsPR-00074y-N8; Mon, 24 Apr 2023 05:22:57 -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 1pqsPQ-00073i-B8 for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:22:56 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqsPN-0004kp-LA for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:22:56 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-3023a56048bso3505703f8f.3 for ; Mon, 24 Apr 2023 02:22:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682328172; x=1684920172; 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=hTkRfH0Ve1ZP8J8LCPrqWJSboaa1eNljgxtDfB/bOpY=; b=x1d9VaF+eiFmatxXlLWHgrEeH2Co96wQP/t3urbLbnkulWb4rmhF2jPO/OP8NVPIZH d5nU+ktDjlQouyAqP6H8Wagi3pyf3z8GVXEjo8Qq9SYT4rykAE3gXsQNCmktP6g6NPxD JgSnLhD9MHTDSPr76hwEnGQoA0ei0at6cSPKTvVvIgSHbZkCLwQt4JvZRpbUvceXESqc 5q1IlQoOvGW2oHMgyr5gVwjO5fa8bOT7WDClZlbKdx2K18LTognDKUpCjIgMt2O8tYkk b+06V7Lmt9kgdrr5DWLarttKtF9ZtRhY/X6PCs0OyqAe54L+6NPyeZ4j51JSJCMldIk9 EFow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682328172; x=1684920172; 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=hTkRfH0Ve1ZP8J8LCPrqWJSboaa1eNljgxtDfB/bOpY=; b=F1RN2/SnVIu78n14ZzCytLKHTbB3TTQR5wuNaAOB+pMTbWwqr7XJlU3+Jzawkwq8Tc sQXv8cksa/zWJo6U4KjCuxbkn+jg0IQodeJc3otUYZFRJctlXGmNyoQTgRBQCDVwaIu1 ULhalVgv+V0iXIyLg/ooIb1o2U/Swwm7Ng5/9XgXQjAgz/ncMRowK32OyjMmt80brvKP Bo9QyinU9b/ULyYLxgNPnbLq1KHpaMwbsaT+pz3eVda4jxslNf+bPt1DTJ5WymH5FTsc vFiRBJ7nBcJCwA8YWSzBR2MaOSiobMRpp5Nd6Y1OZRhT7XHTd3fLcH3SkoKwPVtY3qZn kdGQ== X-Gm-Message-State: AAQBX9ePy6k2Py/lO3/V66MEwUmEt3vjynAMO+KlPIFLJSLD0EWHYocl ymDc6Q/dctNouVGfSocR6ou5eg== X-Received: by 2002:adf:dc4b:0:b0:2f0:442a:2d45 with SMTP id m11-20020adfdc4b000000b002f0442a2d45mr8218540wrj.57.1682328171872; Mon, 24 Apr 2023 02:22:51 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id z10-20020a5d654a000000b002f22c44e974sm10339731wrv.102.2023.04.24.02.22.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 02:22:50 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CB4EB1FFBB; Mon, 24 Apr 2023 10:22:49 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , "Edgar E. Iglesias" , Paolo Bonzini , Aurelien Jarno , Peter Maydell , Juan Quintela , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Richard Henderson , Joel Stanley , Leif Lindholm , Markus Armbruster , Radoslaw Biernacki , Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , John Snow , Andrew Jeffery , David Hildenbrand , Bastian Koppelmann , Max Filippov , qemu-s390x@nongnu.org, Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P=2E_Berrang=C3=A9?= , qemu-arm@nongnu.org, Eduardo Habkost , Ilya Leoshkevich , Marcin Juszkiewicz Subject: [PATCH 03/18] tests/avocado: Add set of boot tests on SBSA-ref Date: Mon, 24 Apr 2023 10:22:34 +0100 Message-Id: <20230424092249.58552-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424092249.58552-1-alex.bennee@linaro.org> References: <20230424092249.58552-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.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: Philippe Mathieu-Daudé This change adds set of boot tests on SBSA-ref machine: 1. boot firmware up to the EDK2 banner 2. boot Alpine Linux Prebuilt flash volumes are included, built using upstream documentation. To unify tests for AArch64/virt and AArch64/sbsa-ref we boot the same Alpine Linux image on both. Signed-off-by: Marcin Juszkiewicz Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230323082813.971535-1-marcin.juszkiewicz@linaro.org> Reviewed-by: Leif Lindholm Message-Id: <20230328171426.14258-1-philmd@linaro.org> Signed-off-by: Alex Bennée --- MAINTAINERS | 1 + tests/avocado/machine_aarch64_sbsaref.py | 158 +++++++++++++++++++++++ 2 files changed, 159 insertions(+) create mode 100644 tests/avocado/machine_aarch64_sbsaref.py diff --git a/MAINTAINERS b/MAINTAINERS index 24154f5721..034ff71dac 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -943,6 +943,7 @@ L: qemu-arm@nongnu.org S: Maintained F: hw/arm/sbsa-ref.c F: docs/system/arm/sbsa.rst +F: tests/avocado/machine_aarch64_sbsaref.py Sharp SL-5500 (Collie) PDA M: Peter Maydell diff --git a/tests/avocado/machine_aarch64_sbsaref.py b/tests/avocado/machine_aarch64_sbsaref.py new file mode 100644 index 0000000000..0a79fa7ab6 --- /dev/null +++ b/tests/avocado/machine_aarch64_sbsaref.py @@ -0,0 +1,158 @@ +# Functional test that boots a Linux kernel and checks the console +# +# SPDX-FileCopyrightText: 2023 Linaro Ltd. +# SPDX-FileContributor: Philippe Mathieu-Daudé +# SPDX-FileContributor: Marcin Juszkiewicz +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os + +from avocado import skip +from avocado import skipUnless +from avocado.utils import archive + +from avocado_qemu import QemuSystemTest +from avocado_qemu import wait_for_console_pattern +from avocado_qemu import interrupt_interactive_console_until_pattern + + +class Aarch64SbsarefMachine(QemuSystemTest): + """ + :avocado: tags=arch:aarch64 + :avocado: tags=machine:sbsa-ref + """ + + timeout = 180 + + def fetch_firmware(self): + """ + Flash volumes generated using: + + - Fedora GNU Toolchain version 12.2.1 20220819 (Red Hat Cross 12.2.1-2) + + - Trusted Firmware-A + https://github.com/ARM-software/arm-trusted-firmware/tree/5fdb2e54 + + - Tianocore EDK II + https://github.com/tianocore/edk2/tree/494127613b + https://github.com/tianocore/edk2-non-osi/tree/41876073 + https://github.com/tianocore/edk2-platforms/tree/8efa4f42 + """ + + # Secure BootRom (TF-A code) + fs0_xz_url = ( + "https://fileserver.linaro.org/s/ATnSmq6k8SoXgbH/" + "download/SBSA_FLASH0.fd.xz" + ) + fs0_xz_hash = "a210a09692bcbe0a3743ffd0df44e80e0c7ad8ab" + tar_xz_path = self.fetch_asset(fs0_xz_url, asset_hash=fs0_xz_hash) + archive.extract(tar_xz_path, self.workdir) + fs0_path = os.path.join(self.workdir, "SBSA_FLASH0.fd") + + # Non-secure rom (UEFI and EFI variables) + fs1_xz_url = ( + "https://fileserver.linaro.org/s/t8foNnMPz74DZZy/" + "download/SBSA_FLASH1.fd.xz" + ) + fs1_xz_hash = "13a9a262953787c7fc5a9155dfaa26e703631e02" + tar_xz_path = self.fetch_asset(fs1_xz_url, asset_hash=fs1_xz_hash) + archive.extract(tar_xz_path, self.workdir) + fs1_path = os.path.join(self.workdir, "SBSA_FLASH1.fd") + + for path in [fs0_path, fs1_path]: + with open(path, "ab+") as fd: + fd.truncate(256 << 20) # Expand volumes to 256MiB + + self.vm.set_console() + self.vm.add_args( + "-drive", + f"if=pflash,file={fs0_path},format=raw", + "-drive", + f"if=pflash,file={fs1_path},format=raw", + "-smp", + "1", + "-machine", + "sbsa-ref", + ) + + def test_sbsaref_edk2_firmware(self): + """ + :avocado: tags=cpu:cortex-a57 + """ + + self.fetch_firmware() + self.vm.launch() + + # TF-A boot sequence: + # + # https://github.com/ARM-software/arm-trusted-firmware/blob/v2.8.0/\ + # docs/design/trusted-board-boot.rst#trusted-board-boot-sequence + # https://trustedfirmware-a.readthedocs.io/en/v2.8/\ + # design/firmware-design.html#cold-boot + + # AP Trusted ROM + wait_for_console_pattern(self, "Booting Trusted Firmware") + wait_for_console_pattern(self, "BL1: v2.8(release):v2.8") + wait_for_console_pattern(self, "BL1: Booting BL2") + + # Trusted Boot Firmware + wait_for_console_pattern(self, "BL2: v2.8(release)") + wait_for_console_pattern(self, "Booting BL31") + + # EL3 Runtime Software + wait_for_console_pattern(self, "BL31: v2.8(release)") + + # Non-trusted Firmware + wait_for_console_pattern(self, "UEFI firmware (version 1.0") + interrupt_interactive_console_until_pattern(self, "QEMU SBSA-REF Machine") + + # This tests the whole boot chain from EFI to Userspace + # We only boot a whole OS for the current top level CPU and GIC + # Other test profiles should use more minimal boots + def boot_alpine_linux(self, cpu): + self.fetch_firmware() + + iso_url = ( + "https://dl-cdn.alpinelinux.org/" + "alpine/v3.17/releases/aarch64/alpine-standard-3.17.2-aarch64.iso" + ) + + iso_hash = "5a36304ecf039292082d92b48152a9ec21009d3a62f459de623e19c4bd9dc027" + iso_path = self.fetch_asset(iso_url, algorithm="sha256", asset_hash=iso_hash) + + self.vm.set_console() + self.vm.add_args( + "-cpu", + cpu, + "-drive", + f"file={iso_path},format=raw", + "-device", + "virtio-rng-pci,rng=rng0", + "-object", + "rng-random,id=rng0,filename=/dev/urandom", + ) + + self.vm.launch() + wait_for_console_pattern(self, "Welcome to Alpine Linux 3.17") + + @skipUnless(os.getenv("AVOCADO_TIMEOUT_EXPECTED"), "Test might timeout") + def test_sbsaref_alpine_linux_cortex_a57(self): + """ + :avocado: tags=cpu:cortex-a57 + """ + self.boot_alpine_linux("cortex-a57") + + @skipUnless(os.getenv("AVOCADO_TIMEOUT_EXPECTED"), "Test might timeout") + def test_sbsaref_alpine_linux_neoverse_n1(self): + """ + :avocado: tags=cpu:max + """ + self.boot_alpine_linux("neoverse-n1") + + @skip("requires TF-A update to handle FEAT_FGT") + def test_sbsaref_alpine_linux_max(self): + """ + :avocado: tags=cpu:max + """ + self.boot_alpine_linux("max,pauth-impdef=on") From patchwork Mon Apr 24 09:22:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 676562 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp2054763wrs; Mon, 24 Apr 2023 02:25:10 -0700 (PDT) X-Google-Smtp-Source: AKy350a+vGeBXkLt+5L+duC8qOO61g0WOoQd5L+oJRiqdRAWypSNkAsK4M8lePyrwAHpV7ZKXK6p X-Received: by 2002:a05:622a:1810:b0:3eb:1082:ec93 with SMTP id t16-20020a05622a181000b003eb1082ec93mr22037026qtc.41.1682328310145; Mon, 24 Apr 2023 02:25:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682328310; cv=none; d=google.com; s=arc-20160816; b=a/Zj7G21RcPTEQvcejNlWTYjOs+TtqUePHZ8OidAdhml2isVvdKXqY+XerenVfQy4a kb/lw3Dv/idXWjTD32GwdmX6syTM1EoPX8vMCe9oN+tCfbC9Q3ZdK8vn86Q1fnkF3EV2 dBoWewthGdJSvk9YPGXfrhzvsrbRsTqdZ7oplvZownbaLPL7WDPryGxh7MOCNxH+W3hg vrgCNTlI3397qsgHteWkD7k/jw46GeIunLsoFiMK7bTnfR6+bHUxjimXIFZy6KyAIkA5 JR4kIJ50GU5UyWsWHP29VI8aYX4lFkxvGeYDInTcdC2al5O7tBVprBs55VSb2sLuZeyc S3wA== 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=otnCERiARxYXOemsNhRIhm75Bahsw6pevrZV+yYHYSs=; b=ci2e5IOOAo0NdHBsRxAnE9WumK68c4awxf4oGyB0aVzGsglY0V2uWQHlPXyOPi1yWP 7CWY54oaH2ikO9KhfjSGuyFta8nrC7jkvM6NUSzKy8Nt58MLuOK8DVS8u/0W/54pK1vZ gGlq6TF06qZMtMlJ/Igi20Dqx3kdSFpXXGAsH/BkibcvzrjOIvnO6q1yQBpg/MlPx+Eo 9VHtmfPGbxJVeujRkn7OGgCW0omv7jorJ/ElLThpb4meCcdeerM+JaMTUJKigs1IKTWe dDH7kHX69kviZ4GI/qAqKmCtbtLwdH7s3w3zk7IztuqS5UaDxTGWhL8yD1AK8GhKQlPZ sBKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fZ1tKN7A; 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 do27-20020a05620a2b1b00b0074df9f3ac98si6714833qkb.351.2023.04.24.02.25.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Apr 2023 02:25:10 -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=fZ1tKN7A; 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 1pqsPW-0007A9-EY; Mon, 24 Apr 2023 05:23:02 -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 1pqsPU-00078C-Lk for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:00 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqsPN-0004l7-W3 for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:00 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3f1958d3a53so27504425e9.0 for ; Mon, 24 Apr 2023 02:22:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682328172; x=1684920172; 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=otnCERiARxYXOemsNhRIhm75Bahsw6pevrZV+yYHYSs=; b=fZ1tKN7AopRMvdYhFsS3on9/JutW6D0Z+5zwsY0TDfTv0Bs8HW7BbMG28cgvlGphj6 qVXtFkQQgY9h/2J47hirzInnIOOjLRS/zejUJuaC14pYsAc9alammyOQDDLhVX1uI730 o3aGpm6YSq+IXrLpGlvXiq3ykAIUoUQZsANOhK0NqE+LhJUqfnWW3reBM4usuAJVpKfy cFvuKq4GvgsIQutwEIU7rfgheoD9ZmpIEVz9k7twM+gi0sW2hYSYUgahuIo4/EWsehAD S+JIPgOjFn6UXM1QxASpez75bOyXc7izIK2FQaDuYwUDnSMdu9hzQdbgapA7E9X6Ri1a K1vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682328172; x=1684920172; 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=otnCERiARxYXOemsNhRIhm75Bahsw6pevrZV+yYHYSs=; b=QIDmNy+QUbcwiCj0pohwLWuVUJGdsG7SkIeg/xfWem6pvq7YJtMFwKeLcB3qBSYIaX 02evjFilqyikX9zUofgnvC1FmCE++7nDjINEhYY31SFADcoIRqjJ2iBSM1uedf53tBIk RLj4Qb5j3CWcT7TEeRlNrcUzGh/E5RaJMicEzADpUBjOC5VMCADkp0/3HDiTvFN4prtU PiRj4vbyf+VXl1BT5P7MHzQAOUQGQwIwTWhtj6UZ9tTeu8TYuhvNhZlJoBXtGvofumxm bcICEF6/IBpo64I/irdA5Cm1ZL290lv2GEjCJVayhJHwlLP0Cu71NzbYfWsgGXUbiT7X l9aw== X-Gm-Message-State: AAQBX9f+43tYWZBK0AN2XDQmY6+wOfS/RYguIiG37pRLtYd/CWimrbZC OF5oKFplxkWIWpbZs8Z9mHxJ0w== X-Received: by 2002:a5d:6582:0:b0:2ef:bbe1:5f85 with SMTP id q2-20020a5d6582000000b002efbbe15f85mr9057065wru.9.1682328172335; Mon, 24 Apr 2023 02:22:52 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id m7-20020adfe947000000b003011baf89b3sm10371203wrn.40.2023.04.24.02.22.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 02:22:50 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E53E91FFBC; Mon, 24 Apr 2023 10:22:49 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , "Edgar E. Iglesias" , Paolo Bonzini , Aurelien Jarno , Peter Maydell , Juan Quintela , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Richard Henderson , Joel Stanley , Leif Lindholm , Markus Armbruster , Radoslaw Biernacki , Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , John Snow , Andrew Jeffery , David Hildenbrand , Bastian Koppelmann , Max Filippov , qemu-s390x@nongnu.org, Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P=2E_Berrang=C3=A9?= , qemu-arm@nongnu.org, Eduardo Habkost , Ilya Leoshkevich Subject: [PATCH 04/18] gitlab-ci: Avoid to re-run "configure" in the device-crash-test jobs Date: Mon, 24 Apr 2023 10:22:35 +0100 Message-Id: <20230424092249.58552-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424092249.58552-1-alex.bennee@linaro.org> References: <20230424092249.58552-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.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=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 From: Thomas Huth After "make check-venv" had been added to these jobs, they started to re-run "configure" each time since our logic in the makefile thinks that some files are out of date here. Avoid it with the same trick that we are using in buildtest-template.yml already by disabling the up-to-date check via NINJA=":". Fixes: 1d8cf47e5b ("tests: run 'device-crash-test' from tests/venv") Signed-off-by: Thomas Huth Message-Id: <20230414145845.456145-2-thuth@redhat.com> Signed-off-by: Alex Bennée --- .gitlab-ci.d/buildtest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index ba6f551752..333eea9dd3 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -102,7 +102,7 @@ crash-test-debian: IMAGE: debian-amd64 script: - cd build - - make check-venv + - make NINJA=":" check-venv - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-i386 build-system-fedora: @@ -145,7 +145,7 @@ crash-test-fedora: IMAGE: fedora script: - cd build - - make check-venv + - make NINJA=":" check-venv - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-ppc - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-riscv32 From patchwork Mon Apr 24 09:22:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 676558 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp2054596wrs; Mon, 24 Apr 2023 02:24:34 -0700 (PDT) X-Google-Smtp-Source: AKy350ajC46F0MdgbR7B6pIHqfWbGGL0d0PAQXR8LToBTOg0i5nuc8ZGa1rFh/ldn30iGthwTbph X-Received: by 2002:a05:6214:1c49:b0:5f1:5f73:aec2 with SMTP id if9-20020a0562141c4900b005f15f73aec2mr22363798qvb.32.1682328274690; Mon, 24 Apr 2023 02:24:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682328274; cv=none; d=google.com; s=arc-20160816; b=NMCDlMSyh+bQ4JHjnZg1GIowTToUtOwb3YCcqKyvmoUjLNynij85qSEiQKPeUEtWsE SkJxh9m9F6rQOQg+rGWWeNzVZldQAOTgIkrTWMIT/uR99wH1nbRQLl6GmGQ6Y804e9H6 jtPWSe5BfMp8FGrtbhpOwuEycDkAPMOv2WjTBtXSrSmFR2JraQTQEAIw2B1O2tid8TmF Zk4wOcFGWO8GapBOYRWuErzWyAxZ1Xp32mSJNggpDEdocHC/uNjJc29rZldmd9ZD8PXe aqYecTyAi/nCPfLWHseSaObfTNcIEMBPSd7KrLiRySH+nqapHVPOL4gvsdBuEnk3sqkr rT/Q== 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=o5kSB6Tp7rwswMBs6F95VrSi+MAlNKbqKile7T4KtUU=; b=UAfvQzbZiY1b9L4g705zmtAATq3dzjqRm4gPiKMNNLI60Wek7XMn6PzslN31yKKAI2 znv+DCRuGcqI91sytjioAjhS6F5cIEDUXgA5dROAJgnQ/LbW9uBRdm3Llq9J7a1+jQ6+ twfR0I05EK5DjUzbV0hSfNtL8tbjv9pOHDy1AfmaI98wmsMZPfWIiPPNQrUgsWedxVqn h72cfARauAUtrcgVOD9eICCVPjjoiFrK8eDInab+SV4FgaD2uCMTYYUeMkUfbbxTzlCx AJ97sePw9wH/bem8ydZvzsLIOaZxVYEOSmGgl1rY096xeT+os3/7i0K2DFcafBvhN5TO FZxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qvVYWTEb; 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 6-20020ac85746000000b003ef2fcf9142si1714353qtx.210.2023.04.24.02.24.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Apr 2023 02:24:34 -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=qvVYWTEb; 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 1pqsQ2-0007QX-1n; Mon, 24 Apr 2023 05:23:34 -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 1pqsPa-0007EK-4P for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:06 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqsPP-0004m6-AZ for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:05 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3f19323259dso30657995e9.3 for ; Mon, 24 Apr 2023 02:22:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682328173; x=1684920173; 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=o5kSB6Tp7rwswMBs6F95VrSi+MAlNKbqKile7T4KtUU=; b=qvVYWTEbTzMEbCUcUjyONZj5qjdX0zEBYSBlq85WgcFEp0yzzwxl+6MkLmDrUkOEnG 4Kej8f+Ktq24ncfu4XXVQgFLxDZuKidvxXB4ge+WjpLrd2x/Pb4hsHcUm3u78crtV/9A FWki+lMM3g7WZkLaeTnjpQ1gIWJ32OvrROD4tSJoL5imremLKx+4HkRx4cEd1rs3pJ6l rmZ9kluhnIx/oXn0/OfvSV/0PQTeL5veuORn4kxOu4lIsML4SOmotQqwIfMENO3FPKj2 JkKAZw6oR00rjGggHbAYg0ppJcIdS91dZJbi11+OFqyj23XXKYx/gIvyIFF+JrmJ9BCt TAXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682328173; x=1684920173; 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=o5kSB6Tp7rwswMBs6F95VrSi+MAlNKbqKile7T4KtUU=; b=FFMMuZK2dM22iiaSZOjHBIQwcZNXk+aCUF9Z5ptu/X6+lejYnHOcftyFP4YQZC994Q zaiVxhl4iGNjzrP1GG0gf0//FNj31gPA0aI/RQAMtGVGHhCH2iIVfYhPacjqJHsfPGwj ttlxsk0CZ/sDUkr/EyDb0O9q0DSvzd8QMrrPG+YSZMth9LqQWT4PwciHPWcPHNhjpyzT JoFTwzaebAdppAPa3IC7Nw8aWhpjiWKnA8k+9F4x1FhCPidWgtxaSvKfcuH1cgs9Ey2J EzqY3EPpcxfPqnA4qxu07ol+ki1AWy/+jfXlBCFjkkWeRz4NC4Ir5/gmo6Uf6o5fJLHj IRiQ== X-Gm-Message-State: AAQBX9fYXcy5Lfwxrdvp/Ih1oZnYl/IqkhnyBm70JcQtvAo5OKm8i9BF JEQTNcDVvZRcGCyJasw5RxUz2Q== X-Received: by 2002:a05:600c:2214:b0:3f1:98bd:acec with SMTP id z20-20020a05600c221400b003f198bdacecmr4564123wml.11.1682328173551; Mon, 24 Apr 2023 02:22:53 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id p10-20020a5d48ca000000b003047dc162f7sm1094226wrs.67.2023.04.24.02.22.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 02:22:52 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0CBC91FFBD; Mon, 24 Apr 2023 10:22:50 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , "Edgar E. Iglesias" , Paolo Bonzini , Aurelien Jarno , Peter Maydell , Juan Quintela , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Richard Henderson , Joel Stanley , Leif Lindholm , Markus Armbruster , Radoslaw Biernacki , Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , John Snow , Andrew Jeffery , David Hildenbrand , Bastian Koppelmann , Max Filippov , qemu-s390x@nongnu.org, Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P=2E_Berrang=C3=A9?= , qemu-arm@nongnu.org, Eduardo Habkost , Ilya Leoshkevich , Eldon Stegall Subject: [PATCH 05/18] scripts/device-crash-test: Add a parameter to run with TCG only Date: Mon, 24 Apr 2023 10:22:36 +0100 Message-Id: <20230424092249.58552-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424092249.58552-1-alex.bennee@linaro.org> References: <20230424092249.58552-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.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=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 From: Thomas Huth We're currently facing the problem that the device-crash-test script runs twice as long in the CI when a runner supports KVM - which sometimes results in a timeout of the CI job. To get a more deterministic runtime here, add an option to the script that allows to run it with TCG only. Reported-by: Eldon Stegall Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230417134321.3627231-6-alex.bennee@linaro.org> Message-Id: <20230414145845.456145-3-thuth@redhat.com> Signed-off-by: Alex Bennée --- .gitlab-ci.d/buildtest.yml | 2 +- scripts/device-crash-test | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 333eea9dd3..bb3650a51c 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -103,7 +103,7 @@ crash-test-debian: script: - cd build - make NINJA=":" check-venv - - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-i386 + - tests/venv/bin/python3 scripts/device-crash-test -q --tcg-only ./qemu-system-i386 build-system-fedora: extends: diff --git a/scripts/device-crash-test b/scripts/device-crash-test index 73bcb98693..b74d887331 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -397,7 +397,7 @@ def binariesToTest(args, testcase): def accelsToTest(args, testcase): - if getBinaryInfo(args, testcase['binary']).kvm_available: + if getBinaryInfo(args, testcase['binary']).kvm_available and not args.tcg_only: yield 'kvm' yield 'tcg' @@ -510,6 +510,8 @@ def main(): help="Full mode: test cases that are expected to fail") parser.add_argument('--strict', action='store_true', dest='strict', help="Treat all warnings as fatal") + parser.add_argument('--tcg-only', action='store_true', dest='tcg_only', + help="Only test with TCG accelerator") parser.add_argument('qemu', nargs='*', metavar='QEMU', help='QEMU binary to run') args = parser.parse_args() From patchwork Mon Apr 24 09:22:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 676561 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp2054736wrs; Mon, 24 Apr 2023 02:25:04 -0700 (PDT) X-Google-Smtp-Source: AKy350aJrY5VYbWnEn4bGYpCp1lQ3qDr1D0P5n1eujyRZ1MVJDJlvQg/mvjG6ynai0SvcQbv9xcF X-Received: by 2002:a05:622a:d2:b0:3ef:37e3:cc5d with SMTP id p18-20020a05622a00d200b003ef37e3cc5dmr23026376qtw.17.1682328304512; Mon, 24 Apr 2023 02:25:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682328304; cv=none; d=google.com; s=arc-20160816; b=0aI9m218m70SF4r9hWT4+ZB6d4/NfPDXWz3JNoKKw/MWnyQPBmuy1+k+NN0hv1iqBN KM6A+IP8ckmzo9D1/XxQ+Z6wa/R/L9d16h5KD0D8036PzP0OOEQhbs4PTJVDumrZV9Zd 9SGxeN01eR1KE5/ezEF92Zp8vUxVMi+f3HXpaRkNxpi27R7wRe86Jttw6QhZTA4Pqlu2 BYp5ZFinZp70FS7z7t7nQftkux4WcrnC3/P+wAqOEIL36GN+nGBEhiRWBG0DkRGlLCJT 8SSAPDi7JatJqAQNd7z3G7B7s9FxbLLAPvsrWUqOSLpoWW+rNhV4jX8AuqEWzX9GcoWI Yonw== 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=lZgm+vGcTA1V9BHjB7oPcAA/f7caN4cqjQx2QPPAA1g=; b=axsoVGjfozAFLAtEd34jEbWXpylvUF37MK+pIw7Fwt9IS+56D5f/ul7W1v9olxs/N+ BIKfcAjS3jza4ncU6W1Y7zVAJoLlcIro8yOxC5nEqM6xX1LVnm0NoBbb9/4cv398QbRD xEzwJo77XYLJp8ZTDwhDsa9aMCBj9Y7EmVKrwEXZcPiPsw6W/bp0TAAFvNnYDubTDwFc DrYUeIlsQp0RW8QQnpUfxxJHBJ8TW/4vhv/zGyD6o2JWdhSzAZ5dK0ANQAleeDyB66vV o5WSEBGsyrAblUs1dbrPOO+RHsiW6EjPhCkCt5+xVe2Bpn6VKsFXwXIiRIGORQDolfQP MXSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nsNVKmcQ; 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 g9-20020ac85d49000000b003e3874d7b5dsi6701181qtx.721.2023.04.24.02.25.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Apr 2023 02:25:04 -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=nsNVKmcQ; 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 1pqsQ3-0007Xr-7a; Mon, 24 Apr 2023 05:23:35 -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 1pqsPb-0007Ei-Gh for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:07 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqsPP-0004mU-OO for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:07 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f19afc4fbfso19027795e9.2 for ; Mon, 24 Apr 2023 02:22:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682328174; x=1684920174; 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=lZgm+vGcTA1V9BHjB7oPcAA/f7caN4cqjQx2QPPAA1g=; b=nsNVKmcQvjG9yzQn35Z8ya1Aiv0aVEam3dE+syo8uSwP0o6H7d+2jyvTGdGIm+7nZI 7e1hi3Fa+f+YRbZ1oevdZiiE5O4wMolQbAPNUm+Sr1uEGaB+OlCSC3IuzGptaw2sh6eS n2GOe3ajQb7oNODrLZPyF+omRIVNq9XQ8eUx56nHw8lArSj1fdtgcjhhUFZlwr7tFrCA nW0OFJokZTiJ2eCOcTnHpyL425a1KvPpfvkF7+2N7tE/OQ9g35DFbfD5xwbVvH4IHexm 2sMpQOnEdVdDB1x8oFwpsemTbRVjER5575TT+sPvlMujP00fa9oByChTdS40DJe3wGt9 vJwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682328174; x=1684920174; 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=lZgm+vGcTA1V9BHjB7oPcAA/f7caN4cqjQx2QPPAA1g=; b=PmLQYGT3jPLqrzIvmlkDzf9U4PjDPwLwzmhRsKnLYYebEpOROTZ8BXDjfj+pS+9DqV OZWyw13BXRPIpwBZuyiy8Y1WNj6BYdlT02ip58kFH0tFRfD5QTNjwG4MKyRFrbRRMNCQ kj5RuFJsvysQqd359Qy1bMPLyhqQV+KcVhtTCa8SrlwQWLDccQaLjCC3wo8FGA7M9T2K L/z378MAnsjsL96+U4SCVCYBdAmcNr5TAw2vHJA/XqO4+pCe+6HKcshoQIb8z4LMcms5 Oye7ZKZ31ZYhikEqBAfdqU2p2ckJHx+P0spyf1h+jg6mFnNtovdLLbpsZqxQpugvwW2d oSww== X-Gm-Message-State: AAQBX9fiZEYUB8V1w7u0dW4BbKQAf1pVuBmpiDzJcome1MClkiFoDy1I f9emkt3GgzX3DfwuslREVpgLzA== X-Received: by 2002:a7b:cc98:0:b0:3f1:6ebe:d598 with SMTP id p24-20020a7bcc98000000b003f16ebed598mr7049943wma.7.1682328174013; Mon, 24 Apr 2023 02:22:54 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id l2-20020a1c7902000000b003f193d7c6b7sm8205288wme.41.2023.04.24.02.22.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 02:22:53 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 2550C1FFBE; Mon, 24 Apr 2023 10:22:50 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , "Edgar E. Iglesias" , Paolo Bonzini , Aurelien Jarno , Peter Maydell , Juan Quintela , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Richard Henderson , Joel Stanley , Leif Lindholm , Markus Armbruster , Radoslaw Biernacki , Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , John Snow , Andrew Jeffery , David Hildenbrand , Bastian Koppelmann , Max Filippov , qemu-s390x@nongnu.org, Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P=2E_Berrang=C3=A9?= , qemu-arm@nongnu.org, Eduardo Habkost , Ilya Leoshkevich , Michael Tokarev , Kevin Wolf Subject: [PATCH 06/18] qemu-options: finesse the recommendations around -blockdev Date: Mon, 24 Apr 2023 10:22:37 +0100 Message-Id: <20230424092249.58552-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424092249.58552-1-alex.bennee@linaro.org> References: <20230424092249.58552-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.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 We are a bit premature in recommending -blockdev/-device as the best way to configure block devices. It seems there are times the more human friendly -drive still makes sense especially when -snapshot is involved. Improve the language to hopefully make things clearer. Suggested-by: Michael Tokarev Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Cc: Markus Armbruster Cc: Kevin Wolf Message-Id: <20230330101141.30199-5-alex.bennee@linaro.org> --- v3 - more re-wording to try and approach consensus - add explicit warning to -snapshot option --- qemu-options.hx | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 04c259157a..baa0589733 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1143,10 +1143,22 @@ have gone through several iterations as the feature set and complexity of the block layer have grown. Many online guides to QEMU often reference older and deprecated options, which can lead to confusion. -The recommended modern way to describe disks is to use a combination of +The most explicit way to describe disks is to use a combination of ``-device`` to specify the hardware device and ``-blockdev`` to describe the backend. The device defines what the guest sees and the -backend describes how QEMU handles the data. +backend describes how QEMU handles the data. It is the only guaranteed +stable interface for describing block devices and as such is +recommended for management tools and scripting. + +The ``-drive`` option combines the device and backend into a single +command line option which is a more human friendly. There is however no +interface stability guarantee although some older board models still +need updating to work with the modern blockdev forms. + +Older options like ``-hda`` are essentially macros which expand into +``-drive`` options for various drive interfaces. The original forms +bake in a lot of assumptions from the days when QEMU was emulating a +legacy PC, they are not recommended for modern configurations. ERST @@ -1639,6 +1651,14 @@ SRST the raw disk image you use is not written back. You can however force the write back by pressing C-a s (see the :ref:`disk images` chapter in the System Emulation Users Guide). + + .. warning:: + snapshot is incompatible with ``-blockdev`` (instead use qemu-img + to manually create snapshot images to attach to your blockdev). + If you have mixed ``-blockdev`` and ``-drive`` declarations you + can use the 'snapshot' property on your drive declarations + instead of this global option. + ERST DEF("fsdev", HAS_ARG, QEMU_OPTION_fsdev, From patchwork Mon Apr 24 09:22:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 676564 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp2054881wrs; Mon, 24 Apr 2023 02:25:35 -0700 (PDT) X-Google-Smtp-Source: AKy350ZjELruYroryt7ACH1hUmi+jP/5l8YSwZ3co4eZQC3Dj8SKf9kUKrNnTs9XRCvMivQo2YSL X-Received: by 2002:a05:6214:e41:b0:5ef:8ae8:9aec with SMTP id o1-20020a0562140e4100b005ef8ae89aecmr20991595qvc.36.1682328335321; Mon, 24 Apr 2023 02:25:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682328335; cv=none; d=google.com; s=arc-20160816; b=jgAeH4XvmDNTUbI3+VqJuPhCsjr2JMGNmwaiIYmpqoRY5OdM02LiCZw77fwobiB0zm UJXwxwk5oSwlLvE5w1t6WFuIl6DetECFhiA7sMHv5qy4EDRGrTzyl6W0J1HByYVe6Jrh TmXiitXlfwjpVKDjSVNE/1Wps4tLIdN3PY2EGOFabp8JCY21W17UTzFwgH8G0fBS0pu8 4u+OOiUMzrXZPvNVT3jbTRqV6p8/kptlzPB+DTKtPWUa6HYMqryDccxWqBmGD0rILqua +Lz7GzMASCw+wJrZneZ8KTTGQymgPL9QKQ8Pf36AcQs3Icq4VVd+0ydQzuiA9ovMEvQR w7/w== 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=9uTXovsPx5Gwk+eN7aB5uoOgo/DjD2jpEQnWvJoeYzI=; b=oH10ITS0cmZ9V/Y/JSa3ZCXuuZkGYr8nHLukTcKcxOHlE8O4wfm/Xmr2XZjWF70s4I BNd+gYC1QDJYZpG0jhvv1oqRm11k6jepwv4iOcGSGgmX4o3sWxQSB/1rYiD2y+a3Gt2M NwV6iDaRfS6k04hLkL5ST9zTe7fIbkgQ5icnnyXNv8O0z+p+IWJMfQD3qctANdNhqAKP ANmWtLZh9RgVSE70P2EztZ/HoCiGe1shWjWHMDAptg3u06FtLKcg6eEG1rpDZuMHVw2D 335vyjl5VHj+jBXFY50V/M2AK6KGhNiJj0+oMkjeIZHuO7zMlpAXalVYsEk+nNlXSzGI ZYyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RUzuoLa2; 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 q133-20020a37438b000000b0074e3627eca8si5103326qka.137.2023.04.24.02.25.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Apr 2023 02:25:35 -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=RUzuoLa2; 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 1pqsQ8-0007qt-Kq; Mon, 24 Apr 2023 05:23:40 -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 1pqsPl-0007Ni-JB for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:25 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqsPP-0004mI-9a for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:17 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-2febac9cacdso2462329f8f.1 for ; Mon, 24 Apr 2023 02:22:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682328174; x=1684920174; 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=9uTXovsPx5Gwk+eN7aB5uoOgo/DjD2jpEQnWvJoeYzI=; b=RUzuoLa2FBaXvdu9twXit9kiSbf/sqQZ0s9bv5c7NMWA5th2m728Lkjzpj1Jax/SUE VSKD6yk9wDGYK5Qt79b3QFszL3dirRz7JK2DXq2QJOaXU4NaGLJMMNfSEfLsJtX0pWTu cMdwTElHbwQiB6BBQaP8I4YDdP+CzI60lcdCavBg1KR1dbfTfEW9NWhtJnqhmRMK37Dj ECDmgpkafa/+wsI0w9xNTvRjf2dwkvuNwfB6/gH6/vcDFTrbGvWlHXa7RgkNlChhk+Wc V9RrR5c22RtAwy23Ein/Az+F54MTSBmOq09f1hFoIwH6SkXsfy6rrIVeiWrRwOKZjlUT V7TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682328174; x=1684920174; 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=9uTXovsPx5Gwk+eN7aB5uoOgo/DjD2jpEQnWvJoeYzI=; b=N0TizoAICcXf/W5iuknrWbn+J3ogbu7K0cmo3zlMlK3EeIlZdyHxb/kDI7/BCKGE0L QTy+P/kO03wDU61o82HPkybcKQA/Ar1sp4p0mq73o2vxiVPTKkCsXCjqPRPqyF1ijywo a+fdLiwOsAHC4baEPMbvKN2Mg7nU9g4Ega2Y7tLHBP4i0ciPodM3AIrH1DYCpipSzvDt OR+3TxyZj+G4PvMb1h3bUGzyRzBSDdit78KRxcRMIJ3c/b66XAlzETo/aKATmPBCdRGv LyX7WscZjohIKYoYJSGaU1hy0P5f0o9KHw8e20IDe+w2LeauFkfZEjgvcZb6SstrVzs6 gOEA== X-Gm-Message-State: AAQBX9ezeMTQa7vMt1YM67qXDPh/50Kv8WF5b0vy01EU6HfS1m9rm3Ix faFftM0A2YOlus63ePN0xK6O/A== X-Received: by 2002:a05:6000:1290:b0:2f9:1224:2474 with SMTP id f16-20020a056000129000b002f912242474mr8930818wrx.23.1682328173804; Mon, 24 Apr 2023 02:22:53 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id n16-20020a05600c181000b003f046ad52efsm14993862wmp.31.2023.04.24.02.22.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 02:22:53 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 41F521FFBF; Mon, 24 Apr 2023 10:22:50 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , "Edgar E. Iglesias" , Paolo Bonzini , Aurelien Jarno , Peter Maydell , Juan Quintela , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Richard Henderson , Joel Stanley , Leif Lindholm , Markus Armbruster , Radoslaw Biernacki , Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , John Snow , Andrew Jeffery , David Hildenbrand , Bastian Koppelmann , Max Filippov , qemu-s390x@nongnu.org, Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P=2E_Berrang=C3=A9?= , qemu-arm@nongnu.org, Eduardo Habkost , Ilya Leoshkevich Subject: [PATCH 07/18] .gitlab-ci.d/cirrus: Drop the CI job for compiling with FreeBSD 12 Date: Mon, 24 Apr 2023 10:22:38 +0100 Message-Id: <20230424092249.58552-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424092249.58552-1-alex.bennee@linaro.org> References: <20230424092249.58552-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 From: Thomas Huth FreeBSD 13.0 has been released in April 2021: https://www.freebsd.org/releases/13.0R/announce/ According to QEMU's support policy, we stop supporting the previous major release two years after the the new major release has been published. So we can stop testing FreeBSD 12 in our CI now. Signed-off-by: Thomas Huth Message-Id: <20230418160225.529172-1-thuth@redhat.com> Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- .gitlab-ci.d/cirrus.yml | 13 ------------- .gitlab-ci.d/cirrus/freebsd-12.vars | 16 ---------------- tests/lcitool/refresh | 1 - 3 files changed, 30 deletions(-) delete mode 100644 .gitlab-ci.d/cirrus/freebsd-12.vars diff --git a/.gitlab-ci.d/cirrus.yml b/.gitlab-ci.d/cirrus.yml index 502dfd612c..1507c928e5 100644 --- a/.gitlab-ci.d/cirrus.yml +++ b/.gitlab-ci.d/cirrus.yml @@ -44,19 +44,6 @@ variables: QEMU_JOB_CIRRUS: 1 -x64-freebsd-12-build: - extends: .cirrus_build_job - variables: - NAME: freebsd-12 - CIRRUS_VM_INSTANCE_TYPE: freebsd_instance - CIRRUS_VM_IMAGE_SELECTOR: image_family - CIRRUS_VM_IMAGE_NAME: freebsd-12-4 - CIRRUS_VM_CPUS: 8 - CIRRUS_VM_RAM: 8G - UPDATE_COMMAND: pkg update; pkg upgrade -y - INSTALL_COMMAND: pkg install -y - TEST_TARGETS: check - x64-freebsd-13-build: extends: .cirrus_build_job variables: diff --git a/.gitlab-ci.d/cirrus/freebsd-12.vars b/.gitlab-ci.d/cirrus/freebsd-12.vars deleted file mode 100644 index 44d8a2a511..0000000000 --- a/.gitlab-ci.d/cirrus/freebsd-12.vars +++ /dev/null @@ -1,16 +0,0 @@ -# THIS FILE WAS AUTO-GENERATED -# -# $ lcitool variables freebsd-12 qemu -# -# https://gitlab.com/libvirt/libvirt-ci - -CCACHE='/usr/local/bin/ccache' -CPAN_PKGS='' -CROSS_PKGS='' -MAKE='/usr/local/bin/gmake' -NINJA='/usr/local/bin/ninja' -PACKAGING_COMMAND='pkg' -PIP3='/usr/local/bin/pip-3.8' -PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy sndio socat spice-protocol tesseract usbredir virglrenderer vte3 zstd' -PYPI_PKGS='' -PYTHON='/usr/local/bin/python3' diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh index 33ef1282da..f1570b54df 100755 --- a/tests/lcitool/refresh +++ b/tests/lcitool/refresh @@ -182,7 +182,6 @@ try: # # Cirrus packages lists for GitLab # - generate_cirrus("freebsd-12") generate_cirrus("freebsd-13") generate_cirrus("macos-12") From patchwork Mon Apr 24 09:22:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 676567 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp2055030wrs; Mon, 24 Apr 2023 02:26:13 -0700 (PDT) X-Google-Smtp-Source: AKy350YjSXQZccpJi53JJzmaz4afxQuodHWM4a+SIiFXZVA4n2wWGvHOkcrrgxCPDZRThfJr/Qbp X-Received: by 2002:a05:622a:1b8c:b0:3e6:938a:2aef with SMTP id bp12-20020a05622a1b8c00b003e6938a2aefmr19767076qtb.9.1682328373144; Mon, 24 Apr 2023 02:26:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682328373; cv=none; d=google.com; s=arc-20160816; b=KaWMaMZxlBV/KKimOSyCcghcnex4xcVqx7CRkOpKt/WZPWOhlZSIgshYSkYhIHHjwN lPpwdD/fLGlzh9FA+YU7Vh0cBdZObONekXmQOSf6yDJtNBPszWbxL7W0CBjGnM6VJ1K+ liLGGPJXdSihkUmNtGl0bpCbZ7NQYQxRhuW34Caszvh+pReV3D+OoMRri5ttTpd46b80 qUxuvBTOW65jEysYmSjmLYh4w2U5m7KXUGDuIU9F4J/QGXk8ecbYf5FSf3JMhZfCToGT 5+VyOjSyH78o5jCMwJjKGxkrZDsDyEKRd51yvQQt5YlHMA4hpL5oy04FFkvG83wGCxx9 oYXA== 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=IPLhtaZltjDsm0+7czRR+umbyKr+Au9dGft4aGwUTwE=; b=fzoSO5kTSrHgCsvk3Oyxy0ZTMuqSzvQ0ZxPHirFpTnRoM39pvSmKXpFgcav0IEJynn xZjZSNBamCT0UUmvW6Dbp7I1TEHFUGkKCWisrTAE+IhWZygZy2re7qDKp9eYXOf1FqCS nnAPnuzfFwJAk7TpueSxwrRDHvFdpI+H1MqwkR7nEyQBWEoeUFOLOBPFJtHsdmnOT5OQ 7/FTCq5AuD5EaX6ozuiWupttSlyTWFSTfdXvxzRn7sV/bg+M8pswGD1HQLp5bmQNCp4G x7g+6uqOkouw92hLsFr2wGgIsxVLpZqXEa5ar2RkdrDZ+aV1GubLRU0LaEozOZStE054 KIxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JINczLzo; 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 m20-20020a05620a221400b0074e314ae820si5808115qkh.306.2023.04.24.02.26.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Apr 2023 02:26:13 -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=JINczLzo; 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 1pqsPX-0007Af-7t; Mon, 24 Apr 2023 05:23:03 -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 1pqsPW-00079j-1T for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:02 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqsPO-0004ld-Gm for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:01 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f1950f5676so29974915e9.3 for ; Mon, 24 Apr 2023 02:22:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682328173; x=1684920173; 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=IPLhtaZltjDsm0+7czRR+umbyKr+Au9dGft4aGwUTwE=; b=JINczLzorryr1mK2BH3fpR1gApIw8GzNALXrpymsuVON0Gn4Zjj4FV45bHu6JVcEmi 1ZpejeXyznctGAtmf2FOlGGJLZyT1TCAAZxsPjc8L8tkaK4KtgDdLj2zLpQD+x4bj5HY 4yKizdrwwPEYSLAl+FY144Tqyt8pE1Y3GhnTvjVwvtPWg75sqw4HawGm0uCMEniBMFDr ubeaNkmgUaNUn7WHgMj08albaZmnvRdMKQyPOX2hWdNPKMRA7hisfQLIlUmCED7XAQK1 xdxp6/HL3E9zvtOeYEIriGhrxsjRCpckN+8ZC0I6J3qGNOhtq2ywInkOD/GlDaJh1zrK 5crA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682328173; x=1684920173; 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=IPLhtaZltjDsm0+7czRR+umbyKr+Au9dGft4aGwUTwE=; b=bWHM8tQrlsguQIfm5h2jsOqTN1C0yF2AWAHE+i1t0wruwHXf+caG/kB05q6O2k55IY JGZ7M3sy5owAJzlbipwo+eQCwE22zSlfoqV9QnuENpt1FdrgAcsCXpdy8qEnBJ7n43hh jt0t6mdJws5F5w0XLdPIKSYag4q932z6bb/WqNU4iUmTid2ETnk3f04Wn/OJg3zahNOm RKh2r/8mzaIiK24HM1LAzf2wWyK4rH4IGWnILqy/BY7u1YbpzPQwUVvxPll9oycris4x ak1KHJAjxjm7GmVQP0ebSQgD0EvSCewW+438/5EcIQFLskspYQ3sQPuoPWRbb3t+7dge aNPw== X-Gm-Message-State: AAQBX9cbqvNF5PiNWFVksMcCNU77hstwTsR37BaOP1/24gDMIiZuOXga HlNbdgJLuFw7MeTRCnEifvNt9Q== X-Received: by 2002:a7b:cb96:0:b0:3f0:7e15:f8fc with SMTP id m22-20020a7bcb96000000b003f07e15f8fcmr7214993wmi.14.1682328173070; Mon, 24 Apr 2023 02:22:53 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id eo9-20020a05600c82c900b003f0ad8d1c69sm8698363wmb.25.2023.04.24.02.22.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 02:22:53 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5C14C1FFC0; Mon, 24 Apr 2023 10:22:50 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , "Edgar E. Iglesias" , Paolo Bonzini , Aurelien Jarno , Peter Maydell , Juan Quintela , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Richard Henderson , Joel Stanley , Leif Lindholm , Markus Armbruster , Radoslaw Biernacki , Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , John Snow , Andrew Jeffery , David Hildenbrand , Bastian Koppelmann , Max Filippov , qemu-s390x@nongnu.org, Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P=2E_Berrang=C3=A9?= , qemu-arm@nongnu.org, Eduardo Habkost , Ilya Leoshkevich Subject: [PATCH 08/18] tests/avocado: Make ssh_command_output_contains() globally available Date: Mon, 24 Apr 2023 10:22:39 +0100 Message-Id: <20230424092249.58552-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424092249.58552-1-alex.bennee@linaro.org> References: <20230424092249.58552-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.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=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 From: Thomas Huth This function will be useful in other tests, too, so move it to the core LinuxSSHMixIn class. Signed-off-by: Thomas Huth Reviewed-by: Cédric Le Goater Message-Id: <20230421110345.1294131-2-thuth@redhat.com> Signed-off-by: Alex Bennée --- tests/avocado/avocado_qemu/__init__.py | 8 ++++++++ tests/avocado/linux_ssh_mips_malta.py | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado_qemu/__init__.py index cb71f50db9..6788837e1b 100644 --- a/tests/avocado/avocado_qemu/__init__.py +++ b/tests/avocado/avocado_qemu/__init__.py @@ -431,6 +431,14 @@ def ssh_command(self, command): f'Guest command failed: {command}') return stdout_lines, stderr_lines + def ssh_command_output_contains(self, cmd, exp): + stdout, _ = self.ssh_command(cmd) + for line in stdout: + if exp in line: + break + else: + self.fail('"%s" output does not contain "%s"' % (cmd, exp)) + class LinuxDistro: """Represents a Linux distribution diff --git a/tests/avocado/linux_ssh_mips_malta.py b/tests/avocado/linux_ssh_mips_malta.py index 0179d8a6ca..d9bb525ad9 100644 --- a/tests/avocado/linux_ssh_mips_malta.py +++ b/tests/avocado/linux_ssh_mips_malta.py @@ -101,14 +101,6 @@ def shutdown_via_ssh(self): self.ssh_disconnect_vm() wait_for_console_pattern(self, 'Power down', 'Oops') - def ssh_command_output_contains(self, cmd, exp): - stdout, _ = self.ssh_command(cmd) - for line in stdout: - if exp in line: - break - else: - self.fail('"%s" output does not contain "%s"' % (cmd, exp)) - def run_common_commands(self, wordsize): self.ssh_command_output_contains( 'cat /proc/cpuinfo', From patchwork Mon Apr 24 09:22:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 676557 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp2054575wrs; Mon, 24 Apr 2023 02:24:31 -0700 (PDT) X-Google-Smtp-Source: AKy350Ykx987m8LIh0vMYvppQU7ZM87DJXLK45+8qR6E/ZJLvz392JZ4sPBrM4Zm748qdU6aoKjD X-Received: by 2002:a05:6214:c6c:b0:5ea:3abd:db61 with SMTP id t12-20020a0562140c6c00b005ea3abddb61mr16119316qvj.11.1682328271728; Mon, 24 Apr 2023 02:24:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682328271; cv=none; d=google.com; s=arc-20160816; b=Vpag5mYto39oNhYryWmMrKMNMKuB+k6aFwHdCxgJXO3GXAVU+MPAjXKS3agNOPyF9F rYhy5jx///5xmI2aj9NKFZIfRDNidi+xTyFbu8JfPv7J58kyVYOyJR69TmVfGYEAEn85 VKR4n4jy5SufR3udPjA0eInh94Au2j8TT16w0AQMYNnfc3OR1aFZ5zUcB8FGcjH6ArH7 Zdeqxs1FYSg+W2dodCjTvoo1mkGbsNG4EzEJaGnmCZ6jGe6ovWGpJ0WwQNoXqrsNgacC CtU51Wjiraeph13mwB7AzcqkmRFlN+DZ5D/hzwDH1hUh+8WXanNzW6MYN9+9fawRiY+O szJQ== 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=iONo8m57sFQhz/fKHL0PRqYNSYb2qqSH+RERi0fWhz0=; b=JJn7untSZQ3CAOwLT8hckSafeCGcKctdvv/uCY0F7w9hgP61/Hyo9DxdfXD88gLHbB 5b/xKilfSAPG9yCTaxl2WNS0bzQb+YYffJG2nRghaakrIn/vIrPSduXQ/2IUrC4G8zK2 oOqsiklB4W0l344riveoMdoRb7yKKLCnEer7qU7Xb6sCd+C8qMm8kEKmTwf/4857x510 0E1KdR0vtKfxSI2oDbgp02EsnOr6V/FUVCC2I+NkWixtMxmOeSQtaujoXVv1vLIaHbhN Z1A5KWmfPLMGZSLAPlHIZxzNFGWeNXx5PW0zrav8+fr9KfXuLjQgfK8I+/JDwXTIn3ZM ajag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="LEuyv/e3"; 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 v1-20020a05620a0f0100b0074ae3bf128fsi7199409qkl.343.2023.04.24.02.24.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Apr 2023 02:24:31 -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="LEuyv/e3"; 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 1pqsQB-00084y-1C; Mon, 24 Apr 2023 05:23:43 -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 1pqsPi-0007Fu-4R for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:23 -0400 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 1pqsPQ-0004nC-U3 for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:12 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3f1957e80a2so69597045e9.1 for ; Mon, 24 Apr 2023 02:22:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682328175; x=1684920175; 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=iONo8m57sFQhz/fKHL0PRqYNSYb2qqSH+RERi0fWhz0=; b=LEuyv/e3JqCM1JRBQ/80AUwhCkNtixL5P+kLNXbmykg4VQAjPIIOYkZd7KVH0xlzK0 NX6+MSDjcLG0Q7CA2yZeMchuCvyA733XhykLN95rWNe3xk5W0iqZyWYFaR4HddhNjX9r TmGkbTBC9X9TzVrNo4HDxudtyu+g67CsHiEt/kzmlHSVCe+ojTmEDLGh2pR9V/8awmnX gwSTIPwirSxlue0VTF1ADZgqV30dOnwYC95gT9BAZeQwyklJ+Mlr9LwN4TTdPCdE800W WvZs+rm78T6HkGelekl7e3sRa8ssZicRm055vKt+Tboyvs212fNXIq7zSg/RM+sYDlUk YNWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682328175; x=1684920175; 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=iONo8m57sFQhz/fKHL0PRqYNSYb2qqSH+RERi0fWhz0=; b=DtBAT2RsJLGoNboyt5g0UtjEjyj1DdlajluwYM/tcuzfQTkBFHOVuZ5WK4dXyyAQDa LWzvCuFFlQEUMTOUBbrAljNpR4cSHQ7xHgnSCUaUGwHo2YuFjpGAcWmP1+LVBsOk9bSp 14WR72JJQH4D18Vk5dukjFJIOPAs6t+/B5+Djlm+ehRuS+yShJxpdAOmeg8Ux4gqG242 mE+6LwlW8zF8P2mYII3qC9NCuD1dV9NBanxsCJ+n3f5N0vfb5oZYE8zNMIaqROIFKVTS SRirpECCDp+25gS8CAxZAguXHTiraT0Yg++D64qTqpCKTWWEUUN89spcqXXMnz2lBIVq 8XMA== X-Gm-Message-State: AAQBX9fdVi7lv0sdDo/UEQuzlIS2Q3NqyFiWbqohhBa/AUiiYVKuXHOv uee9ZNgkFbI6vgvHErVJ7GcfTQ== X-Received: by 2002:a05:6000:1181:b0:2fc:3596:7392 with SMTP id g1-20020a056000118100b002fc35967392mr10023134wrx.24.1682328175002; Mon, 24 Apr 2023 02:22:55 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id z14-20020a5d4d0e000000b002efb4f2d240sm10339317wrt.87.2023.04.24.02.22.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 02:22:53 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 77D8C1FFC1; Mon, 24 Apr 2023 10:22:50 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , "Edgar E. Iglesias" , Paolo Bonzini , Aurelien Jarno , Peter Maydell , Juan Quintela , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Richard Henderson , Joel Stanley , Leif Lindholm , Markus Armbruster , Radoslaw Biernacki , Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , John Snow , Andrew Jeffery , David Hildenbrand , Bastian Koppelmann , Max Filippov , qemu-s390x@nongnu.org, Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P=2E_Berrang=C3=A9?= , qemu-arm@nongnu.org, Eduardo Habkost , Ilya Leoshkevich Subject: [PATCH 09/18] tests/avocado/machine_aspeed: Fix the broken ast2[56]00_evb_sdk tests Date: Mon, 24 Apr 2023 10:22:40 +0100 Message-Id: <20230424092249.58552-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424092249.58552-1-alex.bennee@linaro.org> References: <20230424092249.58552-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@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, T_SCC_BODY_TEXT_LINE=-0.01 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 From: Thomas Huth test_arm_ast2500_evb_sdk and test_arm_ast2600_evb_sdk are currently failing. The problem is that they are trying to look for the login prompt that does not have a newline at the end - but the logic in _console_interaction() only handles full lines. It used to work by accident in the past since there were sometimes kernel (warning and error) messages popping up that finally provided a newline character in the output, but since the tests have been changed to run with the "quiet" kernel parameter, this is not working anymore. To make this work reliably, we must not look for the "login:" prompt, but have to use some text ending with a newline instead. And in the ast2600 test, switch to ssh instead of trying to log into the serial console - this works much more reliable and also has the benefit of excercising the network interface here a little bit, too. Signed-off-by: Thomas Huth Reviewed-by: Cédric Le Goater Message-Id: <20230421110345.1294131-3-thuth@redhat.com> [AJB: remove stray debug log] Signed-off-by: Alex Bennée --- tests/avocado/machine_aspeed.py | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py index 2b532c4834..724ee72c02 100644 --- a/tests/avocado/machine_aspeed.py +++ b/tests/avocado/machine_aspeed.py @@ -10,6 +10,7 @@ import tempfile import subprocess +from avocado_qemu import LinuxSSHMixIn from avocado_qemu import QemuSystemTest from avocado_qemu import wait_for_console_pattern from avocado_qemu import exec_command @@ -268,7 +269,7 @@ def test_arm_ast2600_evb_buildroot_tpm(self): self.do_test_arm_aspeed_buildroot_poweroff() -class AST2x00MachineSDK(QemuSystemTest): +class AST2x00MachineSDK(QemuSystemTest, LinuxSSHMixIn): EXTRA_BOOTARGS = ( 'quiet ' @@ -295,7 +296,7 @@ def do_test_arm_aspeed_sdk_start(self, image): self.require_netdev('user') self.vm.set_console() self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw', - '-net', 'nic', '-net', 'user') + '-net', 'nic', '-net', 'user,hostfwd=:127.0.0.1:0-:22') self.vm.launch() self.wait_for_console_pattern('U-Boot 2019.04') @@ -323,7 +324,7 @@ def test_arm_ast2500_evb_sdk(self): self.do_test_arm_aspeed_sdk_start( self.workdir + '/ast2500-default/image-bmc') - self.wait_for_console_pattern('ast2500-default login:') + self.wait_for_console_pattern('nodistro.0 ast2500-default ttyS4') @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') def test_arm_ast2600_evb_sdk(self): @@ -345,22 +346,25 @@ def test_arm_ast2600_evb_sdk(self): 'ds1338,bus=aspeed.i2c.bus.5,address=0x32'); self.do_test_arm_aspeed_sdk_start( self.workdir + '/ast2600-default/image-bmc') - self.wait_for_console_pattern('ast2600-default login:') - exec_command_and_wait_for_pattern(self, 'root', 'Password:') - exec_command_and_wait_for_pattern(self, '0penBmc', 'root@ast2600-default:~#') + self.wait_for_console_pattern('nodistro.0 ast2600-default ttyS4') - exec_command_and_wait_for_pattern(self, - 'echo lm75 0x4d > /sys/class/i2c-dev/i2c-5/device/new_device', + self.ssh_connect('root', '0penBmc', False) + self.ssh_command('dmesg -c > /dev/null') + + self.ssh_command_output_contains( + 'echo lm75 0x4d > /sys/class/i2c-dev/i2c-5/device/new_device ; ' + 'dmesg -c', 'i2c i2c-5: new_device: Instantiated device lm75 at 0x4d'); - exec_command_and_wait_for_pattern(self, + self.ssh_command_output_contains( 'cat /sys/class/hwmon/hwmon19/temp1_input', '0') self.vm.command('qom-set', path='/machine/peripheral/tmp-test', property='temperature', value=18000); - exec_command_and_wait_for_pattern(self, + self.ssh_command_output_contains( 'cat /sys/class/hwmon/hwmon19/temp1_input', '18000') - exec_command_and_wait_for_pattern(self, - 'echo ds1307 0x32 > /sys/class/i2c-dev/i2c-5/device/new_device', + self.ssh_command_output_contains( + 'echo ds1307 0x32 > /sys/class/i2c-dev/i2c-5/device/new_device ; ' + 'dmesg -c', 'i2c i2c-5: new_device: Instantiated device ds1307 at 0x32'); year = time.strftime("%Y") - exec_command_and_wait_for_pattern(self, 'hwclock -f /dev/rtc1', year); + self.ssh_command_output_contains('/sbin/hwclock -f /dev/rtc1', year); From patchwork Mon Apr 24 09:22:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 676566 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp2054918wrs; Mon, 24 Apr 2023 02:25:43 -0700 (PDT) X-Google-Smtp-Source: AKy350ZE2zXy8pRl2zzQLDy8zateSDHnl8bpEZaQiU82AfgPCPshnofLDaf8935UVF2J3RvtaRvo X-Received: by 2002:ac8:58cd:0:b0:3e6:4fab:478f with SMTP id u13-20020ac858cd000000b003e64fab478fmr22541406qta.43.1682328342976; Mon, 24 Apr 2023 02:25:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682328342; cv=none; d=google.com; s=arc-20160816; b=WBxLIIuZ35IJd1+UodIF0HCnfQ9W+sixHxm8lClUucvSjZEzKQ3EG7Gw6Jbca4AHPn V50uATVWHPAKUxyoL9sZuHavvAIQpeaYxQRQKwjHnXeYu/cRWDPt2s7YOJRUXyzMTMjN h6VR4U3Jr68cwPQhHQ2nSQFS9bzNh+5ObJKW5CNbmVTrfU5z1v+tAHZWR+znwNJlrVFy QoiWicmnwOL6kV4AGn28ezZCb65fuOYkMnaZUUf/XwDohQ/5ttfjSihdY2pGDjqBbl0q tbiLchKcujfWeDMO38F+KffD23x+f3A/quCeaQ4E67ult3qVl4YHBWkdOiH4O5d9OCMz Ro+A== 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=0gATlHo8jZj7xSKmpmcEVbxmuB9cXEWUKLiKEpRBnCw=; b=FmiFwvoB5IhT7KjIrvDVzAVXZVwTRlpqP5lzSGjvj3TgPLwipWQeMiFmpekOr3igKO yhC/omWHULLbLfsv1TVzZBzSYoPTvylErvXVi+nYrSVLnTocfU8oDrjfwiXh7O7Ez14+ k0L6DYD4mYLO8tv/PQKjvPR4S0aTP+pTHf73NfRS9jsDfQLkywgziJRFA3/7g9HETWPw nhYaQyOBLiScoPh+9e2TfVW+7sB2wMPupokb6nGlq4T8s9YTX2Vd5GxQrPh0GhV0rvao z8/F0J/Eh0VSd/lMVnc/kgObj1NLFwsqg9yXiRa1Kk2sb/1Mw2RwHCsHUMmETUbTLEts wbPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q2UNVkzt; 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 c76-20020a379a4f000000b00748750a33adsi6548953qke.261.2023.04.24.02.25.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Apr 2023 02:25:42 -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=Q2UNVkzt; 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 1pqsQ6-0007jZ-RW; Mon, 24 Apr 2023 05:23: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 1pqsPe-0007Fe-TQ for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:12 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqsPQ-0004nG-K4 for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:09 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-3f1728c2a57so43348755e9.0 for ; Mon, 24 Apr 2023 02:22:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682328175; x=1684920175; 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=0gATlHo8jZj7xSKmpmcEVbxmuB9cXEWUKLiKEpRBnCw=; b=Q2UNVkztqm07zxn07aQUR+0xUDgzL1hfxGJ4UK1sdPrRKnSe62QvfHPBrGYJQhLNuq WIX8EoOP0F2UKq6e//EVavhv7A8p3OXvnLfHFFRJGGJ15ITsIsv/NqH89pg9jPxDc+8A O1BCE2MnFbWr4UqpDPHvUlITdVae1OvpfFcw58D5tYE5xIB5R/LiZAavBboQcSR3m2aF HnBWKrfBmmIoT21FKw7+0CnxyY0T0/pprw9u5MugaV3ByhylkHwrQy/3odjug170iAVG 9ylRF6Sb3ktPGvRedJjtSP45Kp7g9sey1XnlYbFlVkcbgGQ7fnjDV7p5M6UAEgI7U6AE pxVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682328175; x=1684920175; 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=0gATlHo8jZj7xSKmpmcEVbxmuB9cXEWUKLiKEpRBnCw=; b=Sb+tEet1woQW5sQXko07YreopiKwmw5qvlD8IMmxTsAL0dptaMbLfXM8UH++laaQoB 8sAOu5grbcHtCQ7YwW7aMQgpE3t+Uq9SofVTk+8K2tG08S6/q3GaTzCWgr+imDnQ+DM5 9yvljUCLJ9Fdanai+Mv5NUCSnHia4QWrb8jPOTFxmreIyQr9aKQZwBP5k5q+EsFYKNnF GYlPGKaRbZXZuBjP7EzIvEyv9dJDTKY69D87j2Msw24lM4FssifPzMpxd1scA/soKeHH d9oBUxUNYINZ5ly+TAqnmbiAWCpPypSqQQTytukp050mB6wuNdPoiZR1CikMjO3Cgb77 y1og== X-Gm-Message-State: AAQBX9cO8iGIdxSSI8XVH2RCNI6NepPgzv6e1NWH7r0FeL+Yyi7x8EnU nLlzEphq+WAZZw193NoSBkCOmQ== X-Received: by 2002:a7b:c5c2:0:b0:3f1:7316:6f4 with SMTP id n2-20020a7bc5c2000000b003f1731606f4mr6853130wmk.20.1682328175248; Mon, 24 Apr 2023 02:22:55 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id g10-20020a7bc4ca000000b003f171234a08sm11582037wmk.20.2023.04.24.02.22.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 02:22:53 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8F3A11FFC2; Mon, 24 Apr 2023 10:22:50 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , "Edgar E. Iglesias" , Paolo Bonzini , Aurelien Jarno , Peter Maydell , Juan Quintela , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Richard Henderson , Joel Stanley , Leif Lindholm , Markus Armbruster , Radoslaw Biernacki , Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , John Snow , Andrew Jeffery , David Hildenbrand , Bastian Koppelmann , Max Filippov , qemu-s390x@nongnu.org, Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P=2E_Berrang=C3=A9?= , qemu-arm@nongnu.org, Eduardo Habkost , Ilya Leoshkevich Subject: [PATCH 10/18] MAINTAINERS: Cover tests/avocado/machine_aspeed.py Date: Mon, 24 Apr 2023 10:22:41 +0100 Message-Id: <20230424092249.58552-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424092249.58552-1-alex.bennee@linaro.org> References: <20230424092249.58552-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.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: Thomas Huth tests/avocado/machine_aspeed.py should belong to the ASPEED section in the maintainers file. Improve the wildcards here a little bit, so that it is covered, too. Signed-off-by: Thomas Huth Reviewed-by: Cédric Le Goater Message-Id: <20230421110345.1294131-4-thuth@redhat.com> Signed-off-by: Alex Bennée --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 034ff71dac..d0f48a5113 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1113,7 +1113,7 @@ F: include/hw/misc/pca9552*.h F: hw/net/ftgmac100.c F: include/hw/net/ftgmac100.h F: docs/system/arm/aspeed.rst -F: tests/qtest/*aspeed* +F: tests/*/*aspeed* F: hw/arm/fby35.c NRF51 From patchwork Mon Apr 24 09:22:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 676560 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp2054691wrs; Mon, 24 Apr 2023 02:24:54 -0700 (PDT) X-Google-Smtp-Source: AKy350Z9Uxn0ZNgTBqsASGgo0iTblgMsDnDHwFam7GxQ96ow1A5mcVMFpOD9j5poLh7kokOLM0oy X-Received: by 2002:a05:622a:2:b0:3ec:d85d:2afe with SMTP id x2-20020a05622a000200b003ecd85d2afemr23018172qtw.2.1682328293817; Mon, 24 Apr 2023 02:24:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682328293; cv=none; d=google.com; s=arc-20160816; b=vYQKmfH43+ushiGDr7hmLcF5rNiXoBNHoVATIaZBv0W4L5n5orkNmJX4DSl2lWDyg8 xxu3mnYvBDzuH/tV4bCka0OJEc9xtqhFdP3/R8LTg8xbcgUwCMDzh0PmO9Vnfj7mZmJ+ au/Z98+mk09VG3xevX4veQ4xa9relaPJU5pW+ThiWNnj8HwX9UluPZQPpHu21htG2sCB wWISIKkkVsX5fcrilLB1jAjmqPwv4olvo4LXh2a4OBxIxZBNtQIcQ9CjnNh7g7OXNUHP 0tBmrSxDBpfcv1eckipmds8HzhHzvDi6k85TCT+0HXz2cCb2Gnlg7ucrC9WgoZ40r6jt hIdw== 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=k3CcGFsLs0X/rcB8rUBi4/9QeDN/ZK8Y25q/vvmaz/M=; b=vMoCZSJUq8+jKCGmIKbHfrVlAYi3Q2toNCFPf3UW7bslthTlnDI+k3O9ixQAp+1eys YE8pLvCOpkcul7A4VCzYqbexDyJ386A8FNzxlFwqyFBsZfjklckRURCHwcxstPIheqIZ bgjt2XT0dD/VWO14fVjubLOcFLukUZ8lWURUu41Qk4ggPNjePRAaZvE+2a2Cua422jIJ 21/fcQx6mcBQK3RgG96tWZ+6Ddqjz5jFl4f2+lCBCyOezSyJ2H6rz9GFt9gbJDjIu/cJ OoVWC0dQ7GjO9TdbQnatBGOkqfv3XIH+LAvfJAH0XPDycVuWpDbiQw3Wlb86c6VTxtgu veuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qQOz0BM1; 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 k5-20020a05620a0b8500b0074ad9eb3b15si3966955qkh.325.2023.04.24.02.24.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Apr 2023 02:24:53 -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=qQOz0BM1; 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 1pqsQC-00087X-9P; Mon, 24 Apr 2023 05:23:44 -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 1pqsPj-0007JY-TE for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:25 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqsPR-0004oG-RS for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:14 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-2fddb442d47so3817410f8f.2 for ; Mon, 24 Apr 2023 02:22:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682328176; x=1684920176; 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=k3CcGFsLs0X/rcB8rUBi4/9QeDN/ZK8Y25q/vvmaz/M=; b=qQOz0BM1XgpF11Fnol50ZtckcMGGoW8Th7dj81dChwp5mcuZEIcf+pycRUOSdUlrOM iWQgJ6uNQX3P8gYYeWxzT6FEoNWIAUxeFkmAoq4ZXFe1dTzjsTTYXubo5VviaI4kzKf8 2G3BAzjapoYztFOsY63lyDlskGe67zrWezoTgs7RZWvItkZxLNdz/TLFjXwIVKK04nbX nwLunfjzYOsKOQznvpcy8ZJRXPVygCsxGjfdMmG/6VRyd4frvr5tOlf9ibq28OocKioy k2kgR2FX/arBGUjMg954Dt5yFotrYNNFeU4OVyFlbtWX1HVausFJFHWlu1XI+SG7cixG zeAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682328176; x=1684920176; 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=k3CcGFsLs0X/rcB8rUBi4/9QeDN/ZK8Y25q/vvmaz/M=; b=KyrG3a2q+RsKTxEBOkxzu1Krfa5szDfizSdW83cf6NuKkJC935daM0fDsavY302Fpx eMx+t+dTC8M8B7ZGBWBVcILtNR8IJkMvbyYsv96EESN/qM+ZEbJ8+64vp9Y71gPPQ4+e jCd4H/B3/z2odHEKBGcYv8JcKno3XvpQ1o9v7OBH7zg48BLW5LMlFsYRqjmLIrE/rszf fLnKy9bFdA72Kq6o1HlsxUV4zGfJ32pAWMZ5qe5g9x6xEEe6TVdAJ76/ds4M8kRGhwas pkzOR8M1pnpzR0Sj9VT04mwE5eFq08r0vAeR6V+qik8pK9fdptj/UKPn/6JVRerypMfR rnMA== X-Gm-Message-State: AAQBX9ejYd3RklmGevG6yeCjpfNdYuHTCVQjsbxWHXtstAp/pKFqA3IT x0vzW5/sqJ6nKHm8GGX1Vj5gCQ== X-Received: by 2002:adf:eacc:0:b0:2f4:867e:efaa with SMTP id o12-20020adfeacc000000b002f4867eefaamr9543892wrn.53.1682328176281; Mon, 24 Apr 2023 02:22:56 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id r4-20020adfdc84000000b002f598008d50sm10341053wrj.34.2023.04.24.02.22.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 02:22:53 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A848B1FFB8; Mon, 24 Apr 2023 10:22:50 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , "Edgar E. Iglesias" , Paolo Bonzini , Aurelien Jarno , Peter Maydell , Juan Quintela , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Richard Henderson , Joel Stanley , Leif Lindholm , Markus Armbruster , Radoslaw Biernacki , Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , John Snow , Andrew Jeffery , David Hildenbrand , Bastian Koppelmann , Max Filippov , qemu-s390x@nongnu.org, Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P=2E_Berrang=C3=A9?= , qemu-arm@nongnu.org, Eduardo Habkost , Ilya Leoshkevich , Kautuk Consul , Harsh Prateek Bora Subject: [PATCH 11/18] avocado_qemu/__init__.py: factor out the qemu-img finding Date: Mon, 24 Apr 2023 10:22:42 +0100 Message-Id: <20230424092249.58552-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424092249.58552-1-alex.bennee@linaro.org> References: <20230424092249.58552-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.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=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 From: Kautuk Consul Factor out the code that finds the qemu-img binary in the QemuSystemTest class and create a new get_qemu_img() function with it. This function will get called also from the new code in tuxrun_baselines.py avocado test-case. Signed-off-by: Kautuk Consul Reviewed-by: Harsh Prateek Bora Suggested-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230421042322.684093-2-kconsul@linux.vnet.ibm.com> Signed-off-by: Alex Bennée --- tests/avocado/avocado_qemu/__init__.py | 27 +++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado_qemu/__init__.py index 6788837e1b..33090903f1 100644 --- a/tests/avocado/avocado_qemu/__init__.py +++ b/tests/avocado/avocado_qemu/__init__.py @@ -330,6 +330,19 @@ def _new_vm(self, name, *args): vm.add_args(*args) return vm + def get_qemu_img(self): + self.log.debug('Looking for and selecting a qemu-img binary') + + # If qemu-img has been built, use it, otherwise the system wide one + # will be used. + qemu_img = os.path.join(BUILD_DIR, 'qemu-img') + if not os.path.exists(qemu_img): + qemu_img = find_command('qemu-img', False) + if qemu_img is False: + self.cancel('Could not find "qemu-img"') + + return qemu_img + @property def vm(self): return self.get_vm(name='default') @@ -602,17 +615,9 @@ def set_up_existing_ssh_keys(self): return (ssh_public_key, ssh_private_key) def download_boot(self): - self.log.debug('Looking for and selecting a qemu-img binary to be ' - 'used to create the bootable snapshot image') - # If qemu-img has been built, use it, otherwise the system wide one - # will be used. If none is available, the test will cancel. - qemu_img = os.path.join(BUILD_DIR, 'qemu-img') - if not os.path.exists(qemu_img): - qemu_img = find_command('qemu-img', False) - if qemu_img is False: - self.cancel('Could not find "qemu-img", which is required to ' - 'create the bootable image') - vmimage.QEMU_IMG = qemu_img + # Set the qemu-img binary. + # If none is available, the test will cancel. + vmimage.QEMU_IMG = super().get_qemu_img() self.log.info('Downloading/preparing boot image') # Fedora 31 only provides ppc64le images From patchwork Mon Apr 24 09:22:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 676563 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp2054772wrs; Mon, 24 Apr 2023 02:25:13 -0700 (PDT) X-Google-Smtp-Source: AKy350bE45qVUDX6TPJdGfF4AXV3k4Afl305j8CGzrJ06CKnPBMoEmb56RwQN4ygtzTLiHRnyMrR X-Received: by 2002:a05:622a:178e:b0:3ed:a811:23d0 with SMTP id s14-20020a05622a178e00b003eda81123d0mr24304330qtk.41.1682328312826; Mon, 24 Apr 2023 02:25:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682328312; cv=none; d=google.com; s=arc-20160816; b=BUBgzLZGRYZyXb4uqPR7hYT6N6FbIo2tC1gWOwBVnOFQ4PrTLirTSg+iBlXf5ydrmv fEu6fbv58yvnNzwOlpNHGidqi2aAM8SLhvd8JiA5nf8tsoiCpwTTM9aANU6aHKDnCk3h ManaH3MDbck/HMfSqa06AnWvXNXuHzhZ4E4aLKIlStGdkDLi4SQUWNRtNk+ZiYrwq7V8 9z94UWAXe8+1obI8x9UOiiQZV5JwZHmC1EU+AdcHwwrIYJcUi3n3ODH4FoObL4JoiH12 y90CqqHBlrjOXuPiocoVgwDX5G2lOtCxCu0+ZK+9N+G6gvnqPhFhFEPrXgEEaFLNzq41 ODWg== 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=I4tVKb7J1HOiUkOeX7zfOlqKTbRSuqHHdNiF8Yq+Ih8=; b=RVpLVQ1XhU51k2QaWyi0xZggo1VINaxoux3hUIeSpiD6toR/z/FiehQnRW9ZvEamJ2 qI4g62BmdeVV+RCR5zE+q6l0IJdVqlftjY/xYlXBtZuW1bAEm7DxHBFUNqueyhQVxNnh tq7lD5E6hUY50DaU1maz3XE1WoyEyjREWc2d+p0AXr0cz7vxHnhd+Il/1aJYnb/r7bPr hz7i89Y4R5n9U8UvYISVwJhfy7blFKGhWTp5EAAEwoX+NWwUO2YuSlGN0PAp2yShYGrJ u3XGi1lwmrl5tOggKOimB7R4nav7qmIdefzsSdwI9HD8rGGNzhVbr0nqsdF6NW1Ot6mJ 3LpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UjuONCQw; 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 q18-20020a05622a04d200b003e64f4fb4f0si642900qtx.255.2023.04.24.02.25.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Apr 2023 02:25:12 -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=UjuONCQw; 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 1pqsQ7-0007mB-LI; Mon, 24 Apr 2023 05:23:39 -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 1pqsPi-0007Fs-4K for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:25 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqsPQ-0004nX-T5 for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:12 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-3f173af665fso26195425e9.3 for ; Mon, 24 Apr 2023 02:22:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682328175; x=1684920175; 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=I4tVKb7J1HOiUkOeX7zfOlqKTbRSuqHHdNiF8Yq+Ih8=; b=UjuONCQwve8NrKacSXdRZSXQbuZMAtROh/BwLiYNvTlW/8e/a9rudGEC0jtAty8Lho IpSoX87hFUIHnUEK9l/cQSc8j1bu1571jddQk1BfVud/cbiTkwFtq7xyqC/4JQ4iaBk/ AAA9I57skzbC0B3UirpMAppY1Z4RN4tTBxCRVu0vY9u0yStOcITQRB6juYVsyQugJNMP ImMCU1v96UFHoMdCr54gjq3AsraXHHffMAFiGHhFwtnmKgkW8TkiCQSwmOJLezFoRJgF ovcopdeUsqvNHOgfjqxkdg9X1xyp8+3ckmZSkkv2AqyYSAaDjONxqNrmfDjIy89E5q+n pi+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682328175; x=1684920175; 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=I4tVKb7J1HOiUkOeX7zfOlqKTbRSuqHHdNiF8Yq+Ih8=; b=jqPETCuKiEutKawgTtxCPXe8dedga2CmPcKavSg9WTqDsUAG/YTGXws79EtIa/5kDa Oe8MRXBymP9nj3enNrpTGgUMTrbJZIvVGZ6GH1yWGp7WglMS0d32Hc9xUzSEuVgjSQ4w GMJUuLejaMxSD3CAs5yELMdQd3M0utHtfLJs3wtdk/ERevm4ehkl1wkr5zqK7hZkBhPa 6+rDs3G7StvIa7UrNeJAXsSvQvuR+mgBDLUwxacQ2ZT6RGPQgy+B1IEKu+KkKhrX6sMn c7o38VmUsQCSf9jK6CXQVpTVht55ffrcbIZrTPm1DlT16N0FCowSfzYByTHW93Ow9ov3 Bcig== X-Gm-Message-State: AAQBX9d0ydV1RZ1MKwah2XCJQzPi99qYfTOCOvWMBVAWS2T3xzePrXmd HHG1/27V+2g+ix8r8MDW4DJ87A== X-Received: by 2002:a1c:e909:0:b0:3f1:98e1:c902 with SMTP id q9-20020a1ce909000000b003f198e1c902mr4009399wmc.4.1682328175463; Mon, 24 Apr 2023 02:22:55 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id n12-20020a7bc5cc000000b003f17329f7f2sm11624698wmk.38.2023.04.24.02.22.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 02:22:53 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C0C221FFC3; Mon, 24 Apr 2023 10:22:50 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , "Edgar E. Iglesias" , Paolo Bonzini , Aurelien Jarno , Peter Maydell , Juan Quintela , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Richard Henderson , Joel Stanley , Leif Lindholm , Markus Armbruster , Radoslaw Biernacki , Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , John Snow , Andrew Jeffery , David Hildenbrand , Bastian Koppelmann , Max Filippov , qemu-s390x@nongnu.org, Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P=2E_Berrang=C3=A9?= , qemu-arm@nongnu.org, Eduardo Habkost , Ilya Leoshkevich , Kautuk Consul , Harsh Prateek Bora Subject: [PATCH 12/18] tests/avocado/tuxrun_baselines.py: improve code coverage for ppc64 Date: Mon, 24 Apr 2023 10:22:43 +0100 Message-Id: <20230424092249.58552-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424092249.58552-1-alex.bennee@linaro.org> References: <20230424092249.58552-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.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: Kautuk Consul Commit c0c8687ef0fd990db8db1655a8a6c5a5e35dd4bb disabled the boot_linux.py test-case due to which the code coverage for ppc decreased by around 2%. As per the discussion on https://lore.kernel.org/qemu-devel/87sfdpqcy4.fsf@linaro.org/ it was mentioned that the baseline test for ppc64 could be modified to make up this 2% code coverage. This patch attempts to achieve this 2% code coverage by adding various device command line arguments (to ./qemu-system-ppc64) in the tuxrun_baselines.py test-case. The code coverage report with boot_linux.py, without it and finally with these tuxrun_baselines.py changes is as follows: With boot_linux.py ------------------ lines......: 13.8% (58006 of 420997 lines) functions..: 20.7% (7675 of 36993 functions) branches...: 9.2% (22146 of 240611 branches) Without boot_linux.py (without this patch changes) -------------------------------------------------- lines......: 11.9% (50174 of 420997 lines) functions..: 18.8% (6947 of 36993 functions) branches...: 7.4% (17580 of 239017 branches) Without boot_linux.py (with this patch changes) ----------------------------------------------- lines......: 13.8% (58287 of 420997 lines) functions..: 20.7% (7640 of 36993 functions) branches...: 8.4% (20223 of 240611 branches) Rebased on Alex Benee's testing/next branch: https://gitlab.com/stsquad/qemu/-/tree/testing/next Signed-off-by: Kautuk Consul Reported-by: Alex Bennée Reviewed-by: Harsh Prateek Bora Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230424041830.1275636-1-kconsul@linux.vnet.ibm.com> --- tests/avocado/tuxrun_baselines.py | 70 ++++++++++++++++++++++++++++--- 1 file changed, 64 insertions(+), 6 deletions(-) diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_baselines.py index e8749717e9..3a46e7a745 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -11,6 +11,7 @@ import os import time +import tempfile from avocado import skip, skipIf from avocado_qemu import QemuSystemTest @@ -72,6 +73,8 @@ def setUp(self): # Occasionally we need extra devices to hook things up self.extradev = self.get_tag('extradev') + self.qemu_img = super().get_qemu_img() + def wait_for_console_pattern(self, success_message, vm=None): wait_for_console_pattern(self, success_message, failure_message='Kernel panic - not syncing', @@ -179,6 +182,63 @@ def common_tuxrun(self, self.vm.launch() self.run_tuxtest_tests(haltmsg) + def ppc64_common_tuxrun(self, sums, prefix): + # add device args to command line. + self.vm.add_args('-netdev', 'user,id=vnet,hostfwd=:127.0.0.1:0-:22', + '-device', 'virtio-net,netdev=vnet') + self.vm.add_args('-netdev', '{"type":"user","id":"hostnet0"}', + '-device', '{"driver":"virtio-net-pci","netdev":' + '"hostnet0","id":"net0","mac":"52:54:00:4c:e3:86",' + '"bus":"pci.0","addr":"0x9"}') + self.vm.add_args('-device', '{"driver":"qemu-xhci","p2":15,"p3":15,' + '"id":"usb","bus":"pci.0","addr":"0x2"}') + self.vm.add_args('-device', '{"driver":"virtio-scsi-pci","id":"scsi0"' + ',"bus":"pci.0","addr":"0x3"}') + self.vm.add_args('-device', '{"driver":"virtio-serial-pci","id":' + '"virtio-serial0","bus":"pci.0","addr":"0x4"}') + self.vm.add_args('-device', '{"driver":"scsi-cd","bus":"scsi0.0"' + ',"channel":0,"scsi-id":0,"lun":0,"device_id":' + '"drive-scsi0-0-0-0","id":"scsi0-0-0-0"}') + self.vm.add_args('-device', '{"driver":"virtio-balloon-pci",' + '"id":"balloon0","bus":"pci.0","addr":"0x6"}') + self.vm.add_args('-audiodev', '{"id":"audio1","driver":"none"}') + self.vm.add_args('-device', '{"driver":"usb-tablet","id":"input0"' + ',"bus":"usb.0","port":"1"}') + self.vm.add_args('-device', '{"driver":"usb-kbd","id":"input1"' + ',"bus":"usb.0","port":"2"}') + self.vm.add_args('-device', '{"driver":"VGA","id":"video0",' + '"vgamem_mb":16,"bus":"pci.0","addr":"0x7"}') + self.vm.add_args('-object', '{"qom-type":"rng-random","id":"objrng0"' + ',"filename":"/dev/urandom"}', + '-device', '{"driver":"virtio-rng-pci","rng":"objrng0"' + ',"id":"rng0","bus":"pci.0","addr":"0x8"}') + self.vm.add_args('-object', '{"qom-type":"cryptodev-backend-builtin",' + '"id":"objcrypto0","queues":1}', + '-device', '{"driver":"virtio-crypto-pci",' + '"cryptodev":"objcrypto0","id":"crypto0","bus"' + ':"pci.0","addr":"0xa"}') + self.vm.add_args('-device', '{"driver":"spapr-pci-host-bridge"' + ',"index":1,"id":"pci.1"}') + self.vm.add_args('-device', '{"driver":"spapr-vscsi","id":"scsi1"' + ',"reg":12288}') + self.vm.add_args('-m', '2G,slots=32,maxmem=4G', + '-object', 'memory-backend-ram,id=ram1,size=1G', + '-device', 'pc-dimm,id=dimm1,memdev=ram1') + + # Create a temporary qcow2 and launch the test-case + with tempfile.NamedTemporaryFile(prefix=prefix, + suffix='.qcow2') as qcow2: + process.run(self.qemu_img + ' create -f qcow2 ' + + qcow2.name + ' 1G') + + self.vm.add_args('-drive', 'file=' + qcow2.name + + ',format=qcow2,if=none,id=' + 'drive-virtio-disk1', + '-device', 'virtio-blk-pci,scsi=off,bus=pci.0,' + 'addr=0xb,drive=drive-virtio-disk1,id=virtio-disk1' + ',bootindex=2') + self.common_tuxrun(csums=sums, drive="scsi-hd") + # # The tests themselves. The configuration is derived from how # tuxrun invokes qemu (with minor tweaks like using -blockdev @@ -379,7 +439,7 @@ def test_ppc64(self): """ :avocado: tags=arch:ppc64 :avocado: tags=machine:pseries - :avocado: tags=cpu:POWER8 + :avocado: tags=cpu:POWER10 :avocado: tags=endian:big :avocado: tags=console:hvc0 :avocado: tags=tuxboot:ppc64 @@ -391,14 +451,13 @@ def test_ppc64(self): "1d953e81a4379e537fc8e41e05a0a59d9b453eef97aa03d47866c6c45b00bdff", "vmlinux" : "f22a9b9e924174a4c199f4c7e5d91a2339fcfe51c6eafd0907dc3e09b64ab728" } - - self.common_tuxrun(csums=sums, drive="scsi-hd") + self.ppc64_common_tuxrun(sums, prefix='tuxrun_ppc64_') def test_ppc64le(self): """ :avocado: tags=arch:ppc64 :avocado: tags=machine:pseries - :avocado: tags=cpu:POWER8 + :avocado: tags=cpu:POWER10 :avocado: tags=console:hvc0 :avocado: tags=tuxboot:ppc64le :avocado: tags=image:vmlinux @@ -409,8 +468,7 @@ def test_ppc64le(self): "b442678c93fb8abe1f7d3bfa20556488de6b475c22c8fed363f42cf81a0a3906", "vmlinux" : "979eb61b445a010fb13e2b927126991f8ceef9c590fa2be0996c00e293e80cf2" } - - self.common_tuxrun(csums=sums, drive="scsi-hd") + self.ppc64_common_tuxrun(sums, prefix='tuxrun_ppc64le_') def test_riscv32(self): """ From patchwork Mon Apr 24 09:22:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 676568 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp2056495wrs; Mon, 24 Apr 2023 02:30:02 -0700 (PDT) X-Google-Smtp-Source: AKy350YTuUDGnAMkk9VMx3OmHoz3uN/ZqpSEaC6MKMXeadTpqNqA8BMWjVc3bs4UWFx+F3n3Rwxs X-Received: by 2002:a05:6214:e4b:b0:613:5d6a:94f6 with SMTP id o11-20020a0562140e4b00b006135d6a94f6mr5198769qvc.19.1682328602509; Mon, 24 Apr 2023 02:30:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682328602; cv=none; d=google.com; s=arc-20160816; b=Nh8Nlia7WsgxblajqyeFBqFmDCTFineLXOSLcSGTCTpaLAIfvIJRGaThDdWOMnCSs5 xF/4a1asoszKp6rUhA5yxLzM/lRIyrfEOevBU3KXqV/jtNqX92M1kqneJrT2lmPawVK3 3FGYyLO3cy6xtU4dZLwtojIL4WSU3ryv6SNi896ypz5vFTrP/WtON9q733PSTGL384SO U29M/J4Sbra7wtOAPOPmMukkgyQMQ+5BN3HUUlyNTj/itnjkXBwllqZ1oiy7DPxbOxit zH7FB5oJrOhjVHWlwNFO3T/huV0cMzFI+8WbD5ocLhqleeR2KMiilTYnlQ+869cnnskg i/dQ== 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=6eo3cJsnHj0aRBy2LctgzUogZ9gk6lwxV1RcOen+FMc=; b=pyqs0nZGmb7SPNcOsDuevam/6DV7c4aisc2W8YFIjLCItCdbqapVqYFd4roPPo5fmW B49FycemZVb3HIGgq/qxMUkuF80dPt3oF/u0lhlmg8SyqgXYJ6YhdwoQ94zu0v7w6tgc Ygsuc9fZaPSh48rsDxkHpzfYfyQ3agG44MGnvbkjXVILCE2XddCWY0Tl41tlKOWmBKqV Xt9Lho2/eI4QJkqVLkY/rmY2DumGaIeBd/usVQrCYVszoCTG9ckO7oY9B61RMSL+cOzC kplsHYy0e8ug/smS9cNrAzRbJdWQ0DPdh9ksdJjQ5izOTTvQ6mXqf+iqms/bNBYijVXD Erlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fe2bKXKG; 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 b10-20020a05622a020a00b003eebe989fdbsi7145834qtx.468.2023.04.24.02.30.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Apr 2023 02:30:02 -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=fe2bKXKG; 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 1pqsW6-0003ye-43; Mon, 24 Apr 2023 05:29:50 -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 1pqsVh-0003mq-HQ for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:29:27 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqsVd-0006cA-UL for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:29:24 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-2fddb442d47so3823932f8f.2 for ; Mon, 24 Apr 2023 02:29:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682328560; x=1684920560; 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=6eo3cJsnHj0aRBy2LctgzUogZ9gk6lwxV1RcOen+FMc=; b=fe2bKXKGTMLCSxdW4b1Sgw0WMP/wXRPp7oYJz2g+D8QVUL8a+05tla4zItPpJ2Kj9k mBzFQ+hnngRmyQp1XFHC62TVttwlj08diMNMUp2M8s5m7jrhiqUya3KEqWDsjngySZah 88oViM7HMDE0TjhID3Tw6OLHSblywfnRn3QTmyO6VNqI3cvkauekoMPm/g/OoQzEdaR2 yEp1d065FWETvwZQX9fgiiTQQmwtNwAsR+3itNVEemHUiJxHdvR6ILFZ3EBugZGvmOYP C4gLowIrHMavl3KlCi+VlCU1XRz/vdl+Numv3qsAnRJpwGPnf+Lx3bzu90C3tn3PvxoT IwCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682328560; x=1684920560; 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=6eo3cJsnHj0aRBy2LctgzUogZ9gk6lwxV1RcOen+FMc=; b=OUzGVtzMDzPNxopM8HXWmOCt8Nm4WOuS0kq9fgtOB0RxHGLAR8ybiii1IX1tsIlLJa iVeedk2yj9ULWeTa1Ot7mSTMHswRhZefBgwa/3myO44WalN76i8cQ/ZwKBKMsDW5+tpP tX7nlcjhdj2jqtkZPH+7orqH2yZVf4bPJVgsc4qLMs5zh/NyMhaYmX6nWJ2HgezKjgzR BGFAU2FIcnfMxUsy6tA4nDUedrrn/j22WuGIAlt/1445AZAkBRkFWDuK8Oq+PU74CWh+ jcwak8QOxw/2e0y+uSBpiMo0YKY1dmxounkE4bqwuqUtldOwwsmUMN0WlfW0Kx8pdVH2 nwIg== X-Gm-Message-State: AAQBX9eHKd7tzAOJ5X9jTig76NSuEfUo2IwFlYrx9jhZN7r6WEZ84Ssl ZERte6KNB8b2jcvYKjmdbnQE5g== X-Received: by 2002:adf:e9d0:0:b0:2ff:6906:7169 with SMTP id l16-20020adfe9d0000000b002ff69067169mr8535787wrn.68.1682328560419; Mon, 24 Apr 2023 02:29:20 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id s13-20020adfeb0d000000b002fb6a79dea0sm10488692wrn.7.2023.04.24.02.29.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 02:29:19 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 04A7D1FFC4; Mon, 24 Apr 2023 10:22:51 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , "Edgar E. Iglesias" , Paolo Bonzini , Aurelien Jarno , Peter Maydell , Juan Quintela , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Richard Henderson , Joel Stanley , Leif Lindholm , Markus Armbruster , Radoslaw Biernacki , Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , John Snow , Andrew Jeffery , David Hildenbrand , Bastian Koppelmann , Max Filippov , qemu-s390x@nongnu.org, Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P=2E_Berrang=C3=A9?= , qemu-arm@nongnu.org, Eduardo Habkost , Ilya Leoshkevich Subject: [PATCH 13/18] tests/tcg: limit the scope of the plugin tests Date: Mon, 24 Apr 2023 10:22:44 +0100 Message-Id: <20230424092249.58552-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424092249.58552-1-alex.bennee@linaro.org> References: <20230424092249.58552-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.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 Running every plugin with every test is getting excessive as well as not really improving coverage that much. Restrict the plugin tests to just the MULTIARCH_TESTS which are shared between most architecture for both system and user-mode. For those that aren't we need to squash MULTIARCH_TESTS so we don't add them when they are not part of the TESTS global. Signed-off-by: Alex Bennée Acked-by: Richard Henderson Message-Id: <20230421131400.2750123-1-alex.bennee@linaro.org> --- tests/tcg/Makefile.target | 10 +++++++--- tests/tcg/aarch64/Makefile.softmmu-target | 2 -- tests/tcg/aarch64/Makefile.target | 1 - tests/tcg/arm/Makefile.softmmu-target | 4 +++- tests/tcg/arm/Makefile.target | 8 -------- tests/tcg/cris/Makefile.target | 3 +++ tests/tcg/hppa/Makefile.target | 2 -- tests/tcg/i386/Makefile.target | 10 ---------- tests/tcg/ppc64/Makefile.target | 2 -- tests/tcg/riscv64/Makefile.softmmu-target | 3 +++ tests/tcg/riscv64/Makefile.target | 1 - tests/tcg/s390x/Makefile.softmmu-target | 3 +++ tests/tcg/tricore/Makefile.softmmu-target | 3 +++ tests/tcg/xtensa/Makefile.softmmu-target | 3 +++ 14 files changed, 25 insertions(+), 30 deletions(-) diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target index 8318caf924..72876cc84e 100644 --- a/tests/tcg/Makefile.target +++ b/tests/tcg/Makefile.target @@ -152,13 +152,17 @@ PLUGINS=$(patsubst %.c, lib%.so, $(notdir $(wildcard $(PLUGIN_SRC)/*.c))) # We need to ensure expand the run-plugin-TEST-with-PLUGIN # pre-requistes manually here as we can't use stems to handle it. We -# also add some special helpers the run-plugin- rules can use bellow. +# only expand MULTIARCH_TESTS which are common on most of our targets +# to avoid an exponential explosion as new tests are added. We also +# add some special helpers the run-plugin- rules can use bellow. +ifneq ($(MULTIARCH_TESTS),) $(foreach p,$(PLUGINS), \ - $(foreach t,$(TESTS),\ + $(foreach t,$(MULTIARCH_TESTS),\ $(eval run-plugin-$(t)-with-$(p): $t $p) \ $(eval RUN_TESTS+=run-plugin-$(t)-with-$(p)))) -endif +endif # MULTIARCH_TESTS +endif # CONFIG_PLUGIN strip-plugin = $(wordlist 1, 1, $(subst -with-, ,$1)) extract-plugin = $(wordlist 2, 2, $(subst -with-, ,$1)) diff --git a/tests/tcg/aarch64/Makefile.softmmu-target b/tests/tcg/aarch64/Makefile.softmmu-target index df9747bae8..b74a2534e3 100644 --- a/tests/tcg/aarch64/Makefile.softmmu-target +++ b/tests/tcg/aarch64/Makefile.softmmu-target @@ -81,6 +81,4 @@ pauth-3: $(call skip-test, "BUILD of $@", "missing compiler support") run-pauth-3: $(call skip-test, "RUN of pauth-3", "not built") -run-plugin-pauth-3-with-%: - $(call skip-test, "RUN of pauth-3 ($*)", "not built") endif diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target index 9e91a20b0d..0315795487 100644 --- a/tests/tcg/aarch64/Makefile.target +++ b/tests/tcg/aarch64/Makefile.target @@ -32,7 +32,6 @@ ifneq ($(CROSS_CC_HAS_ARMV8_3),) AARCH64_TESTS += pauth-1 pauth-2 pauth-4 pauth-5 pauth-%: CFLAGS += -march=armv8.3-a run-pauth-%: QEMU_OPTS += -cpu max -run-plugin-pauth-%: QEMU_OPTS += -cpu max endif # BTI Tests diff --git a/tests/tcg/arm/Makefile.softmmu-target b/tests/tcg/arm/Makefile.softmmu-target index 7df88ddea8..8b546e2aa3 100644 --- a/tests/tcg/arm/Makefile.softmmu-target +++ b/tests/tcg/arm/Makefile.softmmu-target @@ -23,4 +23,6 @@ LDFLAGS+=-nostdlib -N -static test-armv6m-undef: EXTRA_CFLAGS+=-mcpu=cortex-m0 -mfloat-abi=soft run-test-armv6m-undef: QEMU_OPTS+=-semihosting -M microbit -kernel -run-plugin-test-armv6m-undef-%: QEMU_OPTS+=-semihosting -M microbit -kernel + +# We don't currently support the multiarch system tests +undefine MULTIARCH_TESTS diff --git a/tests/tcg/arm/Makefile.target b/tests/tcg/arm/Makefile.target index b3b1504a1c..0038cef02c 100644 --- a/tests/tcg/arm/Makefile.target +++ b/tests/tcg/arm/Makefile.target @@ -46,11 +46,6 @@ semihosting-arm: semihosting.c run-semihosting-arm: semihosting-arm $(call run-test,$<,$(QEMU) $< 2> $<.err) -run-plugin-semihosting-arm-with-%: - $(call run-test, $@, $(QEMU) $(QEMU_OPTS) \ - -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \ - $(call strip-plugin,$<) 2> $<.err) - ARM_TESTS += semiconsole-arm semiconsole: CFLAGS += -mthumb @@ -62,9 +57,6 @@ semiconsole-arm: semihosting.c run-semiconsole-arm: semiconsole-arm $(call skip-test, $<, "MANUAL ONLY") -run-plugin-semiconsole-arm-with-%: - $(call skip-test, $<, "MANUAL ONLY") - endif ARM_TESTS += commpage diff --git a/tests/tcg/cris/Makefile.target b/tests/tcg/cris/Makefile.target index 372287bd03..43587d2769 100644 --- a/tests/tcg/cris/Makefile.target +++ b/tests/tcg/cris/Makefile.target @@ -57,3 +57,6 @@ SIMG:=cris-axis-linux-gnu-run # e.g.: make -f ../../tests/tcg/Makefile run-check_orm-on-sim run-%-on-sim: $(call run-test, $<, $(SIMG) $<) + +# We don't currently support the multiarch tests +undefine MULTIARCH_TESTS diff --git a/tests/tcg/hppa/Makefile.target b/tests/tcg/hppa/Makefile.target index b78e6b4849..cdd0d572a7 100644 --- a/tests/tcg/hppa/Makefile.target +++ b/tests/tcg/hppa/Makefile.target @@ -10,8 +10,6 @@ EXTRA_RUNS+=run-test-mmap-4096 # run-test-mmap-16384 run-test-mmap-65536 # it requires the full vdso with dwarf2 unwind info. run-signals: signals $(call skip-test, $<, "BROKEN awaiting vdso support") -run-plugin-signals-with-%: - $(call skip-test, $<, "BROKEN awaiting vdso support") VPATH += $(SRC_PATH)/tests/tcg/hppa TESTS += stby diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target index bafd8c2180..821822ed0c 100644 --- a/tests/tcg/i386/Makefile.target +++ b/tests/tcg/i386/Makefile.target @@ -18,19 +18,15 @@ X86_64_TESTS:=$(filter test-i386-adcox test-i386-bmi2 $(SKIP_I386_TESTS), $(ALL_ test-i386-sse-exceptions: CFLAGS += -msse4.1 -mfpmath=sse run-test-i386-sse-exceptions: QEMU_OPTS += -cpu max -run-plugin-test-i386-sse-exceptions-%: QEMU_OPTS += -cpu max test-i386-pcmpistri: CFLAGS += -msse4.2 run-test-i386-pcmpistri: QEMU_OPTS += -cpu max -run-plugin-test-i386-pcmpistri-%: QEMU_OPTS += -cpu max test-i386-bmi2: CFLAGS=-O2 run-test-i386-bmi2: QEMU_OPTS += -cpu max -run-plugin-test-i386-bmi2-%: QEMU_OPTS += -cpu max test-i386-adcox: CFLAGS=-O2 run-test-i386-adcox: QEMU_OPTS += -cpu max -run-plugin-test-i386-adcox-%: QEMU_OPTS += -cpu max # # hello-i386 is a barebones app @@ -52,8 +48,6 @@ test-i386: $(call skip-test, "BUILD of $@", "missing -no-pie compiler support") run-test-i386: $(call skip-test, "RUN of test-i386", "not built") -run-plugin-test-i386-with-%: - $(call skip-test, "RUN of test-i386 ($*)", "not built") endif ifeq ($(SPEED), slow) @@ -87,7 +81,6 @@ sha512-sse: sha512.c $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) run-sha512-sse: QEMU_OPTS+=-cpu max -run-plugin-sha512-sse-with-%: QEMU_OPTS+=-cpu max TESTS+=sha512-sse @@ -103,15 +96,12 @@ test-avx.h: test-avx.py x86.csv test-3dnow: CFLAGS += -masm=intel -O -I. run-test-3dnow: QEMU_OPTS += -cpu max -run-plugin-test-3dnow: QEMU_OPTS += -cpu max test-3dnow: test-3dnow.h test-mmx: CFLAGS += -masm=intel -O -I. run-test-mmx: QEMU_OPTS += -cpu max -run-plugin-test-mmx: QEMU_OPTS += -cpu max test-mmx: test-mmx.h test-avx: CFLAGS += -mavx -masm=intel -O -I. run-test-avx: QEMU_OPTS += -cpu max -run-plugin-test-avx: QEMU_OPTS += -cpu max test-avx: test-avx.h diff --git a/tests/tcg/ppc64/Makefile.target b/tests/tcg/ppc64/Makefile.target index f081f1c683..6d47d3cae6 100644 --- a/tests/tcg/ppc64/Makefile.target +++ b/tests/tcg/ppc64/Makefile.target @@ -24,14 +24,12 @@ PPC64_TESTS += byte_reverse sha512-vector endif byte_reverse: CFLAGS += -mcpu=power10 run-byte_reverse: QEMU_OPTS+=-cpu POWER10 -run-plugin-byte_reverse-with-%: QEMU_OPTS+=-cpu POWER10 sha512-vector: CFLAGS +=-mcpu=power10 -O3 sha512-vector: sha512.c $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) run-sha512-vector: QEMU_OPTS+=-cpu POWER10 -run-plugin-sha512-vector-with-%: QEMU_OPTS+=-cpu POWER10 PPC64_TESTS += signal_save_restore_xer PPC64_TESTS += xxspltw diff --git a/tests/tcg/riscv64/Makefile.softmmu-target b/tests/tcg/riscv64/Makefile.softmmu-target index e22cdb34c5..d5b126e5f1 100644 --- a/tests/tcg/riscv64/Makefile.softmmu-target +++ b/tests/tcg/riscv64/Makefile.softmmu-target @@ -19,3 +19,6 @@ QEMU_OPTS += -M virt -display none -semihosting -device loader,file= EXTRA_RUNS += run-issue1060 run-issue1060: issue1060 $(call run-test, $<, $(QEMU) $(QEMU_OPTS)$<) + +# We don't currently support the multiarch system tests +undefine MULTIARCH_TESTS diff --git a/tests/tcg/riscv64/Makefile.target b/tests/tcg/riscv64/Makefile.target index cc3ed65ffd..9973ba3b5f 100644 --- a/tests/tcg/riscv64/Makefile.target +++ b/tests/tcg/riscv64/Makefile.target @@ -9,4 +9,3 @@ TESTS += noexec TESTS += test-noc test-noc: LDFLAGS = -nostdlib -static run-test-noc: QEMU_OPTS += -cpu rv64,c=false -run-plugin-test-noc-%: QEMU_OPTS += -cpu rv64,c=false diff --git a/tests/tcg/s390x/Makefile.softmmu-target b/tests/tcg/s390x/Makefile.softmmu-target index 3e7f72abcd..192315dd20 100644 --- a/tests/tcg/s390x/Makefile.softmmu-target +++ b/tests/tcg/s390x/Makefile.softmmu-target @@ -23,3 +23,6 @@ include $(S390X_SRC)/pgm-specification.mak $(PGM_SPECIFICATION_TESTS): pgm-specification-softmmu.o $(PGM_SPECIFICATION_TESTS): LDFLAGS+=pgm-specification-softmmu.o TESTS += $(PGM_SPECIFICATION_TESTS) + +# We don't currently support the multiarch system tests +undefine MULTIARCH_TESTS diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index b3cd56fffc..49e573bc3b 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -29,3 +29,6 @@ QEMU_OPTS += -M tricore_testboard -cpu tc27x -nographic -kernel %.tst: %.o $(LD) $(LDFLAGS) $< -o $@ + +# We don't currently support the multiarch system tests +undefine MULTIARCH_TESTS diff --git a/tests/tcg/xtensa/Makefile.softmmu-target b/tests/tcg/xtensa/Makefile.softmmu-target index ba6cd9fde3..78bf72dfaa 100644 --- a/tests/tcg/xtensa/Makefile.softmmu-target +++ b/tests/tcg/xtensa/Makefile.softmmu-target @@ -41,3 +41,6 @@ $(XTENSA_USABLE_TESTS): linker.ld macros.inc $(CRT) Makefile.softmmu-target $(CC) $(XTENSA_INC) $(ASFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) $(NOSTDFLAGS) $(CRT) endif + +# We don't currently support the multiarch system tests +undefine MULTIARCH_TESTS From patchwork Mon Apr 24 09:22:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 676554 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp2054433wrs; Mon, 24 Apr 2023 02:24:07 -0700 (PDT) X-Google-Smtp-Source: AKy350YGn+ORryHGrZhHL1Yi4bvaNkn7YPCCDCeNo5FeYPwUyDJ9t52nNNXKoKhvFWvlYPtGu3eA X-Received: by 2002:ad4:5bc4:0:b0:5ef:410f:88be with SMTP id t4-20020ad45bc4000000b005ef410f88bemr24808972qvt.1.1682328246893; Mon, 24 Apr 2023 02:24:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682328246; cv=none; d=google.com; s=arc-20160816; b=t8u4IIxZ/J8TOoZ2KFF84mQjePrfMrAJSG24ao55KGKAzmZdoBIGQLTWdO+vViAz8L g48h/R8wR+XDdoLhpta2ICXLQbHD4qu2yFumGx+HeHRTxc7TGlDFP8PyIf8w1jM1BA2E jLrCSkjpu7Ah2Kix81IRx1FnRIZRMj8jLcsfCWco7SHlNSJStd2N/nPurNge7UO8O6M6 Io4EUzm8w3ZSSmwE9XKCscBx6MxChxXgf7S6YPrJu1M9CqwErUDw1Qf8Gw7r7fOXcwKz zk5xfGVhmdaQcwJftnj41IbRXJtNf3aFG3olL+ElLtItYV527OjqE6ARG2FwFgE3mS8e RYWA== 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=E75ZWyiqIVTxUEOaQt09ssb12BxYvniNvmSS7shhmvE=; b=S30uo9GWiQetYrdYOKVc3wY92H6oI9k0o5yHJsTH3B9Q+I4qb4l8Tma0I6np7nzEWB 8Y0yJ13vHrmUAqNNHvsMdqBv15zMUvhwU1V2qDp7c43/cUIERYJzNoPHSD6QH27DqniP G04yNrfYaFlLYntnMYZUHW5cT3DIudwZNMB4s21T4KCPQPJNzWaod6V2x1I4cRNNnkdY Bs8mSKHmEWJI9+rXcHGXF6HmMLMfENp1DDXyZOyw/+oybbQBQiN/w5MORvvfpKG4TFSC GO0oY8H5cIYzebYb/RmGZDXvYeauV9x+39WKXcrMQ5HlMR3RSNXc1D3h3SkPCGzxQ0t2 jGZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MKJBRs77; 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 iv15-20020ad45cef000000b0056eb019cf92si6989383qvb.118.2023.04.24.02.24.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Apr 2023 02:24:06 -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=MKJBRs77; 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 1pqsQ5-0007eH-KP; Mon, 24 Apr 2023 05:23:37 -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 1pqsPl-0007Ng-Ip for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:25 -0400 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 1pqsPS-0004oY-Ee for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:16 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3f1950f5676so29975545e9.3 for ; Mon, 24 Apr 2023 02:22:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682328177; x=1684920177; 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=E75ZWyiqIVTxUEOaQt09ssb12BxYvniNvmSS7shhmvE=; b=MKJBRs77kBxBCvrH4zO9hHK6RV8e7Hvetk8obi8rkNcg/kd5paHhW4tXyvsoY1uq9I z+W2qFE6FYIPiJz6WvTSmEbwkiT0krFydvB78NLzVi1zFJDWt94RQeiwxoHRVKzTEnly bxbvYw7QosRy0JsHVmjyg/SSsgwyCulrsWWAMAtoMDQRPdIijq2UbjPE64YB7AL7Z+fl V56mo4NUbW6RaXYW0h/zrP5uIgeQewkouyXmEhiJR+RTBZBPM9rueKWGxyz790CUkYTb 6umdJ1pJxlySZm1unCUMsIDDyC046VKBdPkNhkamm/Bs3ZyC4gXSHL/WkR5wQbaZ6Rwy dZKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682328177; x=1684920177; 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=E75ZWyiqIVTxUEOaQt09ssb12BxYvniNvmSS7shhmvE=; b=amCU5s2+8/HE5eFr8XkilJ9DRaCD6uZT1clUxIcmZnubVGg6zTYzvknsrhZoLJ6i+o umsxjotNSWPRJicfNDjj9k2Qqf4KTSPUsW7oHm0JoNDv/ESWQfhK8L2ztb0T/RiuIjdk Od5u25xiqtV14Oh2FgSszEJ3lpRjEYX0aIIXeECNbz2i8QhPqeNai4MbMUE8EMRA/cWd mj5/npHqX7ChqLkQ+Ssvmkfzm6oAFISprIkoFcbZdfYn4c6HVqirj9+A5eobs0cevtpO y2TGK97YOlv7RhZUr6KFzPgY7Q4lmcQEYZ3l4egmPd5c43tmEeiY3WOzdifA3dbTT2TK opYg== X-Gm-Message-State: AAQBX9c/yE1/FPrPRhcx72JgP2WkBGyw0sL9DOcKUV9f5VrZMrNm/eJ4 4tvlKopDJ7i/KeXjSB5lcrTZYg== X-Received: by 2002:adf:db4e:0:b0:2f2:3dbf:6922 with SMTP id f14-20020adfdb4e000000b002f23dbf6922mr7989880wrj.22.1682328176753; Mon, 24 Apr 2023 02:22:56 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id h3-20020a5d5043000000b002c70ce264bfsm10315847wrt.76.2023.04.24.02.22.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 02:22:53 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1E71F1FFB7; Mon, 24 Apr 2023 10:22:51 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , "Edgar E. Iglesias" , Paolo Bonzini , Aurelien Jarno , Peter Maydell , Juan Quintela , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Richard Henderson , Joel Stanley , Leif Lindholm , Markus Armbruster , Radoslaw Biernacki , Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , John Snow , Andrew Jeffery , David Hildenbrand , Bastian Koppelmann , Max Filippov , qemu-s390x@nongnu.org, Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P=2E_Berrang=C3=A9?= , qemu-arm@nongnu.org, Eduardo Habkost , Ilya Leoshkevich , Yohei Kojima Subject: [PATCH 14/18] qemu-options.hx: Update descriptions of memory options for NUMA node Date: Mon, 24 Apr 2023 10:22:45 +0100 Message-Id: <20230424092249.58552-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424092249.58552-1-alex.bennee@linaro.org> References: <20230424092249.58552-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@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, T_SCC_BODY_TEXT_LINE=-0.01 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 From: Yohei Kojima This commit adds the following description: 1. `memdev` option is recommended over `mem` option (see [1,2]) 2. users must specify memory for all NUMA nodes (see [2]) This commit also separates descriptions for `mem` and `memdev` into two paragraphs. The old doc describes legacy `mem` option first, and it was a bit confusing. Related documentation: [1] https://wiki.qemu.org/ChangeLog/5.1#Incompatible_changes [2] https://www.qemu.org/docs/master/about/removed-features.html Signed-off-by: Yohei Kojima Message-Id: Reviewed-by: Juan Quintela Message-Id: <20230420155723.1711048-3-alex.bennee@linaro.org> [AJB: fix documentation in commit message] Signed-off-by: Alex Bennée --- qemu-options.hx | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index baa0589733..b5efa648ba 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -405,15 +405,22 @@ SRST -numa node,nodeid=0 -numa node,nodeid=1 \ -numa cpu,node-id=0,socket-id=0 -numa cpu,node-id=1,socket-id=1 - Legacy '\ ``mem``\ ' assigns a given RAM amount to a node (not supported - for 5.1 and newer machine types). '\ ``memdev``\ ' assigns RAM from - a given memory backend device to a node. If '\ ``mem``\ ' and - '\ ``memdev``\ ' are omitted in all nodes, RAM is split equally between them. - - - '\ ``mem``\ ' and '\ ``memdev``\ ' are mutually exclusive. - Furthermore, if one node uses '\ ``memdev``\ ', all of them have to - use it. + '\ ``memdev``\ ' option assigns RAM from a given memory backend + device to a node. It is recommended to use '\ ``memdev``\ ' option + over legacy '\ ``mem``\ ' option. This is because '\ ``memdev``\ ' + option provides better performance and more control over the + backend's RAM (e.g. '\ ``prealloc``\ ' parameter of + '\ ``-memory-backend-ram``\ ' allows memory preallocation). + + For compatibility reasons, legacy '\ ``mem``\ ' option is + supported in 5.0 and older machine types. Note that '\ ``mem``\ ' + and '\ ``memdev``\ ' are mutually exclusive. If one node uses + '\ ``memdev``\ ', the rest nodes have to use '\ ``memdev``\ ' + option, and vice versa. + + Users must specify memory for all NUMA nodes by '\ ``memdev``\ ' + (or legacy '\ ``mem``\ ' if available). In QEMU 5.2, the support + for '\ ``-numa node``\ ' without memory specified was removed. '\ ``initiator``\ ' is an additional option that points to an initiator NUMA node that has best performance (the lowest latency or From patchwork Mon Apr 24 09:22:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 676565 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp2054914wrs; Mon, 24 Apr 2023 02:25:42 -0700 (PDT) X-Google-Smtp-Source: AKy350ZpjJANvUScs1t9d0k5ZdL9KwDX9kfnV9UoYqxRi3P9t1QAb+NFttsWRnhQ97RzSPaaOKbA X-Received: by 2002:a05:622a:149:b0:3eb:6892:2930 with SMTP id v9-20020a05622a014900b003eb68922930mr20695505qtw.39.1682328342545; Mon, 24 Apr 2023 02:25:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682328342; cv=none; d=google.com; s=arc-20160816; b=KEGUR0c8Vq5pI7+gZnWbdModRF4Syi/B7G8MCQ5i1OVZGvm+2MVZ51WxKi07L3fDD3 QYSz5PAS3fXXy5dI3YewoqS5sFHzOaeIOTwnJdpaoPe0iH5nE729shHkSQfdlnwa7Eht dN0a8Y4IhLoJ6ef3NrYSD0sLjSUU0jJzkEL6wSuzvlDQaNFbJcUUqipPeV6wRhyrsKje tRxfFGouPapH6fWaC4psIeG971hjCbqpegCnQEcDAbZ1z/BrjI3zlXbvpqFTAMSpKXU3 NjwqoEGuSi1UX1xlZ/p/1ap/P65ys27CN7EAkc66Yt8TTc1RQaO9pUig4mxhPkCmLWQu Vz9A== 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=i/gcQ0ADi5Q8/WVVH1ldcE/C6wAf2VNor5AXJ2C7QUY=; b=0rJyVfty/aUhsjfMyMZN6SntXRQOqinCDqqU1FWqcMPWDy7AsQ1tflPTn0QLXpdU5f Kxz1mivyYXfmdyKKXwhtCPXORV+v/k+OBVUBnCkdcoGT8XQQK7UYab8xsrz8F4sMRE8R ecL8IyiGP6Rvt2qJdxwrxC+0nw0yTamVXSVLjU8Y0SlCj81ScM8JfkSBg8yO5BussMvT mJut87VDtvMgGb+IfGcVZKU56O2J8m+Uov3KVX9Zq4m/A0UfQOTQ9+xKYdKVoJMaDRdH U6vUYssgFmwGAZR9W7bpvm3ogkj+3qrx0NiuIe+4PkToxXrixMSRe6DMPKWrL9YJk+6L K85w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V+9guQXP; 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 a17-20020ac85b91000000b003e4e589b382si7040977qta.589.2023.04.24.02.25.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Apr 2023 02:25:42 -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=V+9guQXP; 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 1pqsQ6-0007hq-D4; Mon, 24 Apr 2023 05:23: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 1pqsPo-0007OZ-1F for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:25 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqsPS-0004op-H3 for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:17 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-2f95231618aso2557663f8f.1 for ; Mon, 24 Apr 2023 02:22:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682328177; x=1684920177; 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=i/gcQ0ADi5Q8/WVVH1ldcE/C6wAf2VNor5AXJ2C7QUY=; b=V+9guQXPE28L9zNwJ9sX93HS+1pFxnuEM6+MfSpsNmYtr7UXIGjl/QPQ6dQ4EImI8z Z1QwobD2Q/8gmBiNeCY70WWSKxn0bejTeTtmffLdMFhvRpwsyJlmYhF9s41C1P/YTOFM uvD4UrQ853rDetPcyDvMQjCkmFAcx900EH5Wo/C+9hDYkmjyg9Queyu88p02qRHGpbHN mGGW7g69o9dtZxD4LM5YlLpxEuD8w1ANXc07O+ItVT5kM/f8Ukb3dmQc3UJRAXQenFFh ydsQlpjvV75YWiFDIRfLZTmxp4clcW2Bmq8fFLadcRNakf1fCY2nkse+QCrHixkpta4e 7phg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682328177; x=1684920177; 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=i/gcQ0ADi5Q8/WVVH1ldcE/C6wAf2VNor5AXJ2C7QUY=; b=BzRIz4QV0CkRPXN0VigHH4DcWs88SPaMBP14RsIZ7/rb22PbqAvPz4Oi5GXOEwhOKW N+7nRFWZGgd6BUmFQyKAqDaKBAMmRUvWX1bllgvgtcKtevjpHMhCF9pwIyCVX6kUU/lx Tfp2S6wGP0jC3WeZfXPcYU5sF3uRf8sj7K0RaRmrp6Cse9FjskeQhqB+jv5AEw7kQ7cv RI6i36Hx4pToo5SZq7Nhn6UMvZI/VH15T2DMgefJt7LZMv6VTlKl2oPLtHyA+MBe2RGZ 0p5n1pzEs5BFCsxAEUgqoDs2tRpiocuIgoJyRh0gsZHVtDuFUGUt4KumfIbFUAJJ7l0w 4EYw== X-Gm-Message-State: AAQBX9fUJ/O1B/CGtkfbmxzaL/auon6nGxXYsiVMaBO8T5k53Yb/hHX4 WOfJIPt89DpzL0Q76Fl/41MdpQ== X-Received: by 2002:a5d:4a05:0:b0:300:6473:e339 with SMTP id m5-20020a5d4a05000000b003006473e339mr9893850wrq.6.1682328177172; Mon, 24 Apr 2023 02:22:57 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id d3-20020a05600c3ac300b003f19b3d89e9sm5407520wms.33.2023.04.24.02.22.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 02:22:56 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3B87B1FFC5; Mon, 24 Apr 2023 10:22:51 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , "Edgar E. Iglesias" , Paolo Bonzini , Aurelien Jarno , Peter Maydell , Juan Quintela , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Richard Henderson , Joel Stanley , Leif Lindholm , Markus Armbruster , Radoslaw Biernacki , Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , John Snow , Andrew Jeffery , David Hildenbrand , Bastian Koppelmann , Max Filippov , qemu-s390x@nongnu.org, Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P=2E_Berrang=C3=A9?= , qemu-arm@nongnu.org, Eduardo Habkost , Ilya Leoshkevich Subject: [PATCH 15/18] docs/system: remove excessive punctuation from guest-loader docs Date: Mon, 24 Apr 2023 10:22:46 +0100 Message-Id: <20230424092249.58552-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424092249.58552-1-alex.bennee@linaro.org> References: <20230424092249.58552-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.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=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 A possessive its needs no ' whereas the contraction of it is does. Signed-off-by: Alex Bennée Reviewed-by: Juan Quintela Reviewed-by: Thomas Huth Message-Id: <20230420155723.1711048-7-alex.bennee@linaro.org> --- docs/system/guest-loader.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/system/guest-loader.rst b/docs/system/guest-loader.rst index 9ef9776bf0..304ee5d531 100644 --- a/docs/system/guest-loader.rst +++ b/docs/system/guest-loader.rst @@ -14,7 +14,7 @@ The guest loader does two things: - load blobs (kernels and initial ram disks) into memory - sets platform FDT data so hypervisors can find and boot them -This is what is typically done by a boot-loader like grub using it's +This is what is typically done by a boot-loader like grub using its multi-boot capability. A typical example would look like: .. parsed-literal:: @@ -25,9 +25,9 @@ multi-boot capability. A typical example would look like: -device guest-loader,addr=0x47000000,initrd=rootfs.cpio In the above example the Xen hypervisor is loaded by the -kernel -parameter and passed it's boot arguments via -append. The Dom0 guest +parameter and passed its boot arguments via -append. The Dom0 guest is loaded into the areas of memory. Each blob will get -``/chosen/module@`` entry in the FDT to indicate it's location and +``/chosen/module@`` entry in the FDT to indicate its location and size. Additional information can be passed with by using additional arguments. From patchwork Mon Apr 24 09:22:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 676570 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp2056863wrs; Mon, 24 Apr 2023 02:31:02 -0700 (PDT) X-Google-Smtp-Source: AKy350bzgHrNV/LjXV0uQ/0PT8r1pjJyWbozW8MgSLzXP1I0YdaebRmcQ63RjWeV9Mp4sfgILPA1 X-Received: by 2002:ad4:5de2:0:b0:5eb:fc42:ea4f with SMTP id jn2-20020ad45de2000000b005ebfc42ea4fmr19131487qvb.33.1682328662142; Mon, 24 Apr 2023 02:31:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682328662; cv=none; d=google.com; s=arc-20160816; b=N5G83tNRb8w/U9wD7WrOj0Pl6M1Xr6F6E0w6YtS3Nbl0SLKZIQ/bQHn54+XczrAJHD 6LiJ2hiCZe0XLyacqAODEZhFWYK5X7seZVwL0fnbCzh2EWGyelwLPOjzEMQsFrWKwaT7 KibF/C8+fke05NofhsRDvo9B6enGJ5OQ8GpzxkykKGFUFV4L072mm8TcxJN16mGrwjQT Z31nroDTtEerrqsSiq8xWY3XGQzlcr2ldss4mvkaIuSUYiUUJdr2eA0spoo1YUz3fkBx sAEuZM1xBMBYGfbIpk+a74x9yDv0Tukcr+0QZMsidYu+dRatC4ObAfKzMarT4OjVvfmt VPgA== 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=KZgFhfTtj2ImggRREYrxhpwQ3q5LfEc+IwV3JjKE3es=; b=bE0e9Vr6ZY7hyxD/p6IgWx7A7xvhV0sON2X+431gMg1y/PSAvB7gcTojCknYR0DHVE sL7TLUN6dK6YO3pEEzFr4IiO71Uo96hIj8G63NsnSKvpGe15R4DgbP5XWD2XGV7sqWDr YmF4nEjpx3LVL/PCugojjnQA7h58gZVFMH8hS1PmTUzeIgLs4LMiW3tmlBhgYB3GNMef Hdj9ApfqzRjUG5bxS27sS8FCANGQKGMRJozCSs/jlZswXI3wnow82qqs8uSR89YWTvlW ybrGBQndkgmaXWA3SIx9iVxMegCJ6ApuZI/apYL4qapy13oAErpOFPAVAg7yXHSQr6/x kYIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YoHXJyTX; 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 p4-20020a05620a056400b0074ac8afc0casi5493013qkp.1.2023.04.24.02.31.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Apr 2023 02:31:02 -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=YoHXJyTX; 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 1pqsWQ-0004IR-G5; Mon, 24 Apr 2023 05:30:12 -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 1pqsVr-0003wZ-5S for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:29:37 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqsVh-0006c4-0E for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:29:32 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-2f87c5b4635so3814086f8f.1 for ; Mon, 24 Apr 2023 02:29:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682328560; x=1684920560; 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=KZgFhfTtj2ImggRREYrxhpwQ3q5LfEc+IwV3JjKE3es=; b=YoHXJyTXBLh66AKNwBrJIHCyO5HhkmWA2vTLeHJFL6MeKV5saOk+RdLFuoKF2unXET ggWa+Mz3afLpqnsc2iK0h+EnvejTZk/99rz6SOhhzwKdyFsmwCoK0XR5lFzGDtLRZaZO 3dO13kgjX1t4FoqY9aCNTLVhgM7PWXLoWMOwK1FK6HEpl26n4A+4Jbxez7QuCWuaREIS 33B2kZ6Dh/DXuA/+eS1BwxN+h6qwEdEIg9QMXJbNXpA3Welut4CG/lPJ0U796c8GlkbD r66QpUBKCjS+I7n+SglWr336alW7Rwf3ocjxuXgWZsqFIJpDLBDdNxeRy6Zr276wZ8Sx T5Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682328560; x=1684920560; 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=KZgFhfTtj2ImggRREYrxhpwQ3q5LfEc+IwV3JjKE3es=; b=JmjWB5HpiGM+yt5j3R8ybJZRR7Cg6Rja0s8+LJcLlVfS9qrGHcWKrjPJXIuaCGG6Be XUVTjRAr8qFwFA7I0+cc35FBYIsmj9kPXjzdwmzb7t7AZBEUney0AiHUH9RH6yc8Z4JF 3lxuDaDCwrMnJYXK+IvY3rUCRODr57Kf500C0BzypF0SHE9GVv+Nt2FuRdTqjejZ+hZU 5u3GjgFZ973JkWfDOag9utNLUa5IZcPm1Vcrn+nzYov6W49Oad3B2o7zVeWVOLoDZbT6 QVnqUfCGOAAE2hkvzf56w0AVgFrDVy1kw8kYLEbI/EGcz3d0EAzrIb2M948/XP4AgX18 eL+w== X-Gm-Message-State: AAQBX9e4/XqXCEv7hRbOPZsc9c/gUvQfzqXUGAkAwwY4zPiKDjTxj5zI IWlCRSrttt4Qx6xHmeRjFbW1gQ== X-Received: by 2002:adf:ea46:0:b0:2e5:31a3:38d4 with SMTP id j6-20020adfea46000000b002e531a338d4mr9218447wrn.55.1682328560215; Mon, 24 Apr 2023 02:29:20 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id j3-20020a5d5643000000b002e4cd2ec5c7sm10337523wrw.86.2023.04.24.02.29.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 02:29:19 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 543721FFC6; Mon, 24 Apr 2023 10:22:51 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , "Edgar E. Iglesias" , Paolo Bonzini , Aurelien Jarno , Peter Maydell , Juan Quintela , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Richard Henderson , Joel Stanley , Leif Lindholm , Markus Armbruster , Radoslaw Biernacki , Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , John Snow , Andrew Jeffery , David Hildenbrand , Bastian Koppelmann , Max Filippov , qemu-s390x@nongnu.org, Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P=2E_Berrang=C3=A9?= , qemu-arm@nongnu.org, Eduardo Habkost , Ilya Leoshkevich Subject: [PATCH 16/18] docs/devel: make a statement about includes Date: Mon, 24 Apr 2023 10:22:47 +0100 Message-Id: <20230424092249.58552-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424092249.58552-1-alex.bennee@linaro.org> References: <20230424092249.58552-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 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 While not explicitly disallowing header macro abuse (because that would make us hypocrites) lets at least address some things to think about. Signed-off-by: Alex Bennée Reviewed-by: Juan Quintela Message-Id: <20230420155723.1711048-8-alex.bennee@linaro.org> --- docs/devel/style.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/devel/style.rst b/docs/devel/style.rst index 68aa776930..5bc6f2f095 100644 --- a/docs/devel/style.rst +++ b/docs/devel/style.rst @@ -300,6 +300,20 @@ putting those into qemu/typedefs.h instead of including the header. Cyclic inclusion is forbidden. +Generative Includes +------------------- + +QEMU makes fairly extensive use of the macro pre-processor to +instantiate multiple similar functions. While such abuse of the macro +processor isn't discouraged it can make debugging and code navigation +harder. You should consider carefully if the same effect can be +achieved by making it easy for the compiler to constant fold or using +python scripting to generate grep friendly code. + +If you do use template header files they should be named with the +``.c.inc`` or ``.h.inc`` suffix to make it clear they are being +included for expansion. + C types ======= From patchwork Mon Apr 24 09:22:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 676553 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp2054383wrs; Mon, 24 Apr 2023 02:23:58 -0700 (PDT) X-Google-Smtp-Source: AKy350aBXnRRso6wrOZXhtjm3LEwGi5XRgfr3WnveTUe7+/Jwys67+KW2ofbOafHgSg3gTt2K9HS X-Received: by 2002:a05:6214:5195:b0:5ef:8b9c:aa86 with SMTP id kl21-20020a056214519500b005ef8b9caa86mr21027568qvb.44.1682328238285; Mon, 24 Apr 2023 02:23:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682328238; cv=none; d=google.com; s=arc-20160816; b=GCrop2/wLbL5KztuSWsLz5BzEAUvjKd7DqKK3ZwZO8x2ELhHLKc1JfqgFw1RHzkypD XBZMadfoW2mMD3+VY/0PshC3fGjmXb0FZ5C0h9AZ2th0HN8GsfTb4LGvxMDeGBsyXKVH FccmK7fM5/J3AbI4ULKKgfNV2GtTwnjHKJRxZ50IzaathpBkDPkBn0bIq6V3UCmoFXY9 wQOkYclMfGHYZZSipXo/ItmYWyrv0dkaMoNvugfg2kTMZfGivedxjutzPqkrePrhHkhi y7Zp0I6WEA6cR0NCxkaoXXKWdAW1n6W3CCNq5bIAWHYLUr+hIWw03EIrNGwl6snktLbm pJFw== 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=ymh1KmF1OssFCV8CswQJao0hOIMo+XbhaPHzwGuiKz8=; b=X1OJGO2FB+R2K2wOmIi0EfsvHZUMbcAZ8AkIQzSekSwkAJPE1uP6GMkikE6MlbyX5Y s5CY/KNlUrS07ZEj8h2F8ca6k2QM64t++yGd0UBghyev5m9z2vUXMk1d45Y5N6vMJYnn 8qeo8UvWey5s6vyHP/T8vjSXAFeePPi4HeCs7w2RmeYuplrTT3jkH2zJCTi7hNlVV78R tqNBXkTS14eYJTCQ+RGg0KNj+u0mdxihpVfFdBwLURNcDHhu8wreKNlTIB4endCcvnjO 5h7AoaUnYbBcuMQ8lMxgajNxGzeCf1oNjOUN0TBBZyOryTQo9hunqe60u9knJXfJhemj dKcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uT+ZCJ1w; 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 o2-20020ad45c82000000b005e32ca3bf52si7439690qvh.314.2023.04.24.02.23.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Apr 2023 02:23:58 -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=uT+ZCJ1w; 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 1pqsQ9-0007wi-Ny; Mon, 24 Apr 2023 05:23:41 -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 1pqsPo-0007Oa-1h for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:25 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqsPT-0004pG-Hg for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:23:18 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-2f95231618aso2557679f8f.1 for ; Mon, 24 Apr 2023 02:22:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682328178; x=1684920178; 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=ymh1KmF1OssFCV8CswQJao0hOIMo+XbhaPHzwGuiKz8=; b=uT+ZCJ1wEBDq7TmrZeZGhrgzO26xURh4c4nX6qGOo4OqKvHcIRxN+uKvYt6GurNkY8 gTC/l1D9NqP1QiKRx97y1emjAxohpMKe6Tyxv3m9DZ8tSREn7E1Hnnw2I+ARAcUPUnuK yDpAZoScYIIZAvWqj5ojfm+j245QGQTxHUegNhZ6cP3ogh5Qbp1ZTlXe/j9zZlsDB1w1 7BjVDcBB3/9OzVxmhAYRLzN6zdrQzq5InrZpQ3pli0T2p+Xlo29WGW1DY8lJOIszhKzO BS1wgS1TsA9W9W6GeGL6ZNks18KfC2dZqGt6NXEcgGHAOlVd3hfOA2bFLOqJxubaAvAJ vxIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682328178; x=1684920178; 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=ymh1KmF1OssFCV8CswQJao0hOIMo+XbhaPHzwGuiKz8=; b=S2/tSE9om5veBkexl8FWi4rGPs57zhXp4y3JUWDLsTk2hPg4gsfLcUrff4Y6gnJO/h 5N8a5FLolxc+a8LqzBZpQnG+NpDYPPmjgrSsATw+Gt4aPC54xJkJrn1DgLehvkjrn3H5 pVRMHN/nFkSFqaFL+L45wxBHP4hYEbspBqd5PdybWGYE5NHfWHh6inUF6rP4sXcWtiIe o/ejLJOqDGPWoHLW22PhLMzIHXYnCNP4Jk9pb7uCt6LZ0pJWyYl7SO21h+wU0ddgw3pU SR+cjMBnjA2wKQuzLDURz9QATjjFtLveB3K86ubGLsBujpqDdnl6ShVpS6RHixD60v4n 9DmA== X-Gm-Message-State: AAQBX9eTE8GkRmhHsPEdWHu6bWOph/L6O7DjBnwciXn7JMjq+3bqxnZ7 OUrjI3+P/UiZJipvw5DrRJa0kA== X-Received: by 2002:a05:6000:8e:b0:304:6d32:d589 with SMTP id m14-20020a056000008e00b003046d32d589mr3845013wrx.18.1682328178209; Mon, 24 Apr 2023 02:22:58 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id w6-20020adfee46000000b002f0442a2d3asm10372906wro.48.2023.04.24.02.22.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 02:22:56 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6F1B41FFC7; Mon, 24 Apr 2023 10:22:51 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , "Edgar E. Iglesias" , Paolo Bonzini , Aurelien Jarno , Peter Maydell , Juan Quintela , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Richard Henderson , Joel Stanley , Leif Lindholm , Markus Armbruster , Radoslaw Biernacki , Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , John Snow , Andrew Jeffery , David Hildenbrand , Bastian Koppelmann , Max Filippov , qemu-s390x@nongnu.org, Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P=2E_Berrang=C3=A9?= , qemu-arm@nongnu.org, Eduardo Habkost , Ilya Leoshkevich , Mark Cave-Ayland Subject: [PATCH 17/18] docs/devel: mention the spacing requirement for QOM Date: Mon, 24 Apr 2023 10:22:48 +0100 Message-Id: <20230424092249.58552-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424092249.58552-1-alex.bennee@linaro.org> References: <20230424092249.58552-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.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 We have a more complete document on QOM but we should at least mention the style requirements in the style guide. Signed-off-by: Alex Bennée Cc: Mark Cave-Ayland Reviewed-by: Juan Quintela Message-Id: <20230420155723.1711048-9-alex.bennee@linaro.org> Reviewed-by: Mark Cave-Ayland --- vppr: - use Mark's formulation, briefly mention property separation. --- docs/devel/qom.rst | 2 ++ docs/devel/style.rst | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/docs/devel/qom.rst b/docs/devel/qom.rst index 3e34b07c98..c9237950d0 100644 --- a/docs/devel/qom.rst +++ b/docs/devel/qom.rst @@ -1,3 +1,5 @@ +.. _qom: + =========================== The QEMU Object Model (QOM) =========================== diff --git a/docs/devel/style.rst b/docs/devel/style.rst index 5bc6f2f095..e9fce0fc69 100644 --- a/docs/devel/style.rst +++ b/docs/devel/style.rst @@ -628,6 +628,46 @@ are still some caveats to beware of QEMU Specific Idioms ******************** +QEMU Object Model Declarations +============================== + +QEMU Object Model Declarations +============================== + +The QEMU Object Model (QOM) provides a framework for handling objects +in the base C language. The first declaration of a storage or class +structure should always be the parent and leave a visual space between +that declaration and the new code. It is also useful to separate +backing for properties (options driven by the user) and internal state +to make navigation easier. + +For a storage structure the first declaration should always be called +"parent_obj" and for a class structure the first member should always +be called "parent_class" as below: + +.. code-block:: c + + struct MyDeviceState { + DeviceState parent_obj; + + /* Properties */ + int prop_a; + char *prop_b; + /* Other stuff */ + int internal_state; + }; + + struct MyDeviceClass { + DeviceClass parent_class; + + void (*new_fn1)(void); + bool (*new_fn2)(CPUState *); + }; + +Note that there is no need to provide typedefs for QOM structures +since these are generated automatically by the QOM declaration macros. +See :ref:`qom` for more details. + Error handling and reporting ============================ From patchwork Mon Apr 24 09:22:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 676569 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp2056785wrs; Mon, 24 Apr 2023 02:30:48 -0700 (PDT) X-Google-Smtp-Source: AKy350bnrwKj9U7ThbKG1a7DyS8/dH70kxUb6NJmXMXFIqha8xfI/u5Q55JekBWCVLA4iCeTlpOz X-Received: by 2002:ac8:5f83:0:b0:3f0:a108:8642 with SMTP id j3-20020ac85f83000000b003f0a1088642mr4346914qta.20.1682328648250; Mon, 24 Apr 2023 02:30:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682328648; cv=none; d=google.com; s=arc-20160816; b=gRzJvxdeg7aiDc80dPe4ph963PuDJiV1BUlRhxxE9BcIhLUcVkoIAvcJ4ZRjkpn4Mc VkQ6fbiMnvaSFLE8N9eDzH80fTN+imTro+93uxxLQrBXuoxH1q/DNZGBwT9o6PdbfjdC CKHgJHWC++KtYluAJ9T5tm/m3csig+uxcgZcUTkydqJ/5iCEfH8XZkCvzgoM1ldN/1Oq 5zJ0bHkpyXOJyLBILqWLrQbfmWhbTLZe0jSolCWGfJEc5Rl2X5nQSkfsHh2WjJSdlIRS N0mJEqqZjA9h519xioGa5Gq8NmoeyLoFw9BZwtRr5OiAwYZztSgjtaod9imXRf2ExtDU pAKA== 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=b/rn85BLkY7Z2OPz7xDZllD6kTbU8YWvJhq44VxZVFA=; b=Olb+v3HzHKhvveUJiQCU2L4yccTP2Y96NEx/GY23lq6mZrdMKjyLw9nB5gYGlNaYHg BYhMcw8dYK2LTrGDGC/lOhWqIWR4CLrM6VITs+hD8gHKec1NCxmlbPzM5U9pTOAwCSy6 DB+/7zzOlDw/Rf7Uma7PRGr18BusLGNo89I4IrYbnbMxV9CP1AnmfzIOeh5+X98S42Gz bm+Tgjjy9sxTuWYfbzvZkUBPwPbXohi+543m1vwIIC02YqvUwXY7oF5LyX40G1aTm+6Y c4VTGVRU0u/jI06t4EU5K3EYLam78CixBEsJ3PoNqaTSYxRZ3JSlbaswgX8sMs9/vPqU BXBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cWdCeBFw; 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 f29-20020a05622a1a1d00b003e4dfa86e21si7051066qtb.40.2023.04.24.02.30.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Apr 2023 02:30:48 -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=cWdCeBFw; 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 1pqsW7-0003zL-5m; Mon, 24 Apr 2023 05:29:51 -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 1pqsVj-0003o9-D6 for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:29:29 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqsVe-0006cD-DC for qemu-devel@nongnu.org; Mon, 24 Apr 2023 05:29:26 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-2f7db354092so2465916f8f.2 for ; Mon, 24 Apr 2023 02:29:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682328560; x=1684920560; 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=b/rn85BLkY7Z2OPz7xDZllD6kTbU8YWvJhq44VxZVFA=; b=cWdCeBFwHORwSIrh3xV/ytU3JtqALq3T08Tf2im2Jdj3x4XRhiqBmltJDubRUTBGOz vxuIOf1QQFS8BEj47uBdidywyPym28gKmcXooJGHaOSXjivv9TfSkFAl4SMuBcASMcNk SPXPk9FpxtjzpBujJsucdfrW1Tz7pQp6xMk9Vr9P8qzVyCBSQYGsbat14saVL/b7DAXt 0T5hylQqJW2AGYoqZkqHO5nyvhkcG/Cbp2nYfOGXfdczWF9DRniEWrT6eta42O2JKvob A++PQuWWIMLOJLFFFyZtvjmmSFWadE3cRXBvpKniYcyvcK3fow/Ufv0s0upQZ1b5aYQZ 5qFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682328560; x=1684920560; 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=b/rn85BLkY7Z2OPz7xDZllD6kTbU8YWvJhq44VxZVFA=; b=VLGR7KogXtRJpd9fc2Dxfw4GROdpb2i7hYSSsCyjSmNX1Jf23s+UXC84KslM3fPpNk AWwOkqt2dBsR3tEq8lCwG+rWp93TkFk3Llr0qLVLzFOuicnhO5Yls+6k5EyxZ59A4xAK mdwxU96SYJvThwn5W2GtZKvCkoqMNVzQYyuOu3b/ka3FTU3WQy4hj6MAoMFWvnLb7eJa JspTUMRhm29j4BVbUAZwrBiS9+6qwWJ50oJcwh2WLcZt+Sicpb/7pw4fiqTxlEyS3eOY 6xpUeRH4DZZh/n8mr8aKJyBBomTwsyYLCCKYizTwDOsf55rxO9eBp+MLImauhC1PPn35 a72Q== X-Gm-Message-State: AAQBX9fQ4Y1U5gMPVPIQpbFUbZzDlTXkvENiPD6D/xLUzH5ET6ZMqzHO pITsrxSbUpnrWJngFjU13wwxMA== X-Received: by 2002:a5d:4e01:0:b0:304:6715:8728 with SMTP id p1-20020a5d4e01000000b0030467158728mr5095286wrt.18.1682328560614; Mon, 24 Apr 2023 02:29:20 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id h3-20020a5d5043000000b002c70ce264bfsm10327237wrt.76.2023.04.24.02.29.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 02:29:19 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 87A481FFC8; Mon, 24 Apr 2023 10:22:51 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , "Edgar E. Iglesias" , Paolo Bonzini , Aurelien Jarno , Peter Maydell , Juan Quintela , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Richard Henderson , Joel Stanley , Leif Lindholm , Markus Armbruster , Radoslaw Biernacki , Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , John Snow , Andrew Jeffery , David Hildenbrand , Bastian Koppelmann , Max Filippov , qemu-s390x@nongnu.org, Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P=2E_Berrang=C3=A9?= , qemu-arm@nongnu.org, Eduardo Habkost , Ilya Leoshkevich , Vladimir Sementsov-Ogievskiy Subject: [PATCH 18/18] docs/style: call out the use of GUARD macros Date: Mon, 24 Apr 2023 10:22:49 +0100 Message-Id: <20230424092249.58552-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424092249.58552-1-alex.bennee@linaro.org> References: <20230424092249.58552-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.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=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 There use makes our code safer so we should mention them. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20230420155723.1711048-10-alex.bennee@linaro.org> --- vppr: - show example of what QEMU_LOCK_GUARD makes easier (although I didn't repeat for the WITH_ form) --- docs/devel/style.rst | 54 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/docs/devel/style.rst b/docs/devel/style.rst index e9fce0fc69..b97e5111fc 100644 --- a/docs/devel/style.rst +++ b/docs/devel/style.rst @@ -668,6 +668,60 @@ Note that there is no need to provide typedefs for QOM structures since these are generated automatically by the QOM declaration macros. See :ref:`qom` for more details. +QEMU GUARD macros +================= + +QEMU provides a number of ``_GUARD`` macros intended to make the +handling of multiple exit paths easier. For example using +``QEMU_LOCK_GUARD`` to take a lock will ensure the lock is released on +exit from the function. + +.. code-block:: c + + static int my_critical_function(SomeState *s, void *data) + { + QEMU_LOCK_GUARD(&s->lock); + do_thing1(data); + if (check_state2(data)) { + return -1; + } + do_thing3(data); + return 0; + } + +will ensure s->lock is released however the function is exited. The +equivalent code without _GUARD macro makes us to carefully put +qemu_mutex_unlock() on all exit points: + +.. code-block:: c + + static int my_critical_function(SomeState *s, void *data) + { + qemu_mutex_lock(&s->lock); + do_thing1(data); + if (check_state2(data)) { + qemu_mutex_unlock(&s->lock); + return -1; + } + do_thing3(data); + qemu_mutex_unlock(&s->lock); + return 0; + } + +There are often ``WITH_`` forms of macros which more easily wrap +around a block inside a function. + +.. code-block:: c + + WITH_RCU_READ_LOCK_GUARD() { + QTAILQ_FOREACH_RCU(kid, &bus->children, sibling) { + err = do_the_thing(kid->child); + if (err < 0) { + return err; + } + } + } + Error handling and reporting ============================