From nobody Sat May 11 14:14:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1682610352; cv=none; d=zohomail.com; s=zohoarc; b=ZL1L8TIMKC1S1dLs+RdXHxJZc5o0/OCZzNrd8RL2Qk1id9qs8dwaaZpQdH3v0UCyLIXecF78Zi9gcQBKJMrwhPzi6oBNOKvzhgPk6NhJok0GfbQBChDgBC5s5jW1f1yF++6IGLcXxR1Qs1cm4t95fZE1TCSkf+49H/asteE1VrQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682610352; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8/qtbypS+zMfBjvyTpm1Br1Ca+O9tkkfRjWzVGRifNU=; b=WvItH1s3PL9l/2wCf1cQZOL3MEroI5DGl9GL3yKmMiRBiZsl3nNrYrSJ9MgT+xHZ71fEJ76zwz1BgTQWa1fDott32xc4Us08iBdYPQbdWLBYdCx7VyLugkFJVasWzCEuwM+KIHsQj9A4ghMc+eT9BTTWkAOGyCXgNX67+IrP+pA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1682610352521460.2836349648055; Thu, 27 Apr 2023 08:45:52 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: ACHHUZ6XLsz7zoHD9KgDw1TYsps4HfZpH9McH6eeKgUXvESyatVrkpOiM/BmdFZMxNWd8NGWpjjN2w== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Kautuk Consul , Hariharan T S , Thomas Huth , =?UTF-8?q?Alex=20Benn=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1682610353280100003 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=C3=A9e 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)) =20 +JOBS_OPTION=3D$(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=3D$(AVOCADO_SHOW) run --job-results-dir=3D$(TESTS_RESUL= TS_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=3D$(AVOCADO_SHOW) run --job-results-dir=3D$(TESTS_RESUL= TS_DIR) \ + $(if $(AVOCADO_TAGS),, \ + --filter-by-tags-include-empty \ + --filter-by-tags-include-empty-key) \ + --max-parallel-tasks $(JOBS_OPTION:-j%=3D%) \ + $(AVOCADO_CMDLINE_TAGS) \ + $(if $(GITLAB_CI),,--failfast) $(AVOCADO_TESTS), \ "AVOCADO", "tests/avocado") =20 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=3D=3D88.1 +avocado-framework=3D=3D101.0 pycdlib=3D=3D1.11.0 --=20 2.39.2 From nobody Sat May 11 14:14:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1682610471; cv=none; d=zohomail.com; s=zohoarc; b=asVMvJOGNWjw1c6+D+dFqdzKhvEE8hSzt5nqN9gc75oSVgpsPAYHgJRm1x2VQUewcaaOU/rm/DO21x0Lu1VtaTun2wXZhtWEHgm427SRHVqDwLDUmr3heZhnVIDL989nw1loJXcssJXJRkGHpj3JlXZxO6TdzBTBeicyKhZGdUA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682610471; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Wgoxuz1ScUhHkzTThSzzMJt+lGCLt4B0IMA+ZNFLE5U=; b=cSSTDeF0fDIJ/hDfhqetR9oNqoctifgkP/bQnMwJxZWRs5nzPh2pYAJtq9MVPlxfuYQeh31AN/ds0ljGS+ghQkTC6sLw+E2ZGl2u43Y/2Co+HEqGNUrzNkHjmmg5XRpnDMYw8/OKAnAMvqUMe3HHn7VYsnkWmczihKbkY272T5c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1682610471280632.7909476445788; Thu, 27 Apr 2023 08:47:51 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: ACHHUZ6SBm3nCyCucBBCTDKxWU+aGBnLtVXBar5/vI4SwKwRZNOT7tH5gph4E3Poz94kkZ8iG88lKg== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1682610472579100003 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=C3=A9e 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_basel= ines.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= =3DNone): failure_message=3D'Kernel panic - not syn= cing', vm=3Dvm) =20 - def fetch_tuxrun_assets(self, dt=3DNone): + def fetch_tuxrun_assets(self, csums=3DNone, dt=3DNone): """ Fetch the TuxBoot assets. They are stored in a standard way so we use the per-test tags to fetch details. """ - base_url =3D f"https://storage.tuxboot.com/{self.tuxboot}/" - kernel_image =3D self.fetch_asset(base_url + self.image) - disk_image_zst =3D self.fetch_asset(base_url + "rootfs.ext4.zst") + base_url =3D f"https://storage.tuxboot.com/20230331/{self.tuxboot}= /" + + # empty hash if we weren't passed one + csums =3D {} if csums is None else csums + ksum =3D csums.get(self.image, None) + isum =3D csums.get("rootfs.ext4.zst", None) + + kernel_image =3D self.fetch_asset(base_url + self.image, + asset_hash =3D ksum, + algorithm =3D "sha256") + disk_image_zst =3D self.fetch_asset(base_url + "rootfs.ext4.zst", + asset_hash =3D isum, + algorithm =3D "sha256") =20 cmd =3D f"{self.zstd} -d {disk_image_zst} -o {self.workdir}/rootfs= .ext4" process.run(cmd) =20 if dt: - dtb =3D self.fetch_asset(base_url + dt) + dsum =3D csums.get(dt, None) + dtb =3D self.fetch_asset(base_url + dt, + asset_hash =3D dsum, + algorithm =3D "sha256") else: dtb =3D None =20 @@ -149,7 +162,9 @@ def run_tuxtest_tests(self, haltmsg): else: self.vm.wait() =20 - def common_tuxrun(self, dt=3DNone, + def common_tuxrun(self, + csums=3DNone, + dt=3DNone, drive=3D"virtio-blk-device", haltmsg=3D"reboot: System halted", console_index=3D0): @@ -158,7 +173,7 @@ def common_tuxrun(self, dt=3DNone, special with the command line we can process most things using the tag metadata. """ - (kernel, disk, dtb) =3D self.fetch_tuxrun_assets(dt) + (kernel, disk, dtb) =3D self.fetch_tuxrun_assets(csums, dt) =20 self.prepare_run(kernel, disk, drive, dtb, console_index) self.vm.launch() @@ -182,7 +197,11 @@ def test_arm64(self): :avocado: tags=3Dconsole:ttyAMA0 :avocado: tags=3Dshutdown:nowait """ - self.common_tuxrun() + sums =3D {"Image" : + "ce95a7101a5fecebe0fe630deee6bd97b32ba41bc8754090e9ad8961e= a8674c7", + "rootfs.ext4.zst" : + "bbd5ed4b9c7d3f4ca19ba71a323a843c6b585e880115df3b7765769db= d9dd061"} + self.common_tuxrun(csums=3Dsums) =20 def test_arm64be(self): """ @@ -194,7 +213,11 @@ def test_arm64be(self): :avocado: tags=3Dconsole:ttyAMA0 :avocado: tags=3Dshutdown:nowait """ - self.common_tuxrun() + sums =3D { "Image" : + "e0df4425eb2cd9ea9a283e808037f805641c65d8fcecc8f6407d8f4f= 339561b4", + "rootfs.ext4.zst" : + "e6ffd8813c8a335bc15728f2835f90539c84be7f8f5f691a8b01451b= 47fb4bd7"} + self.common_tuxrun(csums=3Dsums) =20 def test_armv5(self): """ @@ -206,7 +229,15 @@ def test_armv5(self): :avocado: tags=3Dconsole:ttyAMA0 :avocado: tags=3Dshutdown:nowait """ - self.common_tuxrun(drive=3D"virtio-blk-pci", + sums =3D { "rootfs.ext4.zst" : + "17177afa74e7294da0642861f08c88ca3c836764299a54bf6d1ce276= cb9712a5", + "versatile-pb.dtb" : + "0bc0c0b0858cefd3c32b385c0d66d97142ded29472a496f4f490e42f= c7615b25", + "zImage" : + "c95af2f27647c12265d75e9df44c22ff5228c59855f54aaa70f41ec2= 842e3a4d" } + + self.common_tuxrun(csums=3Dsums, + drive=3D"virtio-blk-pci", dt=3D"versatile-pb.dtb") =20 def test_armv7(self): @@ -219,7 +250,12 @@ def test_armv7(self): :avocado: tags=3Dconsole:ttyAMA0 :avocado: tags=3Dshutdown:nowait """ - self.common_tuxrun() + sums =3D { "rootfs.ext4.zst" : + "ab1fbbeaddda1ffdd45c9405a28cd5370c20f23a7cbc809cc90dc9f2= 43a8eb5a", + "zImage" : + "4c7a22e9f15875bec06bd2a29d822496571eb297d4f22694099ffcdb= 19077572" } + + self.common_tuxrun(csums=3Dsums) =20 def test_armv7be(self): """ @@ -232,7 +268,12 @@ def test_armv7be(self): :avocado: tags=3Dconsole:ttyAMA0 :avocado: tags=3Dshutdown:nowait """ - self.common_tuxrun() + sums =3D {"rootfs.ext4.zst" : + "42ed46dd2d59986206c5b1f6cf35eab58fe3fd20c96b41aaa16b32f3f= 90a9835", + "zImage" : + "7facc62082b57af12015b08f7fdbaf2f123ba07a478367853ae12b219= afc9f2f" } + + self.common_tuxrun(csums=3Dsums) =20 def test_i386(self): """ @@ -243,7 +284,12 @@ def test_i386(self): :avocado: tags=3Dimage:bzImage :avocado: tags=3Dshutdown:nowait """ - self.common_tuxrun(drive=3D"virtio-blk-pci") + sums =3D {"bzImage" : + "a3e5b32a354729e65910f5a1ffcda7c14a6c12a55e8213fb86e277f1b= 76ed956", + "rootfs.ext4.zst" : + "f15e66b2bf673a210ec2a4b2e744a80530b36289e04f5388aab812b97= f69754a" } + + self.common_tuxrun(csums=3Dsums, drive=3D"virtio-blk-pci") =20 def test_mips32(self): """ @@ -256,7 +302,12 @@ def test_mips32(self): :avocado: tags=3Droot:sda :avocado: tags=3Dshutdown:nowait """ - self.common_tuxrun(drive=3D"driver=3Dide-hd,bus=3Dide.0,unit=3D0") + sums =3D { "rootfs.ext4.zst" : + "fc3da0b4c2f38d74c6d705123bb0f633c76ed953128f9d0859378c32= 8a6d11a0", + "vmlinux" : + "bfd2172f8b17fb32970ca0c8c58f59c5a4ca38aa5855d920be3a69b5= d16e52f0" } + + self.common_tuxrun(csums=3Dsums, drive=3D"driver=3Dide-hd,bus=3Did= e.0,unit=3D0") =20 def test_mips32el(self): """ @@ -268,7 +319,12 @@ def test_mips32el(self): :avocado: tags=3Droot:sda :avocado: tags=3Dshutdown:nowait """ - self.common_tuxrun(drive=3D"driver=3Dide-hd,bus=3Dide.0,unit=3D0") + sums =3D { "rootfs.ext4.zst" : + "e799768e289fd69209c21f4dacffa11baea7543d5db101e8ce27e3bc= 2c41d90e", + "vmlinux" : + "8573867c68a8443db8de6d08bb33fb291c189ca2ca671471d3973a3e= 712096a3" } + + self.common_tuxrun(csums=3Dsums, drive=3D"driver=3Dide-hd,bus=3Did= e.0,unit=3D0") =20 def test_mips64(self): """ @@ -280,7 +336,12 @@ def test_mips64(self): :avocado: tags=3Droot:sda :avocado: tags=3Dshutdown:nowait """ - self.common_tuxrun(drive=3D"driver=3Dide-hd,bus=3Dide.0,unit=3D0") + sums =3D { "rootfs.ext4.zst" : + "69d91eeb04df3d8d172922c6993bb37d4deeb6496def75d8580f6f9d= e3e431da", + "vmlinux" : + "09010e51e4b8bcbbd2494786ffb48eca78f228e96e5c5438344b0eac= 4029dc61" } + + self.common_tuxrun(csums=3Dsums, drive=3D"driver=3Dide-hd,bus=3Did= e.0,unit=3D0") =20 def test_mips64el(self): """ @@ -291,7 +352,12 @@ def test_mips64el(self): :avocado: tags=3Droot:sda :avocado: tags=3Dshutdown:nowait """ - self.common_tuxrun(drive=3D"driver=3Dide-hd,bus=3Dide.0,unit=3D0") + sums =3D { "rootfs.ext4.zst" : + "fba585368f5915b1498ed081863474b2d7ec4e97cdd46d21bdcb2f96= 98f83de4", + "vmlinux" : + "d4e08965e2155c4cccce7c5f34d18fe34c636cda2f2c9844387d6149= 50155266" } + + self.common_tuxrun(csums=3Dsums, drive=3D"driver=3Dide-hd,bus=3Did= e.0,unit=3D0") =20 def test_ppc32(self): """ @@ -302,7 +368,12 @@ def test_ppc32(self): :avocado: tags=3Dimage:uImage :avocado: tags=3Dshutdown:nowait """ - self.common_tuxrun(drive=3D"virtio-blk-pci") + sums =3D { "rootfs.ext4.zst" : + "8885b9d999cc24d679542a02e9b6aaf48f718f2050ece6b8347074b6= ee41dd09", + "uImage" : + "1a68f74b860fda022fb12e03c5efece8c2b8b590d96cca37a8481a3a= e0b3f81f" } + + self.common_tuxrun(csums=3Dsums, drive=3D"virtio-blk-pci") =20 def test_ppc64(self): """ @@ -316,7 +387,12 @@ def test_ppc64(self): :avocado: tags=3Dextradev:driver=3Dspapr-vscsi :avocado: tags=3Droot:sda """ - self.common_tuxrun(drive=3D"scsi-hd") + sums =3D { "rootfs.ext4.zst" : + "1d953e81a4379e537fc8e41e05a0a59d9b453eef97aa03d47866c6c4= 5b00bdff", + "vmlinux" : + "f22a9b9e924174a4c199f4c7e5d91a2339fcfe51c6eafd0907dc3e09= b64ab728" } + + self.common_tuxrun(csums=3Dsums, drive=3D"scsi-hd") =20 def test_ppc64le(self): """ @@ -329,7 +405,12 @@ def test_ppc64le(self): :avocado: tags=3Dextradev:driver=3Dspapr-vscsi :avocado: tags=3Droot:sda """ - self.common_tuxrun(drive=3D"scsi-hd") + sums =3D { "rootfs.ext4.zst" : + "b442678c93fb8abe1f7d3bfa20556488de6b475c22c8fed363f42cf8= 1a0a3906", + "vmlinux" : + "979eb61b445a010fb13e2b927126991f8ceef9c590fa2be0996c00e2= 93e80cf2" } + + self.common_tuxrun(csums=3Dsums, drive=3D"scsi-hd") =20 def test_riscv32(self): """ @@ -337,7 +418,14 @@ def test_riscv32(self): :avocado: tags=3Dmachine:virt :avocado: tags=3Dtuxboot:riscv32 """ - self.common_tuxrun() + sums =3D { "Image" : + "89599407d7334de629a40e7ad6503c73670359eb5f5ae9d686353a3d= 6deccbd5", + "fw_jump.elf" : + "f2ef28a0b77826f79d085d3e4aa686f1159b315eff9099a37046b189= 36676985", + "rootfs.ext4.zst" : + "7168d296d0283238ea73cd5a775b3dd608e55e04c7b92b76ecce31bb= 13108cba" } + + self.common_tuxrun(csums=3Dsums) =20 def test_riscv64(self): """ @@ -345,7 +433,14 @@ def test_riscv64(self): :avocado: tags=3Dmachine:virt :avocado: tags=3Dtuxboot:riscv64 """ - self.common_tuxrun() + sums =3D { "Image" : + "cd634badc65e52fb63465ec99e309c0de0369f0841b7d9486f9729e1= 19bac25e", + "fw_jump.elf" : + "6e3373abcab4305fe151b564a4c71110d833c21f2c0a1753b7935459= e36aedcf", + "rootfs.ext4.zst" : + "b18e3a3bdf27be03da0b285e84cb71bf09eca071c3a087b42884b698= 2ed679eb" } + + self.common_tuxrun(csums=3Dsums) =20 def test_s390(self): """ @@ -355,7 +450,13 @@ def test_s390(self): :avocado: tags=3Dimage:bzImage :avocado: tags=3Dshutdown:nowait """ - self.common_tuxrun(drive=3D"virtio-blk-ccw", + sums =3D { "bzImage" : + "0414e98dd1c3dafff8496c9cd9c28a5f8d04553bb5ba37e906a812b4= 8d442ef0", + "rootfs.ext4.zst" : + "88c37c32276677f873a25ab9ec6247895b8e3e6f8259134de2a61608= 0b8ab3fc" } + + self.common_tuxrun(csums=3Dsums, + drive=3D"virtio-blk-ccw", haltmsg=3D"Requesting system halt") =20 # Note: some segfaults caused by unaligned userspace access @@ -370,9 +471,14 @@ def test_sh4(self): :avocado: tags=3Droot:sda :avocado: tags=3Dconsole:ttySC1 """ + sums =3D { "rootfs.ext4.zst" : + "3592a7a3d5a641e8b9821449e77bc43c9904a56c30d45da0694349cf= d86743fd", + "zImage" : + "29d9b2aba604a0f53a5dc3b5d0f2b8e35d497de1129f8ee5139eb6fd= f0db692f" } + # 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) =3D self.fetch_tuxrun_assets() + (kernel, disk, dtb) =3D self.fetch_tuxrun_assets(csums=3Dsums) =20 # the console comes on the second serial port self.prepare_run(kernel, disk, @@ -395,7 +501,13 @@ def test_sparc64(self): :avocado: tags=3Droot:sda :avocado: tags=3Dshutdown:nowait """ - self.common_tuxrun(drive=3D"driver=3Dide-hd,bus=3Dide.0,unit=3D0") + + sums =3D { "rootfs.ext4.zst" : + "ad2f1dc436ab51583543d25d2c210cab478645d47078d30d129a66ab= 0e281d76", + "vmlinux" : + "e34313e4325ff21deaa3d38a502aa09a373ef62b9bd4d7f8f29388b6= 88225c55" } + + self.common_tuxrun(csums=3Dsums, drive=3D"driver=3Dide-hd,bus=3Did= e.0,unit=3D0") =20 def test_x86_64(self): """ @@ -407,4 +519,10 @@ def test_x86_64(self): :avocado: tags=3Droot:sda :avocado: tags=3Dshutdown:nowait """ - self.common_tuxrun(drive=3D"driver=3Dide-hd,bus=3Dide.0,unit=3D0") + sums =3D { "bzImage" : + "2bc7480a669ee9b6b82500a236aba0c54233debe98cb968268fa230f= 52f03461", + "rootfs.ext4.zst" : + "b72ac729769b8f51c6dffb221113c9a063c774dbe1d66af30eb593c4= e9999b4b" } + + self.common_tuxrun(csums=3Dsums, + drive=3D"driver=3Dide-hd,bus=3Dide.0,unit=3D0") --=20 2.39.2 From nobody Sat May 11 14:14:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1682610429; cv=none; d=zohomail.com; s=zohoarc; b=h5r3Tqmk5HbjRVPOpwr++BDkRIBxhjlG04vQE0TlvtZ6dTzhgdc6hwaFoR4MZakgsl9OlUC7hMIywaiDGs8D1O+KLCeg3iFxRI2qs3fc9SmM8c9YsMPZ/oqgkaG7a3qxfM4KNdkwAgzCFmGEZroEde+DUaJDgaBvKXn9vz4TMP8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682610429; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=m3zAanYebbZhFO73oDp9ANAxrPZGnhSnFIhjJ3ZsGEU=; b=clWHLksRQprLOCjGFgKOEJgT+Y/74FG+MWxDIw6GBJNQNJxmI1MLyrRvnyyx/K9qcgGoW9bQFsdfX3X/UuHb/DNfgZUD2udOM27bEwx42a/6Azvhf9Pocl5KhDorNXVm9bIhZ0LPti84/KKc0uX3nXMuuTfaw0H5QJcBJ+J/iuo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1682610429733659.6953683746254; Thu, 27 Apr 2023 08:47:09 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: ACHHUZ4KCY9TJsyYfIyGg73BJceTxOOg3HB2KkeRXbD/INWZbtFKLXSatad63fFuU8LBKzx98wRaXw== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcin Juszkiewicz , Leif Lindholm , =?UTF-8?q?Alex=20Benn=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1682610431355100003 From: Philippe Mathieu-Daud=C3=A9 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=C3=A9 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=C3=A9e 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 =20 Sharp SL-5500 (Collie) PDA M: Peter Maydell diff --git a/tests/avocado/machine_aarch64_sbsaref.py b/tests/avocado/machi= ne_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=C3=A9 +# 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=3Darch:aarch64 + :avocado: tags=3Dmachine:sbsa-ref + """ + + timeout =3D 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/5fdb2e= 54 + + - 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 =3D ( + "https://fileserver.linaro.org/s/ATnSmq6k8SoXgbH/" + "download/SBSA_FLASH0.fd.xz" + ) + fs0_xz_hash =3D "a210a09692bcbe0a3743ffd0df44e80e0c7ad8ab" + tar_xz_path =3D self.fetch_asset(fs0_xz_url, asset_hash=3Dfs0_xz_h= ash) + archive.extract(tar_xz_path, self.workdir) + fs0_path =3D os.path.join(self.workdir, "SBSA_FLASH0.fd") + + # Non-secure rom (UEFI and EFI variables) + fs1_xz_url =3D ( + "https://fileserver.linaro.org/s/t8foNnMPz74DZZy/" + "download/SBSA_FLASH1.fd.xz" + ) + fs1_xz_hash =3D "13a9a262953787c7fc5a9155dfaa26e703631e02" + tar_xz_path =3D self.fetch_asset(fs1_xz_url, asset_hash=3Dfs1_xz_h= ash) + archive.extract(tar_xz_path, self.workdir) + fs1_path =3D 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=3Dpflash,file=3D{fs0_path},format=3Draw", + "-drive", + f"if=3Dpflash,file=3D{fs1_path},format=3Draw", + "-smp", + "1", + "-machine", + "sbsa-ref", + ) + + def test_sbsaref_edk2_firmware(self): + """ + :avocado: tags=3Dcpu: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-sequen= ce + # 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 M= achine") + + # 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 =3D ( + "https://dl-cdn.alpinelinux.org/" + "alpine/v3.17/releases/aarch64/alpine-standard-3.17.2-aarch64.= iso" + ) + + iso_hash =3D "5a36304ecf039292082d92b48152a9ec21009d3a62f459de623e= 19c4bd9dc027" + iso_path =3D self.fetch_asset(iso_url, algorithm=3D"sha256", asset= _hash=3Diso_hash) + + self.vm.set_console() + self.vm.add_args( + "-cpu", + cpu, + "-drive", + f"file=3D{iso_path},format=3Draw", + "-device", + "virtio-rng-pci,rng=3Drng0", + "-object", + "rng-random,id=3Drng0,filename=3D/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=3Dcpu: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=3Dcpu: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=3Dcpu:max + """ + self.boot_alpine_linux("max,pauth-impdef=3Don") --=20 2.39.2 From nobody Sat May 11 14:14:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1682610378; cv=none; d=zohomail.com; s=zohoarc; b=C6cvohBcdAtWZpRt0sTCY21gbenIRZhiWT1IOR8a8Ep/3DDLBFNxQuvHI6JCGNMvdTatNIew8LIYvP3EUj8X+D1UIs+KTzOY/XlrhaAkqPQqtYoiergWfEKH47vflaIQJorD6935uOYY5bkLVERr3Rhy01p+o9GvtmruV2ax6tI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682610378; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=G81MgRiGIts/A6nA0K+cz87dFeXnPcfbunuD/xKLhHk=; b=EWxWryCbF5Jvf7+TAmdyrugMOMtxJ19XkWs4Mq+Ja8eQky52vOXfAuroMOD9xB7hVnbRlQE0C5F0U+hUI83cn4wt8mRyryQQ/gu8/x60PhE5DmBKQybwTfm+ipNjrLzNwXaOHWxd2ACOvTx1pvYnVFwRncTNQhU3fR34az03VSg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1682610378101288.5836486318477; Thu, 27 Apr 2023 08:46:18 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: ACHHUZ4tj27KxXizT9+UzrGhhBcKNkczF2ah4mcA1nmLhPGNg1dYmgdAv5vE6OHWhRW11h+EqKlBXA== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1682610379236100001 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=3D":". 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=C3=A9e 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=3D":" check-venv - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-i3= 86 =20 build-system-fedora: @@ -145,7 +145,7 @@ crash-test-fedora: IMAGE: fedora script: - cd build - - make check-venv + - make NINJA=3D":" 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-ri= scv32 =20 --=20 2.39.2 From nobody Sat May 11 14:14:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1682610406; cv=none; d=zohomail.com; s=zohoarc; b=jyAW0aq2eJuJQzuz3IbwnW8Z0JSekz5Ej9OA6+wbEC9HL7dFi0DC97Cj6HaKPSnOyT+uLBnB//An3Y5hIqYDW1igqp4VY8NyHyWsp9AcRrei17qJi9jCUG2d+/BSQ7OGmBQzsj2DeGT1XG9xyD0ajV9d8h/npW97sRNaz8jarh8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682610406; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=4eCwi/pVbpdAUWwYQpZXmTPlZe0TlOgYAIJaukeqpyY=; b=USBFKEzbEv2jYgo1kKrNi2giRPvN6V0T5i/iecho82QoF8kRpjnepvLu22Ks7+g2w83QP5xiYliqhtl8udby+JKMlxb49O6LVVg8/koyx3l9Ji+P/Zycqr7sRbFnMCNuURgn7BVMbqFan6HA0ArwdpifUUichNOYuSRr99F0fBQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1682610405981141.06972209236653; Thu, 27 Apr 2023 08:46:45 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: ACHHUZ559p2Kpka0YRynLIBRv54qA7IOlaP6n4U5C6j5LZvUUGrOwSPwa0JTDnUER088oEx/chOg7Q== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Thomas Huth , Eldon Stegall , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1682610407025100001 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=C3=A9 Message-Id: <20230414145845.456145-3-thuth@redhat.com> Signed-off-by: Alex Benn=C3=A9e 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=3D":" check-venv - - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-i3= 86 + - tests/venv/bin/python3 scripts/device-crash-test -q --tcg-only ./qem= u-system-i386 =20 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): =20 =20 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' =20 @@ -510,6 +510,8 @@ def main(): help=3D"Full mode: test cases that are expected to= fail") parser.add_argument('--strict', action=3D'store_true', dest=3D'strict', help=3D"Treat all warnings as fatal") + parser.add_argument('--tcg-only', action=3D'store_true', dest=3D'tcg_o= nly', + help=3D"Only test with TCG accelerator") parser.add_argument('qemu', nargs=3D'*', metavar=3D'QEMU', help=3D'QEMU binary to run') args =3D parser.parse_args() --=20 2.39.2 From nobody Sat May 11 14:14:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1682610342; cv=none; d=zohomail.com; s=zohoarc; b=Dau94zg1VP31aYZPc1sKDgBX3QxTE1Ya+lqbDVQgEA1IMtBUGYJlt+PiYcOdz6mWwOPLS4k+JRFc/yEtXrl/fIConqicoX9jmq2D42kC9QTlHv5RHbSpww4L/KJdjRXarkAcUqqSSxL4JHbcYEuoX0snFh3g1etoWmbD8olBfAs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682610342; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SI6uYTd7Q0+IVe4nYn/2huKDCgz0raMlMXhc7QX3q+I=; b=XiJv0pd7/qSROIw4cjtlp/IzjRWjMQH73K4+3L5onAla/ABmXpcYt2lTOeUCE9C7kGn7MvqfQYLKS+gJckq50DKtlPmHpBQT5wXw1/lrADls7jX2GorzEnnTeTJpsAeJ1MjQiahL3SgYEz3FZZIcbuCWoS+iWtswUUAIYsbyhPU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1682610341815961.7838038805278; Thu, 27 Apr 2023 08:45:41 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: ACHHUZ4j55R9nCON1VzY2fVDWClLCs2Dh7zzxfNJw96LC0UvGJShD48GsCDpx5ZEEytV/w4xPB9/bA== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?UTF-8?q?Alex=20Benn=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1682610343296100001 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=C3=A9e 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. =20 -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. =20 ERST =20 @@ -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 =20 DEF("fsdev", HAS_ARG, QEMU_OPTION_fsdev, --=20 2.39.2 From nobody Sat May 11 14:14:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1682610417; cv=none; d=zohomail.com; s=zohoarc; b=fpGOhaWuaFjXPW/StFboVpPaxRhnMp4xDFh3wf7kbc+SN8ueh4wqLbYVuuYyXxWuNZf6OdbZZzsNAHoOSPVmWPBZUHkUd8/ShT3GYW1q6cmhR+Sk9TNWqXTIfgsgJYdYBSxPVvujBudErIOsQ9ndfoXxrFkmm0pIY4S6RrpTF6k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682610417; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0hmaz0tTnTlT4tA/o8R0lO6yD1wszvUTG7WLcL70qJw=; b=R3fENFFQ4YRmx+wl0Bqh5ijX0R82lakUlJrxuOfgJcJcEHR12HFpvek5NCfhDtPWuPF03Nb3W68zJs8JB8W9dU5hew+QzkGUMsFkDjotQEY+eUc79ZZVY38UPDjrYRQSJentZY7qa2TVXjLpMriDva7/rbP9oS9kHhAIeIDs55I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1682610417256244.91891664972184; Thu, 27 Apr 2023 08:46:57 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: ACHHUZ5Ij6trf7L/irSeKyaTnjM5UjrLxjXnfRZZPp2W/OmqNVM+9hKQVPik8Gh/dW9x5uLSIkPb6w== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Warner Losh , =?UTF-8?q?Philippe=20Mathieu-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1682610419508100001 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=C3=A9e 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 =20 -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/free= bsd-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=3D'/usr/local/bin/ccache' -CPAN_PKGS=3D'' -CROSS_PKGS=3D'' -MAKE=3D'/usr/local/bin/gmake' -NINJA=3D'/usr/local/bin/ninja' -PACKAGING_COMMAND=3D'pkg' -PIP3=3D'/usr/local/bin/pip-3.8' -PKGS=3D'alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cdrkit-geni= soimage cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 g= ettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt lib= jpeg-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 vt= e3 zstd' -PYPI_PKGS=3D'' -PYTHON=3D'/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") =20 --=20 2.39.2 From nobody Sat May 11 14:14:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1682610434; cv=none; d=zohomail.com; s=zohoarc; b=KlLkG5YaphV4criJtGtMPt/kQZ2sJ4jY2WBXr7vj02aKJMVRujWIDkLrb01wXzCtEsXFMYCZcXQlo8Robq5hI1SkByKrkIiqVsmGYTwEPRrfc+m5dZOlKJMNpMroCQAHdfvrJ9Uz440MwOxa5VSVloCKax6Nkc9qiSjkxmCiK7E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682610434; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PG4UaEnYvjghjI9pm8jP+I8uIcN8w3ndXb9vuAXwPTg=; b=O6DLUwpzPq91R4i3sM7cz7/KZ7WpmIR2ZKixE6LsrXdNoK/ixRpSVQMZCAuJw/YGHDevGfuKelZ0Trh8/O1q8Nw0YH7H6G+1TXgxqqpjutXzbYvp8AC/phxtPIGaF/2Xd7QJ2iYF0rHkYLJgc1hQBALfDNf3LfLc6VWF8vOSJV0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1682610434807201.95510618894366; Thu, 27 Apr 2023 08:47:14 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: ACHHUZ7Bn0wkshWYFfEKQE2YQqwookwmi1vC2KMWEGqOtytZPFZLfCj90ZPJboNUFbRlth7r0T9PHQ== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Thomas Huth , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , =?UTF-8?q?Philippe=20Mathieu-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1682610435592100001 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=C3=A9dric Le Goater Message-Id: <20230421110345.1294131-2-thuth@redhat.com> Signed-off-by: Alex Benn=C3=A9e 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 =20 + def ssh_command_output_contains(self, cmd, exp): + stdout, _ =3D 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 =20 diff --git a/tests/avocado/linux_ssh_mips_malta.py b/tests/avocado/linux_ss= h_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') =20 - def ssh_command_output_contains(self, cmd, exp): - stdout, _ =3D 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', --=20 2.39.2 From nobody Sat May 11 14:14:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1682610545; cv=none; d=zohomail.com; s=zohoarc; b=npGX06BqlGnw0A/kpQppYlargTZzHZcvi6GIkN4LZ2AH1sOkrwCJxPiQVUaDxIRMTMm8pA9tB6YI9Pz4fWXQwqT9U650o8/cO39190EuaOKeoMGiJVRocdSB26LWxQwP7M1IGcEFvdvWlhtHIBi2v0DNLINvtP8M9RuGB78rGrQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682610545; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5NIko2Gkapa67pYfAhG5iuG1fjGYEcV1kfLWbhJ/29M=; b=h+MtrRUhpEpFPvNJrMjq6IijiK/xaEs1QLJecsbSwPbp4P3EP53Jl6NYgUHthMr/anLLFhoHYu7XCKxt9oU1gOIeJIeDcj0U5rJ9oR4FMn89on6I4ODvDPSxRYM8R7lHdjH+RqlhyaJidSDSKx2Ljk/JMoiJ7EqIfXl4nPP1lss= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1682610545526251.83673539198264; Thu, 27 Apr 2023 08:49:05 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: ACHHUZ55+PPjnXxizLgd1HAqalP86PczOGQ6FqSeWRcGNtJq085GKWTLF+EgROYG/qxqTfPgOaMzDw== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Thomas Huth , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Peter Maydell , Andrew Jeffery , Joel Stanley , Cleber Rosa , =?UTF-8?q?Philippe=20Mathieu-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1682610546080100001 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=C3=A9dric Le Goater Message-Id: <20230421110345.1294131-3-thuth@redhat.com> [AJB: remove stray debug log] Signed-off-by: Alex Benn=C3=A9e 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 =20 +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): =20 self.do_test_arm_aspeed_buildroot_poweroff() =20 -class AST2x00MachineSDK(QemuSystemTest): +class AST2x00MachineSDK(QemuSystemTest, LinuxSSHMixIn): =20 EXTRA_BOOTARGS =3D ( '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=3D' + image + ',if=3Dmtd,format= =3Draw', - '-net', 'nic', '-net', 'user') + '-net', 'nic', '-net', 'user,hostfwd=3D:127.0.0.1= :0-:22') self.vm.launch() =20 self.wait_for_console_pattern('U-Boot 2019.04') @@ -323,7 +324,7 @@ def test_arm_ast2500_evb_sdk(self): =20 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') =20 @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=3Daspeed.i2c.bus.5,address=3D0x32'); 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-d= efault:~#') + self.wait_for_console_pattern('nodistro.0 ast2600-default ttyS4') =20 - 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=3D'/machine/peripheral/tmp-test', property=3D'temperature', value=3D18000); - exec_command_and_wait_for_pattern(self, + self.ssh_command_output_contains( 'cat /sys/class/hwmon/hwmon19/temp1_input', '= 18000') =20 - exec_command_and_wait_for_pattern(self, - 'echo ds1307 0x32 > /sys/class/i2c-dev/i2c-5/device/new_devic= e', + self.ssh_command_output_contains( + 'echo ds1307 0x32 > /sys/class/i2c-dev/i2c-5/device/new_devic= e ; ' + 'dmesg -c', 'i2c i2c-5: new_device: Instantiated device ds1307 at 0x32'); year =3D time.strftime("%Y") - exec_command_and_wait_for_pattern(self, 'hwclock -f /dev/rtc1', ye= ar); + self.ssh_command_output_contains('/sbin/hwclock -f /dev/rtc1', yea= r); --=20 2.39.2 From nobody Sat May 11 14:14:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1682610373; cv=none; d=zohomail.com; s=zohoarc; b=jG2cPV5MiOnqi+li/I1KRmtKfVFYTBfrkOmDbF8srQNYhVtKCIrqq9IHrs3CsAAcGx2eqcW3xuYBSPkKPBnDUt9rgeZ/XFjCE4fthDFinSK4TbyEQ3KyueaAn92cuy5NMqFQ512SeG1o5etIz4pBDI1fOYAiUFhlLwvvZEx4AfQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682610373; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fpyH5AwC5Qg4YEV6tQjjlqv6VK+Xr7HhmB8/VhCFqAY=; b=UDlQBs/cqjGZtm3mF5M/OOvQUXhP5S1Nge5xsVU71iWJmKVfzIaWG0viOYmHO8VBgCemmrvo5bFW7Yx77i4/fReeGf5PQd2SMp0VtZ09q/zwk8fXv/XRoBnntRb2h0hcXBK3xgv+IaB3QHDusJhxuZqobJTh545vauvR3xR2Bhw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1682610373001663.9225371438574; Thu, 27 Apr 2023 08:46:13 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: ACHHUZ6Jli1202t/S0YoyJyThk8x9GdyLusyRCh55YHUbQGqeLZZHMjXm9hcjsxL4nXTKjMG07mzGg== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Thomas Huth , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1682610373464100001 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=C3=A9dric Le Goater Message-Id: <20230421110345.1294131-4-thuth@redhat.com> Signed-off-by: Alex Benn=C3=A9e 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 =20 NRF51 --=20 2.39.2 From nobody Sat May 11 14:14:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1682610621; cv=none; d=zohomail.com; s=zohoarc; b=A6xeVeY41c7IHI9rk3SZWnYy+1xhkAY5BCvKuMiRwqPI5EdfFZzCxp6g88xf1HoY7sk+X0Np0sv2qDug1zv+0yqSEL1/02MulT/xa9epZwumZWR9z30xrtAtT/lgxcrDlFCHZsxNegSPMkfAhVN9+SKJriKNa4rmJu5guZ9L+NU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682610621; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BZ/8ey82+JXDwq7XVHlAwGozyCogXibvNckafjptj/k=; b=V55ZtiL/ssRQh4e7HzxjAnO/PquzPwMXXtBpr31KlQTfCkVGcgzs1WpxZ+XACEqNeqzt6hr/OEpXluHO/bvSmgoqUmp2RwQwIheEj/ljP8c+B4DSM7dwE8dlgiPWyY9f/aFyAce1fIHUpdQ4JNZIrtoDgmbfv9dYLe6IVL1pnYg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1682610621343663.8905847431462; Thu, 27 Apr 2023 08:50:21 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: ACHHUZ7yPv00Y4yNGBT4WZDxUUYyGXWCVDcuV7zw3H24vEfdWlJAgbJq7nAxCgjMCHGKp3IlLmjfPA== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Kautuk Consul , Harsh Prateek Bora , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1682610622688100005 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=C3=A9 Message-Id: <20230421042322.684093-2-kconsul@linux.vnet.ibm.com> Signed-off-by: Alex Benn=C3=A9e 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 =20 + 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 =3D os.path.join(BUILD_DIR, 'qemu-img') + if not os.path.exists(qemu_img): + qemu_img =3D 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=3D'default') @@ -602,17 +615,9 @@ def set_up_existing_ssh_keys(self): return (ssh_public_key, ssh_private_key) =20 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 =3D os.path.join(BUILD_DIR, 'qemu-img') - if not os.path.exists(qemu_img): - qemu_img =3D 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 =3D qemu_img + # Set the qemu-img binary. + # If none is available, the test will cancel. + vmimage.QEMU_IMG =3D super().get_qemu_img() =20 self.log.info('Downloading/preparing boot image') # Fedora 31 only provides ppc64le images --=20 2.39.2 From nobody Sat May 11 14:14:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1682610402; cv=none; d=zohomail.com; s=zohoarc; b=Bl/gbdZ0PbyzlGgr2xYU37FZ6m1/stN6ZZIvQI9UbI6X1LPCK8zoZFy9j9Fx16QvGjBSl9beETnc71z6tJ61/XPu7DH4rJmYdB6hsYJHvXdBSQMOT/5XuQjbOHqOJnMA42ms0e9wP8mQHuH2g9514a5wIUFUR09yqZpMqblyUeQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682610402; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=oa1kZsBc5Tdan51WU2r4Uy35B4rpsLKztYDttyHE2dE=; b=G9ZAHcNC6ZMeytamQGdpLsg8T+5Y9niXUNsXtkBhOW3UpkP6ztEzybBG6PbNg4480NNELKIRmmqEz8zxB7qHbt4C2NtaV42x7rW0f4+r1vovje4abZwUk16bOEiKjrmhPC484W4pvZo+frNchzLOzqJBMthB+jCk28X1Iuzkvqg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 168261040226082.01417499542777; Thu, 27 Apr 2023 08:46:42 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: ACHHUZ47tZazc2BooeXrNqjVyKY8jDMvYI6Zl2MpvWWkl8xATyeibGJp06sImef4y+r3s7R2agm2rA== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Kautuk Consul , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Harsh Prateek Bora , =?UTF-8?q?Philippe=20Mathieu-Daud=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1682610403189100003 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 Reported-by: Alex Benn=C3=A9e Reviewed-by: Harsh Prateek Bora Reviewed-by: Philippe Mathieu-Daud=C3=A9 ------------------ 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=C3=A9e Reviewed-by: Harsh Prateek Bora Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Alex Benn=C3=A9e 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_basel= ines.py index e8749717e9..3a46e7a745 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -11,6 +11,7 @@ =20 import os import time +import tempfile =20 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 =3D self.get_tag('extradev') =20 + self.qemu_img =3D super().get_qemu_img() + def wait_for_console_pattern(self, success_message, vm=3DNone): wait_for_console_pattern(self, success_message, failure_message=3D'Kernel panic - not syn= cing', @@ -179,6 +182,63 @@ def common_tuxrun(self, self.vm.launch() self.run_tuxtest_tests(haltmsg) =20 + def ppc64_common_tuxrun(self, sums, prefix): + # add device args to command line. + self.vm.add_args('-netdev', 'user,id=3Dvnet,hostfwd=3D:127.0.0.1:0= -:22', + '-device', 'virtio-net,netdev=3Dvnet') + 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":"scs= i0"' + ',"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":"objrng= 0"' + ',"filename":"/dev/urandom"}', + '-device', '{"driver":"virtio-rng-pci","rng":"obj= rng0"' + ',"id":"rng0","bus":"pci.0","addr":"0x8"}') + self.vm.add_args('-object', '{"qom-type":"cryptodev-backend-builti= n",' + '"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=3D32,maxmem=3D4G', + '-object', 'memory-backend-ram,id=3Dram1,size=3D1= G', + '-device', 'pc-dimm,id=3Ddimm1,memdev=3Dram1') + + # Create a temporary qcow2 and launch the test-case + with tempfile.NamedTemporaryFile(prefix=3Dprefix, + suffix=3D'.qcow2') as qcow2: + process.run(self.qemu_img + ' create -f qcow2 ' + + qcow2.name + ' 1G') + + self.vm.add_args('-drive', 'file=3D' + qcow2.name + + ',format=3Dqcow2,if=3Dnone,id=3D' + 'drive-virtio-disk1', + '-device', 'virtio-blk-pci,scsi=3Doff,bus=3Dpci.0= ,' + 'addr=3D0xb,drive=3Ddrive-virtio-disk1,id=3Dvirti= o-disk1' + ',bootindex=3D2') + self.common_tuxrun(csums=3Dsums, drive=3D"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=3Darch:ppc64 :avocado: tags=3Dmachine:pseries - :avocado: tags=3Dcpu:POWER8 + :avocado: tags=3Dcpu:POWER10 :avocado: tags=3Dendian:big :avocado: tags=3Dconsole:hvc0 :avocado: tags=3Dtuxboot:ppc64 @@ -391,14 +451,13 @@ def test_ppc64(self): "1d953e81a4379e537fc8e41e05a0a59d9b453eef97aa03d47866c6c4= 5b00bdff", "vmlinux" : "f22a9b9e924174a4c199f4c7e5d91a2339fcfe51c6eafd0907dc3e09= b64ab728" } - - self.common_tuxrun(csums=3Dsums, drive=3D"scsi-hd") + self.ppc64_common_tuxrun(sums, prefix=3D'tuxrun_ppc64_') =20 def test_ppc64le(self): """ :avocado: tags=3Darch:ppc64 :avocado: tags=3Dmachine:pseries - :avocado: tags=3Dcpu:POWER8 + :avocado: tags=3Dcpu:POWER10 :avocado: tags=3Dconsole:hvc0 :avocado: tags=3Dtuxboot:ppc64le :avocado: tags=3Dimage:vmlinux @@ -409,8 +468,7 @@ def test_ppc64le(self): "b442678c93fb8abe1f7d3bfa20556488de6b475c22c8fed363f42cf8= 1a0a3906", "vmlinux" : "979eb61b445a010fb13e2b927126991f8ceef9c590fa2be0996c00e2= 93e80cf2" } - - self.common_tuxrun(csums=3Dsums, drive=3D"scsi-hd") + self.ppc64_common_tuxrun(sums, prefix=3D'tuxrun_ppc64le_') =20 def test_riscv32(self): """ --=20 2.39.2 From nobody Sat May 11 14:14:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1682610436; cv=none; d=zohomail.com; s=zohoarc; b=Dc3E2hdKIUAFoZcNVGEXxJEwgHoQezCfGRDAbiARyfMOLjrMs1nU1RPJ2fpapu5z6uJ5WIvjyHm81vaM6djzP4MTq2k0zQDG2TSxUBZzirpBtlb8TMrr3DwPwDfY4gNT3iZ8KzqKkMy4UY6q6OfysOUfzGEgXu6N9504g2XRaqE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682610436; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=V/edUvbQqbiUFHK/am+hC1zUnk4wPQCAjH6TozCoSbU=; b=kgnlArKISEP8O7w0P5sUhGA1fz/fRYzDVZ+yEuzKB+/39ZIBx2cRHxam7Vr3jYs7eZ/EmeJAQv03ghnXQ7DezKZWGVbMclk2gTWeX1nmLzHTTDJW5ipFhWiLiGhy+eJTJ2+XiXX181M3zqWyJ+K0m0S9kc+gmLIZrSHJxE5LDy0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 168261043613368.8813826769358; Thu, 27 Apr 2023 08:47:16 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: ACHHUZ4DVf6Ap7EC/a/K3ih8wtNSbK4cgk2hMItRdhku5nK4b26hJuT9Sffoye7+aTzB65rKJZlkcQ== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1682610437558100007 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=C3=A9e 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=3D$(patsubst %.c, lib%.so, $(notdir $(wildcar= d $(PLUGIN_SRC)/*.c))) =20 # 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. =20 +ifneq ($(MULTIARCH_TESTS),) $(foreach p,$(PLUGINS), \ - $(foreach t,$(TESTS),\ + $(foreach t,$(MULTIARCH_TESTS),\ $(eval run-plugin-$(t)-with-$(p): $t $p) \ $(eval RUN_TESTS+=3Drun-plugin-$(t)-with-$(p)))) -endif +endif # MULTIARCH_TESTS +endif # CONFIG_PLUGIN =20 strip-plugin =3D $(wordlist 1, 1, $(subst -with-, ,$1)) extract-plugin =3D $(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 +=3D pauth-1 pauth-2 pauth-4 pauth-5 pauth-%: CFLAGS +=3D -march=3Darmv8.3-a run-pauth-%: QEMU_OPTS +=3D -cpu max -run-plugin-pauth-%: QEMU_OPTS +=3D -cpu max endif =20 # 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+=3D-nostdlib -N -static test-armv6m-undef: EXTRA_CFLAGS+=3D-mcpu=3Dcortex-m0 -mfloat-abi=3Dsoft =20 run-test-armv6m-undef: QEMU_OPTS+=3D-semihosting -M microbit -kernel -run-plugin-test-armv6m-undef-%: QEMU_OPTS+=3D-semihosting -M microbit -ker= nel + +# 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) =20 -run-plugin-semihosting-arm-with-%: - $(call run-test, $@, $(QEMU) $(QEMU_OPTS) \ - -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \ - $(call strip-plugin,$<) 2> $<.err) - ARM_TESTS +=3D semiconsole-arm =20 semiconsole: CFLAGS +=3D -mthumb @@ -62,9 +57,6 @@ semiconsole-arm: semihosting.c run-semiconsole-arm: semiconsole-arm $(call skip-test, $<, "MANUAL ONLY") =20 -run-plugin-semiconsole-arm-with-%: - $(call skip-test, $<, "MANUAL ONLY") - endif =20 ARM_TESTS +=3D 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:=3Dcris-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+=3Drun-test-mmap-4096 # run-test-mmap-16384 ru= n-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") =20 VPATH +=3D $(SRC_PATH)/tests/tcg/hppa TESTS +=3D 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:=3D$(filter test-i386-adcox test-i386-bmi2= $(SKIP_I386_TESTS), $(ALL_ =20 test-i386-sse-exceptions: CFLAGS +=3D -msse4.1 -mfpmath=3Dsse run-test-i386-sse-exceptions: QEMU_OPTS +=3D -cpu max -run-plugin-test-i386-sse-exceptions-%: QEMU_OPTS +=3D -cpu max =20 test-i386-pcmpistri: CFLAGS +=3D -msse4.2 run-test-i386-pcmpistri: QEMU_OPTS +=3D -cpu max -run-plugin-test-i386-pcmpistri-%: QEMU_OPTS +=3D -cpu max =20 test-i386-bmi2: CFLAGS=3D-O2 run-test-i386-bmi2: QEMU_OPTS +=3D -cpu max -run-plugin-test-i386-bmi2-%: QEMU_OPTS +=3D -cpu max =20 test-i386-adcox: CFLAGS=3D-O2 run-test-i386-adcox: QEMU_OPTS +=3D -cpu max -run-plugin-test-i386-adcox-%: QEMU_OPTS +=3D -cpu max =20 # # 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 =20 ifeq ($(SPEED), slow) @@ -87,7 +81,6 @@ sha512-sse: sha512.c $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) =20 run-sha512-sse: QEMU_OPTS+=3D-cpu max -run-plugin-sha512-sse-with-%: QEMU_OPTS+=3D-cpu max =20 TESTS+=3Dsha512-sse =20 @@ -103,15 +96,12 @@ test-avx.h: test-avx.py x86.csv =20 test-3dnow: CFLAGS +=3D -masm=3Dintel -O -I. run-test-3dnow: QEMU_OPTS +=3D -cpu max -run-plugin-test-3dnow: QEMU_OPTS +=3D -cpu max test-3dnow: test-3dnow.h =20 test-mmx: CFLAGS +=3D -masm=3Dintel -O -I. run-test-mmx: QEMU_OPTS +=3D -cpu max -run-plugin-test-mmx: QEMU_OPTS +=3D -cpu max test-mmx: test-mmx.h =20 test-avx: CFLAGS +=3D -mavx -masm=3Dintel -O -I. run-test-avx: QEMU_OPTS +=3D -cpu max -run-plugin-test-avx: QEMU_OPTS +=3D -cpu max test-avx: test-avx.h diff --git a/tests/tcg/ppc64/Makefile.target b/tests/tcg/ppc64/Makefile.tar= get index f081f1c683..6d47d3cae6 100644 --- a/tests/tcg/ppc64/Makefile.target +++ b/tests/tcg/ppc64/Makefile.target @@ -24,14 +24,12 @@ PPC64_TESTS +=3D byte_reverse sha512-vector endif byte_reverse: CFLAGS +=3D -mcpu=3Dpower10 run-byte_reverse: QEMU_OPTS+=3D-cpu POWER10 -run-plugin-byte_reverse-with-%: QEMU_OPTS+=3D-cpu POWER10 =20 sha512-vector: CFLAGS +=3D-mcpu=3Dpower10 -O3 sha512-vector: sha512.c $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) =20 run-sha512-vector: QEMU_OPTS+=3D-cpu POWER10 -run-plugin-sha512-vector-with-%: QEMU_OPTS+=3D-cpu POWER10 =20 PPC64_TESTS +=3D signal_save_restore_xer PPC64_TESTS +=3D 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 +=3D -M virt -display none -semihosting -device= loader,file=3D EXTRA_RUNS +=3D 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 +=3D noexec TESTS +=3D test-noc test-noc: LDFLAGS =3D -nostdlib -static run-test-noc: QEMU_OPTS +=3D -cpu rv64,c=3Dfalse -run-plugin-test-noc-%: QEMU_OPTS +=3D -cpu rv64,c=3Dfalse diff --git a/tests/tcg/s390x/Makefile.softmmu-target b/tests/tcg/s390x/Make= file.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+=3Dpgm-specification-softmmu.o TESTS +=3D $(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 +=3D -M tricore_testboard -cpu tc27x -nographic= -kernel =20 %.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/Ma= kefile.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) Makef= ile.softmmu-target $(CC) $(XTENSA_INC) $(ASFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) $(NOST= DFLAGS) $(CRT) =20 endif + +# We don't currently support the multiarch system tests +undefine MULTIARCH_TESTS --=20 2.39.2 From nobody Sat May 11 14:14:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1682610585; cv=none; d=zohomail.com; s=zohoarc; b=G2Z2KNGB8ZW66u2EZSGK4JmYcOcWRdN/CGqcPS5IXJo9iHn07USMxL/5QtG+0f+eE5UcskwHWiWdURhyI7Uy7Y952j50c0jQ3Dv+uSXEZjI3MRPF89mNunKWWKUHmKSjU5iMSzYJvbBCLvcPiIFcOUbio7noIOXQkOeg5DveA/M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682610585; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=gd3Al4GBqCr5ZtQERTG0wvZGPUvV+r+DB1fF+uG5JLY=; b=JTxZ6Ta0OH2cWBopuMyETgSYMWHb+uNvcey6G7FmyvXkqLNSlAUlCcgMo1R3M/aBYFOOFXFsMRhf/qaMDOKQ0kSsd/TdYMSTLIc3r6YD+XDyzTfN7xFRVM0jhbCywnbZXGLfMNJ5mqsW83VuJSzwTVDHG2+6piODt7QOfysxHHQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1682610585058435.1395287713905; Thu, 27 Apr 2023 08:49:45 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: ACHHUZ75UqpWmSGqVHtUI6dtcbjdRhjg6rfYmj0bxj6JMJbKXDbdKJYyJabWOtfvCDEMB/6wQHnbQg== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Yohei Kojima , Juan Quintela , =?UTF-8?q?Alex=20Benn=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1682610587391100003 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=C3=A9e 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=3D0 -numa node,nodeid=3D1 \ -numa cpu,node-id=3D0,socket-id=3D0 -numa cpu,node-id=3D1,socket-i= d=3D1 =20 - Legacy '\ ``mem``\ ' assigns a given RAM amount to a node (not support= ed - 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 betwee= n 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. =20 '\ ``initiator``\ ' is an additional option that points to an initiator NUMA node that has best performance (the lowest latency or --=20 2.39.2 From nobody Sat May 11 14:14:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1682610921; cv=none; d=zohomail.com; s=zohoarc; b=eK4E+l7wBtV25cd6Aks9gGa2SoZZLxZBIPOhJoyMXRyu/zUZb29vQvvsBruMTZ270EPVoUM/MwWF0XjKlXGJ4YnTTAh+fVcuoCYwUSIYW9JT2jSU8hGFgUaWXWdpuNnYyeE7DDeGxkDdkTyCnovaMNtLJ9EpJ+7ioW8lMc/nLto= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682610921; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=irb8Kevpl1FBY/VezS2GPdCbSf2KjxNFns8nRQw9WcE=; b=HH82wwQ0mVftofuWweXsqohrTsfBOdhn3YajyBgP4vnjpU6GFN4fHRFXfOfVrJUqzd3S3MVH0JJA4A8cYSsF3QZQj9xUm4y0rYUZgAe184NGKAdvyWerejmzMpVY7KKWCH0jX+BmvjOi82nQT5cBwChPU94VALZFHMV/kahFLW4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 168261092124819.752528997841978; Thu, 27 Apr 2023 08:55:21 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: ACHHUZ5VbI1Ot9oR73UoWyfmNN3HFGRWY6Ekjc8DvOdUxC5TA8IItvxpYfnbBuz2Lz6F52y4rSdhIA== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?UTF-8?q?Alex=20Benn=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1682610922453100005 A possessive its needs no ' whereas the contraction of it is does. Signed-off-by: Alex Benn=C3=A9e 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 =20 -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: =20 .. parsed-literal:: @@ -25,9 +25,9 @@ multi-boot capability. A typical example would look like: -device guest-loader,addr=3D0x47000000,initrd=3Drootfs.cpio =20 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. =20 --=20 2.39.2 From nobody Sat May 11 14:14:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1682610921; cv=none; d=zohomail.com; s=zohoarc; b=Hyz9oijIh/1/WWIt1sDFJJD7VQ6gNfVHspNahkgCDDUk/sFg9V81j2WDUEJSgi39ge4DC1VfQZWHlYkvz+p0DsiTwlTjoEYKzNrziw2B2/7+XU3Ljny1RSjVyioxi3/mmLH+MHxg91NN1LvDFufEyDMH/NLJ8i4npXGhSy4fQjc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682610921; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=V2IcmnDRTfsJw8B/y7QWIsoARNTmJ+ae9LSsjB/DsJA=; b=Xxn7l+qH0dkbIYL5V93jA7QQ7qi0wVbGAAUa/Ca90TiRTrutpiW6wXF/uvYYK0LlyxulBD2FuyOlyDg2OXaBIuJSC/fZm4r+LVTGEpdc44LsOy3qXApUl7Zib94/kGyAtKUKIqZ03BmgyZa9qu4sfX71zGHF6gul81Kr216aPWQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1682610921248209.70369653019281; Thu, 27 Apr 2023 08:55:21 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: ACHHUZ6ZCi5I7rfF2+nSaBUG3VfRGeVGTIoZ8VmRmeRgb4bVINh7oxDGFauw6GUWN2OfX2b+KVEbPg== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Juan Quintela , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1682610922438100004 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=C3=A9e 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 includin= g the header. =20 Cyclic inclusion is forbidden. =20 +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 =3D=3D=3D=3D=3D=3D=3D =20 --=20 2.39.2 From nobody Sat May 11 14:14:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1682610951; cv=none; d=zohomail.com; s=zohoarc; b=FbSbj9zJrXfsfLs3hA/fpbTdadfQFaGSA9NQPil3cxl3+d/ajjabnTct/zgRaXhFbVwNM1EVoY3HUFY+70eMC65t17/HovrcR1qQ0s3mbVyJkPLa56tz+u06uUf54b4RwwmScZsadC9yLtPWAGrmQx+V9vzShQEwztaR9kasR50= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682610951; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1P7UU9XkAh8MdcejAHOkstfLQyMrAhkzu8fMbugyBnE=; b=LPmWgf+mql1aoPsXU7is+jJLeNQA80wSWAkdZjnbqeoZ1VqSNVvHTgXria9MRwtZ2kQv7WAXdl9dPk0ct0mSQqGQAYht4Q2f/EVNYMsvsU8opyxlSxmAAIePIq5fvqF/6cZhXkqqzTU40nd7rbZgbYPpfdnFtawjaRvFMCYt7c0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1682610951214638.325163723243; Thu, 27 Apr 2023 08:55:51 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: ACHHUZ6UhxL0cwM5v4fqHvBdAX30kYis4QoVXB5YTTun1COAKNUe2JAUivHflEC3HbRTuIBVK1oipw== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Juan Quintela , Mark Cave-Ayland , Paolo Bonzini , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , Thomas Huth , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1682610952153100001 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=C3=A9e 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: + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D The QEMU Object Model (QOM) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D 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 ******************** =20 +QEMU Object Model Declarations +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D + +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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D =20 --=20 2.39.2 From nobody Sat May 11 14:14:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1682610931; cv=none; d=zohomail.com; s=zohoarc; b=aUQeF8X2FCDjzYtBXiKufw5jrNkkX4ZZVxc3QYeFmb8LD9tXjhtveQLhWB+ZDo/+VBY/z7spd6w9vHEUc+KbHIvzryB+OIieo6o/P4UzorCMcdt55QErH2rvx0p48IXpXfRoUMThaMx3zZ1QgeJKM5dwiLl95tl9m8e6FJNcuTM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682610931; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Ce0cdJ9i1NfBLh1+Cb1T4HPYjQLrv+NJRBLrnGH/7bo=; b=VlLh5flKtDLOp2JClNe0f/+hIHov9z67qZQ1ykD0H8Xv9BDOqsL9gx+9Fn9pDP646RPPGX442ZqumpQ1h/ftFiVjqyKyZrb8nwTLTF55dZihUEDxYjwOWMM2lURMOe3Vp7gvKUUYseQwwZmYOSedVIkQhSMV4Z4//17P5jGhW+I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1682610931641941.2626061261291; Thu, 27 Apr 2023 08:55:31 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: ACHHUZ4GOR01TJ9omc3Zb5sMrTzh/eu99XyqvcLHyWsr3SJMZUCsy+dtJt1w4HIPpngKzRkcNO/ysw== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Juan Quintela , Vladimir Sementsov-Ogievskiy , =?UTF-8?q?Daniel=20P=2E=20Berrang=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1682610932217100001 There use makes our code safer so we should mention them. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 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. =20 +QEMU GUARD macros +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +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 =3D do_the_thing(kid->child); + if (err < 0) { + return err; + } + } + } + Error handling and reporting =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D =20 --=20 2.39.2