From patchwork Thu Apr 27 15:44:53 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: 677518 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp414391wrs; Thu, 27 Apr 2023 08:45:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7ECZnOqHvyplyo880k63SlkuuNbTo0cEQmyNs08SKidFrvOO0bopMRrp8GxV+l8IeCcHDS X-Received: by 2002:a05:6214:1bc5:b0:5ef:6554:d066 with SMTP id m5-20020a0562141bc500b005ef6554d066mr4159046qvc.12.1682610351751; Thu, 27 Apr 2023 08:45:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682610351; cv=none; d=google.com; s=arc-20160816; b=Rrd470qyE2RcRcka1r9TpqbEF9bqcZmkyM2cTL+uJk5ADV3xaaYbjzUH59kzWHLagu ISMrUGHEUjTUllHbtuDritxZ4141WXUwDE14ADhMWWRv0PGiaOY0yetJgboh4+tm48xU Qkk0HuWffah8Rwoi8FNQ3CEtaz2Rz675tJ33qJ3AaepG53uTKN7fR+LCkVxREJe2lpHa WsJAiDvTLeO+5eZQzxb3EUL1Nol6R3JS2W32d9lnSNjBi5siPNr0vR4MgsXWZkKlg+f6 7YTG0gg7wdk3ho+0Ne/mUlYm/IDmAAQEFiFZ0yrmUSelvA8Cm5WOijgAxE9cVqTifwKA h/5A== 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=8/qtbypS+zMfBjvyTpm1Br1Ca+O9tkkfRjWzVGRifNU=; b=aYS7r/HxPIMvri4/CmP4UsmNw7QwduwR9u9AFwiMYRYGUGKxEy4sMtmzZMpY078q2R cZDmudomTJl9eAnblboRyr1+PHy+gVCBxYN5JjzjIB4QNpdeotdveoLn15nXm/PaZcbm RkbvSdIZOuj6g7r/pN1qjDnPNsYo+kQXV+KsgrLiYitN1sCdlNQ9GwuctzfaDOt+kKdX wVxOxzw3wEkDkdKTfKALxOSkOq6TFCTZk15wBCOeU7R4dBWAZMFXSJH1sYPmYEdEhEc5 O0r2wstAaPkxJVpoc07LWL5OQNWT2lUUpsNWX/myGgk2L3kL+uuU4xsbU0Inq83BX1s2 vpmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="DYjzh/Je"; 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 s12-20020a0562140cac00b0057115385fd0si12195078qvs.373.2023.04.27.08.45.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Apr 2023 08:45:51 -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="DYjzh/Je"; 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 1ps3o7-0001pq-W5; Thu, 27 Apr 2023 11:45:20 -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 1ps3o4-0001oD-6z for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:16 -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 1ps3o1-0004ia-Sq for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:15 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3f315735514so29117135e9.1 for ; Thu, 27 Apr 2023 08:45:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682610311; x=1685202311; 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=8/qtbypS+zMfBjvyTpm1Br1Ca+O9tkkfRjWzVGRifNU=; b=DYjzh/JeYu65JmawbYSPleiqnF+ZhAu4Vh4jf2ogVRJpK0yC9wnyG8STZ+yqLdIwcL oLS5Hsx4YqnJfLHiZtcatnih1HUlfmKjrwcUCSFOxH/0ky/FsNXlKCArQlK4YNLsULDJ lZGuyTD1aVgoVsWVEOc9TXB+nAX2yasN5ixrtkgJ2+zYqe5pzXjifigNI2e1YyUuYswu 7WCVJpZxpgjxYUqqZ8YNsOY55yVsA4kw7sU/Ka+Xgo2zsEW1CluCUzIIwpOk5SXSNl8A IOe4K/38w1fG6WCV5wgPnyLqyET37+mv0T2flsSp4awFmBeAJEb6x0JtznpsMjomaCO6 ss0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682610311; x=1685202311; 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=8/qtbypS+zMfBjvyTpm1Br1Ca+O9tkkfRjWzVGRifNU=; b=UyI3PJOlCqu4fxGSBdjiH4J29zqyQqdO/yLgSkK0ojK27Uxymc0pu/mMBLWaz4hp60 1Fi78gzO7sV4BO1MRRiA7Z05fj/2CmZUNZ39BDMtoW4mQnExOEuRsb2eRrfzWdhpvihC 1FCHMGxlL7fVYmnGGf2gwgN8wwxpFFmro7XyodxfikUDW8LdUNPZpixMLuhCfmqVs6rn xzHJNH5zg3gYaCG4PyH1GTpybMHPDqXd1iC0e61hb6KQQxH51VIy7SxhFBOj42HYLAxl bqSGoAeXKNPp3yY0kBrse6DvN/OF6QXJ/8bJ4R+TCU+nLlEhrXy/t4z6Ovxy+sjmT64e h/3A== X-Gm-Message-State: AC+VfDyWpb+DXM4ojosMbLzY3g0vKJ4peqrcIYxpErpSraYGTj1YSrNW XQSZ75K9wg/lNi7rhU9wHeB3f0qFBKKNPdLZ5Po= X-Received: by 2002:a05:600c:5409:b0:3f1:754e:69e6 with SMTP id he9-20020a05600c540900b003f1754e69e6mr4560560wmb.17.1682610311493; Thu, 27 Apr 2023 08:45:11 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 3-20020a05600c22c300b003f31d44f0cbsm825405wmg.29.2023.04.27.08.45.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 08:45:11 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CC3BF1FFB8; Thu, 27 Apr 2023 16:45:10 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Kautuk Consul , Hariharan T S , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini Subject: [PULL 01/18] tests/requirements.txt: bump up avocado-framework version to 101.0 Date: Thu, 27 Apr 2023 16:44:53 +0100 Message-Id: <20230427154510.1791273-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230427154510.1791273-1-alex.bennee@linaro.org> References: <20230427154510.1791273-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=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 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 Signed-off-by: Alex Bennée Message-Id: <20230327115030.3418323-2-kconsul@linux.vnet.ibm.com> Message-Id: <20230424092249.58552-2-alex.bennee@linaro.org> 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 Thu Apr 27 15:44:54 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: 677528 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp415392wrs; Thu, 27 Apr 2023 08:47:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7hv1gQjZbwWuXf5St/Tq2NyiCOMaIrriTpmb0lKmDTqYNXLLqrL3vGn6C3rNYrjocKGOe6 X-Received: by 2002:ad4:5c64:0:b0:5f4:357c:3bdd with SMTP id i4-20020ad45c64000000b005f4357c3bddmr2839010qvh.14.1682610470817; Thu, 27 Apr 2023 08:47:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682610470; cv=none; d=google.com; s=arc-20160816; b=WTmJwgcvhJiE6Z9XOMbxWN13B8Rbgjb07InxmKRjYH0VT88+r4ssonpLvYa3IOxK2x V0GyUOeh+EGa09CL1SOG7e3dechv6Gwq4fqoAsVI4LXhL/bCPn5aulmTlIZH/P6H1ZSn d/4XCKOhxnnpo5YptROAwa8ku13xxYGpg6PdOv6gs28hzTw301x0dG9X3I6SZLbnXE/u iP4CplX/paurOt8fxHXuGycgRPURZdj/Ngwpe/GtTmtVjbEVKO8qE4gbuE9bQhkr9Glo 9p7K2/Iz7CZxMCWY3Dgt8ehpEyn0cTCNix6f0DWSIJzkcSDXTWVaEw6Voz1niaAA6KKL 5fzw== 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=Wgoxuz1ScUhHkzTThSzzMJt+lGCLt4B0IMA+ZNFLE5U=; b=A+8iE/QFEDhiAmHCJTPEkB1gtTwKIbUAK9Mw1wGwugCZ3v9Iv932l31+f5sQT2qV4m 8unZ/vqoIkoEhG0HGJKyL096Cfbp856paf/KWEO0wKOF+K21OJOBTA4OKxmwIDIS0zkl tACmo+Wtm/Fa/mC5aBjVWrNXXuCZ7Pofy4fGU/GZZqG/Ql+2kEkhiMxhaAzK7lNCsW33 TdqyCStXDInr00mZIHpfDmcHrQPoT2n1mJ7JLEagK4txn4ozdzgShSIYbFWyp+fdxCML HJMUCoL14bGb/Uvnm7IvYi9rdhRNdbTdAmKngy7hLQj5W2EsMkPzKImh/fAevq7OH2nc dY4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VtfEyePg; 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 iu10-20020ad45cca000000b005ef54567825si12493071qvb.601.2023.04.27.08.47.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Apr 2023 08:47:50 -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=VtfEyePg; 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 1ps3oF-0001tC-3b; Thu, 27 Apr 2023 11:45:27 -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 1ps3o4-0001oT-Ma for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:18 -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 1ps3o1-0004ig-TB for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:16 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3f178da21b2so88630025e9.1 for ; Thu, 27 Apr 2023 08:45:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682610312; x=1685202312; 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=Wgoxuz1ScUhHkzTThSzzMJt+lGCLt4B0IMA+ZNFLE5U=; b=VtfEyePgldBXMvdP4EEwz9pqZkXnoLX8evZp/jpzOah47K7lpdi92VTbnjqD7UqFJo MyIRfACj5u3NsOpvbi2oOb3lBjR5ER7y+iw9gvumNrtCffk65PdEoRiOQHFnKUUMIvuw z8J6OfXsrct/WQ46S+Gse883bdmd1tqRx5f/jE/KX0IPUMU5p1i4A+vxF1zV66sv0VOe A4oUd94RLgdYzdjeZ80zQOx5dXCwbrCj61xepD/VWorZo8QVjpKJm79c+AzwEnBX8Dir Ve6hPsIkEF2v3EMw7xiHRdxUIohJsmiUGbJxmUtvZZqslJzkUjFXTd4IdRqo0mMu6B43 9slg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682610312; x=1685202312; 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=Wgoxuz1ScUhHkzTThSzzMJt+lGCLt4B0IMA+ZNFLE5U=; b=kHqRu/FwSTFESbwYAUA92lOwviKZrsH5msns266AhSDhm0YV4FFERaXnIUblxRLcbW k6x4hVvczaifvioGMIejvpRfWkC8MEFaDZxj/RhV1THf+ksaQQzPTnaT/FOfWVBIap9B 68Nf+XI0mwJewjWetcSyMqnjNRaeUNIvz2L9rizNrQorbNPCoaPkXr7EjCq9qA+QWQ/g UoFLA4oh+hXfoXCUQk4txi3gB1NI9AUtsGhNSeZbmaui5adaqKJ6LDvmZbyiujn7bDi3 U/r2g07falLhETX9oDwZ0I9ubIgJ/uW6fOvwM23UGttWPz/LFcIqIJ41AMHaUqsfvgMT Gfjg== X-Gm-Message-State: AC+VfDwdo095mvT2kbeal712O7pveX1fAVXYffZMW1PyGmLkkivU/CM0 r8LpUloxy6EmpQ1Sr4queZdOdA== X-Received: by 2002:a7b:cc1a:0:b0:3f1:969f:c9d0 with SMTP id f26-20020a7bcc1a000000b003f1969fc9d0mr1799033wmh.4.1682610311838; Thu, 27 Apr 2023 08:45:11 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id x24-20020a1c7c18000000b003f183127434sm21666087wmc.30.2023.04.27.08.45.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 08:45:11 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E56AE1FFBA; Thu, 27 Apr 2023 16:45:10 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal , Cleber Rosa Subject: [PULL 02/18] tests/avocado: use the new snapshots for testing Date: Thu, 27 Apr 2023 16:44:54 +0100 Message-Id: <20230427154510.1791273-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230427154510.1791273-1-alex.bennee@linaro.org> References: <20230427154510.1791273-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=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 Message-Id: <20230424092249.58552-3-alex.bennee@linaro.org> 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 Thu Apr 27 15:44:55 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: 677524 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp415133wrs; Thu, 27 Apr 2023 08:47:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4W1SLBti5vFSLPwScCdjat6Sv0y19jIcn6WyLT8PQK9njC/Q9qI2MT0FKBeVUjEJ4Y19RZ X-Received: by 2002:ac8:4e85:0:b0:3ea:65d2:2fd1 with SMTP id 5-20020ac84e85000000b003ea65d22fd1mr3310086qtp.3.1682610429362; Thu, 27 Apr 2023 08:47:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682610429; cv=none; d=google.com; s=arc-20160816; b=w0rGzbKbZAoNZXEvio18wWfSE3TcaLyuOBKlvT4BknRn23yEKNYtJGoEt4UZ4ebHZH NpRUIiejxb5pY1g6RCitCmkjiK5bIfS5TzrMDxD6MFPNflWksKM5uhLwiD9dwYwjlApL vrKVkCQOA6VFS83DMkSuMiw3zDKM8vWNx9kxxzMnN5J0KeHhQA/Z09K4F+GTEwQ56Es4 rF9fnC00o64EivGx/pJHio4ZNyQZkFH+wq12Llj+oGraDm7k3Us4WbI4AALinn/31wgP 1RNL2S3r4ADa/ZV6wymrPCrdqfvOCeQ16/lW0W8OviR++ttwxQUq267L9ui1DK7LKyjK ps3g== 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=m3zAanYebbZhFO73oDp9ANAxrPZGnhSnFIhjJ3ZsGEU=; b=G/YNdloXJYjs96tBJVP1rz+fznM2a/7fVeyDal55O6cDYctZoGudKMa5AvKcWU2rkv 9ilupKjOqAmdwAWZ0sfrF5t4fEN80ShoRBbWydbi6uZtyDdKytXfMudYpjhGlQfAoDt6 qKgnQVofG5g9RsV2AyG9F20p269PcqjO6qzIF0lsdCLYo7fkAMcXaYOxxm8rDtTfNoMJ 09/0ZYYXedKcg9Q77iZs/cyvfPr7GB3zU4bz06vuLaSpAOqrW8VmLokAbWHUYSjKGGhH dZcGATAFS/uNyARbpiT83oLL6F5jlngu2HIXEcuofNkEe0v9MgFc3hLfQPV8bjh4qPrW FoXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k25iDfa8; 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 b13-20020a05620a0ccd00b0074dead13b81si11419969qkj.397.2023.04.27.08.47.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Apr 2023 08:47:09 -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=k25iDfa8; 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 1ps3oL-0001vu-6s; Thu, 27 Apr 2023 11:45: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 1ps3o6-0001pH-Lo for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:18 -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 1ps3o2-0004j0-Hh for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:17 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f19a80a330so41743735e9.2 for ; Thu, 27 Apr 2023 08:45:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682610313; x=1685202313; 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=m3zAanYebbZhFO73oDp9ANAxrPZGnhSnFIhjJ3ZsGEU=; b=k25iDfa8qX/wTq6JpIISVl6gD01rxrFSoEX1SnovYzC0SUzx36qrPA0yBzpz7V0Vdt LCAtm0nUdFqXu+ljsWtbYqhRAugGfaNV2Cc2xh4wXY/umI91pXLmDniuVDEimCd7BPmI eZz3nh9ZUPEV/9HU/nyJlxtOQb3eRY39sdVqbAhAwyj5ksWZ33AISqOWFdCgawdgCgRo wGp4MHbzewDP3Vkj3TZhpKHhgLi4J4B7ZpMJXZkK7dujfRzjQ58IWfxdMGvOekFW6aIs wY1M0kGpM4l6fHUl/FX4oszzyt3Kz73977/+2gYhGtHTUAQLxC73diuNphBcBXDS/Joc 6jgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682610313; x=1685202313; 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=m3zAanYebbZhFO73oDp9ANAxrPZGnhSnFIhjJ3ZsGEU=; b=XM7OnL3RzcB+mqfuqCVJKF+z5udbNqksXyPTz/csUzJBTRPOGFV72axYYfynwo+BNS YUjuYIhvda+vWyrPAhrtry+s8i5I0wvUFNsv3vH3tjPej663YUuJw2UVRbLmKqUmVc42 WucU8OPLwxQznxi/NXBoPQlQ9xaXho/zGcf0baE3n/vaTFQ/T9RpFwq2zOYK0IyfUYbl 0Op15o+Pm3Id01iWc6LNXwU+rdXua7nOBbU1qQBY5erV3YLgKEEszXW+fwNHiUPb9/K2 5ty+L5+mg1r3DbS9z6GF27XTxert2hVh04NmMLR9130uBHbF1vOPu06ahEJh9l3oOJII 12Fg== X-Gm-Message-State: AC+VfDzlTCxpAOwSVSV4gxgM6TqxD9RaHdx0k5Hkq5uAzXXUIaOjGEpP BtiXf5TLM2xL99XHVeRR/4b/Cg== X-Received: by 2002:a05:600c:2155:b0:3ef:df3:1693 with SMTP id v21-20020a05600c215500b003ef0df31693mr1697370wml.32.1682610312892; Thu, 27 Apr 2023 08:45:12 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id t14-20020a05600c450e00b003f0a6a1f969sm25272355wmo.46.2023.04.27.08.45.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 08:45:11 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0C35D1FFBB; Thu, 27 Apr 2023 16:45:11 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcin Juszkiewicz , Leif Lindholm , =?utf-8?q?Alex_Benn=C3=A9e?= , Radoslaw Biernacki , Peter Maydell , Cleber Rosa , Wainer dos Santos Moschetta , Beraldo Leal , qemu-arm@nongnu.org (open list:SBSA-REF) Subject: [PULL 03/18] tests/avocado: Add set of boot tests on SBSA-ref Date: Thu, 27 Apr 2023 16:44:55 +0100 Message-Id: <20230427154510.1791273-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230427154510.1791273-1-alex.bennee@linaro.org> References: <20230427154510.1791273-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 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 Message-Id: <20230424092249.58552-4-alex.bennee@linaro.org> diff --git a/MAINTAINERS b/MAINTAINERS index a8b942dea4..214124c84c 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 Thu Apr 27 15:44:56 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: 677520 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp414617wrs; Thu, 27 Apr 2023 08:46:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ51XLQGn7kCO62am3qAMuOIuZl2hTsxOzGJm32ucdXLZFT5YowzbLzxZPsndTwl4tixTOKO X-Received: by 2002:ac8:5ac7:0:b0:3ef:5f95:8365 with SMTP id d7-20020ac85ac7000000b003ef5f958365mr3390010qtd.42.1682610377661; Thu, 27 Apr 2023 08:46:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682610377; cv=none; d=google.com; s=arc-20160816; b=eTxN2Q3kVgQS6EzzAm0ctBTRnc8FwHzHZDBC7pPErY6OaYjIEUGDI2nGCmmygTUgQf 4l3V8hPMSuiL01VuENzGjzao1GJg6TtdZ+n0PfZvmBpbyHDSx+Edq8F00fAGt137CG5v +kaAtMZ8wMuLMOxmQaArnreHbpXPaTEjBqsnRPt3BGzfhoSPT56Zf8lhUhwyVh4uadGG /0+OC33LRmgHDJ6xfn4KmxUfRMREO8Y/kVESsA9ufRcJFDH8YWmeUGAdQc7Hq3iWb8s1 g/W1+DN1IUasYOdeXE2yP8q3KC1mx7XtVeMa2n7SwxKRg8w7+Co3QllvWkcHPnBENpw/ DiJA== 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=G81MgRiGIts/A6nA0K+cz87dFeXnPcfbunuD/xKLhHk=; b=XASZdN/BcRuuFCSu4OSZxNhe5rquJzNGk6sLTqt3KbFA4XgSVlu6EbaqYT7BCmwJqc hwQ/ZRxlqRqFOFqTrKc00EcZv1DlDSm7uuIqgucJlZYNk8zxqDWZuIHCnvXb8pbMwShr GslfuKBsiNCqGZ0UwXAGOSiiUQgnkJqoslw4BW5ooD8TR25Qiigu5qFfus6NvSIytrXG mz4DtRHBzjG7yRzIvVISBdP2tuxkk380LETK9m+ozlnQaTO77xO7vMN0GhH0N6rjWIcE ZAQfuY7L03Sg2dNkyZhluLpyvEmoSqjA+F8Uz8Heh5UN2ZRWch5WlEvoXEy0/0t+okd9 79Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wFrC++d3; 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 y10-20020a05622a164a00b003b86b6c1511si12170267qtj.249.2023.04.27.08.46.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Apr 2023 08:46:17 -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=wFrC++d3; 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 1ps3oB-0001s6-Ol; Thu, 27 Apr 2023 11:45:23 -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 1ps3o4-0001oU-Mh for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:18 -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 1ps3o2-0004iw-9U for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:16 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3f19323259dso74608325e9.3 for ; Thu, 27 Apr 2023 08:45:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682610313; x=1685202313; 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=G81MgRiGIts/A6nA0K+cz87dFeXnPcfbunuD/xKLhHk=; b=wFrC++d3Tgi2zn1i7R0Htq2qLimfNNOnYM/Cd9I5vD+cL6/b64qoAg7oawLixvqEbD Piaw7fNwT8qQITnmhBGld/eZ5rou/dVMS2cMKb+P0CTqGGljc5Ab+lGmj9/CowEXLTz3 8o2vII+B4xiMr0hSKgfNARlKJz3HaID3Z7M0iBiwaTZFiBJP2Y2zx6v8aNa43mni+Bv6 FRe7afRt4Lr7CS3ZYnaF79GuztzQqw5lCKs/6mHcxGaUR4U+7gSrDQJ1GVSfCo1kZj+W BnuvuSKPwHqCw33q8ou5ID8xUglibIP+8trAGy2HHQrDd3kkFqFU0k5+bufWw0MbmuTC xIQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682610313; x=1685202313; 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=G81MgRiGIts/A6nA0K+cz87dFeXnPcfbunuD/xKLhHk=; b=KSU3uSxNx9yswUQhcNNk2PeAI3s/dTpCGItLQBobtobCH8xP1RO/68Vi9cTaRipi5c X7fspsc1lg7Og3BApGrg64ErGcswfn40aCFXYg43GrkR8MTN8SKwI8jgjlrJu2s4eLBW 1WwlCUHVZyhbLNJCWBelnTblQpm4NLgTqUze9YPRNiFX4ET6SjfwGaqURGMeya5wtd/F APM2He9XlH+40Fdptbg4lAD3ukDcakhNaoiVQBdqYJ5o3jgr7ckrKnNV4/neWi1dDBUZ nRO75ggMkX9OHBzWrZwypC4Ey80XPF3pVd0BYi5YvDond5G0gmGfL7gLPWSxeW1Ekdzp /3/Q== X-Gm-Message-State: AC+VfDxxsDSNGENirYxh7EAuzHbHo67DopbTW3MS7OF2Xrdh3zrEQD2p N8nvS7qi1rNciWtHkCllVNAq8Q== X-Received: by 2002:a05:600c:28e:b0:3ea:d620:57a7 with SMTP id 14-20020a05600c028e00b003ead62057a7mr2111876wmk.8.1682610312667; Thu, 27 Apr 2023 08:45:12 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id z19-20020a1c4c13000000b003f173419e7asm21518496wmf.43.2023.04.27.08.45.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 08:45:11 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 22C1E1FFBC; Thu, 27 Apr 2023 16:45:11 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 04/18] gitlab-ci: Avoid to re-run "configure" in the device-crash-test jobs Date: Thu, 27 Apr 2023 16:44:56 +0100 Message-Id: <20230427154510.1791273-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230427154510.1791273-1-alex.bennee@linaro.org> References: <20230427154510.1791273-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=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 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 Message-Id: <20230424092249.58552-5-alex.bennee@linaro.org> 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 Thu Apr 27 15:44:57 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: 677522 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp414926wrs; Thu, 27 Apr 2023 08:46:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5DrrSbJgq8Te9BzKubK23AKwRcRF+rUmUQpXewD3u2dvwV+q8azcS44VaR/8hjLbg2BS2u X-Received: by 2002:ac8:7f03:0:b0:3ef:347b:b043 with SMTP id f3-20020ac87f03000000b003ef347bb043mr3317271qtk.32.1682610405470; Thu, 27 Apr 2023 08:46:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682610405; cv=none; d=google.com; s=arc-20160816; b=Fb5HoQ0eXNfi0djpK129B//PS/moKTK/wuDVvoAddJpcOJSdNhS9GhBez+lKpICOso xFWwGC9QZ9gqZdVIbmg1CO1HsBDO6LhQbGkD8KI9BZqTPCtdSNi1EHm9OgJZJBUGKv9s sTzkpUHky31rWiYIFmYUbYdLWBq78ziodrzcdSHrZpaJh5WvZk9eY3BFkyho51mxmjFC 5vNZ4go0KIBbeeyuZesIQVHqYf5qhUOxDN0e3qoofIkJk4PeG3fsKHb5P0zBEwicPcA5 y0xxWBfvI3a9LuVFezLMxkB7sMhVO+/770riedCuDddkg2xUWAtGp+1Ld5nGTak0gLCq 7+Ew== 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=4eCwi/pVbpdAUWwYQpZXmTPlZe0TlOgYAIJaukeqpyY=; b=efOdcKeHA7HjuT7Xoktz7Dut/SNRLYkI+0gPrckt9TBOXhW47Xw31kmnGsPHuE97c8 o+AwRouqRfOdb2vETw3vWsv4Tz5mm6iAjawK1f0wm/b+4ioLZeSQULGefzAnCVbPe/XU tVtCUkABfNlfuWTZ974MK1ybUnXlxoCFs64o+Db60Z2cZsUkB5ISVyIymKCIwYhZDIm8 2tWN8nQBY+1uLDj5U8zaAz1pXKRArGzp2NJmtoPQ07dkhB9QwXPS9uOPt2qjKXoWo/uy DHwWIInWNtTzDwSvGhlnHMFhBy9Z1dIcBo3pHGPH/Whq37EhwpzxtVMapM1SBvXg6n3U 1bKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZlF4TOgx; 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 h7-20020a05622a170700b003ab8d13c3a6si12115463qtk.409.2023.04.27.08.46.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Apr 2023 08:46:45 -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=ZlF4TOgx; 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 1ps3oN-0001wC-45; Thu, 27 Apr 2023 11:45: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 1ps3o7-0001ps-Bf for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:19 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ps3o4-0004lG-Sx for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:19 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3047ff3269aso3163123f8f.0 for ; Thu, 27 Apr 2023 08:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682610315; x=1685202315; 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=4eCwi/pVbpdAUWwYQpZXmTPlZe0TlOgYAIJaukeqpyY=; b=ZlF4TOgx83J9HtkORK/uelak1qPhRe4gQGmQqatv24sS0cXegokAQYh5xWTFJYKpmt SBaJ20OEDG8npsWOXlhC5OTwiQcWYM/f8TKZXsPnAFY4hz2/ncEuLZ5HBy9vF2qTaBlW Shcs6Is0+RQK1vhGz8PDlvqo7/THvLPOQC5Stg/+2w5deLL7vQBQVEzoi5C++8Wih4MI lFJC5QcWio1+Z7HIVloLO+tpDWhIi3bSY1zL0YZ2wtOxv3VRXYK7vZeQV4c1XOJ49Pw/ ecC2dUVYxkEMVZdHNBCtm0sqVMxS3fTYxNziQyVlxD1akxgI6g8faSg3+D+rri2AgxRJ no7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682610315; x=1685202315; 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=4eCwi/pVbpdAUWwYQpZXmTPlZe0TlOgYAIJaukeqpyY=; b=W4xVbMkv+wFo8BlwXUTnB+/SkEw6JjTVzEDchVzXz/ZGQj29WHCpMXzPZyo8xiE3aE Zl9V/qBhIvXKDJ3OuOF7ZiDnDqNWGDEdQSJ+HjPhecTiNy8Stz1VdlK/I2Pz1KSysrLE bcGybT80TTZx1WeTT9W5Er8ROKaWs6Tm3PHm4UWXkzxDl8YLg9S2UOKx1gYZcOp6wJRn 3ps/tU7T2qzBjPPOjQFXdfhXRlEH+toXnnupka2Piy6uHtEh+05ylveSyMwVQTkdZHZ0 tg9HdXJbC83hx41oJvjtUIJfmuRfl07voBmHSIuu63XUI+RG9XYKV4Jpn1ef8kPvpAkP N2+g== X-Gm-Message-State: AC+VfDzqhfEsGBzS5V/E71HWgI7LUQC18FLlsCpreTcdvjq0eTHG6qDB aqQiFzoyy7raSaBzyZNCwAR5bwAW4c6IBj6aT+I= X-Received: by 2002:a5d:4008:0:b0:301:3179:f94 with SMTP id n8-20020a5d4008000000b0030131790f94mr1616240wrp.5.1682610315312; Thu, 27 Apr 2023 08:45:15 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id z16-20020a5d4410000000b002fb0c5a0458sm18841221wrq.91.2023.04.27.08.45.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 08:45:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3A7C81FFBD; Thu, 27 Apr 2023 16:45:11 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Thomas Huth , Eldon Stegall , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 05/18] scripts/device-crash-test: Add a parameter to run with TCG only Date: Thu, 27 Apr 2023 16:44:57 +0100 Message-Id: <20230427154510.1791273-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230427154510.1791273-1-alex.bennee@linaro.org> References: <20230427154510.1791273-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.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 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: <20230414145845.456145-3-thuth@redhat.com> Signed-off-by: Alex Bennée Message-Id: <20230424092249.58552-6-alex.bennee@linaro.org> 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 Thu Apr 27 15:44:58 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: 677517 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp414311wrs; Thu, 27 Apr 2023 08:45:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6RtuxUIZcAQFXtaEGhQGTD8XnsyjW6hX6MCCcwobel3O3vO02pt85m6KEiMdCLp9kxwax1 X-Received: by 2002:a05:622a:46:b0:3ef:5d90:3c5e with SMTP id y6-20020a05622a004600b003ef5d903c5emr3290464qtw.9.1682610341417; Thu, 27 Apr 2023 08:45:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682610341; cv=none; d=google.com; s=arc-20160816; b=I/K5zf1D8jGRBhVyWuQPo23OlyKP6b+fPtWuaH0HxBtGjmlZEk2usG/PhpU/6kTEH3 0xkHZb6LR5YrGOo4FKdXQjvQ7G7c+26rS+CZhb/BPz9VYqMyevhZ5mQJcy6dAiKqIcRq pwA0mMyFVfEdzYYjRcKp0JgDFpk80eunN+NFPvPrBhHp04ejjob/JbfcfBbMTbTtp6/V Pll3ipvsj/Yo2E4vI6sB6GD9pAsT09Z40CBGghsZZce8angBWRoIRecnpxj23jr9K+II gwYPm9vlg+7pKoZNT2pn9KZf/RBO5T+I9YYioG9LbRosHchyut0JJakzxvphV/xZ3TSb QS8A== 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=SI6uYTd7Q0+IVe4nYn/2huKDCgz0raMlMXhc7QX3q+I=; b=KpO0mQPWnEMiqsWh1ChKRs/eJnDl0Epi2nvI1HLg95rJqIGH8RFxWKsrnA+/DcKSVY ofSAnKsOyFDcYL+dODsT/POLzHOXeJYi3YBSQQ6Y7bqbjyqL+VPrg0yqhXd4rlnIwsdK nDfzrWYGp7b+fj5vBwpZLlGadB1PAvBrmOPNpud5TN6sL9Y8BkTwhDcx4b1rgbrtBBXr EqDXMRVgKkMGM/Wk0asS54B806KqYvFxRyXMjAm1YLHaF9KY0smG70QoKZgSyinIODcv e2x1CYMPU+EgRlBQ4POiyW8ZngT2OkJzKW1zgN7PpXazPkrYyTYBg2u0XeTQgbIeDhIU fpVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BS3uaJPo; 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 u25-20020a05622a199900b003ecb0b742f3si12486894qtc.88.2023.04.27.08.45.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Apr 2023 08:45:41 -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=BS3uaJPo; 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 1ps3oB-0001sL-QF; Thu, 27 Apr 2023 11:45:23 -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 1ps3o7-0001pr-9I for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:19 -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 1ps3o4-0004ia-MB for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:18 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3f315735514so29119855e9.1 for ; Thu, 27 Apr 2023 08:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682610316; x=1685202316; 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=SI6uYTd7Q0+IVe4nYn/2huKDCgz0raMlMXhc7QX3q+I=; b=BS3uaJPowCtUB+tvsByZoj1Ht+0mVzlaqQ3EoWlo8/52qbjtQt2frhnGqUYB6MDQR9 f+SP3kH2+c6z9fYJAmFmjOKthAmT9xy2tGQJBvV0ZEGmZwLKHi48AnQGX0piFA4q/vwh NYQ7zjJpEr2rK07HaDzXEaIp+gD6HltUgjIcWnctcBRr+MBGz3xzxWfNMFodJEeboDHJ NhA27ICVtosSdssvD/QPMZwgcD0zcpHsGwtmG5kqNUe9HmQ6bt6tX+cmriajYuUPv22s mer0dzvBTvDHMsX9HHiRtZYKDaer7UtrD9cKpqm9rLRMh2g5hlhXYvIZTAXjeQQ/olh+ 75Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682610316; x=1685202316; 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=SI6uYTd7Q0+IVe4nYn/2huKDCgz0raMlMXhc7QX3q+I=; b=AneRqIsZLrJJ1FCSW2x+r7+t0rG8bKu906NZkWSkHhMp3324do7ln0uOfffdRE2v/T bmNhhIztpQZDAY5LdbAcOLVFvD+Br9oWeSuG/+CyfSIZUURl9MNMSpop8dOZQb7mlYXe h7HhKjwGTJtKdj/fdr2f8WjJ2VG4DtiVHFNFFN4pNCQVm16d4WKfGcSa4xhtbEBdFNJZ 2znoXBfDz4Zd8CLE2/nG7sOPyIpkKPWMr/z1KPhhSh2NckGgEV7bhz4LxQKJCLXoFBm8 9QsUFU1ZvEwlwDM1j19INDPSFolN3l88WT5cwd/vxRFDvRMYm58mUwXoe8i4U6o6UGEF TuqA== X-Gm-Message-State: AC+VfDxE6LkNSOCAmKtHx/G8fJWt4Q7BHVIwMcQrkf0bNqJCHdRilKGo lupcYrnpgu6ENwlokVSjot1Z5g== X-Received: by 2002:a05:600c:3b2a:b0:3f1:73d3:5362 with SMTP id m42-20020a05600c3b2a00b003f173d35362mr4755619wms.13.1682610315818; Thu, 27 Apr 2023 08:45:15 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id s9-20020a1cf209000000b003f321e61c1asm330892wmc.21.2023.04.27.08.45.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 08:45:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4F05A1FFBE; Thu, 27 Apr 2023 16:45:11 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Michael Tokarev , Thomas Huth , Markus Armbruster , Kevin Wolf Subject: [PULL 06/18] qemu-options: finesse the recommendations around -blockdev Date: Thu, 27 Apr 2023 16:44:58 +0100 Message-Id: <20230427154510.1791273-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230427154510.1791273-1-alex.bennee@linaro.org> References: <20230427154510.1791273-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=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: <20230424092249.58552-7-alex.bennee@linaro.org> 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 Thu Apr 27 15:44:59 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: 677523 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp415036wrs; Thu, 27 Apr 2023 08:46:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5HBEF0pZbJTi3JLEbIbdFKsZO/HoRItH8rCGWe4HlcToIpNxoCIQoEr2LQpUZs8skpum+x X-Received: by 2002:a05:6214:dce:b0:5b3:e172:b63e with SMTP id 14-20020a0562140dce00b005b3e172b63emr3439805qvt.22.1682610416966; Thu, 27 Apr 2023 08:46:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682610416; cv=none; d=google.com; s=arc-20160816; b=Q/r94jQWgaA8Fwmw67FOo1quvUOa2ZuJIJPBSRwC4hRlY/hB0Vw9iM2NceaJC5WgI7 ebywLaTT4Mlkn5ulo8XVsdGSGeGE1qLMkKb7mYnMNmCz9rGPKswZCOs00RM2fTE9gOKw HGlxt84vqmwPTXqZCHpaVGW3q3S5Ip6dEFWVH2570LnlwCOv1OSzRJ4uoZGmQYUBn64X mb9thomXU0XKRhBAvhdDSUGAXx2iLUDhByA06Wmaddwqn1bCJHtLNxgkV1Hd5J/idJ47 PT+hs7tMzmZQr+Ikq20fKrhVrMq01zFHO+vm8otVrWkYQN7BUPXo30aNt+dIRcjGyQYN 0EPQ== 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=0hmaz0tTnTlT4tA/o8R0lO6yD1wszvUTG7WLcL70qJw=; b=oJ8bXrd3Zfl2+qbWUytzWw5pqN9/G8yp4MqcMMayQ0KFQa96ki8kpHab+b7BK69Tbm RauoWoLvJ5+/z+ga5VnxVUCT/hA9wuxFTgReIY3DV+omkVAC1qdQ/+AaypekCZp+LUza rVB7KP7mnQtmsDa26UIPJV5KcGKpgdpIULia0EyPLv4qWcDE/z8sh0Pd3MeJ+JcRKQBd ZeVqu2JFww4TWVTotQlIjXyeA+OgBnO0Itj8jbJFwnyqx7YQuQxFHFv74dV31xGlYCe+ vOYS098RmzFjY9as/asE5ZUgJnoeUW+pdjA+WMR20HnuX7XJnBCCpEyNAUkp1csgqZA0 /BKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="l0vesrr/"; 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 fo15-20020ad45f0f000000b005ef8c578589si11987768qvb.297.2023.04.27.08.46.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Apr 2023 08:46:56 -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="l0vesrr/"; 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 1ps3of-0002JL-V6; Thu, 27 Apr 2023 11:45:54 -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 1ps3o9-0001r7-Md for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:22 -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 1ps3o6-0004lH-AF for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:20 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-3f315712406so29275205e9.0 for ; Thu, 27 Apr 2023 08:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682610315; x=1685202315; 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=0hmaz0tTnTlT4tA/o8R0lO6yD1wszvUTG7WLcL70qJw=; b=l0vesrr/Oov8fuAThdb96xaiN8IZ7IX+UPHPEIBbwCRGNbBN30SiRezI8nV8Vm5xxC 1Na+U6CAU1XMxaBxaBl8sok98Q3tKhjwg7CqmAJpRfVIMgtLJyq/o7IhFvB7UT+/dL+V Vilu59sW/ntgCGUmRALV76N0onXZcobRVxetyL0qEFGlaICpbKxBHQ4/a5ZLVJEkv4qr pxbCvJbh1NJjlPTDuYgrkNWeNmnUKMm+Vo0nqWIVxIT2LScc+N6GNH3J9wPJriyn0n2o BeMt1rvOS0Vmstdi0bhSkUvuHABWBRqjNAQye8ZFEaaqSLajV/Cs9GWS5vcxYdS4fCRd PEgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682610315; x=1685202315; 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=0hmaz0tTnTlT4tA/o8R0lO6yD1wszvUTG7WLcL70qJw=; b=kXmQm21DTA7bAfKAkk2MfnotjdQpc6IE1juLfDzFvyoVrkXHkwEmZa94yOrhiH+4HX cEdg5j7BrzUTA6lH6vg29Pe9SaWrsMJH2o3lQCuKcs8gB62Dw8FyM6UxE+OFaZsGuzQv fuDdm2BW08oYv7v/X0583jeO6nW3GDaJCVMc2H8fu4tzCz8Z8M4H5jD6AsTjTFoO13Fg QIuuf3Rgb6VUSzWoHCVv6JPj1T7qLwEXOH3bqh3zQR0yow6dbHrAHI2tS24OamWI4RYf FHRYTEZVwHNS2v+jGiJuZeML8dU8cVfew3IehdLyKIwOH7yv6h6E45b+Qmjy4Yu0YDFz cQBA== X-Gm-Message-State: AC+VfDzw/wX/rgQJGHBYs1MEIshtWdm0jBi+RHnw7aD882xL1WKhtfXy 1eyIUVHh7jT/8cvc+SG/17WdIw== X-Received: by 2002:adf:cf0d:0:b0:2fb:4680:1b59 with SMTP id o13-20020adfcf0d000000b002fb46801b59mr1848290wrj.31.1682610315519; Thu, 27 Apr 2023 08:45:15 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id j14-20020adfea4e000000b002fc3d8c134bsm18924298wrn.74.2023.04.27.08.45.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 08:45:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 68A791FFBF; Thu, 27 Apr 2023 16:45:11 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , Warner Losh , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 07/18] .gitlab-ci.d/cirrus: Drop the CI job for compiling with FreeBSD 12 Date: Thu, 27 Apr 2023 16:44:59 +0100 Message-Id: <20230427154510.1791273-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230427154510.1791273-1-alex.bennee@linaro.org> References: <20230427154510.1791273-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 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 Reviewed-by: Warner Losh Message-Id: <20230424092249.58552-8-alex.bennee@linaro.org> 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 Thu Apr 27 15:45:00 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: 677526 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp415160wrs; Thu, 27 Apr 2023 08:47:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5auD/PNRoPFLxTGq3w7m9uZJNuDb5dJfo4BR+qig2bdtj8VFtLsRg9+3y0+c3JWUCkP3FZ X-Received: by 2002:ac8:5806:0:b0:3e3:8ed5:a470 with SMTP id g6-20020ac85806000000b003e38ed5a470mr3043347qtg.1.1682610434403; Thu, 27 Apr 2023 08:47:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682610434; cv=none; d=google.com; s=arc-20160816; b=cpVNAikyCAdv6JekFvLHK0PmNQ1y3NkT7VE71/uVEKWbbtpyzhuaLYJ8LG/hhgaqhE ESWqHbDrbrMkhVAD3La8k1Br8y1zVxGqEty9LY45//Bs53Dhff3ivd3C1Z6m/5FtNdJm 4LcQHfQdYLdiABAI5YsBLSzC1bjhMxaaGQX6VPV1EHBrSm6yBI1i3hROa/DoEsvSWuAy w1oD46SXEpK5mpvEiEfZH2p3bC8CLCcDKnDAp6LbEgjVpX8Pb2hw8MHLr7MwVdCOfrIf tFIIgJYLXxCQym057xGlBK0p5T5jwLdMzGDfo2+nF6buhTaVVY1mmhI48z0/3X1N27IX phdw== 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=PG4UaEnYvjghjI9pm8jP+I8uIcN8w3ndXb9vuAXwPTg=; b=E6mJ4LB+8BSUz5qcqLWOPjT4q/H2pzD2JPL2l4evfv6Zur6S5bD1AjNlqPZYHhwGPJ Nk9SfsgOXA30q67RhPd0dwI2FSPJttuwGnjjP+HVk4FMsRsKz7bZM0idK4aI8jJroyyZ LPXAgcZZaz0NXny0i9t7SrHm60/Qj8sIW9i8GLv0dqaYikG/2hXR1jNa9o57dTAJap5t rVn+U4pKA5UwehPA136/7PkLZdDI78GUkF4tuhTM85WjYvRYLajnD4JrWK3kFgcUo+o5 je/NhxG1lJEBglJkatIPYcKml0tttD9puOSHSmE+asrWkMqW7yBS3n2MW6436t00s/xI aABA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vFjEqhh+; 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 y20-20020a05622a005400b003f200130581si313205qtw.128.2023.04.27.08.47.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Apr 2023 08:47:14 -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=vFjEqhh+; 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 1ps3oj-0002Xz-G6; Thu, 27 Apr 2023 11:45:58 -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 1ps3o7-0001po-4O for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:19 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ps3o3-0004kp-MC for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:18 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-2fde2879eabso7955217f8f.1 for ; Thu, 27 Apr 2023 08:45:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682610314; x=1685202314; 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=PG4UaEnYvjghjI9pm8jP+I8uIcN8w3ndXb9vuAXwPTg=; b=vFjEqhh+IQXdASsFj7312Yd5G7ee1P/BBHvOIWEw7UAXgxxZth8bK+CMH6EGyd88MO OnpdOAQqWb83CN8aplBAlkzZcvlknZXAFp2vk1gQMz1DelhqKLk99dlOR3wb63/5T75x WsdGJM09+yJDH2foVEEa17YnGkuguNWFTZ+cc41ZBrlZIhYo6D4TPzpX0rLA5EBLRWgm Z8xRPNOrIVcHZ733dVNz3HXYS5SN78TRudN/MRgGM9ocGv92fovpRK5IUyCMjQnUkyj+ ThHZyAqL3ca1pmWRY77CW/Nwf6KaA6GMW3Ul5ROTtLxNNS6CoP/yIaUTKfiep45zdw4a H9yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682610314; x=1685202314; 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=PG4UaEnYvjghjI9pm8jP+I8uIcN8w3ndXb9vuAXwPTg=; b=H5kuOf4HiLKgcvlswpXUtovzkBzwzK3Vig2JikcwrlhFMxawIbVmm0pU4T14YUibWP uWxzMkH+ZUDeLHkB6pJWZU1BvjGAfthqlLlWB646HYwpCZQXap+Dl903L5MI9jNC/UOo vgj3FwnLrUE583AW61MZdt8xA/59Hw8zEmbPtLak+UocB87La07KDJMGlzWCJNpCHcbQ 39H0JNoDWyaG7dBPDPHHHKk8Zu67Lh+SQxE6dPw3XrLzUZXFjn2lqvYVLroqrPwmW3Ph xMWE4hGAIiKH7PYA01tB+gLEGVuJ8tk1Yc8em5LlO30RkRY5ojniY/l3shxwqoMOnW6R 30WQ== X-Gm-Message-State: AC+VfDzG5zHzPBXYAsO+BPWSiWSHDb7qS9EkEWX18gckuSbRIvRD2MOv WOVF1mlCvkVcAKGRnscJXdGxIA== X-Received: by 2002:a5d:6e03:0:b0:2f5:9b1f:da81 with SMTP id h3-20020a5d6e03000000b002f59b1fda81mr1667169wrz.54.1682610314112; Thu, 27 Apr 2023 08:45:14 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id g10-20020a7bc4ca000000b003f171234a08sm21468459wmk.20.2023.04.27.08.45.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 08:45:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 808E31FFC0; Thu, 27 Apr 2023 16:45:11 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Thomas Huth , =?utf-8?q?C=C3=A9dric_Le_Goater?= , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal , Aurelien Jarno Subject: [PULL 08/18] tests/avocado: Make ssh_command_output_contains() globally available Date: Thu, 27 Apr 2023 16:45:00 +0100 Message-Id: <20230427154510.1791273-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230427154510.1791273-1-alex.bennee@linaro.org> References: <20230427154510.1791273-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.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 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 Message-Id: <20230424092249.58552-9-alex.bennee@linaro.org> 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 Thu Apr 27 15:45:01 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: 677529 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp415903wrs; Thu, 27 Apr 2023 08:49:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7UEFY8G114Jhnv0YPxN15eL7xs8t3auPWK9MeUgKQaD/8jmNRcwCMV509BVnLFLF30XhAL X-Received: by 2002:a05:622a:109:b0:3e9:2f1b:c85b with SMTP id u9-20020a05622a010900b003e92f1bc85bmr2964805qtw.51.1682610545039; Thu, 27 Apr 2023 08:49:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682610545; cv=none; d=google.com; s=arc-20160816; b=v/Pkn4fUE12dcE3mS9PW7Kiwomp/+7v69p+G9HJM0gMGWwo9mshll2aiSj4VT0+IiU vUz4q2VUNgF4K3j22nHxZxKjn6KQbVigTXOMC1CH0134+cf4aabWpDPRgs8NROB1VS/Y E6191fBrPetgvgaXmCpAs4i9cVfCSFtag3Exb7ldmRnLkxCPbxmFpno0uO0ef6rH6Ea/ RFbOA+nmGuzE48sbv2jUiRsYwXeYcWx1NzscKlvO1rUlzAf8HTBJb8aj9ba4qsCn21e+ euSFFkpZAxvSq5X2+asxM4qjxEwSPZ4ZyjObNQuzHWAB9ca4+rsjmJeT4KsBFHWqmlGO WG6Q== 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=5NIko2Gkapa67pYfAhG5iuG1fjGYEcV1kfLWbhJ/29M=; b=DnEB7KTtZ8wUAHwRA9C/CseFhfKfIGpEJGiAksXVRlaIuXdcmvtakfFIod93Ru0KAN BR2uWYJv8KrLgZ02+cAx/TbEiFuB16q6Fy82SkMh9Qk9UGBCo1YvnOIVE9lAwqfnYUv3 sC8hXRkT5OKNqx4xmCl1FxwPu0dLDrwkaJk2QnPPemw17yfxSeiYhGgtEy6lAks44tOi TX6osZQpYDxJo+k47tQba/qsR5lRAY2KeGRdTvKdgXOAgdM3vFSzFrwI/8hfDJm/Qn+y zWRBM1t5RC8NYh+SQ4ciVNbqzjVR49FC9uiMCLg568uquOoEmTdozx0k1QKKD/eY1/gD Jy7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="R/YfWNF7"; 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 g2-20020a05620a40c200b0074c600f92f6si12682072qko.577.2023.04.27.08.49.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Apr 2023 08:49:05 -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="R/YfWNF7"; 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 1ps3of-0002Eu-G0; Thu, 27 Apr 2023 11:45:53 -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 1ps3o8-0001qC-0x for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:20 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ps3o5-0004ko-Dr for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:19 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3f1950f5676so75277875e9.3 for ; Thu, 27 Apr 2023 08:45:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682610314; x=1685202314; 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=5NIko2Gkapa67pYfAhG5iuG1fjGYEcV1kfLWbhJ/29M=; b=R/YfWNF7TxvKeV1Jam9mUpdUzX5F/j8f3yUjjo5v1YTiKoGQLZzgqNO+J5bMlzdgaX KNYx6dzjxxWNl/Vx15ZP4YACRo7lUxJlKyOBlWnmgLlA0QgV1e1E/ivQAgo35chPEcBD 83qMLNRouxUx+uX6+bq0G1HsEIsNXNJiu2mqJY24SawKiUE7eQFX2JHZdibyA3PiW+XP lKEACrJBlGT/zl37JyjtW5TKTtCJN0zwrt+1hnJ8P/24TGdxYANRqaYmbM+AJFbiGSCB kmT2M/QdLlKMWJOagyXLAPHV4KejDecex24vvujwUuPX/bYjsr4Zp0x9Q+rtl6qsZRzs kUxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682610314; x=1685202314; 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=5NIko2Gkapa67pYfAhG5iuG1fjGYEcV1kfLWbhJ/29M=; b=V6/2MFLALYQOVJ8wdD18WPTvUb7GGXPcZyKMnBTW7QXkCR8fManufw+YwrT2vicUy7 RC8NUfG5BmUC+62Dw/PvNue4/Xe9oR1qzhomitnplw5aGQby+Xsa/U5NutBODa9OEPo9 sQ1mZFa9WGg6wb75mKG5hkblGy/1txSRciHag4shs2D8jwhuY3ru5qN3yIBF96j0gH4T L9UuuJ2RA9Vg0B5DxMNKr7nwe80t2rOR7g8ZqcZBpaWbxDl0m9yP6nsUYDLklMFRhbhy z0+ICYElGW63IGhr9Tv2e22CiLtfk+WNvLMyiyRT064VhHkxbp1AlLjJBBmzvM/nM1QZ MDlg== X-Gm-Message-State: AC+VfDypWkfX75mT6ZH49JD3lBuQkbK1WuBJ7PPs6Gnd0I4Ue2ej+6+l EuFmADEIHlQ0A2UrnclXsdwA7Q== X-Received: by 2002:a7b:c4da:0:b0:3f1:8aaa:c212 with SMTP id g26-20020a7bc4da000000b003f18aaac212mr1920110wmk.33.1682610313955; Thu, 27 Apr 2023 08:45:13 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id c10-20020a7bc2aa000000b003f080b2f9f4sm24820201wmk.27.2023.04.27.08.45.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 08:45:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9696D1FFB8; Thu, 27 Apr 2023 16:45:11 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Thomas Huth , =?utf-8?q?C=C3=A9dric_Le_Goater?= , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Peter Maydell , Andrew Jeffery , Joel Stanley , Cleber Rosa , =?utf-8?q?Ph?= =?utf-8?q?ilippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal , qemu-arm@nongnu.org (open list:ASPEED BMCs) Subject: [PULL 09/18] tests/avocado/machine_aspeed: Fix the broken ast2[56]00_evb_sdk tests Date: Thu, 27 Apr 2023 16:45:01 +0100 Message-Id: <20230427154510.1791273-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230427154510.1791273-1-alex.bennee@linaro.org> References: <20230427154510.1791273-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.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 Message-Id: <20230424092249.58552-10-alex.bennee@linaro.org> 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 Thu Apr 27 15:45:02 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: 677519 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp414558wrs; Thu, 27 Apr 2023 08:46:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4p1uGQ7oQwWLj2b8ps00AtiVdPY+GRnOAwOgxOz5TxE5TToArSMXVBCoHVOKekKzvw7UAH X-Received: by 2002:ad4:5dc2:0:b0:5ab:af50:eb34 with SMTP id m2-20020ad45dc2000000b005abaf50eb34mr2674506qvh.12.1682610372500; Thu, 27 Apr 2023 08:46:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682610372; cv=none; d=google.com; s=arc-20160816; b=kvjHkGKqx7WZaoD+tIwCsbj1NV8RUVH1uzgWEenZUqlFIE2GbkMISzCSIIG0zdjIFC LmlYuEvJKibiO2xHqWYJBk9FwK+i6YGhEj0Mhee6mkknrU++/k7cNMK1b52ZlG6KJ5Yu Qwy9VVp+SFn/vr5HJCYkdcY1tE1g5M2OT9TqU0PU/x+nKucV18tA8+D42/5NCEOwyL1q 4esH0NA4HBZAQRkHkQjPOisp3caMj/iVmbrENLERj9/h0IHovHVW1JUZUQgZ6cxe1o9T 0kAalJf1T517wJpgehcK9v1KfyPtZZN9uOSC9W/QsuzgpKkcn9z068LNLAfmIwZMieCQ pqaQ== 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=fpyH5AwC5Qg4YEV6tQjjlqv6VK+Xr7HhmB8/VhCFqAY=; b=GXIilkhBYG0/VBDVYVR7iaNN59b/TqeHboT827aY8wq24Hk4pOjK0ktigCNVkDw7eL nWqd0iI76qJ1zxNUZaxvsfauMId+bH9lXOwnQZjc9V4GHRDl8f8upPH50hN73AauZojh 5jweemfKeqDfIRhtLwtvlfZ2SayHckumc8joD5jm23jmSc2YeqhUeVKl63xgYB/EiGu+ MvP9nNh+Cw8FT2mb9D66eDy/PkHjjjDdpPbAZsu6all6Mto3ux9nR7pQLdLAjoSABgmJ 2DoT5Zy5ZZqfQ9rkHW7gpkCIO4H+7T2lFgnkHqWFeYpPlsNzvLxK7uhuVRSPldHdLc28 fEmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=am5Ud7iP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 3-20020a05621420a300b005f1683e9be7si12034826qvd.515.2023.04.27.08.46.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Apr 2023 08:46: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=am5Ud7iP; 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 1ps3oE-0001sX-07; Thu, 27 Apr 2023 11:45:26 -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 1ps3o7-0001pp-5O for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:19 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ps3o4-0004kc-Cq for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:18 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3f192c23fffso49490515e9.3 for ; Thu, 27 Apr 2023 08:45:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682610314; x=1685202314; 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=fpyH5AwC5Qg4YEV6tQjjlqv6VK+Xr7HhmB8/VhCFqAY=; b=am5Ud7iPip2YUkmI4yUYD0Wt3sv4UYwa6fP1DCHmcV4qxkmRjkh4EOtuK5NNowvYL8 wlgUCcZaEJwawyCUhVoKu/KPl3bIs/yqTqN0DNOX0MxQtz/z5njKGqJlJ3pD+se9c3oP 2ANcK/Nad394Q2UqJ+7NaEqWmehwdOdK5Jix3AB3CzhoDpQpUdmnM95guI8iUYvCIDfj uWKPsZ2DEBGDA0vvNNUN5cAmUdQcf/KLrmZ6z4Q7tr273BRjKnyF3gfFdKdgOLn0SekN CuAb+Z9TtC2Zr2d8fxH9a8OX3z8cKvnBcm/cjTzRWNWmYcSZjy0aFhY6VnpNR1SNPh46 88xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682610314; x=1685202314; 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=fpyH5AwC5Qg4YEV6tQjjlqv6VK+Xr7HhmB8/VhCFqAY=; b=EiRd/D8AoeeSGDA2tw/924/Vy0twMhtr/sXLUCi873eTqqOTd2N9rGlBupkt4koxrT TUXyjlrl96Lrp5N9+NqLQrgz347BrmqFcVo58sxJRZmelieufajaWrlJXhF8C3I/yaqy pr2Vi16KW8WfaO91/r5GGsA1GN9qdQghup1fiJIlnBJA1+Zn+7Y3CPElnspPhEAAIO6b 8xtzh7ZXElW/o0LWjGXziFAu9AD7Gp6WfXWSAg7b57acyECpozxuplZTwtRneNO/T393 qmqkG9TgdiGYE3sy2YVL+b+EZCzvp64M9M92wwLRFbxmMWaoFw21w+gOePnHz6blkVs7 H5NA== X-Gm-Message-State: AC+VfDyBryAmk+RSN3PDDhMibmOoGnQFl7J6x1xp/PfMe3Wa9uXdjvkz U5BYIMVSNUtDwZrZ6PGfXfGhuw== X-Received: by 2002:a7b:cb93:0:b0:3f1:6eaf:daa7 with SMTP id m19-20020a7bcb93000000b003f16eafdaa7mr1834302wmi.10.1682610313734; Thu, 27 Apr 2023 08:45:13 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id r6-20020a05600c458600b003f195d540d9sm17368111wmo.14.2023.04.27.08.45.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 08:45:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id ABAE61FFC1; Thu, 27 Apr 2023 16:45:11 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Thomas Huth , =?utf-8?q?C=C3=A9dric_Le_Goater?= , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= Subject: [PULL 10/18] MAINTAINERS: Cover tests/avocado/machine_aspeed.py Date: Thu, 27 Apr 2023 16:45:02 +0100 Message-Id: <20230427154510.1791273-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230427154510.1791273-1-alex.bennee@linaro.org> References: <20230427154510.1791273-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.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 Message-Id: <20230424092249.58552-11-alex.bennee@linaro.org> diff --git a/MAINTAINERS b/MAINTAINERS index 214124c84c..b22b85bc3a 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 Thu Apr 27 15:45:03 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: 677531 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp416557wrs; Thu, 27 Apr 2023 08:50:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Qs1l8XPizgW8vkcjN7WUtUogA26531l57wsO2386Uidj9C6Cr/rDzX86g/G3GCkZsZnT4 X-Received: by 2002:a05:6214:c48:b0:5ef:8004:e0b0 with SMTP id r8-20020a0562140c4800b005ef8004e0b0mr2783014qvj.17.1682610620900; Thu, 27 Apr 2023 08:50:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682610620; cv=none; d=google.com; s=arc-20160816; b=dntUGwlYtNAqOPL+C7sz8KtvHWJKKlz2XaWxJ8c1JFsQazzhLHNS/FLKu4MxAndgBt QzFzVFDlRlxZMMQQkNQu1kXSbTIOXCENDctvce927+EfrPIwPbO8YJKZyBXi8cjHfJAI txcIXNhO/+VvIpmfPtdWotb0do5xzqO4KyTGVsouGO672nnR9LKbVhDKXfNRHU6GRda3 PAMOS3liwR5FIoIFcX0Qtpm6HMC0regGbgjCcngp3ZCb6UIuUJhYdY++lfMdnt/XTbSl a21HK/pPkAbWAxCw1PcioPc5vzXGEAu14Wlp6Pcbh8dXX7Or6YzQiGBU2mUJYAjsslF/ ir2Q== 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=BZ/8ey82+JXDwq7XVHlAwGozyCogXibvNckafjptj/k=; b=Wr2expjl3HJqLRCHBzgXfHzYFBM11iK5wbNr8CUeo8sF191+WM2WjR3+ntGOXnwxhY T1DRI1sqVUdhEEWKUHgaAtdkQkUtEP+l2RLIobt5zxyVketf8ee1TNVmxTy09lFF6dBZ rpCCFfPsilclMitWumwPr4o83aRxRre1y3+3wdHd8wpcBWvO39xFvtGn7ZGMechvoHlz PzJqE7hHywVdWSjHkHVZh5zVdlnsloc6vAsrWAHEftizM0oNp+RMq95ctoBr/SQRj5C/ bUKcuDGjkOeh21bY3GKewZVswSQhYbpFoO88UDTDkV9wS1s5WGzKngmDXD8hOrd65p5J RL4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PT587HoW; 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 u8-20020a05622a14c800b003e43016c09esi5622200qtx.52.2023.04.27.08.50.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Apr 2023 08:50:20 -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=PT587HoW; 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 1ps3oh-0002RN-RB; Thu, 27 Apr 2023 11:45:55 -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 1ps3oA-0001rA-4f for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:22 -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 1ps3o6-0004ls-RT for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:21 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-2f4214b430aso5481352f8f.0 for ; Thu, 27 Apr 2023 08:45:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682610317; x=1685202317; 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=BZ/8ey82+JXDwq7XVHlAwGozyCogXibvNckafjptj/k=; b=PT587HoWNj6m2phYFQqCQJuNsqTEndmVRQMMh6SH+wMlV3/8KCqV7FRcAP1uK8Md3v il8Y+SKmAtUQeuf0apcn8XHrv3SVw6Cs/dQXV7AdDrk4pNCQLMu8bJYcg9x9bOhX5RjV SuwU3xYfBbNflc8A3gCbQw/MZ6KxD8AUqgd0OXugyZBlfupwYabfLbASH7TpaUihzlLe s3gKAr2HnBNdeucBvVDbwhqw/GlLBO8q4wm84F5vg3YMYBhgxJKVuwb+ok/shHxlCv2P oqImzt9ihs/toj3oqOPPvKm/10nq0BI5Sm0CsbRghrIS4IxYU/FwwAn4TjVOnWMqQNez g+jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682610317; x=1685202317; 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=BZ/8ey82+JXDwq7XVHlAwGozyCogXibvNckafjptj/k=; b=BQjXhwg6GkkBCE7wsWL56sTGReJ5nL6Cxz4f/NTYlPUNBYBuHFIZCrSuflnufoFznt tmzYgDWX1ODW+qKOKlg0uQg1yWMG6wSXjekcQOH9SqaUMGUf7TYMmSCbcDeRcyfxa5fj 7sJg9RvL6KszoLN47kTqhplnyJece6c+wSY9JXaXwGf9QFxh5zHY5h6ftfottdlm5as0 Qz8JHDawtpTFCw1N+IpTCFKuAYYz4PHWxqo3MBunhHpTB4jTuZkYagbm2BsLy6aKLbkb 3oaCh5gO2Aop6k6DM++BQAINy7i6m50a0gfzL6mLsCOCftczySq9JOEOMPeHXJLE3f78 60EQ== X-Gm-Message-State: AC+VfDzjIRa8sSvB3exEgJ2wlEUytY2I/hDQJjJ7yBY6CLifxv+HUbF9 U4gTX0OkZXcqdQAD3M3jtEa4lA== X-Received: by 2002:a5d:460f:0:b0:2d8:47c7:7b50 with SMTP id t15-20020a5d460f000000b002d847c77b50mr1613453wrq.1.1682610317039; Thu, 27 Apr 2023 08:45:17 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id v12-20020adfe28c000000b0030497b3224bsm5707007wri.64.2023.04.27.08.45.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 08:45:16 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C15A81FFB7; Thu, 27 Apr 2023 16:45:11 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Kautuk Consul , Harsh Prateek Bora , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , Cleber Rosa , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 11/18] avocado_qemu/__init__.py: factor out the qemu-img finding Date: Thu, 27 Apr 2023 16:45:03 +0100 Message-Id: <20230427154510.1791273-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230427154510.1791273-1-alex.bennee@linaro.org> References: <20230427154510.1791273-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: 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 Message-Id: <20230424092249.58552-12-alex.bennee@linaro.org> 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 Thu Apr 27 15:45:04 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: 677521 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp414861wrs; Thu, 27 Apr 2023 08:46:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ59JEuXvc0acp+mVt5nCzKaNDUTOYv3wOUaH6CJFD28HUwLsjS63t4vBzwh12yXGWbAYtlb X-Received: by 2002:a05:6214:29e3:b0:5ef:4367:7b18 with SMTP id jv3-20020a05621429e300b005ef43677b18mr2481119qvb.39.1682610400717; Thu, 27 Apr 2023 08:46:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682610400; cv=none; d=google.com; s=arc-20160816; b=yj7mLkhfBz4h6M0ZRg+Tw6w9G+xBOd5+QNoLll81rfNJWJ+cAcx7TdjmEWIzcp/+cx yYoHfE+7JMIRMuHr7OTPkvoJRaNvdorNZwnuuJwOc2c5O8WoTuQEVNg1SqkTGVJzJ55F rwPovwcTIsJpD4tJISsu3vbVwv936pfO3s3t8VEcP8UqhY/AuEUzHTesSZJNCMDLyN/s 8S2Xg3oEwE20HkOzmd0psSnFT/JiAJVRW49Knjar5YYXd1RRnVYY9R2+uVaEU2aVbr+i NTO1KYLlXQRblQ0Nmwcedrsspj/gIyzFuqybxQSLhs4RioT4VzL52zvEdTXrKU5bAPAn CIuw== 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=oa1kZsBc5Tdan51WU2r4Uy35B4rpsLKztYDttyHE2dE=; b=zlwUy9Y2F0bOZiutJy+1d50uXDsww/esXdCBad/G5xaDTlCZZzTFIsXF8kT569gBqf Shzj1XqKdQh/5b5tceK2HyN71bcoVg3hmnTkbh19yEuIJMr3cYHeomasLeZiw9I82QPe kXSBCj1HkkSPl1OtkBLnhjds8wFGd96NI5dR8oXWFox/3HwqCOdS+Ly7HmoLZioGEkSQ WMqSbOttuCWfj0XMblt519IHXxHPkl80EMxRv0tF2ZQcSg3ijBKidP6p3DEt4al5JDg/ 0Cfy+hSZ6QLzLNi7SsW1t5lJQ5qxJM2FbyvIJGv9twE9/xSPt8f+Xn589bFoXz7jqr8i jVqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aUR3iCC2; 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 fn6-20020ad45d66000000b005f160656accsi12365374qvb.273.2023.04.27.08.46.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Apr 2023 08:46:40 -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=aUR3iCC2; 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 1ps3ob-00029R-7w; Thu, 27 Apr 2023 11:45:49 -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 1ps3o9-0001r6-GP for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:22 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ps3o6-0004lo-Al for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:20 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3f193ca059bso49350365e9.3 for ; Thu, 27 Apr 2023 08:45:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682610317; x=1685202317; 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=oa1kZsBc5Tdan51WU2r4Uy35B4rpsLKztYDttyHE2dE=; b=aUR3iCC21rS2lk7U91g3xkZjGsHncZ0+K0lxjIj1SnA9n8tzTJTQIjRtv0gxyUOW9A kFQIDaLsykGkUSw7L9tvClVgWKi+hxjIe28ePdlRGH0zTngMpeDm6LBez38SndaLumw2 xJ0XsjJQujmVOWY8/fG7jzDJQjd6vZyJ/uTb1u/SPDgPOSrIkq2X2I2FWkQ/FXnS9kOm 2l5jdAsv1PL0hamfRIz7O4P5ypHdIzJyzfQuxiv5l0aN87MAl/Csfnes1ACmi9IL6sX6 /ghy3Xqogn9+/cdSipX+VzNAGgTr5fRnyG2Chp8hPOM+0PZM+Wb06+9UrKQbct9z3wer F6Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682610317; x=1685202317; 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=oa1kZsBc5Tdan51WU2r4Uy35B4rpsLKztYDttyHE2dE=; b=WMbD+agK2QqZKNuliYcG+xXDB9IQN/CLEIIZb1CG3XaksiIaPz640dGiRtMrZMFyjM J5BAU93jH6jjBSNfzNU6zex36l8Na9W9yprdWS3Jt4elFzpKJ13a3QSkdeIaSEC+IEII uI2RW00uI4JwY4hOsYS5kEQ2nepx7ahcG9FmP6zx2lfhmmyFeMl7+jAfighEUSvoqR1S ENUBljhgoYP6CHXktbHjJlQjoB5ff3iBkGxql85iQugNHe63UduC0xWQJuxFtweyPIkn +4gxYr6EhHapg+p1TeHYqlkXwmGgJbCA1OvJvqhldY+R5n/H46TlIB/KqDJxM5n27bkV bjVg== X-Gm-Message-State: AC+VfDzqXjo/uJoAzYeNM7MKhKKEOHMVzCMH3izks9bMqtZIf75spzNk 69Kwt88Ab0hy0IuAbNNbY/HTOA== X-Received: by 2002:a1c:7c12:0:b0:3f1:6fba:b69a with SMTP id x18-20020a1c7c12000000b003f16fbab69amr1848532wmc.11.1682610316862; Thu, 27 Apr 2023 08:45:16 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id d3-20020a05600c3ac300b003f19b3d89e9sm15365227wms.33.2023.04.27.08.45.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 08:45:16 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D8EA01FFC2; Thu, 27 Apr 2023 16:45:11 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Kautuk Consul , =?utf-8?q?Alex_Benn=C3=A9e?= , Harsh Prateek Bora , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal , Cleber Rosa Subject: [PULL 12/18] tests/avocado/tuxrun_baselines.py: improve code coverage for ppc64 Date: Thu, 27 Apr 2023 16:45:04 +0100 Message-Id: <20230427154510.1791273-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230427154510.1791273-1-alex.bennee@linaro.org> References: <20230427154510.1791273-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, 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é Signed-off-by: Alex Bennée Message-Id: <20230424041830.1275636-1-kconsul@linux.vnet.ibm.com> Message-Id: <20230424092249.58552-13-alex.bennee@linaro.org> 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 Thu Apr 27 15:45:05 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: 677527 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp415172wrs; Thu, 27 Apr 2023 08:47:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ487P4EveXkMe4sFbDwzZQN5PS041fXwFhio5BgliyWGuY1rds9KwDRWrJps9f+ZBMN1y4r X-Received: by 2002:a05:622a:3:b0:3ef:3fcd:3c1c with SMTP id x3-20020a05622a000300b003ef3fcd3c1cmr3337765qtw.63.1682610435686; Thu, 27 Apr 2023 08:47:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682610435; cv=none; d=google.com; s=arc-20160816; b=duJ5YRIA/pftH8WnLJc3hURgpimfHEJEGq8R1jhYFTI6cRPaysXHEAbOWHsxfIPBHx X2t+D3MQJTPJmTNwlBDB1CrJDlAehzTPCu+s4VzckmoE0tCgbiM7OrhPRzXqbwCzdAa3 PNfqDpqCQ5z3GoVbjjr0kbQiMmCQmk7tRoaIdfp/LljvYShp2irUrHJBfxiS98q+vdLA GPwbqFbyjB33P3baHm6TK25AnShjVbNtP6skVjWV4CUz3VIShc++0VU6NtKw5DYgC55y NgKjvKjngegM/W+hvogj03OfAZ6JQHSssWBYxThKdVc5K1E4uBCT0xkjJGpQJATLLv5e 7NzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=V/edUvbQqbiUFHK/am+hC1zUnk4wPQCAjH6TozCoSbU=; b=RLyWWAvrn7ReJasC4ljr9ejnxebZlfrwAaMAoVN43Gw/uxEndDnkE6S1a6WdfYkAA9 pT1epylpweiAHq50YodhcP6g0gqJar0irDlx11czjQQt4i7AXg8Siy7Sktm6h9Dx80nr aTwZAl3/wrTk7OggR985ovFXSIH5ZhkVij/4r8aMeidiXKCcOXFVMrueIddHBuuQnkIa 06v0fOI44U0/v+IKPKENGj0Qg/KhXuu2FM9C0iNs45EfDVgMwpUyAfIntqCvrmmWZzDt e8q5++LrL+S693Ak5yUyd1wC0lP/LMTB71GHkAOUUwOkXE/Xf2qu0ji2sSsOlbmwWKqG YFtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="iXX/X5Ff"; 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 d195-20020a3768cc000000b0074defcc2b9esi11823578qkc.56.2023.04.27.08.47.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Apr 2023 08:47:15 -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="iXX/X5Ff"; 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 1ps3oj-0002XP-Eh; Thu, 27 Apr 2023 11:45:58 -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 1ps3o9-0001r9-Um for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:22 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ps3o7-0004mf-JZ for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:21 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-3f315735514so29121545e9.1 for ; Thu, 27 Apr 2023 08:45:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682610318; x=1685202318; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=V/edUvbQqbiUFHK/am+hC1zUnk4wPQCAjH6TozCoSbU=; b=iXX/X5FfXVaHdgzyCDbHs1tDE7P1dPGS0IsY0w8fmf0XU+gVbQsbohs0W6COHOOj1M a63wfLm8cOoWT0enNNhGz7PnQSMWhqOWi7L8u6Pj0OZucz4sHe44Mpuw+bXvWn+JsGFz 4upxVAeaXp8KmPt5jwFUSpplB2EYJ04cX3wbSR2MBXk8zED1yIdnZ8PlXTh3xbqaluqR bMVNsWhQY+Y0kzmo7q/fKHd9Yt3EXKJyPqsXimBjVZLp01G5F9UhEmU08yGY4HcOJVIN 7oDy9GpFy94WJhcN08ptTvNwCil0qs9AMGmaN9LNmhKbSpJ7kz2eIIFcr69XfWR8HUSG CplA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682610318; x=1685202318; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=V/edUvbQqbiUFHK/am+hC1zUnk4wPQCAjH6TozCoSbU=; b=TngnmHk1pDLBYZuz/Lk1XX77MLbMTMYGu0Es6jEpF5PrTU8FV7cX/BKSjFpNVNdElJ ineqQ5YB2KrosCD0EZaylUUJzxtZfnfvGyxcDaNMLyQ3mryIMAYmh0stDw9Qxjw8hEOA 3U2lRYWs4n/atiV15gee4wj/gdEOzKTfQk9cpGrrhZLkCE70/XF1FhgTucsQ/DglPGSD 7aFhbeA3iuB/mik8DJLULWaqIFBPDOecMB44qgIUGmTD1woTPW89Xx1+BPklpKUH0RMd LCwDHv0JLh4W1VBnZ5tvmbNmp3Xocc5M6UjcE7F1VxAtt8G0i0QM+j729VK57tWTPy/e 8KtQ== X-Gm-Message-State: AC+VfDxLJ88NNy1dHeyGcD/8RGKC+SHZmFlyCri3YY1UO9BA1aFeWrDw 5+uD4OxOgnMsMH7edXtAEqSPJA== X-Received: by 2002:a5d:564d:0:b0:2fa:88d3:f8b8 with SMTP id j13-20020a5d564d000000b002fa88d3f8b8mr4692268wrw.12.1682610318038; Thu, 27 Apr 2023 08:45:18 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id h3-20020a5d5043000000b002c70ce264bfsm18785046wrt.76.2023.04.27.08.45.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 08:45:16 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1AB4B1FFBA; Thu, 27 Apr 2023 16:45:12 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Peter Maydell , "Edgar E. Iglesias" , Paolo Bonzini , Eduardo Habkost , David Hildenbrand , Ilya Leoshkevich , Bastian Koppelmann , Max Filippov , qemu-arm@nongnu.org (open list:ARM TCG CPUs), qemu-s390x@nongnu.org (open list:S390 TCG CPUs) Subject: [PULL 13/18] tests/tcg: limit the scope of the plugin tests Date: Thu, 27 Apr 2023 16:45:05 +0100 Message-Id: <20230427154510.1791273-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230427154510.1791273-1-alex.bennee@linaro.org> References: <20230427154510.1791273-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x329.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 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: <20230424092249.58552-14-alex.bennee@linaro.org> 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 Thu Apr 27 15:45:06 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: 677530 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp416208wrs; Thu, 27 Apr 2023 08:49:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ41zgpnAnItBqQjkmrhRwL6dpV+FB94ejI/VEDcQHjpAmAdFQVSddf3O9w6/3eXPAwBERT0 X-Received: by 2002:ac8:5a07:0:b0:3e4:e035:b5ae with SMTP id n7-20020ac85a07000000b003e4e035b5aemr11098934qta.25.1682610584655; Thu, 27 Apr 2023 08:49:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682610584; cv=none; d=google.com; s=arc-20160816; b=CcMnrYKZxqLPwf4tp8fLeMIBYCQEyAU03LNeYcriFLwP20zqtb4ZCSq0+poNK03H/B 8REc44uNJtu69kVXjcgEaDpxTqeghydlVcUdONSdODCLhZ/QKt+vAEmTaJ1KD2/77a6O QmLNX7osC3TvOzdapcUBoM3BjoHB704XkA0nRnhzmWcwZ6iGbcuXdzWdKvpF+FvL23l6 Aj7Y8GoBU0/SwyPQjDS9we4FG/mZ8TpTpxwwaZdi/FS8cc8zPgq3dXr0QWsCHjC7cUyA ckcojNmkBJ+EeVCj/ZQkV9tw+HBDF3N1bz3DlqhOwy7s3BYxULqQJfSlwdxu6qEDP3ro jygg== 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=gd3Al4GBqCr5ZtQERTG0wvZGPUvV+r+DB1fF+uG5JLY=; b=vLIOkO9Om/eCeyo8UlfQ3KE1KDVbciRsqyIqY/AWh+RBEKqX/4IG5PkKFn/0aC/28t bcxgNeyv69EDFCpLHZc563GOvxmmdr4ztSyGRCFzEy9VgLX3zCpL4AfYoonJOY8oKgwp PLAjl1wK6lQfCvYVHdVDPQNQG6DtxQ+dwVKSBMgO2aPMFBMo4gUDNdaBaD1+fvIu+RSl TcMCgznCUfQK9g38VPdQTqi5bgcMxg0sc+F/l0n6nppycZmcnovS7zn9bA3dxELSVpuI QXcDx8oKi3CuKdrMQx8F2vEFddXKm+EURzMsx+tPFLZXS4GuDxoHpd8yFWubC61qQPrG ttKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q3sJqljF; 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 l9-20020a05620a28c900b0074df6bec9f9si13092153qkp.169.2023.04.27.08.49.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Apr 2023 08:49:44 -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=Q3sJqljF; 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 1ps3ol-0002aB-KD; Thu, 27 Apr 2023 11:45:59 -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 1ps3oD-0001sZ-EQ for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:25 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ps3o7-0004lv-Vg for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:45:25 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-3047ff3269aso3163153f8f.0 for ; Thu, 27 Apr 2023 08:45:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682610317; x=1685202317; 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=gd3Al4GBqCr5ZtQERTG0wvZGPUvV+r+DB1fF+uG5JLY=; b=Q3sJqljFJVOyMUOPUZPzxWFAJdUgkOAHkfiU2M+EERCzRytsuM/lpB/tKcLPZc8c7I SuX0dx7mo2X0PujEu0pVlQnncx2A8ypYaZARqRoNJ/voYYGd93sz5Eh0qBMFqUuGcSvH CE26nWmupoxSBChLwMw+9bqMWX04gSjEF/0EX6c3lE0Yg7QQCeIz4gPqteyjZNl5iA9N vmYtNSAwED3hYML0rQhLLE8dee8TbbHIKHoI1xLYDo6kt55cQ37wA79GNa1u6dMBrH6K vbIsLEgVKzmyObkIwPmdXUg/uwGPaHy9CAhRBKsfY2upNzn9vm585gKUUmjDIc3DBjFo b6aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682610317; x=1685202317; 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=gd3Al4GBqCr5ZtQERTG0wvZGPUvV+r+DB1fF+uG5JLY=; b=Cu1EbDddjhhUfxfQjYhIv7tBd7Melaobn5sV2wjMbqiwiREOHarRxr1G5BzIt33P5u 0aj1XeXVycUR3pIO9EEkkZKJiApHafYrE990yureF5Tceu+AkeMi0TjwiQv4ZeIr/lhL 6HCQFy8flPOTtKaT93n16XbloxgSjfaMvZDXqY8xnp9Nwi4l5dlW9ryV9R7VB6LSzaZl yaYfZ+4a2Sh4bm2ylew5u5uXXcJGm5yOa5Ujwj1OgOXgrJBTCae9fUFgTprbxnXUN5lq GSE+fBVvRaIqmG6wrmtpe3ne0Z2oT4OhMzLQtZESW0J6QMVGJdHWSCFuG76tcT5OmYiO s30Q== X-Gm-Message-State: AC+VfDyfW9N+GQSXBcKQSKi7wl/lamNbc9uZxYwsfZuGubPxQFDQ4kAU SJ600V9xRLOHwMBcKquwp7UICA== X-Received: by 2002:adf:f7c1:0:b0:2f5:5d74:4f9f with SMTP id a1-20020adff7c1000000b002f55d744f9fmr1706289wrq.11.1682610317228; Thu, 27 Apr 2023 08:45:17 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id l14-20020a7bc44e000000b003f195d2f1a9sm17205876wmi.15.2023.04.27.08.45.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 08:45:16 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 31D231FFC3; Thu, 27 Apr 2023 16:45:12 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Yohei Kojima , Juan Quintela , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PULL 14/18] qemu-options.hx: Update descriptions of memory options for NUMA node Date: Thu, 27 Apr 2023 16:45:06 +0100 Message-Id: <20230427154510.1791273-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230427154510.1791273-1-alex.bennee@linaro.org> References: <20230427154510.1791273-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, 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: 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 [AJB: fix documentation in commit message] Signed-off-by: Alex Bennée Message-Id: <20230424092249.58552-15-alex.bennee@linaro.org> 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 Thu Apr 27 15:45:07 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: 677533 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp418611wrs; Thu, 27 Apr 2023 08:55:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4hfMvaqUVwuQ/ZsCKDEfWywNnQjDvudlRqWGw7ur3OgBL7jIGKVdvwUu0fqb2mUz+YB/m9 X-Received: by 2002:ac8:5e4c:0:b0:3d9:45a4:e7b9 with SMTP id i12-20020ac85e4c000000b003d945a4e7b9mr2957370qtx.45.1682610920835; Thu, 27 Apr 2023 08:55:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682610920; cv=none; d=google.com; s=arc-20160816; b=ATjE/fNkOfL8/Or7kUojBlqNl6YWW5NQ/3G9F3LOnl1vz/MonXm7Gjx2nJ/qHJ1+Bo oDec9OofkFye8BxtOMumOGJlRfRj9zL5v0/GAc1qi8wlRV/tDToEcugMNzI82JaC6Q3g NmSms/Pn4Pjhav46uW6+3Hp8lucwjepb+53Gz2uvdye5fT04E1y1mmRnM+FivM7pIAqp O/EHpVNc9QB7sGLFUGInEd5CJF1LdtiqYqkBDgw9TEmJ4DsHAY5sYGEylFB6CQxn269D /A8E/3jGmhahVdln8Sa/909ZBi8aCBxOAPEZ1TqHdbhqcNIZm3nIE8j1pX8xuhvO5IsT yxRQ== 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=irb8Kevpl1FBY/VezS2GPdCbSf2KjxNFns8nRQw9WcE=; b=zbHWrvYviMtxwW0L3zCnmrJcTQLaDI62wCPC49PRQ3DeyyShyMICy+F4wxgkOLYqWk MySjuRwswawe6rOuTghTZhnMYHFP6fJRphKVummdQzkGjhxySAD92lOAqXGEwaSEVpNi idwQLmry6B0tSuv+VNuQZ9eZLe1ITa6qQwl0HmjhNlWDWhk8z70xvNEHHATOxdoj4vr9 2kHHrvWkIFZpOcHl6MY+xQxv4FKcK3Dng8B2ALAN4mAEEkjTesYC8SdS6T0ookRiv8+P aWf7W4rd68SHcYO0zDi8UmPTiCrHPavAkEsmytPuRdD4B+tWb+p1I86KI/DNZNEmmGbw x9QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=knXVkGyS; 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 y18-20020a05622a005200b003f200130580si348624qtw.554.2023.04.27.08.55.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Apr 2023 08:55:20 -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=knXVkGyS; 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 1ps3ww-0007n0-NR; Thu, 27 Apr 2023 11:54:26 -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 1ps3wv-0007mB-4j for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:54:25 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ps3wt-0006mB-2c for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:54:24 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3f192c23fffso49572635e9.3 for ; Thu, 27 Apr 2023 08:54:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682610860; x=1685202860; 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=irb8Kevpl1FBY/VezS2GPdCbSf2KjxNFns8nRQw9WcE=; b=knXVkGySuY/O5OB1hAzAPAa2ryHGcBq1/92oHPakDX97G7LIQfQ07BUCRIGGiyCUAN W7LepqQxA/PhMAbNm7A7/eL6JvgvVqwGaTxvd/7iOYW8UQr3Oi9ExGOIDNRLCH29ib3N g7uiQaDVJ3XkYgPGtJMT9RNhmfV+ft031szoFFpw+oBPINVnRMuZGu3cJl2MeANJR8rM E/wl59AjihmPpVKajTWke+UC4S01gZBZpjJOOYMYiWLwD967YikbxXa/IUtF8HlSAMB4 7LRaESlydyHr6YNvDxOU2T/cFGvwEEzPdxiONa73z0gOSKo5N6FdM9UTEYTymgVTRqKe SxdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682610860; x=1685202860; 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=irb8Kevpl1FBY/VezS2GPdCbSf2KjxNFns8nRQw9WcE=; b=TC9i0uLOq1PP/9z+9kkoNgwUkPPUlxqYgLxuUyUWetOqVCtr5+kjUwh1X9G4FYPXez QZ1lfDEC3S8ygPd8E5df2izM2erGMKFTtDndJM6KadYg6E2ica7c7/4qYdgK2LDvtioO 8gNo20qjfAqaf0SVEKuki2rj1vYJHyrMbzLAdMFpLwmYK54Guo1CR86ydcMZbMsd3C+G ErHE+YDCy6F4LwoIVxo0ip8h3CFjvky6nYHX83LaK905GPp6SBxe4kWBVBJiMO61MrGV Ac2PjSyw8fyqchZ8wvZgUGsc1GpkC1l8afmrjniN1q/J4Y4e00btboK8riZMfnbVJMd4 6ahg== X-Gm-Message-State: AC+VfDxhlaL8T5HD+OdQV47YTYeAVJEn+/Zdz/oVpf9B2jXJYYvI6iYm PV1CM6CP4tyrsf3RGq86txFCMA== X-Received: by 2002:a05:600c:b54:b0:3f0:a785:f0e0 with SMTP id k20-20020a05600c0b5400b003f0a785f0e0mr1852527wmr.40.1682610860614; Thu, 27 Apr 2023 08:54:20 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id m7-20020adfe0c7000000b003048477729asm8766724wri.81.2023.04.27.08.54.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 08:54:20 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 46B8E1FFC4; Thu, 27 Apr 2023 16:45:12 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Juan Quintela , Thomas Huth Subject: [PULL 15/18] docs/system: remove excessive punctuation from guest-loader docs Date: Thu, 27 Apr 2023 16:45:07 +0100 Message-Id: <20230427154510.1791273-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230427154510.1791273-1-alex.bennee@linaro.org> References: <20230427154510.1791273-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.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 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: <20230424092249.58552-16-alex.bennee@linaro.org> 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 Thu Apr 27 15:45:08 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: 677532 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp418613wrs; Thu, 27 Apr 2023 08:55:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Rhw4OylVg8CkR6GePNLuXeLYKR2jCdxr2PIugfCOa+sW1G+nScXrqS2KyhMPnraYuP4tC X-Received: by 2002:ad4:5748:0:b0:616:4da9:9ade with SMTP id q8-20020ad45748000000b006164da99ademr2831264qvx.42.1682610920833; Thu, 27 Apr 2023 08:55:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682610920; cv=none; d=google.com; s=arc-20160816; b=ZWqucq6krZ81CbcUSBPEvsJH1M6CX5M6m3S9CDSa+1XFxTANwAAnLLcQiVzGDpxN73 jCN+V+/ryevQ4SHwAmcIUEGaVDdqbOC2fQgComoLiky7U/ahLF1aTsULYo3AmOD0NZ/O rdjzG7j/r/6KkEaMOV9KJY1JOa/68ombSMbG6KFnLi4Vxt90N6AYjufsl7uSQ8vPXyOu /4Pu2eDkdQV9rmY2t6nGN5Wx94UasPFjSsoBcYlIZByhfTXsKJ8+gpjRro+0dE/FVrem YRYEk5OtB7P85nypT3VemA6t58kkgCFFii8wat4Bm+yWP7Qu+R9Gq6uDL20OR+mpSWJ9 zxHQ== 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=V2IcmnDRTfsJw8B/y7QWIsoARNTmJ+ae9LSsjB/DsJA=; b=i3WQEddKPmzwUFr1MfYJ2TqLO2uXrHieU+oA9uRn7XHD8H6dmabsXiFwgo8cAyZd+U LJfMDp1qA53MsvjfTvb8aukVgLGFvvwa0qdhlvXguDQL6I5fISzvCb2KzSFNazI2efKJ I3BXsJrahV2lumnCTPnOPxIrUMFnvJGwI4V5xp1ykr4X91jumfbD4zFGraucWJhqZRgm XS0h92AmcN0oGKa6yZvmtE67JyvX5PmzhPuZPGek8gFUax+mpRbaI9q81ZUMarb0ZCb1 8d1oKcie0QgCQCJbH+TsprZ5vhH+Ae3JT+3xDEg8u86yuQQiGME49zhok2WxLO8Lq+p+ SlOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T54RLeVP; 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 jf5-20020a0562142a4500b005f16b22c150si12299743qvb.172.2023.04.27.08.55.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Apr 2023 08:55:20 -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=T54RLeVP; 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 1ps3wv-0007mM-Et; Thu, 27 Apr 2023 11:54:25 -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 1ps3wu-0007lv-5D for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:54:24 -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 1ps3ws-0006mG-FA for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:54:23 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f315735514so29465495e9.1 for ; Thu, 27 Apr 2023 08:54:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682610861; x=1685202861; 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=V2IcmnDRTfsJw8B/y7QWIsoARNTmJ+ae9LSsjB/DsJA=; b=T54RLeVP8lSUZPkyiIxzY6nJJDW3uihdsUps3EkpTGKw029mj5KgJvBAMY5hJiOK9G 9lrOfeUW8MqtqiHQNleEYKU26ptIv2Aaf0bY14R9RlgmhlXCoQCSoCrM5tK3+grmSpvv J/aKUD7NLnfXb0jfWvWGnP1GcaFFkDEsMl4qbyCGwdjGHWXJY23ukmgGJgAEIbOmOBWO j9IluvjCEo3melLVhAXGNVH+Tjaxs7ZRwlzpaQh5Hbd3Sfzk85uhtYj3ZaehkQhgngbA zAzAL05J5PXjQZBFnR9rlw4JTsYU2K6CJASWNx+zscKcBdL04rjPS6H+DecJGDR2RUog +42w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682610861; x=1685202861; 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=V2IcmnDRTfsJw8B/y7QWIsoARNTmJ+ae9LSsjB/DsJA=; b=HR6a3DviC+js0ERsIL24SXMZ3b/6B0dp2aVEDwL7p9d1zq7SUbQDRE2zLlm3Qnbse2 uMGqMHW8YvWFZyeHmX1IBTS73y+orbwUp0DiNXDmI5X79DeJkim7rIRdrvtSFje7yVLG 3j7ugXJfQqfafzUfiwOvW22fxwJJFakjeXusg9OBHeMlWf4QAnWzas+XVoSUbo5e60oS soon7XsS0s0FpU0ZkkI0MOlRbdXOXVld39SK1wOvQT42Cy+JuRtjRf+fIRsupjX10/Qb hWdKguvrpzydHconLB+3ZBJvVHfanps+7RhtzMDIGRenNDbYgmdN/mBkk26CD/DBnjRT qCkQ== X-Gm-Message-State: AC+VfDy6AeQp30H0cAtp2mba5vGAsxYCZ7NqVdZGJONYRsKg/pEpf+rI Zd4j5SJjYSbjVDqbqSadg91NGq9r4X7+kneyvDY= X-Received: by 2002:a05:600c:916:b0:3f1:7371:86bb with SMTP id m22-20020a05600c091600b003f1737186bbmr4278089wmp.20.1682610860985; Thu, 27 Apr 2023 08:54:20 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id w23-20020a05600c099700b003f17af4c4e0sm24937769wmp.9.2023.04.27.08.54.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 08:54:20 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5E7F81FFC5; Thu, 27 Apr 2023 16:45:12 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Juan Quintela , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 16/18] docs/devel: make a statement about includes Date: Thu, 27 Apr 2023 16:45:08 +0100 Message-Id: <20230427154510.1791273-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230427154510.1791273-1-alex.bennee@linaro.org> References: <20230427154510.1791273-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 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: <20230424092249.58552-17-alex.bennee@linaro.org> 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 Thu Apr 27 15:45:09 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: 677535 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp418876wrs; Thu, 27 Apr 2023 08:55:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4DQ7zFKFcXv0p0rke1lM5PHcP3SQ7oU/t5ClpVUpTwG5UzE6tvKHz6xj6HpdNOKasKGy07 X-Received: by 2002:a05:6214:21e4:b0:5fa:8692:3882 with SMTP id p4-20020a05621421e400b005fa86923882mr2741687qvj.16.1682610950796; Thu, 27 Apr 2023 08:55:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682610950; cv=none; d=google.com; s=arc-20160816; b=johg3dAXOrGNlXo6cRLedxB/zktM5v1ueendKJ9vin+VdI4wwOcaIbHpQHB2TsmnJs LA9rc86woRlnuEmpFWN7w+j8jMc8zd3xrumK6wn/qhFcj/WKawoq83eliT3pUaydXBpO SKbXx0KCQ84rcSC+CrFdkS10omx2KICicaooGJrYdWOxtr+tQBfrjrj1Z37wl7CGM4Kh EtpiEfnOuL1Vat1LLYP9r7ZpwAdQx1+uNiz0n+u4Rb1bv9Goen0u37bGFA7ZMx2m1+3E liTN1/PJTs9KJW6MftEVm5VMfcOibbDPUGlDya7WaKYLlov914LB4+1cfb8C3WprsWWH cOMA== 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=1P7UU9XkAh8MdcejAHOkstfLQyMrAhkzu8fMbugyBnE=; b=VwZvpryVp/8hECrUaIhPx2GmIWtzMy5AF5CvpCR5gYXIRwUovZgCcInoV3FWJ1Bl9M S4aOB4Z05umAnEvVbWpdKeoceQhHfTxieaiFdNZp3qzE2eXusb+OBb2B6MUYoaePTf3L cOonSU/xfrJLilWidXovxvEH9y8OZn5MDPCGGVgs5C9iXoJ+47+k2DEwZsEXfHsBlR7X z0ud9KLzLwms88MGzeubreC3VAAKqclQ2J2x32P2eFgEsvlp+1P/lt7fN1Ybv4LWVh3n 5fnfsOyT9m2WIuFObUAHQWzS+3WRU3DcgButO5bdNlL46eyMtHqyifHHIoU/b3q1/rDd /++w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kW8ScI7x; 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 s13-20020a0562140cad00b005ef5fcb69fdsi12552160qvs.165.2023.04.27.08.55.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Apr 2023 08:55:50 -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=kW8ScI7x; 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 1ps3wx-0007nF-6O; Thu, 27 Apr 2023 11:54:27 -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 1ps3wv-0007mN-DM for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:54:25 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ps3wt-0006mR-Eg for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:54:25 -0400 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-2f6401ce8f8so5479872f8f.3 for ; Thu, 27 Apr 2023 08:54:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682610862; x=1685202862; 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=1P7UU9XkAh8MdcejAHOkstfLQyMrAhkzu8fMbugyBnE=; b=kW8ScI7xAfNER6iqVf7fVc+1LbkT51PgGlYlsGIQ5GaQInLbJMqq2uZQxjWBwfAVdb GL53Tzdk38EGAZEUPjmH1HkAy+ek8NExEN81rkZUyC0ACZUYKogy3z+ZL0j5iTUbK91G O4h6qcHENOsbVFAJHGyNn2B+acDotwbgC5aP2JJF/EAU3yivgpK5bURSs4LU9BHG9LIo yemfpLyLc9Efw8kfVjv3RRhljCuX7GnUJwOLqLgmOFM7izSvqd3oRDsUbcn9V5Ocai6G oG0arE1mpAhnGlYYPrwMZg55gqv66Je+/ioUZ4T7G2vnXdB25lj6gzKRg9psxUY60qXf PrTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682610862; x=1685202862; 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=1P7UU9XkAh8MdcejAHOkstfLQyMrAhkzu8fMbugyBnE=; b=aVRTwCHfMwffmnyltmbDfCvqZXhzHIH4SFRJxGDLGevAZw8UCydTrN2Wrn5TiA7Ykk CL7cm10WaloOAAQE89hALOQaIkrO2lxPUNtN8C7E9PX9eONisbULicBvcGSJ3Or+zPFg mlQC4DAL6uOWFqquM6DSwEEKp04KcfKqnnGAHP36LPwc/CjjYvjuGZA98yAVzJebtvTM s04n2mJ/CY+8u/hbE36uwf6WC9MidefiPFZVkV95IKA7KRiWCArrcGD3/Vaxs0XTtXMx QhKK43dZFhuy52qrrv2yRIH89Ek6y3e06/tAdIh2+vdClFJgYBxBUS53htvKksc3tVWP veLg== X-Gm-Message-State: AC+VfDyk5EXLFJw6+B7wqq+BKoWLxi+CDX+XN69CaVAQXLcCc7ev6hX2 mnBCf+zYPRUoddOKIQquW9jilw== X-Received: by 2002:a5d:438c:0:b0:304:6963:561f with SMTP id i12-20020a5d438c000000b003046963561fmr1586298wrq.58.1682610861918; Thu, 27 Apr 2023 08:54:21 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id c10-20020a7bc2aa000000b003f080b2f9f4sm24841577wmk.27.2023.04.27.08.54.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 08:54:20 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 76E891FFC6; Thu, 27 Apr 2023 16:45:12 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Juan Quintela , Mark Cave-Ayland , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , Thomas Huth , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 17/18] docs/devel: mention the spacing requirement for QOM Date: Thu, 27 Apr 2023 16:45:09 +0100 Message-Id: <20230427154510.1791273-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230427154510.1791273-1-alex.bennee@linaro.org> References: <20230427154510.1791273-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.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 Reviewed-by: Juan Quintela Reviewed-by: Mark Cave-Ayland Message-Id: <20230424092249.58552-18-alex.bennee@linaro.org> 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..ac2ce42a2f 100644 --- a/docs/devel/style.rst +++ b/docs/devel/style.rst @@ -628,6 +628,43 @@ are still some caveats to beware of QEMU Specific Idioms ******************** +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 Thu Apr 27 15:45:10 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: 677534 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp418684wrs; Thu, 27 Apr 2023 08:55:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5GEvRCwJXKKNYQFsMSBC5XCAydckbBImCXtP1qe0I0Wducljxd3nT1wxc7ebQTMuYiglkT X-Received: by 2002:ac8:4e51:0:b0:3f1:f5c0:fe3e with SMTP id e17-20020ac84e51000000b003f1f5c0fe3emr3587256qtw.26.1682610931096; Thu, 27 Apr 2023 08:55:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682610931; cv=none; d=google.com; s=arc-20160816; b=LV82K5xP5cMeIMn7dYfjdfWtd9C6oF7s4DAw08CksebPchO3gnvYX+oAEmA+gUKgnl sEsNZT361nVqtOgPxicXE/iGUtGElmSQvQQBzy2yNS0TFhVGuFz/YReUmRREhuW+JEOL uVIUZbmYjQxT2Udx03W40hOXaMLkhDZSFtSHFUFkZmpi+JHPSqyL5j2l1W4QizFuknGc i/booB3IRuNM8/n5H5Ro9U+T3Y/+oFWDzZ9+gOR7IjNhrqLXXKQqy8HGsu+vrnZEeqkv 6xO9orPqmIqpnbgEPTNaHKTNvcJ8g8/uj14HaTF0KPLs2tKHMHhNGoG7z7ObO/gXM1qh 3JBw== 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=Ce0cdJ9i1NfBLh1+Cb1T4HPYjQLrv+NJRBLrnGH/7bo=; b=OsOT1Wdlhqgl6oNs4AxE1SfwU7Ho6Ot4uxkIcDzaPUeZkoIZ07Tv5BWnIEgndRurNW +oOpVaFogyBDhav9xYgfGPkF5tBbVx2UaqLV8+a+X+YFVb1LCm2E8Kqt00nsfbHGT4Zs ILCKrc9cxAC3X+fksyxBRZvyb5hK+wvC08fUf+43ZWCFzNO+GIrYe6DYHfI/YbjVRs8l s0H2fC/CFeaZglOXbbVeCjQ41ko6pykgyEYIgqilbsGGrdHORvGVSjHP1zcqO7Qd/ebJ nXOX9+iDAxYiInzkkD82lrMQlCLok2JWIJSjrsltJoj50aHCjFJYHdTud+0nFKn9xLip cvRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sqP16VpK; 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 r4-20020ae9d604000000b007468f1dec63si11948570qkk.571.2023.04.27.08.55.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Apr 2023 08:55: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=sqP16VpK; 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 1ps3wx-0007nc-I5; Thu, 27 Apr 2023 11:54:27 -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 1ps3wv-0007mC-7X for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:54:25 -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 1ps3wt-0006mE-58 for qemu-devel@nongnu.org; Thu, 27 Apr 2023 11:54:24 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-2febac9cacdso5384333f8f.1 for ; Thu, 27 Apr 2023 08:54:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682610861; x=1685202861; 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=Ce0cdJ9i1NfBLh1+Cb1T4HPYjQLrv+NJRBLrnGH/7bo=; b=sqP16VpKZOgf/EXdW4ghzExsmDZrjiEQEUpIASL4UhPilg8U9IiNGhdOtzAiQ6D/BS mhPWxIDCcqQU46Ct/SCXUHlkuPuREOIY3TuJobbsByj89fhUQGqOQ9s1BmnDh9XnWB/a 7zo8fYv9N4cZbD1Td5jysdkXJDmNpJlZ4Bv0tij7DOFZyfWbd40xlcRtF6TrU+ruqlzS 89JxOKmh3SgvaeTWPVh5FAtZ9Slqs9dnt2UDl7Syw2D0G29n3xZO+jy1CLvlUd3Y/9sa dh2xLgD0WdIDXQBgNWZl09sBHRvzwnMPzbj0msQndDud/ki4c2sTWq/9r8CIb9PCnEdT MauQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682610861; x=1685202861; 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=Ce0cdJ9i1NfBLh1+Cb1T4HPYjQLrv+NJRBLrnGH/7bo=; b=ekvfIL7D4mCFtK1fONgDbwLknsI7GsiB+mftg0wSyQtpn9eRhCy+YRzJjLwRBX4Rza 89lUD3B90mGZVB5zHWeCrl5/QVKaqEh9VtIccRb05lK0iiQlodah3UPgXG82HnOTI2bC Gg3bDTXPbEw1oBv+Rz+CoBBwkGlq1TNKd+pKSpca3ZSgMGgIeWfSZ+DUVV7E6/5mNVEf x03MWv5i7L9UmGZJ9USfcSx/dYvN9VtRU1lBffCCuIynQo4QKDvqPAI9Lc5mvgXPOBGd W8swxbZ7tW/OrY8I6PLRQbUP6REtLmcIrI2PgaXZXA5up8nllDSY4Bro+yYNrj1+1iBd JKPg== X-Gm-Message-State: AC+VfDyCc/5eyNOR3KTLNEitXezUcky5s9vEcyHskaqNzuBqnT66ibfA Nj7gcHBRg/RWoJr9P6VfF85IXQ== X-Received: by 2002:a5d:4d4a:0:b0:2f9:5841:a4d4 with SMTP id a10-20020a5d4d4a000000b002f95841a4d4mr1827847wru.27.1682610860790; Thu, 27 Apr 2023 08:54:20 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id j14-20020adfea4e000000b002fc3d8c134bsm18943318wrn.74.2023.04.27.08.54.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 08:54:20 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8D2461FFC7; Thu, 27 Apr 2023 16:45:12 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Juan Quintela , Vladimir Sementsov-Ogievskiy , =?utf-8?q?Daniel_?= =?utf-8?q?P=2E_Berrang=C3=A9?= , Thomas Huth , Markus Armbruster Subject: [PULL 18/18] docs/style: call out the use of GUARD macros Date: Thu, 27 Apr 2023 16:45:10 +0100 Message-Id: <20230427154510.1791273-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230427154510.1791273-1-alex.bennee@linaro.org> References: <20230427154510.1791273-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 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: <20230424092249.58552-19-alex.bennee@linaro.org> diff --git a/docs/devel/style.rst b/docs/devel/style.rst index ac2ce42a2f..aa5e083ff8 100644 --- a/docs/devel/style.rst +++ b/docs/devel/style.rst @@ -665,6 +665,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 ============================