From nobody Sun Nov 24 14:58:58 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=1722266886; cv=none; d=zohomail.com; s=zohoarc; b=FKcCoaXuOfGOWInWlorDh0XEz+zrHv98Crp+8BI4PKe9cVO7M3mPW5Xf63ciLOLuO+UtL6gpVdMZjGWdhRMexfJP6S0Z9Vmwu53RWfiI/ii40vSmTnMJPgJL7KqIDVALdHE7xR6gi+PVPTOHlSFr9za6WdXonTlE2t8XkxrrQ30= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722266886; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=1/zGXteK/S9WGQeoxuzITGtgb8/HqBY0j6sCJN6VEFg=; b=HwjqpODew+OcHLPwnNZqL8+oX1Qhh7lnCnz7MHKwHLObPP3njGceiTqYwqG1nuRv7/+IP1w/IV6YUaGAgWdqwOY6vVTPBu4HxxWznPKmt6p3/rECkSMWYjCJIDYL/e8bl/Ly0sYQaFNXcUODUt2ORxXQkSjyWv28+wnP+qmra70= 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 1722266886021415.55492614377715; Mon, 29 Jul 2024 08:28:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYSHg-0000lj-5A; Mon, 29 Jul 2024 11:27:36 -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 1sYSHe-0000eu-OW for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:27:34 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYSHW-0008EQ-PF for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:27:34 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-367940c57ddso1595973f8f.3 for ; Mon, 29 Jul 2024 08:27:25 -0700 (PDT) Received: from localhost.localdomain ([176.176.173.10]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42805730bd0sm185399465e9.10.2024.07.29.08.27.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Jul 2024 08:27:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722266844; x=1722871644; darn=nongnu.org; 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=1/zGXteK/S9WGQeoxuzITGtgb8/HqBY0j6sCJN6VEFg=; b=QCo2B7Oi6xdE7zx21FU/Dw32TRmz2ehtb5pJiXgmy7iZbAPBcY/w63qPbdP+Hc6fA2 sqXTfA12R5m1tUIxKtw2gMIfjro4lZ/0ewv9YCQRcuof/nd4CJybuczpsAuDCOi7g9ua c/oJgI0pUP8R4Wu6gDXXEx2luN2tBmgKy3OqK6Ly0HQOlkKKK4Gr+i0n+NXRDzBp3nbw DIkmqjIKFU8oFYzem8s9XaF+QIFqBMXgaB2KfcMzrQ5H8CAooyEUnAUQpNUrBT4FNZjL 9/aHkzMgJOJ7rSmOlS+h0IQ0HRu2n2fByOYzXONxP8va6S6ZTOLEEtaT62yp3V6CskdC 67tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722266844; x=1722871644; 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=1/zGXteK/S9WGQeoxuzITGtgb8/HqBY0j6sCJN6VEFg=; b=uGpdrYaKv/TiEmL9YBoMUSl44bEj9tF257/ZJfs6CTfBeGopkIz8IypRraE77W45Jf Lx26+yUb7AxgP9nLOQ5bEKvZprrerhwX+zophDSIr+c8g900kTWhuYEV1fUghKAlHn+q OoMQFYhJ2Sh+a/yEwXVjAYS5OBFySdhEE/qsz60FDtCPBNP1Bvc91N/8EZFYnFu3dNRy b+fvExiX2/aHLAzxKGypKkbaCQ504YaoOEHlAm6vBHDOs1I+zcTz2gpVfJLNnPz0Udv/ 4Q4MJQU6evZ4FTElbHr3y/kp3Fh6zsX1ETZvKtzz4pqKswEqozlaw4Y34kLSNDHzyPhH Wdqg== X-Gm-Message-State: AOJu0Yx7BZlOPuN428n5UeiG9sqNnV2QLeYblQzgbkBiCcTMy5IIYBba CkTm12ZWsy9C7e+Gd6szs3Eaz1YcesyBsD7Ca7ozB0J6rfuI+cPe4+nagKruAwG1S7qL+4vME/6 o X-Google-Smtp-Source: AGHT+IEY5U06Nbncn74cXiGryAK1OTD3/9JAvuPg1ZZjEcZCbaTsmrglveXEKlGjk2DmsGQyJx1Yww== X-Received: by 2002:a05:6000:bc3:b0:368:7fca:9040 with SMTP id ffacd0b85a97d-36b5d0ace36mr5431917f8f.39.1722266843611; Mon, 29 Jul 2024 08:27:23 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Markus Armbruster Subject: [PULL 01/14] docs: add test for firmware.json QAPI Date: Mon, 29 Jul 2024 17:27:01 +0200 Message-ID: <20240729152714.10225-2-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729152714.10225-1-philmd@linaro.org> References: <20240729152714.10225-1-philmd@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::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722266887422116600 From: Thomas Wei=C3=9Fschuh To make sure that the QAPI description stays valid, add a testcase. Suggested-by: Philippe Mathieu-Daud=C3=A9 Link: https://lore.kernel.org/qemu-devel/d9ce0234-4beb-4b90-b14c-76810d3b81= d7@linaro.org/ Reviewed-by: Daniel P. Berrang=C3=A9 Acked-by: Markus Armbruster Signed-off-by: Thomas Wei=C3=9Fschuh Tested-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240724-qapi-firmware-json-v7-1-12341f7e362d@linutronix.de> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- docs/meson.build | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/meson.build b/docs/meson.build index 9040f860ae..322452c877 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -99,3 +99,8 @@ if build_docs alias_target('html', sphinxdocs) alias_target('man', sphinxmans) endif + +test('QAPI firmware.json regression tests', qapi_gen, + args: ['-o', meson.current_build_dir() / 'qapi', + meson.current_source_dir() / 'interop/firmware.json'], + suite: ['qapi-schema', 'qapi-interop']) --=20 2.45.2 From nobody Sun Nov 24 14:58:58 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=1722266865; cv=none; d=zohomail.com; s=zohoarc; b=Vw1dhyFesaR7u8/Oi682EaAD24jcuuiRZZKUaZfguXmyWVeuXSMcnu18zhQM6r+lDMS68UB+SSO8m7hFjP3hXnjBgoirESeX6UhnVD/FOqCxN2pmcOyZqOp3lvMbKVQ+ZprmUKwkwyGELDD/XPMNzKAt9q/SdWQUY+txRT0ivyA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722266865; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=X07qTbL83zQOZhtssmu4m+yBs6p/aBS1K1qhIZAMOfc=; b=JbqP7wEte8mQwc6avwMjRL/1YfZlS+22OzU4SYvIcV3bY1+efPe4HeqqMSsYTxRgDpWbBJ6uoZXBg5PJleJrJgG5ZsBHeLIZBrB3iyn1lErCGKKg3upgT/zJYlDtI4s7Vh3FjXmml6DKi3p0OzLc4YjuQIFfU3INx4b4MIbeTGc= 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 1722266864970790.5006138163504; Mon, 29 Jul 2024 08:27:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYSHf-0000hm-FT; Mon, 29 Jul 2024 11:27: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 1sYSHe-0000eG-J2 for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:27:34 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYSHb-0008Et-J0 for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:27:34 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-427ffae0b91so23132135e9.0 for ; Mon, 29 Jul 2024 08:27:31 -0700 (PDT) Received: from localhost.localdomain ([176.176.173.10]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-428068cda0csm175854995e9.47.2024.07.29.08.27.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Jul 2024 08:27:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722266850; x=1722871650; darn=nongnu.org; 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=X07qTbL83zQOZhtssmu4m+yBs6p/aBS1K1qhIZAMOfc=; b=FejViZJrSDngSBRkiDR5RMhQ84XQHu8SdLms30SqjbdN9hANIlCAxQR/6PWaRnpWeD sggY/ClXqEjk94t8jlkyaJwalj6OY6c4vn9W4WWF0ZPaUWFGVfEjb4ijeHkvWc9CcO2i zSTmYVNnIxo/P/HYb6hA9Gs3kxD5WI6/ttVDoG8lJ980ljo94y94SQU3zi2LPFAQo8l4 9k+h4hdpig26qY9pfXADnzXa04UJJ1TqrlGK/t/mNsyZRnniBfhbAhEDyYvGOcbERbSF PLx0cMZ5EuyR/8uyBRFWsZA4jLhN4f3/XfZjRAPZ9uveaqEGlFTaG/IiHLLaJnhk8ttZ aqmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722266850; x=1722871650; 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=X07qTbL83zQOZhtssmu4m+yBs6p/aBS1K1qhIZAMOfc=; b=Fg/glw4MS3IxdJTuCAdP0q1KSmLLpPD+Ou+++/D3vTGYmMSZZ4C/nsKrsQtgE81FXe u8AoJf0ATHsvX4Bjv0VbjZxCzJh80F96JrNBux5RnYdoDH1liolMSgbKYZi4LwOopxuy p6rJ1K/YhtDrP/2SiKYJ8JItZlFxpYSDtdHm2toUdqJ7gNLQN9G7d2k5dS1umVHrWoJ5 Ph3TrEwBprYFggFdlKpLfgSTLxeyR4Nz3krxcmpY0DWnZAnR0EjzSdqKrxRP5TSbptIE gOKYaewI0XchyUtFuqhgB8GfMV3zTlg1sw5ANTz7K6Pr9NBV7UMHSZhnssBSw06fSJG6 cKQg== X-Gm-Message-State: AOJu0YzfKquJz3K07678IXDfbpAGku7D5LgGyp/XiTnENWEsjqy2K7SK N5AQ6sz63XfY7/q0s3G3muTQ0j8HqVl532n/B0IMw/ogNDk0nw5i7V3z2vmOENfd8EANkCJLB+H b X-Google-Smtp-Source: AGHT+IGO21+j3xAf5g1EFviOS/I4pXKtc1jgfOYi0YHS5yJPU2ag9DvRxonL4TwX48/7JVhPsIQ2kA== X-Received: by 2002:a05:600c:4e90:b0:426:59d3:8cae with SMTP id 5b1f17b1804b1-42811d8c44amr68772135e9.13.1722266849481; Mon, 29 Jul 2024 08:27:29 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-stable@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 02/14] docs/sphinx/depfile.py: Handle env.doc2path() returning a Path not a str Date: Mon, 29 Jul 2024 17:27:02 +0200 Message-ID: <20240729152714.10225-3-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729152714.10225-1-philmd@linaro.org> References: <20240729152714.10225-1-philmd@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::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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: 1722266865311116600 From: Peter Maydell In newer versions of Sphinx the env.doc2path() API is going to change to return a Path object rather than a str. This was originally visible in Sphinx 8.0.0rc1, but has been rolled back for the final 8.0.0 release. However it will probably emit a deprecation warning and is likely to change for good in 9.0: https://github.com/sphinx-doc/sphinx/issues/12686 Our use in depfile.py assumes a str, and if it is passed a Path it will fall over: Handler for event 'build-finish= ed' threw an exception (exception: unsupported operand type(s) for +: 'Posi= xPath' and 'str') Wrapping the env.doc2path() call in str() will coerce a Path object to the str we expect, and have no effect in older Sphinx versions that do return a str. Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2458 Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240729120533.2486427-1-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- docs/sphinx/depfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sphinx/depfile.py b/docs/sphinx/depfile.py index afdcbcec6e..e74be6af98 100644 --- a/docs/sphinx/depfile.py +++ b/docs/sphinx/depfile.py @@ -19,7 +19,7 @@ =20 def get_infiles(env): for x in env.found_docs: - yield env.doc2path(x) + yield str(env.doc2path(x)) yield from ((os.path.join(env.srcdir, dep) for dep in env.dependencies[x])) for mod in sys.modules.values(): --=20 2.45.2 From nobody Sun Nov 24 14:58:58 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=1722266910; cv=none; d=zohomail.com; s=zohoarc; b=H6lYrDbDARgXATQ9iadQiF/zzOnHRwc9Iuh0YCZmduFr1hvicnIyB8ECQPwDgVz7Vtbl2B6c26XEbqtqlWlIQxkRu9ocrAMSlil8CPi/XvERT6pKmLOOLIi/zD3jegKZbAtoFSW8eqFG6BaXmNqpLdw+CLbymv8uqeJZSvKFbNM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722266910; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=FL/ZPZYccUWSxTKfYMWLY3Pr4brfg/yi6VP3FOnE2ts=; b=crlE6uJBN/YlmYziKPNNsAXaHQ76ibAsg4zS9LsPbRMUrHydE4NBy/nPQWwW9eIaSwnzOS2ck37o6EjkSVyoZza4Wro8WCkuCNWdg/k8ZAGtQxWuiDsMCuJ7zLWsAoXR7jkbDWrYhajpXlhoo3Di848ioZIS0fWrgwN+sAQdluM= 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 1722266910875632.4032744434455; Mon, 29 Jul 2024 08:28:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYSHo-0001H9-12; Mon, 29 Jul 2024 11:27:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sYSHj-00013z-Tc for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:27:40 -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 1sYSHh-0008Fj-K2 for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:27:39 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-427b1d4da32so11169075e9.0 for ; Mon, 29 Jul 2024 08:27:37 -0700 (PDT) Received: from localhost.localdomain ([176.176.173.10]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b367f0e26sm12513213f8f.47.2024.07.29.08.27.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Jul 2024 08:27:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722266856; x=1722871656; darn=nongnu.org; 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=FL/ZPZYccUWSxTKfYMWLY3Pr4brfg/yi6VP3FOnE2ts=; b=UBciM1CREDudpU8DKsAfNDe3kN2snIoHQCa4poEA5fwc+tbBxM86uUtGK3z4bIadBJ kWkCS9+biAWxBWgXDCRVyLAmxkkn4k5NDPE6uYGmNwlpKuH18uvbycYXVCGIFW29lCOP ea7FL3PSRau4OrNIX42NPpElb/EyFohs4SL8NtbkmP7jNdxaBSc0hE7k9Xf3roQBEoaf h4A2Qk4qhocoP8YodmNJ4chj4Rz+brp2GKc+hdMuey1ADNcBquiJw2dIWUI1Fsf/pb+c ZUmPNsjI692kYmlu5/ip5GGW1BpyPxbZTNr5ZPkJ72U0DH78ga/u7nYW3jwOZnPjj/8k kRTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722266856; x=1722871656; 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=FL/ZPZYccUWSxTKfYMWLY3Pr4brfg/yi6VP3FOnE2ts=; b=xB40LNzSJJVViG2Q8w93HcU06aYGwiivatGvWC5Nf7IThmV8Xwc1GwMy5fZMdSmM6L goWQ+boEC50qRiqsLoM7nwG63yRLU3PAc4ZXudSXK+pqIJoSrsLR5CXCdHZV9R1FdpVI +Z9IRdftcRmBqp2LGq9LZWtL73E69naNnXS3W5kWkLxQ4+n505XgvfuZy5cCAva5sJ4G 3EYDdkf+13n6+ySJOMyOj0J++BMKvtRYhhMWhD7c8qT4S9/Dm+X979CaKnAGCbsdoGv0 CGoTzrRGiZhuaqMnm2G/DwKV5uRzLvP3/yJnAdvTJnPe1n2A9Mqv20Bex+hW0lSNkw/+ TGFA== X-Gm-Message-State: AOJu0Yy6FJxtjgLerP/L9FnxedYk0rhWZHULPqfxcNTPgpWReZ1andw3 VHnZgfjzwq7tNUNabfm9ywM0ZxBdU076iVzoyx+K9A4+YPvvgxF7TnbZ/L/Y1sM8QIzA8UHdiuv J X-Google-Smtp-Source: AGHT+IFTq9mW+t3SB8tIw1r+RJVtnMv8GjHrE8u2BJPv23gMI6GGTSZOPsTn6T1rVeCfk2v8v0htOA== X-Received: by 2002:a05:600c:1c93:b0:428:29e:67cc with SMTP id 5b1f17b1804b1-42811e7228emr56389085e9.10.1722266855637; Mon, 29 Jul 2024 08:27:35 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 03/14] python: Install pycotap in our venv if necessary Date: Mon, 29 Jul 2024 17:27:03 +0200 Message-ID: <20240729152714.10225-4-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729152714.10225-1-philmd@linaro.org> References: <20240729152714.10225-1-philmd@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=philmd@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 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: 1722266911412116600 From: Thomas Huth The upcoming functional tests will require pycotap for providing TAP output from the python-based tests. Since we want to be able to run some of the tests offline by default, too, let's install it along with meson in our venv if necessary (it's size is only 5 kB, so adding the wheel here should not really be a problem). The wheel file has been obtained with: pip download --only-binary :all: --dest . --no-cache pycotap Signed-off-by: Thomas Huth Tested-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240724175248.1389201-2-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- python/wheels/pycotap-1.3.1-py3-none-any.whl | Bin 0 -> 5119 bytes pythondeps.toml | 1 + 2 files changed, 1 insertion(+) create mode 100644 python/wheels/pycotap-1.3.1-py3-none-any.whl diff --git a/python/wheels/pycotap-1.3.1-py3-none-any.whl b/python/wheels/p= ycotap-1.3.1-py3-none-any.whl new file mode 100644 index 0000000000000000000000000000000000000000..9c2c7d259365c8a0487228c6878= e2c0b10ba6bdd GIT binary patch literal 5119 zcmeI0XH-+^*2hB?0-*~??*uUfq=3DgPrO$Z=3D_u0ZG@O^6~QNbe=3Do02+`gMUW;%Ec7O! zi(;gsC?Ft3iYPD6y)(}E&UnAx5BIF|JZGH`=3DePD+XaE0u@5cy1M$Q5N0H^?|l6bQv zES3d80RXr$0|3W2z$d`L8-w%?J9a_|Q(1A4=3Di{ z)PdwgFGfrnh-nv{0;09#Ai6t_@|AgzZr?iK|5`(*Jq7N=3DIa;g5F5Z#uXinMQAi&b> zl?`99PYQbEzKE-9v!mkOduJ*1JcCqzb2hr~Q?gI^$_YA?wn?>Hew1tQvP5O>WGQYj z#;O2G-DIqMmOWT1DxnLkUdbQ0XX%Q$JV?u?prCOFbKW%1n53GtgZwD_58-z`aJDI=3D$mn=3D>B(cKmxBOmq~V&0-@U zP*r-#42w!!ou^m`|Goe+OED6bGN;@nEqL}Ee-pbaThKhhVvGGPA6!#xXD>BMBJU_R zWwV|sCuh@Ewq1Vanb2J7m9kVlR%zQosM^WAC3xhBd!l~ZsTeF|MCFrSMt)wdt)bhN zJh%?kTnr7nA@P!Zfz-J!!pue5-2Tx;*dINCgo$^$ z35b$oCn+N@m+fkp1hz>ab4kX|*%8L3?_YsT)F%|>bWpN62_w5ZHO`vfLHj3S@el0_ z@%!Dmjp%x)Yo*k3B%6I@HpGVNX{=3DWM3f4M*U~a+RHhav6sBbSOaS2Y&JOwH)?e~Mf z^MV!@G48+CkC?f*1fxo_pARp5Z4{7JBl4`(29!D703;qg0ut=3D3S%B0Wi%gGvm8w+4 zFN>DabeFD@KS%>NTUd^(gwz&Y8XBF6CE9SVYAFoUagJ9z;iL~}-?+dv&;>>mU7Ko{ z?1~s-_HaUT*9&+^iI%2@Aj$nA0`nLK7-`twU!MEA*Qp`)%&2~qm3F>=3DeqiAR{y2l; z#uXDbw(<0|o?4PslQpjMu(&zBWl~@5!WGjD$I@`2Ybp=3DmRq*7K)ixkZH*BLp$7AX; zzqfoeer=3DXMBX8Gpdh<>P?;W~Qd#5{_C4Gg-cN_DZ4#H` z9tdOr5=3D;+xbVj9v@;>qReBh^fNk#n}1W6RJ%}CvFHh)Q8YQ;hlCS2YlNf_QKzlw|; zkhQl-tjnmku6rsa>(t`H+v+M)-tW}HvPfa!xebBc+jyw~3zvyH5f&#o*<{1#lNOaC zX6n0RZWePR=3DKwIxM`dN4wYI4hgs%U}c%@_jGWw=3DCeE$ox_Ndl~9;@EVv? zFuiDviL61-$1u7Tnykm1+%q%WGuEnoxOlP(&o{a^yqrmGoor%NhFc>UZ`H&$(zARi z3BvRv2I=3DBcyRAwMO2Nrqx1Kc(ZdInck*~XHimCXg9Cl4AaC6H4KGFj2iY2j2RNd zO~9pR`g(_?-_7?AKzgC4FMtWp&xoCeNQBa`phT8%LaaVl+8noinWeX6e78*Ce#R#~ zP9AP<8DC{lXVNGR2q@E5=3DPzY_!q5}K(9|Tt2KW(>T&|1`&tfVuh7vHCyhK;`dT*54<(mr*d?`s4}*IL@VQS^wi&&MN_z+U&*hEY?L80u>~;91C((!4 za~(*(yX(Bi66A-e!#5*R`}Yb#Z369-?-S))Twr_72_*>hdLl_^g6sF{Q&Zp87ORxAcH`zG>DfHwCw|)rm6=3Dze~ z17>;uG(DFblGQAu^@kK}oPqvHv&fj~hRzg$Qtm9|S21`?RntA73VsH2-S_n>jX23Cl}nlSiP&Lk68 zm@HB7f{g|fGDb9gP&q9BKFFntM)Q&qX=3Ddt6ST1RFOmt(@m$a=3Dk9`2(jJExYR3gd6j zd1uY@xtF5$g?w{6Koy^Y(%N<2J2g*)P<0hepKAt)G;Un#Ri^k>X#BV;9~En18aZph zd{%s-8JjHGqhRR{?u5Gvy%5IEX23Ucdd)66A#T<-gCnL(su`>VTx!85B}=3DnL1+3Zh zH6EIoTKc6ArI-PmjY`|iFD{=3Ddw+HPptKPM#EyyZ*#W7XUXKQ9=3DEzE=3DC$aG5aJ2R-D z=3D&%*mArzTk8y0H{RIskm^}Tmji&eI*YE2GdP)xqV9-PfuT*PiE_ORV0PAub_+9O6; z!%(pcW9L}QwQg968t`f9)e8&XLg$-yM91?*Ot0iT3+Pi2$5xbduD8`K^8QF-CPTd0 ze@J3CKMcgp%h?1_>Uw;YNIr?G*B9mro<#p zdD@`72Ykagq+RlDR*Ej;9E}E?i9jzpq`}jy~YuufgWjpvgG5 zyBf4ol$Di>)}_P>Q?0&5@>}_WZkjwRpDrWe+$bz5x_MRZN%=3DFU1rhpipaa=3Duy@^Du zqzKid0xecCBgA)8LHkt|FQ46j%8>!Nl$Z-jvhGP$a4`wah8t#zOHC%YU#%{C-eNUY z4TLF=3DE=3DQp8Cc62dYKyE5p>OUT^%7npxY9pz?i~aYMl!8-I+D$H(-XDIr>zntd^5ka zckRMTG9MUw}HX?)oVsmpHJ(wH1;-6&oX~rJb|H>J73I|?>4Js(XPptcGce4 z%;VM0^|$^@Op4)@6O$GgjxJBSZj{ZFsnkZR)mtJ&qT{F6%9^+n>+=3D59pH+vMb-mzH zqFY;x^7V$gCpXHIbnMr{fOpQ*(F-!apUqwQ@QG&lDT}L;pIo8EH;+J({m)-JqFel* zp-f*45-zvt7%_aD4ODh|j3VTc)_*Kx^9+O(mS<>HUt8_{5OJuLbK^Rs96b_~mQyJk z*+Ktt#%1ahr_sIOn`R*|AkCc@S;UKz@>vM1sG8QCVF~u>vMko+oJ+V(3RMev@vl+g z9SGmAd&Yy%+&-#_u86qgz?!qd?@f)U(L>{q(|{Mdm~;W%{>@J7WVgcipHc*;I`1nPDF<+qDy&`eR!~^F=3DHdA^vqA&Ae>*FEUx_FA;Z{eFh0d_} z*WPy-%7^aoX4>~+dIrw>+90(=3DuEYyK=3Dk9=3Da7t-PbW?kZqPa<;{GWliLc1mtM`Gj zxm~`iO`x#S>W%;hYC_B)2=3D@)%RMdof(?;E^)ki82x=3D>QafOvZt$a_6wvpwKW66KTo zl=3DlJ-S#js)spm=3Dq1A8?-pZ9Y{`fEJ~C@N-F6wXg7wJG(%AE{k22hNcun4Zv8&V9tt zr@$Xr;!uE6AF7gfH(rnIAXUA;KGR+$3MmbsikMGNUvu0P^bdLtpj|UXBf$cBt9D0D z-<(`o>YwEYvP2n3A6!v{K2$-zH_(>h3K)uW;h4q_GTHQ*K~B!8!CAY<>$r!goJ2SA zol40IMKjAgM_)sIx*r|T{OJXY@a#r+Efo9k(7>(dPBAqgWO1myJKz)+pB z8Tq-j`cs_)9fgGq<#pFx7k3iY_F_lm2nf$ny)Bv9_k6vDU-kX0JkZK**fxP#Co|SCl|k zmY^KnJ4rg-aA&C=3D7#Fj2H}+mKORV0cX}{;UP4QsGC6$hCspopS7MY(g@1i&~Edy>; zAc=3D-lksjf8DN%{Vvd*)%d|vJ%a<}_(mjmJs;~jldOI+!s z7e0{fiDrp06*TUlBK@qyY|?#}A7Jd3z3hD6bch-uNJv@8{`pwu_&@!26@`9({LLZF zp8iD$h2jGvP<8!LVQ+J6B4X~_69?C;vUAF$}-oc?z-zr+5h zlmBk^eun*AW`Dr+Y5p1Zd(r)w_Os-F(CFy@nf99j{EYfpraw@{zd-#(v_B(%7VGcG edXmjwApa#@BLu~9Bl6ufr~s&Av1c%TfBQc=3DvADJX literal 0 HcmV?d00001 diff --git a/pythondeps.toml b/pythondeps.toml index f6e590fdd8..0bc4144d4b 100644 --- a/pythondeps.toml +++ b/pythondeps.toml @@ -20,6 +20,7 @@ [meson] # The install key should match the version in python/wheels/ meson =3D { accepted =3D ">=3D1.1.0", installed =3D "1.2.3", canary =3D "m= eson" } +pycotap =3D { accepted =3D ">=3D1.1.0", installed =3D "1.3.1" } =20 [docs] # Please keep the installed versions in sync with docs/requirements.txt --=20 2.45.2 From nobody Sun Nov 24 14:58:58 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=1722266970; cv=none; d=zohomail.com; s=zohoarc; b=aPsx37SsSbrZcTEfrgwsv3kP6hJqD8dypPaBM6K97RH4nqizxPpBazLcArZJLVXdeKQSygmRgAydxk+8AIVsj8RRZ5IHuhwmF95f6uu3cQ0u538qGShs/iM7RQ2MT9EFCIXIhpZo8QLNrMzk3MA/UL/PktmXdkip331nY4RFuvk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722266970; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=KBqoPLgA3/9ZofvfJWZLzCibdmlqkba0mV85fMinUUM=; b=JOY1th/T9pirrRApdJ5KlGFGXOsUf4S66TGFGvKAa52ImyYM7ty7X/XxWT58Gby6kPVy8OiUl52rMmQXkIakCyA65K24aJ/FRuUTQmfjCga+qaF6zNkhW4+JeTbay1RH20xycbMmj2dcak+NDyRwnQh8KdnJ2iY2NSbQhhTlvak= 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 172226697018283.36712963341154; Mon, 29 Jul 2024 08:29:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYSI1-00026H-ON; Mon, 29 Jul 2024 11:27:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sYSHs-0001eI-0W for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:27:49 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYSHn-0008GD-Kx for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:27:46 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-428035c0bb2so11104735e9.1 for ; Mon, 29 Jul 2024 08:27:43 -0700 (PDT) Received: from localhost.localdomain ([176.176.173.10]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42805730bdbsm183391265e9.5.2024.07.29.08.27.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Jul 2024 08:27:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722266862; x=1722871662; darn=nongnu.org; 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=KBqoPLgA3/9ZofvfJWZLzCibdmlqkba0mV85fMinUUM=; b=NaVbAlV8HxrobbpIefSjgXnrcUi9fAD+gRb9ms6ED+AAHPLC7UpXdlKYJ6CgZqtzau lCCRxIpHKunZOJurmjjAliLLcChow9UjxV1+CiX8oLYwCmdPjgpsZMLhQRPD+pepVfO5 MFBEQBQKY7Dblmk8TMLE850L7ZEIfk8+jahdscgMsUxr8LZRTOD2sUfuu8jvBbIjh3ip 62bA4CwY4I7/J72TR5abRH6+KW7MCZQHSXnSrt4qLYj1CYZpPVXi2cnn48PejN2t2F4H QefIgwqMXveJ3S+ZLifpbdvOv/j4ernqgbJOuxyIuCcCv42LQiHza1ONe9vbHWW/vyfh p5gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722266862; x=1722871662; 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=KBqoPLgA3/9ZofvfJWZLzCibdmlqkba0mV85fMinUUM=; b=uEsX9OEihmem6C80GPjo3rjnRtEu7EP+mbCBV1T1A5S/SmtKqq45+4npGy9BwPxf6F VghtAk5ZaOvIGbPEJaKXHCyCHt5fXt74yENrnrLnNvy0Wg2nP/c1MoRaKjANMkB2vpJp b0FAC494c8lSwnXcMpefUM2m5MpYJaRCpxcwAo6+bgrhJNzEXTSFcsn+GQS0/068cg8A 99Img+lDDbYECoBmly3eYi+RE9TRMgKUVCJod9V7cTRbIi4IZwn12yyQBooXw0HQc1sn 1GQOEtFwvtjosjO1a/ckj1w4ISxfYNFFxbi020ApKhpl0TWtIE7SxdgSFLJs37w6PuRl tV1g== X-Gm-Message-State: AOJu0YwecdaDf8Qwxk4AQ9dfzNdTb4M2gVf06SRyEYHqVBnvZobe0QtS M9hWS12aI/1pwPG6E9EdGaJgi9T8R4fuC0s8IOcNOGU4CnVIiJTPEiumMLCUzSIkPmPjK5fcNqT j X-Google-Smtp-Source: AGHT+IHn86wfaegvqLnD9wAeQUtx58ySzifUNpxtIHWtP5P4MC/Sr0S9DkiDdbwpg2j3ernvMXJsdA== X-Received: by 2002:a05:600c:1f96:b0:426:6252:61d9 with SMTP id 5b1f17b1804b1-42811fcb0camr49031295e9.11.1722266861716; Mon, 29 Jul 2024 08:27:41 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 04/14] tests/functional: Add base classes for the upcoming pytest-based tests Date: Mon, 29 Jul 2024 17:27:04 +0200 Message-ID: <20240729152714.10225-5-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729152714.10225-1-philmd@linaro.org> References: <20240729152714.10225-1-philmd@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::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: 1722266971692116600 From: Thomas Huth The file is mostly a copy of the tests/avocado/avocado_qemu/__init__.py file with some adjustments to get rid of the Avocado dependencies (i.e. we also have to drop the LinuxSSHMixIn and LinuxTest for now). The emulator binary and build directory are now passed via environment variables that will be set via meson.build later. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240724175248.1389201-3-thuth@redhat.com> [PMD: Updated MAINTAINERS] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 1 + tests/functional/qemu_test/__init__.py | 328 +++++++++++++++++++++++++ 2 files changed, 329 insertions(+) create mode 100644 tests/functional/qemu_test/__init__.py diff --git a/MAINTAINERS b/MAINTAINERS index 98eddf7ae1..aa03a40d01 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4127,6 +4127,7 @@ F: .travis.yml F: docs/devel/ci* F: scripts/ci/ F: tests/docker/ +F: tests/functional/ F: tests/vm/ F: tests/lcitool/ F: tests/avocado/tuxrun_baselines.py diff --git a/tests/functional/qemu_test/__init__.py b/tests/functional/qemu= _test/__init__.py new file mode 100644 index 0000000000..fc98222c52 --- /dev/null +++ b/tests/functional/qemu_test/__init__.py @@ -0,0 +1,328 @@ +# Test class and utilities for functional tests +# +# Copyright 2018, 2024 Red Hat, Inc. +# +# Original Author (Avocado-based tests): +# Cleber Rosa +# +# Adaption for standalone version: +# Thomas Huth +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +import logging +import os +import pycotap +import shutil +import subprocess +import sys +import tempfile +import time +import uuid +import unittest + +from pathlib import Path +from qemu.machine import QEMUMachine +from qemu.utils import kvm_available, tcg_available + +def _source_dir(): + # Determine top-level directory of the QEMU sources + return Path(__file__).parent.parent.parent.parent + +def _build_dir(): + root =3D os.getenv('QEMU_BUILD_ROOT') + if root is not None: + return Path(root) + # Makefile.mtest only exists in build dir, so if it is available, use = CWD + if os.path.exists('Makefile.mtest'): + return Path(os.getcwd()) + + root =3D os.path.join(_source_dir(), 'build') + if os.path.exists(root): + return Path(root) + + raise Exception("Cannot identify build dir, set QEMU_BUILD_ROOT") + +BUILD_DIR =3D _build_dir() + +def has_cmd(name, args=3DNone): + """ + This function is for use in a @skipUnless decorator, e.g.: + + @skipUnless(*has_cmd('sudo -n', ('sudo', '-n', 'true'))) + def test_something_that_needs_sudo(self): + ... + """ + + if args is None: + args =3D ('which', name) + + try: + _, stderr, exitcode =3D run_cmd(args) + except Exception as e: + exitcode =3D -1 + stderr =3D str(e) + + if exitcode !=3D 0: + cmd_line =3D ' '.join(args) + err =3D f'{name} required, but "{cmd_line}" failed: {stderr.strip(= )}' + return (False, err) + else: + return (True, '') + +def has_cmds(*cmds): + """ + This function is for use in a @skipUnless decorator and + allows checking for the availability of multiple commands, e.g.: + + @skipUnless(*has_cmds(('cmd1', ('cmd1', '--some-parameter')), + 'cmd2', 'cmd3')) + def test_something_that_needs_cmd1_and_cmd2(self): + ... + """ + + for cmd in cmds: + if isinstance(cmd, str): + cmd =3D (cmd,) + + ok, errstr =3D has_cmd(*cmd) + if not ok: + return (False, errstr) + + return (True, '') + +def run_cmd(args): + subp =3D subprocess.Popen(args, + stdout=3Dsubprocess.PIPE, + stderr=3Dsubprocess.PIPE, + universal_newlines=3DTrue) + stdout, stderr =3D subp.communicate() + ret =3D subp.returncode + + return (stdout, stderr, ret) + +def is_readable_executable_file(path): + return os.path.isfile(path) and os.access(path, os.R_OK | os.X_OK) + +def _console_interaction(test, success_message, failure_message, + send_string, keep_sending=3DFalse, vm=3DNone): + assert not keep_sending or send_string + if vm is None: + vm =3D test.vm + console =3D vm.console_file + console_logger =3D logging.getLogger('console') + while True: + if send_string: + vm.console_socket.sendall(send_string.encode()) + if not keep_sending: + send_string =3D None # send only once + try: + msg =3D console.readline().decode().strip() + except UnicodeDecodeError: + msg =3D None + if not msg: + continue + console_logger.debug(msg) + if success_message is None or success_message in msg: + break + if failure_message and failure_message in msg: + console.close() + fail =3D 'Failure message found in console: "%s". Expected: "%= s"' % \ + (failure_message, success_message) + test.fail(fail) + +def interrupt_interactive_console_until_pattern(test, success_message, + failure_message=3DNone, + interrupt_string=3D'\r'): + """ + Keep sending a string to interrupt a console prompt, while logging the + console output. Typical use case is to break a boot loader prompt, suc= h: + + Press a key within 5 seconds to interrupt boot process. + 5 + 4 + 3 + 2 + 1 + Booting default image... + + :param test: a test containing a VM that will have its console + read and probed for a success or failure message + :type test: :class:`qemu_test.QemuSystemTest` + :param success_message: if this message appears, test succeeds + :param failure_message: if this message appears, test fails + :param interrupt_string: a string to send to the console before trying + to read a new line + """ + _console_interaction(test, success_message, failure_message, + interrupt_string, True) + +def wait_for_console_pattern(test, success_message, failure_message=3DNone, + vm=3DNone): + """ + Waits for messages to appear on the console, while logging the content + + :param test: a test containing a VM that will have its console + read and probed for a success or failure message + :type test: :class:`qemu_test.QemuSystemTest` + :param success_message: if this message appears, test succeeds + :param failure_message: if this message appears, test fails + """ + _console_interaction(test, success_message, failure_message, None, vm= =3Dvm) + +def exec_command(test, command): + """ + Send a command to a console (appending CRLF characters), while logging + the content. + + :param test: a test containing a VM. + :type test: :class:`qemu_test.QemuSystemTest` + :param command: the command to send + :type command: str + """ + _console_interaction(test, None, None, command + '\r') + +def exec_command_and_wait_for_pattern(test, command, + success_message, failure_message=3DN= one): + """ + Send a command to a console (appending CRLF characters), then wait + for success_message to appear on the console, while logging the. + content. Mark the test as failed if failure_message is found instead. + + :param test: a test containing a VM that will have its console + read and probed for a success or failure message + :type test: :class:`qemu_test.QemuSystemTest` + :param command: the command to send + :param success_message: if this message appears, test succeeds + :param failure_message: if this message appears, test fails + """ + _console_interaction(test, success_message, failure_message, command += '\r') + +class QemuBaseTest(unittest.TestCase): + + qemu_bin =3D os.getenv('QEMU_TEST_QEMU_BINARY') + arch =3D None + + workdir =3D None + log =3D logging.getLogger('qemu-test') + + def setUp(self, bin_prefix): + self.assertIsNotNone(self.qemu_bin, 'QEMU_TEST_QEMU_BINARY must be= set') + self.arch =3D self.qemu_bin.split('-')[-1] + + self.workdir =3D os.path.join(BUILD_DIR, 'tests/functional', self.= arch, + self.id()) + if not os.path.exists(self.workdir): + os.makedirs(self.workdir) + + def main(): + tr =3D pycotap.TAPTestRunner(message_log =3D pycotap.LogMode.LogTo= Error, + test_output_log =3D pycotap.LogMode.Log= ToError) + path =3D os.path.basename(sys.argv[0])[:-3] + unittest.main(module =3D None, testRunner =3D tr, argv=3D["__dummy= __", path]) + + +class QemuSystemTest(QemuBaseTest): + """Facilitates system emulation tests.""" + + cpu =3D None + machine =3D None + _machinehelp =3D None + + def setUp(self): + self._vms =3D {} + + super().setUp('qemu-system-') + + def set_machine(self, machinename): + # TODO: We should use QMP to get the list of available machines + if not self._machinehelp: + self._machinehelp =3D run_cmd([self.qemu_bin, '-M', 'help'])[0= ]; + if self._machinehelp.find(machinename) < 0: + self.skipTest('no support for machine ' + machinename) + self.machine =3D machinename + + def require_accelerator(self, accelerator): + """ + Requires an accelerator to be available for the test to continue + + It takes into account the currently set qemu binary. + + If the check fails, the test is canceled. If the check itself + for the given accelerator is not available, the test is also + canceled. + + :param accelerator: name of the accelerator, such as "kvm" or "tcg" + :type accelerator: str + """ + checker =3D {'tcg': tcg_available, + 'kvm': kvm_available}.get(accelerator) + if checker is None: + self.skipTest("Don't know how to check for the presence " + "of accelerator %s" % accelerator) + if not checker(qemu_bin=3Dself.qemu_bin): + self.skipTest("%s accelerator does not seem to be " + "available" % accelerator) + + def require_netdev(self, netdevname): + netdevhelp =3D run_cmd([self.qemu_bin, + '-M', 'none', '-netdev', 'help'])[0]; + if netdevhelp.find('\n' + netdevname + '\n') < 0: + self.skipTest('no support for " + netdevname + " networking') + + def require_device(self, devicename): + devhelp =3D run_cmd([self.qemu_bin, + '-M', 'none', '-device', 'help'])[0]; + if devhelp.find(devicename) < 0: + self.skipTest('no support for device ' + devicename) + + def _new_vm(self, name, *args): + vm =3D QEMUMachine(self.qemu_bin, base_temp_dir=3Dself.workdir) + self.log.debug('QEMUMachine "%s" created', name) + self.log.debug('QEMUMachine "%s" temp_dir: %s', name, vm.temp_dir) + self.log.debug('QEMUMachine "%s" log_dir: %s', name, vm.log_dir) + if args: + vm.add_args(*args) + return vm + + @property + def vm(self): + return self.get_vm(name=3D'default') + + def get_vm(self, *args, name=3DNone): + if not name: + name =3D str(uuid.uuid4()) + if self._vms.get(name) is None: + self._vms[name] =3D self._new_vm(name, *args) + if self.cpu is not None: + self._vms[name].add_args('-cpu', self.cpu) + if self.machine is not None: + self._vms[name].set_machine(self.machine) + return self._vms[name] + + def set_vm_arg(self, arg, value): + """ + Set an argument to list of extra arguments to be given to the QEMU + binary. If the argument already exists then its value is replaced. + + :param arg: the QEMU argument, such as "-cpu" in "-cpu host" + :type arg: str + :param value: the argument value, such as "host" in "-cpu host" + :type value: str + """ + if not arg or not value: + return + if arg not in self.vm.args: + self.vm.args.extend([arg, value]) + else: + idx =3D self.vm.args.index(arg) + 1 + if idx < len(self.vm.args): + self.vm.args[idx] =3D value + else: + self.vm.args.append(value) + + def tearDown(self): + for vm in self._vms.values(): + vm.shutdown() + super().tearDown() --=20 2.45.2 From nobody Sun Nov 24 14:58:58 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=1722266926; cv=none; d=zohomail.com; s=zohoarc; b=bvFJvYFPsrNroIy8HRkZUheLoH8W1iUR3tLiS67hQzQ/J46NkfQxwP6tU1dR4rvYZd2pdkeP73QtdqSwR4kwz13zlxx9AJsmCwIY40BIwsm/GyDHnrIA1qGDr5cV0+PMaOoweI5kcsLj1jIuFw5CmH4ju2vZdL3mIMbSELfZNUM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722266926; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=f7BE/CfrHJNluE1SRipI94yPsTEJHS+QxQjczrrTgwI=; b=fieND623zSYH/rIvbC+MiVpW3i4/GTiV0H+LaySyIRP1/zxnlIw3+5TK3plj02ezQqpPEqkhwNb2p+fmgyeOPQSoVyWgKDzI2IR/QnUc1rPGEC9iF985/xIGyGUSGgqgHp7vcu7/oRHl4GmJ6Q86eWRpHjYC2NuuQLpTmskF6xA= 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 1722266926084131.6180366375205; Mon, 29 Jul 2024 08:28:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYSI3-0002Z7-6J; Mon, 29 Jul 2024 11:27: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 1sYSHw-0001tx-1v for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:27:52 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYSHt-0008Gq-OQ for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:27:51 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-428178fc07eso15318085e9.3 for ; Mon, 29 Jul 2024 08:27:49 -0700 (PDT) Received: from localhost.localdomain ([176.176.173.10]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b367fc873sm12514354f8f.60.2024.07.29.08.27.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Jul 2024 08:27:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722266868; x=1722871668; darn=nongnu.org; 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=f7BE/CfrHJNluE1SRipI94yPsTEJHS+QxQjczrrTgwI=; b=zyci+QYPSle5ic7GPu8U72byt2Hor+wbISl+4twqMkI7G9SGn0CHEqTiM2PsBRX1eA yiCBZyvBo58DTYlhV0Vg8Uh6m9QPbBAmi5naNtKMg9yxFrCCgzH2JpIHe02AIXJP7f6a s9YocWn8Nu8Ck4XomShys6ahkL1YzPEZcVA5L5SY+jnmo2M5xLFS+EFh50bJ2KHP/QxT xMSUgjv/vGPFfKMFzh7hJY1H1skApRMEMpoF1hP+ZfmBFPqxXhthRlWZZ3E9JJvFh33P qux0Jm/CxdH4bmQTFYObKLGjSf/bXwvfnIK33UUGwooZ3EvkssMz6lJQbym33VOtrSZG AaYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722266868; x=1722871668; 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=f7BE/CfrHJNluE1SRipI94yPsTEJHS+QxQjczrrTgwI=; b=Z52fUOvpIACeRka27sHRVpJgv4VwSG80qK5iLIwt1+hTE7ClsTBWDQOnTyiPFZaSGV OEqAqdaNoo8U+lhiF4EJzqV1Y4RF3rqD/CICT82iCxy4dxMTuLqi/1WfeaTlJ7bVTSMo qUTKdMtUb+q3vFfM8+r18M9I020youd0Kqy6fRm5X3k0ea7SO6a5osGF2I5Sz6xmLFek nOwDBmiU6yfaCrny4MwyDIGT/aXjVd3cuXHd2FBLtvTfGQBOtehDaO9Ljva4Jg1tod8h OWvBfczii1eZ67UZCcF/0UVuj6b63L9/7aW1/fpS5Zpw6JlDlCyFogxsnOGknlNPHaGu VW2Q== X-Gm-Message-State: AOJu0Yw74ezbZbB79sNbq3bFyqsvjsaI9F6sGIbJFflk/YdrMHv82dhg PeXcqmnAgfx7oJ3ssH7Ee0t7Js0Zp0XpGB6n2FC/syofn8NiwrU2p3H8I0QuNgxIn3T8leOH102 P X-Google-Smtp-Source: AGHT+IGWgFX/GcwrWT6ftRRtuZoMav5EJlqb0WXMMw3iVsZ7YIq1Bz613jdjiqwcJyutc/Yhkf/tbA== X-Received: by 2002:adf:e844:0:b0:367:9828:f42d with SMTP id ffacd0b85a97d-36b5d0a60b1mr5731955f8f.53.1722266867426; Mon, 29 Jul 2024 08:27:47 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 05/14] tests/Makefile.include: Increase the level of indentation in the help text Date: Mon, 29 Jul 2024 17:27:05 +0200 Message-ID: <20240729152714.10225-6-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729152714.10225-1-philmd@linaro.org> References: <20240729152714.10225-1-philmd@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::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722266927736116600 From: Thomas Huth The next patch is going to add some entries that need more space between the command and the help text, so let's increase the indentation here first. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240724175248.1389201-4-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/Makefile.include | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 6618bfed70..167d8f29a4 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -3,28 +3,28 @@ .PHONY: check-help check-help: @echo "Regression testing targets:" - @echo " $(MAKE) check Run block, qapi-schema, unit, soft= float, qtest and decodetree tests" - @echo " $(MAKE) bench Run speed tests" + @echo " $(MAKE) check Run block, qapi-schema, unit, so= ftfloat, qtest and decodetree tests" + @echo " $(MAKE) bench Run speed tests" @echo @echo "Individual test suites:" - @echo " $(MAKE) check-qtest-TARGET Run qtest tests for given target" - @echo " $(MAKE) check-qtest Run qtest tests" - @echo " $(MAKE) check-unit Run qobject tests" - @echo " $(MAKE) check-qapi-schema Run QAPI schema tests" - @echo " $(MAKE) check-block Run block tests" + @echo " $(MAKE) check-qtest-TARGET Run qtest tests for given target" + @echo " $(MAKE) check-qtest Run qtest tests" + @echo " $(MAKE) check-unit Run qobject tests" + @echo " $(MAKE) check-qapi-schema Run QAPI schema tests" + @echo " $(MAKE) check-block Run block tests" ifneq ($(filter $(all-check-targets), check-softfloat),) - @echo " $(MAKE) check-tcg Run TCG tests" - @echo " $(MAKE) check-softfloat Run FPU emulation tests" + @echo " $(MAKE) check-tcg Run TCG tests" + @echo " $(MAKE) check-softfloat Run FPU emulation tests" endif - @echo " $(MAKE) check-avocado Run avocado (integration) tests fo= r currently configured targets" + @echo " $(MAKE) check-avocado Run avocado (integration) tests = for currently configured targets" @echo - @echo " $(MAKE) check-report.junit.xml Generates an aggregated XML test r= eport" - @echo " $(MAKE) check-venv Creates a Python venv for tests" - @echo " $(MAKE) check-clean Clean the tests and related data" + @echo " $(MAKE) check-report.junit.xml Generates an aggregated XML test= report" + @echo " $(MAKE) check-venv Creates a Python venv for tests" + @echo " $(MAKE) check-clean Clean the tests and related data" @echo @echo "The following are useful for CI builds" - @echo " $(MAKE) check-build Build most test binaries" - @echo " $(MAKE) get-vm-images Downloads all images used by avoca= do tests, according to configured targets (~350 MB each, 1.5 GB max)" + @echo " $(MAKE) check-build Build most test binaries" + @echo " $(MAKE) get-vm-images Downloads all images used by avo= cado tests, according to configured targets (~350 MB each, 1.5 GB max)" @echo @echo @echo "The variable SPEED can be set to control the gtester speed setting= ." --=20 2.45.2 From nobody Sun Nov 24 14:58:58 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=1722266886; cv=none; d=zohomail.com; s=zohoarc; b=nByi6lkcav5hvqAYaTnEq1rmj2WFZuehQGC6reTU+BaFeBpagKuSos68mvtQvvxfxHbEnI3j+Y1CYsUb2/qKkO3Rwa4zDsedJrUbbtCrixZIF2vgCYFC+1eE5FqISQ5A8oCESsO9hEZUkoKSG7YpDeZEMBpbDil16UaaB3WK04g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722266886; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8PomybOz3qZzuYIDD9gWq6wUwpi3wx9FNYbcCkKRftw=; b=fw7Qtn+9aUIGJsYHuPDZc1G8G5joZnNmVTdnEkpw2loS/MxOUTqHGIQRAY3TR5bN/GCUvsIFSQeEI1U8QE5j42idxEyh5veVtvaO2SflyQRbapjaTXUuXh403KOnk4yVxfpODk7iPrfSzxHw+zXGL4+Q4/Rsjj+eAuLr7f8v5Wo= 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 1722266886069399.50742760302603; Mon, 29 Jul 2024 08:28:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYSI2-0002XB-Vi; Mon, 29 Jul 2024 11:27: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 1sYSI0-0002IH-Px for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:27:57 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYSHy-0008HY-UD for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:27:56 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-427ffae0b91so23137385e9.0 for ; Mon, 29 Jul 2024 08:27:54 -0700 (PDT) Received: from localhost.localdomain ([176.176.173.10]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4281807f701sm68443285e9.22.2024.07.29.08.27.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Jul 2024 08:27:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722266873; x=1722871673; darn=nongnu.org; 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=8PomybOz3qZzuYIDD9gWq6wUwpi3wx9FNYbcCkKRftw=; b=PLBRy+BCNiPaoGgO+Ue5aK/0LmvHunBVaaGrtNIXiv6hQ3/+m5czFc3y+ogjFohYTB EQdUT03eC4WN3gpzGt4Mln883y905rRRRM4Chs7ppgwfWuBqGcNtGLnNbv6ONSccM1MU Jvzti6mf8Tr3Z1DNzpqYC1FOJ8aYNcXgCfboIY8NRFSJBxl0AQSgdWoKaV4JvGlQAhdG g2HyAT52UUNkNrNCXqQ08TWtAodYxNaTxjYuc09dKfI2MLedc5QJWG1taiIsfBX6De42 kY806aVbTZV7jlkXjGb49j+eZfXJFOEBpU+SfF3obVPYM+rRIZUwgWKXgop0lllpkx/5 0H9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722266873; x=1722871673; 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=8PomybOz3qZzuYIDD9gWq6wUwpi3wx9FNYbcCkKRftw=; b=qI0BgLzJ3WQP5zsgPW1Eq3J5vuom8yYFnxIC8ArXVZiKg/IC+UTlZ99+Nwp8+WQA1/ tkTSlj3TsD2ebC8Zq0WEr6yewR47G7EGUbw0lt5Geu4mSdGbwNawc55ClsfDIFOd0V53 Bw+uTBnbZuUmlbZi8QBC9/Hkr3O3cQK6fcUojB2marb0NTrLnuGq9gr22trp2U0sLL90 dzMd6Qo2BvY1V23eX9jEUA5x8t6cbq7zVdpgGCYqYdMtcuWrgEOoXBDb9GxdDt5daOco 9dLpo3JKPp0CkzcpZtL4c15xlBJNxaVtta4cr2JNo8x6/85Bxe17UmJBCeL3GxCNnPGj YWFw== X-Gm-Message-State: AOJu0YyJKjv9LSOEVgUX9F15GKTq/yIA4x0VggPxMvYCbTL6gnXGOnLu hZ40prONQBOhvdyaMqbTRars6LKujyRbs3WbYtzgpQvDF65U+60tvIe4L6d3LB25sxAmP51kovn r X-Google-Smtp-Source: AGHT+IHFKZYr18oYKE5NkTFzDuhVyfo8chvEKOqkncINr0XX82DdFtfdy9qgT3xkNXpuVfOmwK+5GA== X-Received: by 2002:a05:600c:a08:b0:426:62c5:4731 with SMTP id 5b1f17b1804b1-42811dd43c9mr61447485e9.29.1722266873315; Mon, 29 Jul 2024 08:27:53 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Fabiano Rosas , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 06/14] tests/functional: Prepare the meson build system for the functional tests Date: Mon, 29 Jul 2024 17:27:06 +0200 Message-ID: <20240729152714.10225-7-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729152714.10225-1-philmd@linaro.org> References: <20240729152714.10225-1-philmd@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::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: 1722266887451116600 From: Thomas Huth Provide a meson.build file for the upcoming python-based functional tests, and add some wrapper glue targets to the tests/Makefile.include file. We are going to use two "speed" modes for the functional tests: The "quick" tests can be run at any time (i.e. also during "make check"), while the "thorough" tests should only be run when running a "make check-functional" test run (since these tests might download additional assets from the internet). The changes to the meson.build files are partly based on an earlier patch by Ani Sinha. Signed-off-by: Thomas Huth Reviewed-by: Fabiano Rosas Reviewed-by: Daniel P. Berrang=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240724175248.1389201-5-thuth@redhat.com> [PMD: Removed call to check-func target in check-functional rule] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/Makefile.include | 11 ++++++ tests/functional/meson.build | 66 ++++++++++++++++++++++++++++++++++++ tests/meson.build | 1 + 3 files changed, 78 insertions(+) create mode 100644 tests/functional/meson.build diff --git a/tests/Makefile.include b/tests/Makefile.include index 167d8f29a4..9077d5c6f0 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -9,6 +9,8 @@ check-help: @echo "Individual test suites:" @echo " $(MAKE) check-qtest-TARGET Run qtest tests for given target" @echo " $(MAKE) check-qtest Run qtest tests" + @echo " $(MAKE) check-functional Run python-based functional test= s" + @echo " $(MAKE) check-functional-TARGET Run functional tests for a given= target" @echo " $(MAKE) check-unit Run qobject tests" @echo " $(MAKE) check-qapi-schema Run QAPI schema tests" @echo " $(MAKE) check-block Run block tests" @@ -152,6 +154,15 @@ check-acceptance-deprecated-warning: =20 check-acceptance: check-acceptance-deprecated-warning | check-avocado =20 +FUNCTIONAL_TARGETS=3D$(patsubst %-softmmu,check-functional-%, $(filter %-s= oftmmu,$(TARGETS))) +.PHONY: $(FUNCTIONAL_TARGETS) +$(FUNCTIONAL_TARGETS): + @$(MAKE) SPEED=3Dthorough $(subst -functional,-func,$@) + +.PHONY: check-functional +check-functional: + @$(MAKE) SPEED=3Dthorough check-func-quick + # Consolidated targets =20 .PHONY: check check-clean get-vm-images diff --git a/tests/functional/meson.build b/tests/functional/meson.build new file mode 100644 index 0000000000..7fc9c4e513 --- /dev/null +++ b/tests/functional/meson.build @@ -0,0 +1,66 @@ +# QEMU functional tests: +# Tests that are put in the 'quick' category are run by default during +# 'make check'. Everything that should not be run during 'make check' +# (e.g. tests that fetch assets from the internet) should be put into +# the 'thorough' category instead. + +# Most tests run too slow with TCI enabled, so skip the functional tests t= here +if get_option('tcg_interpreter') + subdir_done() +endif + +# Timeouts for individual tests that can be slow e.g. with debugging enabl= ed +test_timeouts =3D { +} + +tests_generic =3D [ +] + +tests_x86_64_quick =3D [ +] + +tests_x86_64_thorough =3D [ +] + +foreach speed : ['quick', 'thorough'] + foreach dir : target_dirs + if not dir.endswith('-softmmu') + continue + endif + + target_base =3D dir.split('-')[0] + test_emulator =3D emulators['qemu-system-' + target_base] + + if speed =3D=3D 'quick' + suites =3D ['func-quick', 'func-' + target_base] + target_tests =3D get_variable('tests_' + target_base + '_quick', [])= + tests_generic + else + suites =3D ['func-' + speed, 'func-' + target_base + '-' + speed, sp= eed] + target_tests =3D get_variable('tests_' + target_base + '_' + speed, = []) + endif + + test_deps =3D roms + test_env =3D environment() + if have_tools + test_env.set('QEMU_TEST_QEMU_IMG', meson.global_build_root() / 'qemu= -img') + test_deps +=3D [qemu_img] + endif + test_env.set('QEMU_TEST_QEMU_BINARY', + meson.global_build_root() / 'qemu-system-' + target_base) + test_env.set('QEMU_BUILD_ROOT', meson.project_build_root()) + test_env.set('PYTHONPATH', meson.project_source_root() / 'python:' + + meson.current_source_dir()) + + foreach test : target_tests + test('func-@0@/@1@'.format(target_base, test), + python, + depends: [test_deps, test_emulator, emulator_modules], + env: test_env, + args: [meson.current_source_dir() / 'test_' + test + '.py'], + protocol: 'tap', + timeout: test_timeouts.get(test, 60), + priority: test_timeouts.get(test, 60), + suite: suites) + endforeach + endforeach +endforeach diff --git a/tests/meson.build b/tests/meson.build index acb6807094..3345ad2098 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -85,3 +85,4 @@ subdir('unit') subdir('qapi-schema') subdir('qtest') subdir('migration') +subdir('functional') --=20 2.45.2 From nobody Sun Nov 24 14:58:58 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=1722266977; cv=none; d=zohomail.com; s=zohoarc; b=Yj5EAYQBAOLtTMchw1NsGPTRQIM28QuUJ+g09Vb/RtQi1ZbtkNGL2Dl+FPbLtH5Xu5MUi8VgxiH4NpkmCwlG4WMzfwQS1wZ8qNu0ZuPFy6OELKjePl0Ne0xyem2/NFDB8jjREPWiYzjVR+P8NHAfZgOwY6mfQAefA2zEQj8MOrI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722266977; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=7TtsHovYmaBnbaX00mMSIqbmFg0IKysPj85jWQOERIQ=; b=Eb1SfmuiKnFIeGVrFX5nM9EdfL0ac7yhgg4Xv+lKSbnUni3C0eeReqzP7wcZ4Lr34rdJZHxNTGATeFw/CwWKywwszYa2gN0eoHaWodhNu96iZrCSi6IPkkLih/VGKQJZzwGtfm9JDWRHkn+X10wlSfUFl4c1UdQMWdQWs7Gjvg8= 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 172226697783870.38797926559084; Mon, 29 Jul 2024 08:29:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYSIK-0004E7-QC; Mon, 29 Jul 2024 11:28:17 -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 1sYSII-0003xB-Ef for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:28:14 -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 1sYSI6-0008I3-RX for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:28:14 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-428163f7635so16365235e9.2 for ; Mon, 29 Jul 2024 08:28:01 -0700 (PDT) Received: from localhost.localdomain ([176.176.173.10]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b367c0351sm12685450f8f.4.2024.07.29.08.27.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Jul 2024 08:27:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722266880; x=1722871680; darn=nongnu.org; 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=7TtsHovYmaBnbaX00mMSIqbmFg0IKysPj85jWQOERIQ=; b=ZjcSRUyUFRFWnUimXHVzOzqPeIpYwER8Xf2H6gPDwmhfQZ0CO6+7kDcQUOjcJku8R5 LDDM7gnqn7QPo1ltuhjIziogUxoS1JTlWLdn+4pry8FdZjI1WGQS3zITavCj/OSO9kLQ /2s311wCHWs87KoaLtPi2PvgJeLIp7raSePCHRPwt0qTW52RgL9w6XfOHFGoI1J+qgPi BHvU1zo6gVnsKqBnNUbEN9dJEmm9fk4rx/KEWL33KbD84PH/4CqUvDp0Y+OnNo1vfzFk uytIrW0E1871EMyleaP1tgAWTW0KJNG6xDrSVP9o89DGTu1YunKhpLVnQhjPq8NwYW0f 7KMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722266880; x=1722871680; 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=7TtsHovYmaBnbaX00mMSIqbmFg0IKysPj85jWQOERIQ=; b=bQLhf4Ox68RACZKKDM7NyTj0QUq59MiWssabCCdcTb/Dk5YXdH8icw5OaVrURcoDJ2 e4L1C5+9lFepPHBpGd+EvPK8DzGhA5kSMqquVXkSpnwUIaYlNnHIAmncgTJ6jYDgrgPQ ouoWkaGvlshrB6nCMmxqti7aeOVSUTxZ9BAEQNQ/CJdkZ4jmyU20dliw6nJxOvpQU3tq Xa0u/LryLW/bTEal8t52YrA86ZeoJ3DN+2wMoseLfCqmHXd+CcNMIwoRLJumgAE4lbfd yBoAoDF6LSRaT71bUktrDg1arga0XIWw8VUXPg/CaD7hQEbkgU3V5UT+0M/saUDK6Qbl mUqw== X-Gm-Message-State: AOJu0YzDeB//ipNX3FdfYo8tH1xlEbmDOTMuGaEUf+VUiZEx83cCU1Xj QWpn/cD6x+Lhji4/uHTP578AzmjX5pm9GMHEHeQpWVHaNoDf/yZEfiFkPbNAnQ/2PiMJvNprNqi / X-Google-Smtp-Source: AGHT+IGbHpknvwMzkA/VuxJ5BWhP8Ko/hLcr3dMJrCyNpfJIsiiamvxY0Mo8yUhesl6gNksLQw+R5Q== X-Received: by 2002:a05:6000:1ccb:b0:367:95e6:158a with SMTP id ffacd0b85a97d-36b5d0bb424mr4624226f8f.63.1722266879853; Mon, 29 Jul 2024 08:27:59 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 07/14] tests/functional: Convert simple avocado tests into standalone python tests Date: Mon, 29 Jul 2024 17:27:07 +0200 Message-ID: <20240729152714.10225-8-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729152714.10225-1-philmd@linaro.org> References: <20240729152714.10225-1-philmd@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=philmd@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 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: 1722266979745116600 From: Thomas Huth These test are rather simple and don't need any modifications apart from adjusting the "from avocado_qemu" line. To ease debugging, make the files executable and add a shebang line and Python '__main__' handling, too, so that these tests can now be run by executing them directly. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240724175248.1389201-6-thuth@redhat.com> [PMD: Updated MAINTAINERS] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 5 ++ tests/functional/meson.build | 5 ++ .../test_cpu_queries.py} | 7 ++- .../test_empty_cpu_model.py} | 7 ++- .../test_mem_addr_space.py} | 52 +++---------------- .../test_pc_cpu_hotplug_props.py} | 11 ++-- .../test_virtio_version.py} | 8 +-- 7 files changed, 39 insertions(+), 56 deletions(-) rename tests/{avocado/cpu_queries.py =3D> functional/test_cpu_queries.py} = (89%) mode change 100644 =3D> 100755 rename tests/{avocado/empty_cpu_model.py =3D> functional/test_empty_cpu_mo= del.py} (84%) mode change 100644 =3D> 100755 rename tests/{avocado/mem-addr-space-check.py =3D> functional/test_mem_add= r_space.py} (93%) mode change 100644 =3D> 100755 rename tests/{avocado/pc_cpu_hotplug_props.py =3D> functional/test_pc_cpu_= hotplug_props.py} (90%) mode change 100644 =3D> 100755 rename tests/{avocado/virtio_version.py =3D> functional/test_virtio_versio= n.py} (98%) mode change 100644 =3D> 100755 diff --git a/MAINTAINERS b/MAINTAINERS index aa03a40d01..1d84803b69 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1830,6 +1830,8 @@ F: hw/isa/apm.c F: include/hw/isa/apm.h F: tests/unit/test-x86-topo.c F: tests/qtest/test-x86-cpuid-compat.c +F: tests/functional/test_mem_addr_space.py +F: tests/functional/test_pc_cpu_hotplug_props.py =20 PC Chipset M: Michael S. Tsirkin @@ -1896,6 +1898,8 @@ F: include/hw/boards.h F: include/hw/core/cpu.h F: include/hw/cpu/cluster.h F: include/sysemu/numa.h +F: tests/functional/test_cpu_queries.py +F: tests/functional/test_empty_cpu_model.py F: tests/unit/test-smp-parse.c T: git https://gitlab.com/ehabkost/qemu.git machine-next =20 @@ -2236,6 +2240,7 @@ F: net/vhost-user.c F: include/hw/virtio/ F: docs/devel/virtio* F: docs/devel/migration/virtio.rst +F: tests/functional/test_virtio_version.py =20 virtio-balloon M: Michael S. Tsirkin diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 7fc9c4e513..a8cc0e6330 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -14,9 +14,14 @@ test_timeouts =3D { } =20 tests_generic =3D [ + 'empty_cpu_model', ] =20 tests_x86_64_quick =3D [ + 'cpu_queries', + 'mem_addr_space', + 'pc_cpu_hotplug_props', + 'virtio_version', ] =20 tests_x86_64_thorough =3D [ diff --git a/tests/avocado/cpu_queries.py b/tests/functional/test_cpu_queri= es.py old mode 100644 new mode 100755 similarity index 89% rename from tests/avocado/cpu_queries.py rename to tests/functional/test_cpu_queries.py index d3faa14720..97dd600c01 --- a/tests/avocado/cpu_queries.py +++ b/tests/functional/test_cpu_queries.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 +# # Sanity check of query-cpu-* results # # Copyright (c) 2019 Red Hat, Inc. @@ -8,7 +10,7 @@ # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. =20 -from avocado_qemu import QemuSystemTest +from qemu_test import QemuSystemTest =20 class QueryCPUModelExpansion(QemuSystemTest): """ @@ -33,3 +35,6 @@ def test(self): e =3D self.vm.cmd('query-cpu-model-expansion', model=3Dmodel, type=3D'full') self.assertEqual(e['model']['name'], c['name']) + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() diff --git a/tests/avocado/empty_cpu_model.py b/tests/functional/test_empty= _cpu_model.py old mode 100644 new mode 100755 similarity index 84% rename from tests/avocado/empty_cpu_model.py rename to tests/functional/test_empty_cpu_model.py index d906ef3d3c..0081b06d85 --- a/tests/avocado/empty_cpu_model.py +++ b/tests/functional/test_empty_cpu_model.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 +# # Check for crash when using empty -cpu option # # Copyright (c) 2019 Red Hat, Inc. @@ -7,7 +9,7 @@ # # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. -from avocado_qemu import QemuSystemTest +from qemu_test import QemuSystemTest =20 class EmptyCPUModel(QemuSystemTest): def test(self): @@ -17,3 +19,6 @@ def test(self): self.vm.wait() self.assertEqual(self.vm.exitcode(), 1, "QEMU exit code should be = 1") self.assertRegex(self.vm.get_log(), r'-cpu option cannot be empty') + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() diff --git a/tests/avocado/mem-addr-space-check.py b/tests/functional/test_= mem_addr_space.py old mode 100644 new mode 100755 similarity index 93% rename from tests/avocado/mem-addr-space-check.py rename to tests/functional/test_mem_addr_space.py index d3974599f4..bb0cf062ca --- a/tests/avocado/mem-addr-space-check.py +++ b/tests/functional/test_mem_addr_space.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 +# # Check for crash when using memory beyond the available guest processor # address space. # @@ -8,7 +10,7 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -from avocado_qemu import QemuSystemTest +from qemu_test import QemuSystemTest import time =20 class MemAddrCheck(QemuSystemTest): @@ -22,9 +24,6 @@ class MemAddrCheck(QemuSystemTest): # for all 32-bit cases, pci64_hole_size is 0. def test_phybits_low_pse36(self): """ - :avocado: tags=3Dmachine:q35 - :avocado: tags=3Darch:x86_64 - With pse36 feature ON, a processor has 36 bits of addressing. So i= t can access up to a maximum of 64GiB of memory. Memory hotplug region b= egins at 4 GiB boundary when "above_4g_mem_size" is 0 (this would be tru= e when @@ -52,9 +51,6 @@ def test_phybits_low_pse36(self): =20 def test_phybits_low_pae(self): """ - :avocado: tags=3Dmachine:q35 - :avocado: tags=3Darch:x86_64 - With pae feature ON, a processor has 36 bits of addressing. So it = can access up to a maximum of 64GiB of memory. Rest is the same as the= case with pse36 above. @@ -72,9 +68,6 @@ def test_phybits_low_pae(self): =20 def test_phybits_ok_pentium_pse36(self): """ - :avocado: tags=3Dmachine:q35 - :avocado: tags=3Darch:x86_64 - Setting maxmem to 59.5G and making sure that QEMU can start with t= he same options as the failing case above with pse36 cpu feature. """ @@ -91,9 +84,6 @@ def test_phybits_ok_pentium_pse36(self): =20 def test_phybits_ok_pentium_pae(self): """ - :avocado: tags=3Dmachine:q35 - :avocado: tags=3Darch:x86_64 - Test is same as above but now with pae cpu feature turned on. Setting maxmem to 59.5G and making sure that QEMU can start fine with the same options as the case above. @@ -111,9 +101,6 @@ def test_phybits_ok_pentium_pae(self): =20 def test_phybits_ok_pentium2(self): """ - :avocado: tags=3Dmachine:q35 - :avocado: tags=3Darch:x86_64 - Pentium2 has 36 bits of addressing, so its same as pentium with pse36 ON. """ @@ -130,9 +117,6 @@ def test_phybits_ok_pentium2(self): =20 def test_phybits_low_nonpse36(self): """ - :avocado: tags=3Dmachine:q35 - :avocado: tags=3Darch:x86_64 - Pentium processor has 32 bits of addressing without pse36 or pae so it can access physical address up to 4 GiB. Setting maxmem to 4 GiB should make QEMU fail to start with "phys-bits too low" @@ -153,9 +137,6 @@ def test_phybits_low_nonpse36(self): # now lets test some 64-bit CPU cases. def test_phybits_low_tcg_q35_70_amd(self): """ - :avocado: tags=3Dmachine:q35 - :avocado: tags=3Darch:x86_64 - For q35 7.1 machines and above, there is a HT window that starts at 1024 GiB and ends at 1 TiB - 1. If the max GPA falls in this range, "above_4G" memory is adjusted to start at 1 TiB boundary for AMD c= pus @@ -182,9 +163,6 @@ def test_phybits_low_tcg_q35_70_amd(self): =20 def test_phybits_low_tcg_q35_71_amd(self): """ - :avocado: tags=3Dmachine:q35 - :avocado: tags=3Darch:x86_64 - AMD_HT_START is defined to be at 1012 GiB. So for q35 machines version > 7.0 and AMD cpus, instead of 1024 GiB limit for 40 bit processor address space, it has to be 1012 GiB , that is 12 GiB @@ -205,9 +183,6 @@ def test_phybits_low_tcg_q35_71_amd(self): =20 def test_phybits_ok_tcg_q35_70_amd(self): """ - :avocado: tags=3Dmachine:q35 - :avocado: tags=3Darch:x86_64 - Same as q35-7.0 AMD case except that here we check that QEMU can successfully start when maxmem is < 988G. """ @@ -224,9 +199,6 @@ def test_phybits_ok_tcg_q35_70_amd(self): =20 def test_phybits_ok_tcg_q35_71_amd(self): """ - :avocado: tags=3Dmachine:q35 - :avocado: tags=3Darch:x86_64 - Same as q35-7.1 AMD case except that here we check that QEMU can successfully start when maxmem is < 976G. """ @@ -243,9 +215,6 @@ def test_phybits_ok_tcg_q35_71_amd(self): =20 def test_phybits_ok_tcg_q35_71_intel(self): """ - :avocado: tags=3Dmachine:q35 - :avocado: tags=3Darch:x86_64 - Same parameters as test_phybits_low_tcg_q35_71_amd() but use Intel cpu instead. QEMU should start fine in this case as "above_4G" memory starts at 4G. @@ -264,9 +233,6 @@ def test_phybits_ok_tcg_q35_71_intel(self): =20 def test_phybits_low_tcg_q35_71_amd_41bits(self): """ - :avocado: tags=3Dmachine:q35 - :avocado: tags=3Darch:x86_64 - AMD processor with 41 bits. Max cpu hw address =3D 2 TiB. By setting maxram above 1012 GiB - 32 GiB - 4 GiB =3D 976 GiB, we= can force "above_4G" memory to start at 1 TiB for q35-7.1 machines @@ -291,9 +257,6 @@ def test_phybits_low_tcg_q35_71_amd_41bits(self): =20 def test_phybits_ok_tcg_q35_71_amd_41bits(self): """ - :avocado: tags=3Dmachine:q35 - :avocado: tags=3Darch:x86_64 - AMD processor with 41 bits. Max cpu hw address =3D 2 TiB. Same as above but by setting maxram between 976 GiB and 992 Gib, QEMU should start fine. @@ -312,9 +275,6 @@ def test_phybits_ok_tcg_q35_71_amd_41bits(self): =20 def test_phybits_low_tcg_q35_intel_cxl(self): """ - :avocado: tags=3Dmachine:q35 - :avocado: tags=3Darch:x86_64 - cxl memory window starts after memory device range. Here, we use 1= GiB of cxl window memory. 4G_mem end aligns at 4G. pci64_hole is 32 Gi= B and starts after the cxl memory window. @@ -335,9 +295,6 @@ def test_phybits_low_tcg_q35_intel_cxl(self): =20 def test_phybits_ok_tcg_q35_intel_cxl(self): """ - :avocado: tags=3Dmachine:q35 - :avocado: tags=3Darch:x86_64 - Same as above but here we do not reserve any cxl memory window. He= nce, with the exact same parameters as above, QEMU should start fine ev= en with cxl enabled. @@ -352,3 +309,6 @@ def test_phybits_ok_tcg_q35_intel_cxl(self): time.sleep(self.DELAY_Q35_BOOT_SEQUENCE) self.vm.shutdown() self.assertNotRegex(self.vm.get_log(), r'phys-bits too low') + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() diff --git a/tests/avocado/pc_cpu_hotplug_props.py b/tests/functional/test_= pc_cpu_hotplug_props.py old mode 100644 new mode 100755 similarity index 90% rename from tests/avocado/pc_cpu_hotplug_props.py rename to tests/functional/test_pc_cpu_hotplug_props.py index 4bd3e02665..9d5a37cb17 --- a/tests/avocado/pc_cpu_hotplug_props.py +++ b/tests/functional/test_pc_cpu_hotplug_props.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # # Ensure CPU die-id can be omitted on -device # @@ -20,16 +21,16 @@ # License along with this library; if not, see . # =20 -from avocado_qemu import QemuSystemTest +from qemu_test import QemuSystemTest =20 class OmittedCPUProps(QemuSystemTest): - """ - :avocado: tags=3Darch:x86_64 - :avocado: tags=3Dcpu:qemu64 - """ + def test_no_die_id(self): self.vm.add_args('-nodefaults', '-S') self.vm.add_args('-smp', '1,sockets=3D2,cores=3D2,threads=3D2,maxc= pus=3D8') self.vm.add_args('-device', 'qemu64-x86_64-cpu,socket-id=3D1,core-= id=3D0,thread-id=3D0') self.vm.launch() self.assertEqual(len(self.vm.cmd('query-cpus-fast')), 2) + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() diff --git a/tests/avocado/virtio_version.py b/tests/functional/test_virtio= _version.py old mode 100644 new mode 100755 similarity index 98% rename from tests/avocado/virtio_version.py rename to tests/functional/test_virtio_version.py index afe5e828b5..eb23060564 --- a/tests/avocado/virtio_version.py +++ b/tests/functional/test_virtio_version.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Check compatibility of virtio device types """ @@ -12,7 +13,7 @@ import os =20 from qemu.machine import QEMUMachine -from avocado_qemu import QemuSystemTest +from qemu_test import QemuSystemTest =20 # Virtio Device IDs: VIRTIO_NET =3D 1 @@ -60,8 +61,6 @@ class VirtioVersionCheck(QemuSystemTest): Check if virtio-version-specific device types result in the same device tree created by `disable-modern` and `disable-legacy`. - - :avocado: tags=3Darch:x86_64 """ =20 # just in case there are failures, show larger diff: @@ -173,3 +172,6 @@ def test_modern_only_devs(self): self.check_modern_only('virtio-mouse-pci', VIRTIO_INPUT) self.check_modern_only('virtio-tablet-pci', VIRTIO_INPUT) self.check_modern_only('virtio-keyboard-pci', VIRTIO_INPUT) + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() --=20 2.45.2 From nobody Sun Nov 24 14:58:58 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=1722266909; cv=none; d=zohomail.com; s=zohoarc; b=fU52R1vDkURhMz8pO33dTs/l0Ex8UHPf8/GfXJ0zuJXkhvhRj+N0teb2xCmeKn3YFHAfrg/PwPU5HBD1JwmD8vi1t3BdeMWa/8DGd4Le4FOL9LB3WRnXKlWksH8fVyNQOWPZyxNJ4bgCGZmiPlVeO2ePN+1D3W2V70UAann/8lI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722266909; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+FkWKuKtm3cf9wl2kIVdOE8LPsOxAfVlikpttFpluek=; b=cSpprbQ11+w0LhvC0fZcXk6oa9XdA3JsD+tiKZnGBqcmlyGMeM0bNo4GTKQ2R8iyIOV+gWDr0CDU3R9LOXRvywpICqYdHhKFK0PVykRaW4hD8DSWedc2CafBmdZgSIJPWSWeleHMjtJtCZjm4/yFIenwT7Kv2p9gfI0UhySOT4g= 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 172226690919256.09610316311796; Mon, 29 Jul 2024 08:28:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYSIJ-00040z-4O; Mon, 29 Jul 2024 11:28:15 -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 1sYSIH-0003nm-1c for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:28:13 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYSIC-0008Lf-P6 for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:28:12 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4281e3b2f72so7836545e9.1 for ; Mon, 29 Jul 2024 08:28:08 -0700 (PDT) Received: from localhost.localdomain ([176.176.173.10]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4280f484cdesm118324465e9.44.2024.07.29.08.28.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Jul 2024 08:28:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722266886; x=1722871686; darn=nongnu.org; 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=+FkWKuKtm3cf9wl2kIVdOE8LPsOxAfVlikpttFpluek=; b=pR5LumrKB6DUpO1ZfueszxyHEV5s7YmbX5xmSKWJtIeCXErxIdH63oAZpthyaB/gfU IMlafb0uxfqYmlLCgaGTKC8YWiT+EatLzpAw3IF5q3lMxjQ0xSgpVdPdh/JDc2sMRdO3 PMrBQUsVOmamYAqtz/cBgdBZ3M6inS07LL0aRu7mGjd9KVYmmyDVWyuSGTPoa2r4f8SG H1eV3ng8PsY80HixaS1oKMpuEL47V9H2eMNlJysRHp/ScihBOy/PnCWXDoIrRKQ6qDvb ZBE92Xg8IH5dTY/LryEvpwwcIk04TfbNgE7c0WFUZTFK46ng85DqIsjxP0HwVFJX3FEF SXmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722266886; x=1722871686; 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=+FkWKuKtm3cf9wl2kIVdOE8LPsOxAfVlikpttFpluek=; b=kvlXWn9OFJZZ1CeDxfn58QcOtdQpuG/bHNJxCBwmVS4jni4+nS7qUG55ewrlABooKp juFINIe8KRSgSYbBxGYrTuArlbMSuS27bGjVmnyZ+MGFFKbwV6yEe3QXLZd5/rBX9SKq GYG8tO63Fk9SXDJwl9S6R68ZZ6VOungaziJL+NQ5FJetzpzfLRxW+7eznrJUdH1cwwlA kIhIppecnQ++sa2YUSCJklhpaCJYK2qQv3bi5Ql1ST9coWXEE06OwPG+76fT/WqghFmw uW18SL39Xd/RpLvyHgjh1Az7pow54vKXBVodhk09BLOWw3zRXyhJTSvqkh3peC1p0ehf 5UEQ== X-Gm-Message-State: AOJu0YwcRmPK+mJLr2LokoZE3pPTQb0eMmTYH1WxOBzZEMCqyOU1CAv1 YT8qQxDVvaV6FAIUFFck2GdTM65S9GSGx6Js4JZfF13veCEVP0LZP3TP+F1715d3/JBlG4MsdJ0 q X-Google-Smtp-Source: AGHT+IG3utXQ56ShFApIxHTbPaZn7LlNXXRwk3Ne9dl7Oo0gCaIHLoYknh0SuR+XI3QPe5EwtG1V4Q== X-Received: by 2002:a05:600c:4f8e:b0:428:2e9:65a9 with SMTP id 5b1f17b1804b1-42811dd1024mr48417305e9.28.1722266885912; Mon, 29 Jul 2024 08:28:05 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 08/14] tests/functional: Convert avocado tests that just need a small adjustment Date: Mon, 29 Jul 2024 17:27:08 +0200 Message-ID: <20240729152714.10225-9-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729152714.10225-1-philmd@linaro.org> References: <20240729152714.10225-1-philmd@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::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: 1722266909463116600 From: Thomas Huth These simple tests can be converted to stand-alone tests quite easily, e.g. by just setting the machine to 'none' now manually or by adding "-cpu" command line parameters, since we don't support the corresponding avocado tags in the new python test framework. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240724175248.1389201-7-thuth@redhat.com> [PMD: More uses of set_machine(), updated MAINTAINERS] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 3 + tests/functional/meson.build | 6 ++ .../test_info_usernet.py} | 11 ++- .../test_ppc_74xx.py} | 74 ++++++++----------- .../version.py =3D> functional/test_version.py} | 13 ++-- 5 files changed, 56 insertions(+), 51 deletions(-) rename tests/{avocado/info_usernet.py =3D> functional/test_info_usernet.py= } (87%) mode change 100644 =3D> 100755 rename tests/{avocado/ppc_74xx.py =3D> functional/test_ppc_74xx.py} (74%) mode change 100644 =3D> 100755 rename tests/{avocado/version.py =3D> functional/test_version.py} (78%) mode change 100644 =3D> 100755 diff --git a/MAINTAINERS b/MAINTAINERS index 1d84803b69..4c9a36dfd3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -317,6 +317,7 @@ F: configs/devices/ppc* F: docs/system/ppc/embedded.rst F: docs/system/target-ppc.rst F: tests/tcg/ppc*/* +F: tests/functional/test_ppc_74xx.py =20 RISC-V TCG CPUs M: Palmer Dabbelt @@ -2105,6 +2106,7 @@ S: Odd Fixes F: hw/net/ F: include/hw/net/ F: tests/qtest/virtio-net-test.c +F: tests/avocado/info_usernet.py F: docs/virtio-net-failover.rst T: git https://github.com/jasowang/qemu.git net =20 @@ -2974,6 +2976,7 @@ S: Supported F: include/qemu/option.h F: tests/unit/test-keyval.c F: tests/unit/test-qemu-opts.c +F: tests/functional/test_version.py F: util/keyval.c F: util/qemu-option.c =20 diff --git a/tests/functional/meson.build b/tests/functional/meson.build index a8cc0e6330..8a8fa0ab99 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -15,6 +15,12 @@ test_timeouts =3D { =20 tests_generic =3D [ 'empty_cpu_model', + 'info_usernet', + 'version', +] + +tests_ppc_quick =3D [ + 'ppc_74xx', ] =20 tests_x86_64_quick =3D [ diff --git a/tests/avocado/info_usernet.py b/tests/functional/test_info_use= rnet.py old mode 100644 new mode 100755 similarity index 87% rename from tests/avocado/info_usernet.py rename to tests/functional/test_info_usernet.py index e1aa7a6e0a..cd37524d94 --- a/tests/avocado/info_usernet.py +++ b/tests/functional/test_info_usernet.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 +# # Test for the hmp command "info usernet" # # Copyright (c) 2021 Red Hat, Inc. @@ -8,18 +10,16 @@ # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. =20 -from avocado_qemu import QemuSystemTest +from qemu_test import QemuSystemTest =20 from qemu.utils import get_info_usernet_hostfwd_port =20 =20 class InfoUsernet(QemuSystemTest): - """ - :avocado: tags=3Dmachine:none - """ =20 def test_hostfwd(self): self.require_netdev('user') + self.set_machine('none') self.vm.add_args('-netdev', 'user,id=3Dvnet,hostfwd=3D:127.0.0.1:0= -:22') self.vm.launch() res =3D self.vm.cmd('human-monitor-command', @@ -31,3 +31,6 @@ def test_hostfwd(self): self.assertGreater(port, 0, ('Found a redirected port that is not greater t= han' ' zero')) + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() diff --git a/tests/avocado/ppc_74xx.py b/tests/functional/test_ppc_74xx.py old mode 100644 new mode 100755 similarity index 74% rename from tests/avocado/ppc_74xx.py rename to tests/functional/test_ppc_74xx.py index f54757c243..5386016f26 --- a/tests/avocado/ppc_74xx.py +++ b/tests/functional/test_ppc_74xx.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 +# # Smoke tests for 74xx cpus (aka G4). # # Copyright (c) 2021, IBM Corp. @@ -5,132 +7,120 @@ # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. =20 -from avocado_qemu import QemuSystemTest -from avocado_qemu import wait_for_console_pattern +from qemu_test import QemuSystemTest +from qemu_test import wait_for_console_pattern =20 class ppc74xxCpu(QemuSystemTest): - """ - :avocado: tags=3Darch:ppc - :avocado: tags=3Daccel:tcg - """ + timeout =3D 5 =20 def test_ppc_7400(self): - """ - :avocado: tags=3Dcpu:7400 - """ self.require_accelerator("tcg") + self.set_machine('g3beige') self.vm.set_console() + self.vm.add_args('-cpu', '7400') self.vm.launch() wait_for_console_pattern(self, '>> OpenBIOS') wait_for_console_pattern(self, '>> CPU type PowerPC,G4') =20 def test_ppc_7410(self): - """ - :avocado: tags=3Dcpu:7410 - """ self.require_accelerator("tcg") + self.set_machine('g3beige') self.vm.set_console() + self.vm.add_args('-cpu', '7410') self.vm.launch() wait_for_console_pattern(self, '>> OpenBIOS') wait_for_console_pattern(self, '>> CPU type PowerPC,74xx') =20 def test_ppc_7441(self): - """ - :avocado: tags=3Dcpu:7441 - """ self.require_accelerator("tcg") + self.set_machine('g3beige') self.vm.set_console() + self.vm.add_args('-cpu', '7441') self.vm.launch() wait_for_console_pattern(self, '>> OpenBIOS') wait_for_console_pattern(self, '>> CPU type PowerPC,G4') =20 def test_ppc_7445(self): - """ - :avocado: tags=3Dcpu:7445 - """ self.require_accelerator("tcg") + self.set_machine('g3beige') self.vm.set_console() + self.vm.add_args('-cpu', '7445') self.vm.launch() wait_for_console_pattern(self, '>> OpenBIOS') wait_for_console_pattern(self, '>> CPU type PowerPC,G4') =20 def test_ppc_7447(self): - """ - :avocado: tags=3Dcpu:7447 - """ self.require_accelerator("tcg") + self.set_machine('g3beige') self.vm.set_console() + self.vm.add_args('-cpu', '7447') self.vm.launch() wait_for_console_pattern(self, '>> OpenBIOS') wait_for_console_pattern(self, '>> CPU type PowerPC,G4') =20 def test_ppc_7447a(self): - """ - :avocado: tags=3Dcpu:7447a - """ self.require_accelerator("tcg") + self.set_machine('g3beige') self.vm.set_console() + self.vm.add_args('-cpu', '7447a') self.vm.launch() wait_for_console_pattern(self, '>> OpenBIOS') wait_for_console_pattern(self, '>> CPU type PowerPC,G4') =20 def test_ppc_7448(self): - """ - :avocado: tags=3Dcpu:7448 - """ self.require_accelerator("tcg") + self.set_machine('g3beige') self.vm.set_console() + self.vm.add_args('-cpu', '7448') self.vm.launch() wait_for_console_pattern(self, '>> OpenBIOS') wait_for_console_pattern(self, '>> CPU type PowerPC,MPC86xx') =20 def test_ppc_7450(self): - """ - :avocado: tags=3Dcpu:7450 - """ self.require_accelerator("tcg") + self.set_machine('g3beige') self.vm.set_console() + self.vm.add_args('-cpu', '7450') self.vm.launch() wait_for_console_pattern(self, '>> OpenBIOS') wait_for_console_pattern(self, '>> CPU type PowerPC,G4') =20 def test_ppc_7451(self): - """ - :avocado: tags=3Dcpu:7451 - """ self.require_accelerator("tcg") + self.set_machine('g3beige') self.vm.set_console() + self.vm.add_args('-cpu', '7451') self.vm.launch() wait_for_console_pattern(self, '>> OpenBIOS') wait_for_console_pattern(self, '>> CPU type PowerPC,G4') =20 def test_ppc_7455(self): - """ - :avocado: tags=3Dcpu:7455 - """ self.require_accelerator("tcg") + self.set_machine('g3beige') self.vm.set_console() + self.vm.add_args('-cpu', '7455') self.vm.launch() wait_for_console_pattern(self, '>> OpenBIOS') wait_for_console_pattern(self, '>> CPU type PowerPC,G4') =20 def test_ppc_7457(self): - """ - :avocado: tags=3Dcpu:7457 - """ self.require_accelerator("tcg") + self.set_machine('g3beige') self.vm.set_console() + self.vm.add_args('-cpu', '7457') self.vm.launch() wait_for_console_pattern(self, '>> OpenBIOS') wait_for_console_pattern(self, '>> CPU type PowerPC,G4') =20 def test_ppc_7457a(self): - """ - :avocado: tags=3Dcpu:7457a - """ self.require_accelerator("tcg") + self.set_machine('g3beige') self.vm.set_console() + self.vm.add_args('-cpu', '7457a') self.vm.launch() wait_for_console_pattern(self, '>> OpenBIOS') wait_for_console_pattern(self, '>> CPU type PowerPC,G4') + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() diff --git a/tests/avocado/version.py b/tests/functional/test_version.py old mode 100644 new mode 100755 similarity index 78% rename from tests/avocado/version.py rename to tests/functional/test_version.py index c6139568a1..3ab3b67f7e --- a/tests/avocado/version.py +++ b/tests/functional/test_version.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 +# # Version check example test # # Copyright (c) 2018 Red Hat, Inc. @@ -9,17 +11,18 @@ # later. See the COPYING file in the top-level directory. =20 =20 -from avocado_qemu import QemuSystemTest +from qemu_test import QemuSystemTest =20 =20 class Version(QemuSystemTest): - """ - :avocado: tags=3Dquick - :avocado: tags=3Dmachine:none - """ + def test_qmp_human_info_version(self): + self.set_machine('none') self.vm.add_args('-nodefaults') self.vm.launch() res =3D self.vm.cmd('human-monitor-command', command_line=3D'info version') self.assertRegex(res, r'^(\d+\.\d+\.\d)') + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() --=20 2.45.2 From nobody Sun Nov 24 14:58:58 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=1722266955; cv=none; d=zohomail.com; s=zohoarc; b=QW86HFDUE1bsdZfE2ROcL4avulPZ/4e24gJUJZJwanWzOYBhhLe5wcC6pHjdk+pwMgRmvPJXXTyc2gXRtPDnk2yrS1U9Mpm7V96e3cumzjxEM3XseIdlYco8KEAIXgo4VcfBVRlVt5BPy8h+gl7NI3x4YQpYnleeCfpTk2lflWw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722266955; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=nIHOLD5EbcXB4owPcPVKVliv892NjsZAXtrM5p8AqZ4=; b=mosJLkqEXKHh0EW3lUiNjmvPlj2Q8gQA1oZMshZWstCNE0i4SKJh7iKJ2vt3ge24WIT+QsL4vyOpE7b8w0WzOR13dF0UfGk4ibAJTpj3rDjp8ZFm/lYM8thWQ/ZFjl8xw1iv5+/HLejcX04KQGGpAh5kwH5oWz0HYad1Nu1ZF/k= 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 1722266955086844.0942542785499; Mon, 29 Jul 2024 08:29:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYSIN-0004dP-Sg; Mon, 29 Jul 2024 11:28:19 -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 1sYSIK-0004DE-EC for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:28:16 -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 1sYSIH-0008Me-Ke for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:28:16 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4257d5fc9b7so22983185e9.2 for ; Mon, 29 Jul 2024 08:28:13 -0700 (PDT) Received: from localhost.localdomain ([176.176.173.10]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427fb7bdfa0sm212853785e9.14.2024.07.29.08.28.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Jul 2024 08:28:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722266892; x=1722871692; darn=nongnu.org; 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=nIHOLD5EbcXB4owPcPVKVliv892NjsZAXtrM5p8AqZ4=; b=AJNp2+KM3F9C4XT9WbsVo2/ltUTCdql3m2rePQwV7Eph/62CZsGsrpQr99O/2w+CDN huc5FF6WPpWt0UVsg2F6HB1C2YANs6+CpNvzzqqennYtc8oFQSQ0cQXKjzR54CIB1n/x JQ3wEOA4Z+7NoEiXWgJigu6Ktsi8dv+mJ4fngQDvq9K9jT8yjdYBErS58ooA+q+ITFXa CY/vlhinUjtX2KefaysFXTJ1pQ/NAh51QxtnM1+iRjQZjvEzXrjl+rDJAZP261WAAWrJ vsf9ZRhXzG5cRcyeWE4AhabZ4h36DfE+AmMRL6/YYq34Rmofvvb8V97JmuPZgmTY7Rcg J+ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722266892; x=1722871692; 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=nIHOLD5EbcXB4owPcPVKVliv892NjsZAXtrM5p8AqZ4=; b=m4oya5MCPS3QQGHgI1ilqmQ1FYMOgm+wGYMyHupic4Xcu3KOaK1ZYicM4JoS6iohhi ElTMp84gdoPkZYrNERi9bzq/L7i8eSpr6LjlL5midyvTmccAUWOhhDBrv3nnH4CRvHtV 9NYiDwR3nOvPYzDq1M5OgqI0kDuyrtfCL6lEvmKA9DMB+vvjHBxT9DgasCeeRZrzNtda VuEDAXz3rA3Y7lfN65/tZWBINGS1jKfT5d7FVF+q3er6TMD95iCssM0nv9risQHNmdhL BqBtU1GPBFf/qFLH3c+0XYTxHs3F3zfifHSe3DPXJ1c44LyMV7GANYNXxJH01a1JuUWE cjOA== X-Gm-Message-State: AOJu0YyVpruOnbh+xPu648TrIwdA/eHCxPgdiZpilNQRiQH2RCFTcLxh kohTBKkozy4JaGjLRx7V5qTtWQzml+kp8bn/sq5dUj9lcKciHYcbL9p0dM6/ieQEyyWIjHVqkGO i X-Google-Smtp-Source: AGHT+IHd5pW1JwRBWuKYrzM/W9SqI8ubDjQem4R5iflvvBuqFrjc44+HyZbqfdI0Z7KGXeu5mTqKtA== X-Received: by 2002:a05:600c:33a3:b0:426:6e9a:7a1e with SMTP id 5b1f17b1804b1-42811e0b672mr64589275e9.35.1722266891871; Mon, 29 Jul 2024 08:28:11 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 09/14] tests/functional: Convert the x86_cpu_model_versions test Date: Mon, 29 Jul 2024 17:27:09 +0200 Message-ID: <20240729152714.10225-10-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729152714.10225-1-philmd@linaro.org> References: <20240729152714.10225-1-philmd@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=philmd@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 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: 1722266955635116600 From: Thomas Huth Nothing thrilling in here, it's just a straight forward conversion. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240724175248.1389201-14-thuth@redhat.com> [PMD: More uses of set_machine(), updated MAINTAINERS] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 1 + tests/functional/meson.build | 1 + .../test_x86_cpu_model_versions.py} | 63 ++++++------------- 3 files changed, 21 insertions(+), 44 deletions(-) rename tests/{avocado/x86_cpu_model_versions.py =3D> functional/test_x86_c= pu_model_versions.py} (92%) mode change 100644 =3D> 100755 diff --git a/MAINTAINERS b/MAINTAINERS index 4c9a36dfd3..a768808a4a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1833,6 +1833,7 @@ F: tests/unit/test-x86-topo.c F: tests/qtest/test-x86-cpuid-compat.c F: tests/functional/test_mem_addr_space.py F: tests/functional/test_pc_cpu_hotplug_props.py +F: tests/functional/test_x86_cpu_model_versions.py =20 PC Chipset M: Michael S. Tsirkin diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 8a8fa0ab99..48a617033e 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -28,6 +28,7 @@ tests_x86_64_quick =3D [ 'mem_addr_space', 'pc_cpu_hotplug_props', 'virtio_version', + 'x86_cpu_model_versions', ] =20 tests_x86_64_thorough =3D [ diff --git a/tests/avocado/x86_cpu_model_versions.py b/tests/functional/tes= t_x86_cpu_model_versions.py old mode 100644 new mode 100755 similarity index 92% rename from tests/avocado/x86_cpu_model_versions.py rename to tests/functional/test_x86_cpu_model_versions.py index 11101e02b9..a7294b4b92 --- a/tests/avocado/x86_cpu_model_versions.py +++ b/tests/functional/test_x86_cpu_model_versions.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # # Basic validation of x86 versioned CPU models and CPU model aliases # @@ -20,11 +21,11 @@ # License along with this library; if not, see . # =20 - -import avocado_qemu import re =20 -class X86CPUModelAliases(avocado_qemu.QemuSystemTest): +from qemu_test import QemuSystemTest + +class X86CPUModelAliases(QemuSystemTest): """ Validation of PC CPU model versions and CPU model aliases =20 @@ -76,9 +77,8 @@ def validate_variant_aliases(self, cpus): def test_4_0_alias_compatibility(self): """ Check if pc-*-4.0 unversioned CPU model won't be reported as alias= es - - :avocado: tags=3Dmachine:pc-i440fx-4.0 """ + self.set_machine('pc-i440fx-4.0') # pc-*-4.0 won't expose non-versioned CPU models as aliases # We do this to help management software to keep compatibility # with older QEMU versions that didn't have the versioned CPU model @@ -110,9 +110,8 @@ def test_4_0_alias_compatibility(self): def test_4_1_alias(self): """ Check if unversioned CPU model is an alias pointing to right versi= on - - :avocado: tags=3Dmachine:pc-i440fx-4.1 """ + self.set_machine('pc-i440fx-4.1') self.vm.add_args('-S') self.vm.launch() =20 @@ -217,9 +216,8 @@ def test_4_1_alias(self): def test_none_alias(self): """ Check if unversioned CPU model is an alias pointing to some version - - :avocado: tags=3Dmachine:none """ + self.set_machine('none') self.vm.add_args('-S') self.vm.launch() =20 @@ -243,21 +241,16 @@ def test_none_alias(self): self.validate_aliases(cpus) =20 =20 -class CascadelakeArchCapabilities(avocado_qemu.QemuSystemTest): +class CascadelakeArchCapabilities(QemuSystemTest): """ Validation of Cascadelake arch-capabilities - - :avocado: tags=3Darch:x86_64 """ def get_cpu_prop(self, prop): cpu_path =3D self.vm.cmd('query-cpus-fast')[0].get('qom-path') return self.vm.cmd('qom-get', path=3Dcpu_path, property=3Dprop) =20 def test_4_1(self): - """ - :avocado: tags=3Dmachine:pc-i440fx-4.1 - :avocado: tags=3Dcpu:Cascadelake-Server - """ + self.set_machine('pc-i440fx-4.1') # machine-type only: self.vm.add_args('-S') self.set_vm_arg('-cpu', @@ -268,10 +261,7 @@ def test_4_1(self): 'pc-i440fx-4.1 + Cascadelake-Server should not ha= ve arch-capabilities') =20 def test_4_0(self): - """ - :avocado: tags=3Dmachine:pc-i440fx-4.0 - :avocado: tags=3Dcpu:Cascadelake-Server - """ + self.set_machine('pc-i440fx-4.0') self.vm.add_args('-S') self.set_vm_arg('-cpu', 'Cascadelake-Server,x-force-features=3Don,check=3D= off,' @@ -281,10 +271,7 @@ def test_4_0(self): 'pc-i440fx-4.0 + Cascadelake-Server should not ha= ve arch-capabilities') =20 def test_set_4_0(self): - """ - :avocado: tags=3Dmachine:pc-i440fx-4.0 - :avocado: tags=3Dcpu:Cascadelake-Server - """ + self.set_machine('pc-i440fx-4.0') # command line must override machine-type if CPU model is not vers= ioned: self.vm.add_args('-S') self.set_vm_arg('-cpu', @@ -295,10 +282,7 @@ def test_set_4_0(self): 'pc-i440fx-4.0 + Cascadelake-Server,+arch-capabili= ties should have arch-capabilities') =20 def test_unset_4_1(self): - """ - :avocado: tags=3Dmachine:pc-i440fx-4.1 - :avocado: tags=3Dcpu:Cascadelake-Server - """ + self.set_machine('pc-i440fx-4.1') self.vm.add_args('-S') self.set_vm_arg('-cpu', 'Cascadelake-Server,x-force-features=3Don,check=3D= off,' @@ -308,10 +292,7 @@ def test_unset_4_1(self): 'pc-i440fx-4.1 + Cascadelake-Server,-arch-capabil= ities should not have arch-capabilities') =20 def test_v1_4_0(self): - """ - :avocado: tags=3Dmachine:pc-i440fx-4.0 - :avocado: tags=3Dcpu:Cascadelake-Server - """ + self.set_machine('pc-i440fx-4.0') # versioned CPU model overrides machine-type: self.vm.add_args('-S') self.set_vm_arg('-cpu', @@ -322,10 +303,7 @@ def test_v1_4_0(self): 'pc-i440fx-4.0 + Cascadelake-Server-v1 should not= have arch-capabilities') =20 def test_v2_4_0(self): - """ - :avocado: tags=3Dmachine:pc-i440fx-4.0 - :avocado: tags=3Dcpu:Cascadelake-Server - """ + self.set_machine('pc-i440fx-4.0') self.vm.add_args('-S') self.set_vm_arg('-cpu', 'Cascadelake-Server-v2,x-force-features=3Don,check= =3Doff,' @@ -335,10 +313,7 @@ def test_v2_4_0(self): 'pc-i440fx-4.0 + Cascadelake-Server-v2 should have= arch-capabilities') =20 def test_v1_set_4_0(self): - """ - :avocado: tags=3Dmachine:pc-i440fx-4.0 - :avocado: tags=3Dcpu:Cascadelake-Server - """ + self.set_machine('pc-i440fx-4.0') # command line must override machine-type and versioned CPU model: self.vm.add_args('-S') self.set_vm_arg('-cpu', @@ -349,10 +324,7 @@ def test_v1_set_4_0(self): 'pc-i440fx-4.0 + Cascadelake-Server-v1,+arch-capab= ilities should have arch-capabilities') =20 def test_v2_unset_4_1(self): - """ - :avocado: tags=3Dmachine:pc-i440fx-4.1 - :avocado: tags=3Dcpu:Cascadelake-Server - """ + self.set_machine('pc-i440fx-4.1') self.vm.add_args('-S') self.set_vm_arg('-cpu', 'Cascadelake-Server-v2,x-force-features=3Don,check= =3Doff,' @@ -360,3 +332,6 @@ def test_v2_unset_4_1(self): self.vm.launch() self.assertFalse(self.get_cpu_prop('arch-capabilities'), 'pc-i440fx-4.1 + Cascadelake-Server-v2,-arch-capa= bilities should not have arch-capabilities') + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() --=20 2.45.2 From nobody Sun Nov 24 14:58:58 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=1722266931; cv=none; d=zohomail.com; s=zohoarc; b=THwzYevBEfxMZzDBpFzUW1Kv/sMqaEDJT87Z441XaA8/53f4nz1g7+xtIxRLZVI4IOoLR6CYcMhKuddG1ikcdSeCWygFo5cXck5bQ/po5LMmk2cGCk1u0ZyImpO7XgGY2Vdk3MUlleLWMA0x/6GiTfKs1Z5qMjx1CtA+vykeucA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722266931; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=hJ0+ehSPNMw3L+RsXx/3bfW5qZR45CYyWXKfYU5cn30=; b=RFO9R/Q2yVhl5bkQuYkRMgEMLAIahTxcB5vz02SzjlwNonEWpfGIZZh3LjnvZqT/1IE+Eqp4OqIvWNMsTkA1QFkd1XjLRUtuZp+RHJyWsSiKPqO6yhqAXX1B3HveEnhNnYNC5wVzpUUAaWQvVYltIClm0fwG8K2RuzVZA9kmAA0= 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 1722266931362797.0271766659364; Mon, 29 Jul 2024 08:28:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYSIS-0005E5-Ku; Mon, 29 Jul 2024 11:28:24 -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 1sYSIQ-00052d-QA for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:28:22 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYSIN-0008Nn-N7 for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:28:22 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-368584f9e36so1419574f8f.2 for ; Mon, 29 Jul 2024 08:28:19 -0700 (PDT) Received: from localhost.localdomain ([176.176.173.10]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b36857db6sm12533901f8f.73.2024.07.29.08.28.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Jul 2024 08:28:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722266898; x=1722871698; darn=nongnu.org; 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=hJ0+ehSPNMw3L+RsXx/3bfW5qZR45CYyWXKfYU5cn30=; b=jkC+IoiQ56WmHqrXsCuQDVKNM8C7qAW2Bgzbcp2bxJoGIf7vl5h2j3GP0nMo9nRubh 2w/GmgNe3Tgu60aOuE6gGxSccxu+OKkdyAQy8V8ZJ5vfz5RTP2qlis8H4x9i1h1eZH6Z tFjpOAGWMWfEc8zszyIA/2V85Nmjql5klV/JCyaOX4tHQpAFuwjNhgYeVYTdUC5lB3dg kGAMaqrtg+g32rTPwfF4luAgXXKrnbMT2XnnmgoM00yKt3qkbz7UwikEISaUzU/ba3cK J5ZfBgkSqHdVW8ZeWsIX5hdoATV4M6uKXM753zPoQYEPF5IXWKMLyuZjxaicWV+xLDEs Ra6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722266898; x=1722871698; 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=hJ0+ehSPNMw3L+RsXx/3bfW5qZR45CYyWXKfYU5cn30=; b=YBaiVM5OGjj/9GFHseudXddBMbsldTou1rH2HcP+4Ds4dXfqeog4p025li++S1Lpv/ zmF5CJFtXhOt3ara2rMYqCum7wTn5936ZVVxevGjn+QRygTJfhZoo36ZtM+1wIGn55qC LvlYFlDlJ7ZoK7SvmrY9QQrmz43drD08Ha0yy7jS+pUjsnPoaexsqrqS8eL5qydUTTJv kM+es7pnT30mK3oFHqUF9j+9VwSZRveyuRA/bMLRV31sVq9p4+vA46IMoF9QiahcYioA aCZ9LIn7zz2Ri29TMk8S2H6QapTRizAt4rAgsPz7aslP13jEOh9RDaiONCXOYcbOtNyU cUrA== X-Gm-Message-State: AOJu0YwlJINBCeGQN6NWjhtFTPII3Ztpu6z3M2/SNTMNKwpR+0+7zz6L UKv0/wtdIIeEXrRUQ03KZmouBGdZDNV6SC4kDlPPc10VhNAKYbdgOyftBy7lz+FCiVMfwPmfqbM J X-Google-Smtp-Source: AGHT+IG2RhidZfv4zGjcjCzezmJ1QGe09GAqM9S4tK2uNA5NTaEvp9OOnNwiigu6921i8ZFnU+iMgQ== X-Received: by 2002:a05:6000:dc7:b0:367:9237:611d with SMTP id ffacd0b85a97d-36b5d096f0amr6103041f8f.60.1722266897790; Mon, 29 Jul 2024 08:28:17 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 10/14] tests/functional: Convert the riscv_opensbi avocado test into a standalone test Date: Mon, 29 Jul 2024 17:27:10 +0200 Message-ID: <20240729152714.10225-11-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729152714.10225-1-philmd@linaro.org> References: <20240729152714.10225-1-philmd@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::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722266933546116600 From: Thomas Huth The avocado test defined test functions for both, riscv32 and riscv64. Since we can run the whole file with multiple targets in the new framework, we can now consolidate the functions so we have to only define one function per machine now. Signed-off-by: Thomas Huth Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240724175248.1389201-16-thuth@redhat.com> [PMD: Updated MAINTAINERS] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 1 + tests/avocado/riscv_opensbi.py | 63 -------------------------- tests/functional/meson.build | 8 ++++ tests/functional/test_riscv_opensbi.py | 36 +++++++++++++++ 4 files changed, 45 insertions(+), 63 deletions(-) delete mode 100644 tests/avocado/riscv_opensbi.py create mode 100755 tests/functional/test_riscv_opensbi.py diff --git a/MAINTAINERS b/MAINTAINERS index a768808a4a..a906218f9d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -337,6 +337,7 @@ F: include/hw/riscv/ F: linux-user/host/riscv32/ F: linux-user/host/riscv64/ F: tests/tcg/riscv64/ +F: tests/functional/test_riscv_opensbi.py =20 RISC-V XThead* extensions M: Christoph Muellner diff --git a/tests/avocado/riscv_opensbi.py b/tests/avocado/riscv_opensbi.py deleted file mode 100644 index bfff9cc3c3..0000000000 --- a/tests/avocado/riscv_opensbi.py +++ /dev/null @@ -1,63 +0,0 @@ -# OpenSBI boot test for RISC-V machines -# -# Copyright (c) 2022, Ventana Micro -# -# This work is licensed under the terms of the GNU GPL, version 2 or -# later. See the COPYING file in the top-level directory. - -from avocado_qemu import QemuSystemTest -from avocado_qemu import wait_for_console_pattern - -class RiscvOpenSBI(QemuSystemTest): - """ - :avocado: tags=3Daccel:tcg - """ - timeout =3D 5 - - def boot_opensbi(self): - self.vm.set_console() - self.vm.launch() - wait_for_console_pattern(self, 'Platform Name') - wait_for_console_pattern(self, 'Boot HART MEDELEG') - - def test_riscv32_spike(self): - """ - :avocado: tags=3Darch:riscv32 - :avocado: tags=3Dmachine:spike - """ - self.boot_opensbi() - - def test_riscv64_spike(self): - """ - :avocado: tags=3Darch:riscv64 - :avocado: tags=3Dmachine:spike - """ - self.boot_opensbi() - - def test_riscv32_sifive_u(self): - """ - :avocado: tags=3Darch:riscv32 - :avocado: tags=3Dmachine:sifive_u - """ - self.boot_opensbi() - - def test_riscv64_sifive_u(self): - """ - :avocado: tags=3Darch:riscv64 - :avocado: tags=3Dmachine:sifive_u - """ - self.boot_opensbi() - - def test_riscv32_virt(self): - """ - :avocado: tags=3Darch:riscv32 - :avocado: tags=3Dmachine:virt - """ - self.boot_opensbi() - - def test_riscv64_virt(self): - """ - :avocado: tags=3Darch:riscv64 - :avocado: tags=3Dmachine:virt - """ - self.boot_opensbi() diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 48a617033e..94ac97ac53 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -23,6 +23,14 @@ tests_ppc_quick =3D [ 'ppc_74xx', ] =20 +tests_riscv32_quick =3D [ + 'riscv_opensbi', +] + +tests_riscv64_quick =3D [ + 'riscv_opensbi', +] + tests_x86_64_quick =3D [ 'cpu_queries', 'mem_addr_space', diff --git a/tests/functional/test_riscv_opensbi.py b/tests/functional/test= _riscv_opensbi.py new file mode 100755 index 0000000000..d077e40f42 --- /dev/null +++ b/tests/functional/test_riscv_opensbi.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 +# +# OpenSBI boot test for RISC-V machines +# +# Copyright (c) 2022, Ventana Micro +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +from qemu_test import QemuSystemTest +from qemu_test import wait_for_console_pattern + +class RiscvOpenSBI(QemuSystemTest): + + timeout =3D 5 + + def boot_opensbi(self): + self.vm.set_console() + self.vm.launch() + wait_for_console_pattern(self, 'Platform Name') + wait_for_console_pattern(self, 'Boot HART MEDELEG') + + def test_riscv_spike(self): + self.set_machine('spike') + self.boot_opensbi() + + def test_riscv_sifive_u(self): + self.set_machine('sifive_u') + self.boot_opensbi() + + def test_riscv_virt(self): + self.set_machine('virt') + self.boot_opensbi() + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() --=20 2.45.2 From nobody Sun Nov 24 14:58:58 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=1722266955; cv=none; d=zohomail.com; s=zohoarc; b=OMvKMn+jrJng4y+7WmVB0OwN5WVgOEbEAh+gNqeTBXnunr2VZCGyKm3G3FwM9PCcKqogvCrzZDKwlEcjg1FmIqqVMmMi7Cvcn4SBKg+zXghboxx5eWW5/e5UvHi+jcq8qaUTp3pNRjG9V2JAO/GkyJwVAEOSVa2Qi1C4KU1d+Ew= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722266955; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=v9+uYHMIghgd2LjabzUJzhrVG79tp1J2HB1deB4p2GI=; b=SXzI0q98W4aSTSQyd5uxBVY+9+E/HKuey9kQKgNKFa6SG1Ik83hCeVCMvMEJZf1pegX+/ExxlkW0sCaplGl1njOsgKCZjlR4H3ObOPsRrQAo/pFp+ZN9BIfp3ojozSclIG9NLEllCJxwDIDUsFMdoT6bZRNO5whanUu93JpwOuI= 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 1722266955366741.5517727703483; Mon, 29 Jul 2024 08:29:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYSIb-0006IK-2y; Mon, 29 Jul 2024 11:28:33 -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 1sYSIX-0005pp-V4 for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:28:30 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYSIV-0008Sk-Nw for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:28:29 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3684407b2deso1439307f8f.1 for ; Mon, 29 Jul 2024 08:28:26 -0700 (PDT) Received: from localhost.localdomain ([176.176.173.10]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b36857d4fsm12615930f8f.86.2024.07.29.08.28.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Jul 2024 08:28:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722266904; x=1722871704; darn=nongnu.org; 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=v9+uYHMIghgd2LjabzUJzhrVG79tp1J2HB1deB4p2GI=; b=crQT4POTsIPbhfTqLWYCdhLPjkNbzGSaETnHggBbc0/66rQYAfMaEn+avRZmewpIxf RcvO9Y8HEh7vsfkihK7A1kmAyVVUtU7tlW8nC90epdhLU6yYnXVEFYcx4oMxa/Eb5x/Q 2X4bWhTm8zbQe5s1F2gz86wFn3k0WFG9ZUA+vpX9I/ji9IYTVWhwaCWzqd/MYW+iEeyk 8CdjjU0UXMRlSrziEyEp62NGwzFmItPE2przO1AEucLUMqWyBqlmHs31U8jiqTmCewje Df71rriUnwXeslEKbE7EkQtKNsB/2ZeJc+Q2SIpK1siqF/kBCtfg2fVo5etx2c6eOIhY Nznw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722266904; x=1722871704; 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=v9+uYHMIghgd2LjabzUJzhrVG79tp1J2HB1deB4p2GI=; b=qirXeUlmbdTjuPWkKvg2mIHvez4RpERFH2keUpj9/9iZsoajtgctVN29n6BZKunBV8 uJYhF3CRjiGiDVee5nFrqTJUos8TCLdfbVWbrDxdtG9Rj8ykO3tR39N42i14EMnNK4AO ii4BAFXkXY5jqynaKT0Y566OS9CIUhbSm6r1teQ6UrhAj29o28NRny12zH72PwZXQEAt bm/RaWf8JEGh+lPRi8QPtUDDjC20Cc590yn0qQ9yVktoOfPvxuoqb4Hmx3hq9yzv6Kxz VyI4/9auMWeFtSndjMQcXDO4/uJJaqKwdpzG9h1EhEY9vprqEMxHxxQd0VQSDMjqLmoN r68A== X-Gm-Message-State: AOJu0YweCmNxwaalSIsZJ4AWpKUJ6r3z5C8eeYOIfOaacjc6ye6O4C4Y xWjVOH6JZVE0myhuDbP+PWOe0r5y9lnPmC0SEMakElY4g7Q34D4as70QRzg6nw83NXK+45EYLD2 d X-Google-Smtp-Source: AGHT+IGic3LCoI+pgt5erQ15t+dFGoYJm2buPFRNoVFpKIqbYuF/Us6jXwbqW+uOubqhIhtN5OreSg== X-Received: by 2002:a5d:64e1:0:b0:368:4ed7:2acc with SMTP id ffacd0b85a97d-36b5cecf2famr8645980f8f.5.1722266903772; Mon, 29 Jul 2024 08:28:23 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 11/14] gitlab-ci: Add "check-functional" to the build tests Date: Mon, 29 Jul 2024 17:27:11 +0200 Message-ID: <20240729152714.10225-12-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729152714.10225-1-philmd@linaro.org> References: <20240729152714.10225-1-philmd@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::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722266955628116600 From: Thomas Huth Now that we converted many tests from the "check-avocado" test suite to the "check-functional" test suite, we should make sure that these also get tested in the CI. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Thomas Huth Message-ID: <20240724175248.1389201-24-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- .gitlab-ci.d/buildtest-template.yml | 3 +- .gitlab-ci.d/buildtest.yml | 60 ++++++++++++++--------------- 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-t= emplate.yml index 8f7ebfaed8..54cae74a8e 100644 --- a/.gitlab-ci.d/buildtest-template.yml +++ b/.gitlab-ci.d/buildtest-template.yml @@ -71,7 +71,7 @@ reports: junit: build/meson-logs/testlog.junit.xml =20 -.avocado_test_job_template: +.functional_test_job_template: extends: .common_test_job_template cache: key: "${CI_JOB_NAME}-cache" @@ -98,6 +98,7 @@ du -chs ${CI_PROJECT_DIR}/avocado-cache ; fi - export AVOCADO_ALLOW_UNTRUSTED_CODE=3D1 + - export QEMU_TEST_ALLOW_UNTRUSTED_CODE=3D1 after_script: - cd build - du -chs ${CI_PROJECT_DIR}/avocado-cache diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index aa32782405..1d2afae996 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -22,14 +22,14 @@ check-system-alpine: IMAGE: alpine MAKE_CHECK_ARGS: check-unit check-qtest =20 -avocado-system-alpine: - extends: .avocado_test_job_template +functional-system-alpine: + extends: .functional_test_job_template needs: - job: build-system-alpine artifacts: true variables: IMAGE: alpine - MAKE_CHECK_ARGS: check-avocado + MAKE_CHECK_ARGS: check-avocado check-functional AVOCADO_TAGS: arch:avr arch:loongarch64 arch:mips64 arch:mipsel =20 build-system-ubuntu: @@ -53,14 +53,14 @@ check-system-ubuntu: IMAGE: ubuntu2204 MAKE_CHECK_ARGS: check =20 -avocado-system-ubuntu: - extends: .avocado_test_job_template +functional-system-ubuntu: + extends: .functional_test_job_template needs: - job: build-system-ubuntu artifacts: true variables: IMAGE: ubuntu2204 - MAKE_CHECK_ARGS: check-avocado + MAKE_CHECK_ARGS: check-avocado check-functional AVOCADO_TAGS: arch:alpha arch:microblazeel arch:mips64el =20 build-system-debian: @@ -85,14 +85,14 @@ check-system-debian: IMAGE: debian MAKE_CHECK_ARGS: check =20 -avocado-system-debian: - extends: .avocado_test_job_template +functional-system-debian: + extends: .functional_test_job_template needs: - job: build-system-debian artifacts: true variables: IMAGE: debian - MAKE_CHECK_ARGS: check-avocado + MAKE_CHECK_ARGS: check-avocado check-functional AVOCADO_TAGS: arch:arm arch:i386 arch:riscv64 arch:sh4 arch:sparc arch= :xtensa =20 crash-test-debian: @@ -129,14 +129,14 @@ check-system-fedora: IMAGE: fedora MAKE_CHECK_ARGS: check =20 -avocado-system-fedora: - extends: .avocado_test_job_template +functional-system-fedora: + extends: .functional_test_job_template needs: - job: build-system-fedora artifacts: true variables: IMAGE: fedora - MAKE_CHECK_ARGS: check-avocado + MAKE_CHECK_ARGS: check-avocado check-functional AVOCADO_TAGS: arch:microblaze arch:mips arch:xtensa arch:m68k arch:riscv32 arch:ppc arch:sparc64 =20 @@ -243,14 +243,14 @@ check-system-centos: IMAGE: centos9 MAKE_CHECK_ARGS: check =20 -avocado-system-centos: - extends: .avocado_test_job_template +functional-system-centos: + extends: .functional_test_job_template needs: - job: build-system-centos artifacts: true variables: IMAGE: centos9 - MAKE_CHECK_ARGS: check-avocado + MAKE_CHECK_ARGS: check-avocado check-functional AVOCADO_TAGS: arch:ppc64 arch:or1k arch:s390x arch:x86_64 arch:rx arch:sh4 =20 @@ -274,14 +274,14 @@ check-system-opensuse: IMAGE: opensuse-leap MAKE_CHECK_ARGS: check =20 -avocado-system-opensuse: - extends: .avocado_test_job_template +functional-system-opensuse: + extends: .functional_test_job_template needs: - job: build-system-opensuse artifacts: true variables: IMAGE: opensuse-leap - MAKE_CHECK_ARGS: check-avocado + MAKE_CHECK_ARGS: check-avocado check-functional AVOCADO_TAGS: arch:s390x arch:x86_64 arch:aarch64 =20 # @@ -302,15 +302,15 @@ build-system-flaky: ppc64-softmmu rx-softmmu s390x-softmmu sh4-softmmu x86_64-softmmu MAKE_CHECK_ARGS: check-build =20 -avocado-system-flaky: - extends: .avocado_test_job_template +functional-system-flaky: + extends: .functional_test_job_template needs: - job: build-system-flaky artifacts: true allow_failure: true variables: IMAGE: debian - MAKE_CHECK_ARGS: check-avocado + MAKE_CHECK_ARGS: check-avocado check-functional QEMU_JOB_OPTIONAL: 1 QEMU_TEST_FLAKY_TESTS: 1 AVOCADO_TAGS: flaky @@ -485,14 +485,14 @@ check-cfi-aarch64: IMAGE: fedora MAKE_CHECK_ARGS: check =20 -avocado-cfi-aarch64: - extends: .avocado_test_job_template +functional-cfi-aarch64: + extends: .functional_test_job_template needs: - job: build-cfi-aarch64 artifacts: true variables: IMAGE: fedora - MAKE_CHECK_ARGS: check-avocado + MAKE_CHECK_ARGS: check-avocado check-functional =20 build-cfi-ppc64-s390x: extends: @@ -523,14 +523,14 @@ check-cfi-ppc64-s390x: IMAGE: fedora MAKE_CHECK_ARGS: check =20 -avocado-cfi-ppc64-s390x: - extends: .avocado_test_job_template +functional-cfi-ppc64-s390x: + extends: .functional_test_job_template needs: - job: build-cfi-ppc64-s390x artifacts: true variables: IMAGE: fedora - MAKE_CHECK_ARGS: check-avocado + MAKE_CHECK_ARGS: check-avocado check-functional =20 build-cfi-x86_64: extends: @@ -557,14 +557,14 @@ check-cfi-x86_64: IMAGE: fedora MAKE_CHECK_ARGS: check =20 -avocado-cfi-x86_64: - extends: .avocado_test_job_template +functional-cfi-x86_64: + extends: .functional_test_job_template needs: - job: build-cfi-x86_64 artifacts: true variables: IMAGE: fedora - MAKE_CHECK_ARGS: check-avocado + MAKE_CHECK_ARGS: check-avocado check-functional =20 tsan-build: extends: .native_build_job_template --=20 2.45.2 From nobody Sun Nov 24 14:58:58 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=1722266981; cv=none; d=zohomail.com; s=zohoarc; b=K1TfaZwS+EXS7cOHbiTeIOldn7rpDF26rmUUqwqw5jWxDUL7BOCadaQBOOj+/UYQ3NuBMr5gs2koSe2En9ISdpZPdGrrh2X9wxx2LP+MlHd1hB3GCF4b76ZtoZ+wsPjKp3IYV80mOL2mryuUVSXwpAMRGglprIIgfIyRTtRuJnE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722266981; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=24RQoEKyoT+5UpLOepmNrf2/RkiZNFw5AqywzTwtt80=; b=nfgIqPdrCHwz/Rz2m09ojNvrLNPc49DaQ5B1zd+Rw4oOMvok5Wjn8BOy1ieNma9usS4Vkg0bENwKjF3w4ujmvT19cUoDNpKdd0Z7mw3kr5JeIELmXLttj9Xw0lOKoszPibKSchg4dG4XGfMOVNMPeeGwsm8KJi4ibC9n5y99umc= 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 1722266981779764.2678506453877; Mon, 29 Jul 2024 08:29:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYSId-0006T4-6X; Mon, 29 Jul 2024 11:28: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 1sYSIb-0006Lg-IB for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:28:33 -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 1sYSIZ-00006m-Hd for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:28:33 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3684e8220f9so1078736f8f.1 for ; Mon, 29 Jul 2024 08:28:31 -0700 (PDT) Received: from localhost.localdomain ([176.176.173.10]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b36800cdasm12766168f8f.64.2024.07.29.08.28.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Jul 2024 08:28:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722266909; x=1722871709; darn=nongnu.org; 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=24RQoEKyoT+5UpLOepmNrf2/RkiZNFw5AqywzTwtt80=; b=wCHCdxfWsNRNUtF1lCqTjnNCgsu8k7psjAPM8xOMquAO0aItj/8cWas+17nsznDAVu MDu6LwRIP4cnMgGHeu57NJMJWb6gLZlh3fxFC/huP51ec8IOGG7itEZd6FL5YfCMR2j8 c4hRkZaPJekL1d/sJYGzL2HCbsMPVD9yTmfNVJWTpAEHLIkTdmbOBnVl9CJSyHlNERFB UuEl7eZHDLVVEelss5DxjYQeAr7KV6wBF6uMWfdBfacYBCZE2Uc9rY5ogIAkMyBUP8JS BvQxsWYabXEQwu7zklMz0T9J9H0oqpq9NrQtIclubIbLGxNmnYFZEQuXNG7TJJC3Zecr llRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722266909; x=1722871709; 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=24RQoEKyoT+5UpLOepmNrf2/RkiZNFw5AqywzTwtt80=; b=sKaE/MPPhvif/rAoZU2e6Kqt4JqyJnCSj6Npe2FYWh3ZN7yXjiecmgKaPnYOn9dOF/ 1QwsNOs+CWu67/sYMA+ZoVZp61aC8+AJGJJPSwYxZ9SuXKnpEXsaEyocYbmrv6JoM4aI 8ZMbm6unzzLN1jGsQRbo6TYrvKpixwfDV82svmXGgfljosThACUgSd6z2d4Zaz3Qch1H Xji8Isw/8sBh0P4Ft5BpLptuf1Y+zRExi37uumxN4dc98JR2KbydlDocbTZkllNRzFhN /TzRlcUh0RYVssHdV8xq5mPTVcApzWxkV76/VoG2Gmc5UIZQ1fOn5VNOqp2d9IyZuTHW g+Xg== X-Gm-Message-State: AOJu0YwxUoxtsG61jAElnlyjlX8l2HMuYwGWrkvX0io3s1LkXZ0EzrD5 C1mr6zRaWJrakaFebIFu7I4vBDOKayKNGH9gKV93s2tUAagwWPSRamcSPGwoI9jrDFGQJn3VfxR V X-Google-Smtp-Source: AGHT+IFd5Zrr2gZfoj8q+c/s5v8wsX9bkyB6pSZ74JWTocdxqpO8cJX1vSbD7U4oYdBE+PfV2jUiyg== X-Received: by 2002:a5d:474f:0:b0:362:2af4:43cc with SMTP id ffacd0b85a97d-36b5d7cfa55mr4952901f8f.19.1722266909624; Mon, 29 Jul 2024 08:28:29 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Akihiko Odaki , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 12/14] tests/avocado: mips: fallback to HTTP given certificate expiration Date: Mon, 29 Jul 2024 17:27:12 +0200 Message-ID: <20240729152714.10225-13-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729152714.10225-1-philmd@linaro.org> References: <20240729152714.10225-1-philmd@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=philmd@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 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: 1722266983777116600 From: Cleber Rosa The SSL certificate installed at mipsdistros.mips.com has expired: 0 s:CN =3D mipsdistros.mips.com i:C =3D US, O =3D Amazon, OU =3D Server CA 1B, CN =3D Amazon a:PKEY: rsaEncryption, 2048 (bit); sigalg: RSA-SHA256 v:NotBefore: Dec 23 00:00:00 2019 GMT; NotAfter: Jan 23 12:00:00 2021 GMT Because this project has no control over that certificate and host, this falls back to plain HTTP instead. The integrity of the downloaded files can be guaranteed by the existing hashes for those files (which are not modified here). Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Cleber Rosa Reviewed-by: Akihiko Odaki Tested-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240726134438.14720-2-crosa@redhat.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/avocado/boot_linux_console.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index c35fc5e9ba..450d67be6a 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -299,7 +299,7 @@ def test_mips_malta32el_nanomips_4k(self): :avocado: tags=3Dendian:little :avocado: tags=3Dcpu:I7200 """ - kernel_url =3D ('https://mipsdistros.mips.com/LinuxDistro/nanomips= /' + kernel_url =3D ('http://mipsdistros.mips.com/LinuxDistro/nanomips/' 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/' 'generic_nano32r6el_page4k.xz') kernel_hash =3D '477456aafd2a0f1ddc9482727f20fe9575565dd6' @@ -312,7 +312,7 @@ def test_mips_malta32el_nanomips_16k_up(self): :avocado: tags=3Dendian:little :avocado: tags=3Dcpu:I7200 """ - kernel_url =3D ('https://mipsdistros.mips.com/LinuxDistro/nanomips= /' + kernel_url =3D ('http://mipsdistros.mips.com/LinuxDistro/nanomips/' 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/' 'generic_nano32r6el_page16k_up.xz') kernel_hash =3D 'e882868f944c71c816e832e2303b7874d044a7bc' @@ -325,7 +325,7 @@ def test_mips_malta32el_nanomips_64k_dbg(self): :avocado: tags=3Dendian:little :avocado: tags=3Dcpu:I7200 """ - kernel_url =3D ('https://mipsdistros.mips.com/LinuxDistro/nanomips= /' + kernel_url =3D ('http://mipsdistros.mips.com/LinuxDistro/nanomips/' 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/' 'generic_nano32r6el_page64k_dbg.xz') kernel_hash =3D '18d1c68f2e23429e266ca39ba5349ccd0aeb7180' --=20 2.45.2 From nobody Sun Nov 24 14:58:58 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=1722266968; cv=none; d=zohomail.com; s=zohoarc; b=VS+fWz3YJP2yWux8jvMws126kIzn7rqW1ZA+CNGiEoRRHW15/F6QIUYB/le8Iuz40wsTvLokU+iNoEEhhxBeZsVwLzhPkkXg3sX0/VSIfnfyZBX/lbXSNVO2SN85Z5e8LSeFl/BPUoNcoQKq/CQizxTvrtyk+C5owxYLW8uZBd8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722266968; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=zXdSwZIkaei7IVXcOo85+RXKqlbMq+68sLXgYS3E5lM=; b=CoKABWCnqajO1FxcTfo4vYG+TotwEE67fYvXAtYgw8rZdBw7X78zwup//zMrLkQ1aqZof7ZEHilev964TnfzsWQfCdCDAH1BquxlHmvnavggh89GOYiZ6brrqtYHSSR853lhJt8A5ifvglIfcdCXin4hjs8QgzljvYUGHI9khGI= 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 1722266968644380.96418323715636; Mon, 29 Jul 2024 08:29:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYSIn-0008Gl-FL; Mon, 29 Jul 2024 11:28:45 -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 1sYSIl-0007yQ-NJ for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:28:43 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYSIf-00008Q-P9 for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:28:42 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-42122ac2f38so11731225e9.1 for ; Mon, 29 Jul 2024 08:28:37 -0700 (PDT) Received: from localhost.localdomain ([176.176.173.10]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427ef3f459fsm129574945e9.0.2024.07.29.08.28.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Jul 2024 08:28:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722266916; x=1722871716; darn=nongnu.org; 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=zXdSwZIkaei7IVXcOo85+RXKqlbMq+68sLXgYS3E5lM=; b=so0frPNnsN2O8ATzTRyytvUPJufmDis7tThJdjT0TqjVurhHgfQ8q16gs4KRNXygp1 svhGNf7DCv60u/Cuqu5vUjk8KVmXDcobJ1LnFTKuTbNtF+8Ho+AgeQMUZsa4oxTo+4UG 2Zcs7ur9pMFX/b7lGo6pN/IlAwSk70+vYzfbxUAEjcRwvRykV8nEqLraLpFlSdsP47HY yoAm18E3UL1V0lXgSu1kdOhsSGO7A/P7p+us9SDa2ECzQNgVxfiUZyHATge2BZvpEJ4T ShBUR8Lm7DR/sIfgSLKpkBsptC5CpK9tU2JXwUu1D//7Kqs7qK3jBRkucL/EElapcqZs AXfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722266916; x=1722871716; 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=zXdSwZIkaei7IVXcOo85+RXKqlbMq+68sLXgYS3E5lM=; b=S/KZQipT+X0c5SgI3boaYYdARG0LOWEDmK36oR46xewu4OjSNaOPbJGfYLYV+pPOWd ZYSWSzubt8VIg1BRPhH+OX0/TcPP2EXxiKJTZzxYLqMm+lCFawze7vH3gcclHGyYBoJH S6XJfrSdLZ+eyZnPPJxYY3PRvXz2b2PwLDzyZ5KezNYaqRLCMYd6LGZoMREyRXTV9gYR xwmmJEnyjFuuivTnSNegSnXLIN0pOgFoFVKbNYXxfQZugtVcBwfuGBofjGyRkpsPs2fv wy2XSX3tcU56IILbpBUciPZGyX3QEv2MOlq44WMDR1VSCKhSQIbEuMIuUSEueu221xs2 +7bg== X-Gm-Message-State: AOJu0YzeSDhnHkI1PfJZjuo+9p8PdGZ5kprAq50913jd5Ch2oB6tL1hh MPTgDpnhY/8gVOhSjVVGQFND0tg3EQ827WZs12pyPuJNoq5bCXQOZ83vpvLyDeI+OdmdZCV0lcz u X-Google-Smtp-Source: AGHT+IEdWtE1I+hDS1jIAqotF7SzgvejyFnco1cDpZQYAdMcSH1EjBnn9KZfB5hOJAt/sAICkDES4w== X-Received: by 2002:a05:600c:350c:b0:426:6981:1bd with SMTP id 5b1f17b1804b1-42811e52330mr53491205e9.5.1722266915665; Mon, 29 Jul 2024 08:28:35 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , Akihiko Odaki , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 13/14] tests/avocado: mips: add hint for fetchasset plugin Date: Mon, 29 Jul 2024 17:27:13 +0200 Message-ID: <20240729152714.10225-14-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729152714.10225-1-philmd@linaro.org> References: <20240729152714.10225-1-philmd@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::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=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: 1722266969735116600 From: Cleber Rosa Avocado's fetchasset plugin runs before the actual Avocado job (and any test). It analyses the test's code looking for occurrences of "self.fetch_asset()" in the either the actual test or setUp() method. It's not able to fully analyze all code, though. The way these tests are written, make the fetchasset plugin blind to the assets. This adds some more code duplication, true, but it will aid the fetchasset plugin to download or verify the existence of these assets in advance. Signed-off-by: Cleber Rosa Reviewed-by: Akihiko Odaki Tested-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240726134438.14720-3-crosa@redhat.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/avocado/boot_linux_console.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index 450d67be6a..b8b0a4df10 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -274,8 +274,7 @@ def test_mips64el_malta_5KEc_cpio(self): # Wait for VM to shut down gracefully self.vm.wait() =20 - def do_test_mips_malta32el_nanomips(self, kernel_url, kernel_hash): - kernel_path_xz =3D self.fetch_asset(kernel_url, asset_hash=3Dkerne= l_hash) + def do_test_mips_malta32el_nanomips(self, kernel_path_xz): kernel_path =3D self.workdir + "kernel" with lzma.open(kernel_path_xz, 'rb') as f_in: with open(kernel_path, 'wb') as f_out: @@ -303,7 +302,8 @@ def test_mips_malta32el_nanomips_4k(self): 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/' 'generic_nano32r6el_page4k.xz') kernel_hash =3D '477456aafd2a0f1ddc9482727f20fe9575565dd6' - self.do_test_mips_malta32el_nanomips(kernel_url, kernel_hash) + kernel_path_xz =3D self.fetch_asset(kernel_url, asset_hash=3Dkerne= l_hash) + self.do_test_mips_malta32el_nanomips(kernel_path_xz) =20 def test_mips_malta32el_nanomips_16k_up(self): """ @@ -316,7 +316,8 @@ def test_mips_malta32el_nanomips_16k_up(self): 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/' 'generic_nano32r6el_page16k_up.xz') kernel_hash =3D 'e882868f944c71c816e832e2303b7874d044a7bc' - self.do_test_mips_malta32el_nanomips(kernel_url, kernel_hash) + kernel_path_xz =3D self.fetch_asset(kernel_url, asset_hash=3Dkerne= l_hash) + self.do_test_mips_malta32el_nanomips(kernel_path_xz) =20 def test_mips_malta32el_nanomips_64k_dbg(self): """ @@ -329,7 +330,8 @@ def test_mips_malta32el_nanomips_64k_dbg(self): 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/' 'generic_nano32r6el_page64k_dbg.xz') kernel_hash =3D '18d1c68f2e23429e266ca39ba5349ccd0aeb7180' - self.do_test_mips_malta32el_nanomips(kernel_url, kernel_hash) + kernel_path_xz =3D self.fetch_asset(kernel_url, asset_hash=3Dkerne= l_hash) + self.do_test_mips_malta32el_nanomips(kernel_path_xz) =20 def test_aarch64_xlnx_versal_virt(self): """ --=20 2.45.2 From nobody Sun Nov 24 14:58:58 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=1722266950; cv=none; d=zohomail.com; s=zohoarc; b=FOzUV6H+C7DYe2B85hj84par73IElsxRFqambtuAKw9kjTjhRSD3wIQXOamviADD0KUtLW7zWgV67DDqESWYGOxPz/saEMTFxi3iGXe85s29azei6eQ5XrzlGyZ57jEr0zUZxftPaHUXR6SV1sWM+Nn3XZhuOkY0wyt81wXQX0s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722266950; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=jz7Ox8GZ4fBgHa8IWcCtoxPXphT3ERQSEGlUxQOFD08=; b=Bjnn/2sNwYuJIMvmFyQ9NDt/9FeGBgQgeripOjL/j1d7SmSPqMKhLTc+loG1781CStTwWQXAyCy1x/RtQc43AQ+CDok2DaARbIobd1S42zyc/cK8Y/moP6tMxnhbjtZh4voWCUyMJ8/bfZ4OgY4sqJnNh1g2n/LnSMLpqhzPRtA= 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 17222669501671016.0659231606494; Mon, 29 Jul 2024 08:29:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYSIr-0000YX-0T; Mon, 29 Jul 2024 11:28: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 1sYSIp-0000Js-L4 for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:28:47 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYSIl-00009O-MF for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:28:47 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4266dc7591fso16448985e9.0 for ; Mon, 29 Jul 2024 08:28:43 -0700 (PDT) Received: from localhost.localdomain ([176.176.173.10]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-428057b7218sm181106805e9.47.2024.07.29.08.28.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Jul 2024 08:28:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722266922; x=1722871722; darn=nongnu.org; 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=jz7Ox8GZ4fBgHa8IWcCtoxPXphT3ERQSEGlUxQOFD08=; b=Srp3SKyWWnt6FNQiXVpaec38d/YXtS4zyesfqtPrDgdzDHiVcvCUH5bZ5R4MMgUz41 uBvSBPQZi/AjyIZkZhaMWK5FSH7lf04dCVZ0WAKuYcVbKejHxrZqWQQeGEsPUvpuQtAK 5uHMc8CG9lKrlp+ZLHVZiNoyU1Xw6Bq1lFtsL4qkG/CLYN3ApUqgkbYJbCnUWbUNMaN0 s1BjKCTia4v12S1dBjcskz7C++I7kD2kY1Q+9EHkGTPF9kQ1TFe54WbL7tgj2S9XiaMJ VNaMFXlF2GC4Qa3JPYXm4tAa5V9mOIXofGjVkmA9559fbMPA5a8imEaFtq9GRpRXZUL+ 6UDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722266922; x=1722871722; 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=jz7Ox8GZ4fBgHa8IWcCtoxPXphT3ERQSEGlUxQOFD08=; b=svjViJWLUDCYby85mp3MOVviUtTACNRB2tQ90khkDeMVqwIDWZyoIG2nglf6eSRbP+ 5Ey8F/5zM6qGUtEreYR3kTcL3SJDdbunBb9TMF+xt6/hUsJiy6ax/Xs4zkjv8FvAHz52 bVcTXn7UzGxo32wkjQk7EYQ1EmYlkyYEm4Wpsyas3UwEvx5ds+1F9qMAirBmhdkcvhBJ Xs4b+3cD8Q+vNZAe5YqOT2ru+4zYreuhixEpCnwpoTCEpZySvTnss49kSk0rpPDyFSz7 ONK7vDz/+6o/rQxjfPB7F59j79nvlA0YLF67gXqZryL79zrjLn0F3SzH2twbtpPZnSbn 3KDw== X-Gm-Message-State: AOJu0YzEYfqx1Gy1kDOEhgeyuyjSmjlS/Z5kQBVZ3Kc5MWmQrQZJLl9y U9NmbIb5iwOECyuPQeFRHJQeWMCMJj1yGL1Peeo/bueozmsmuCjk/ZS8uX+1DvTM5JYrt28xVaN v X-Google-Smtp-Source: AGHT+IFuQJotWxyhTGPrZVPb0S0IiFSQXlanWxvBWHS38i5zJszlbwhWHAV9aQ149I7EKR12XuQvOA== X-Received: by 2002:a05:600c:3b1f:b0:426:5416:67de with SMTP id 5b1f17b1804b1-42811dd4862mr49326015e9.30.1722266921829; Mon, 29 Jul 2024 08:28:41 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , Akihiko Odaki , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 14/14] tests/avocado: test_arm_emcraft_sf2: handle RW requirements for asset Date: Mon, 29 Jul 2024 17:27:14 +0200 Message-ID: <20240729152714.10225-15-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729152714.10225-1-philmd@linaro.org> References: <20240729152714.10225-1-philmd@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::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: 1722266951580116600 From: Cleber Rosa The asset used in the mentioned test gets truncated before it's used in the test. This means that the file gets modified, and thus the asset's expected hash doesn't match anymore. This causes cache misses and re-downloads every time the test is re-run. Let's make a copy of the asset so that the one in the cache is preserved and the cache sees a hit on re-runs. Signed-off-by: Cleber Rosa Reviewed-by: Akihiko Odaki Reviewed-by: Daniel P. Berrang=C3=A9 Message-ID: <20240726134438.14720-9-crosa@redhat.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/avocado/boot_linux_console.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index b8b0a4df10..2929aa042d 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -401,14 +401,16 @@ def test_arm_emcraft_sf2(self): 'fe371d32e50ca682391e1e70ab98c2942aeffb01/spi.bin') spi_hash =3D '65523a1835949b6f4553be96dec1b6a38fb05501' spi_path =3D self.fetch_asset(spi_url, asset_hash=3Dspi_hash) + spi_path_rw =3D os.path.join(self.workdir, os.path.basename(spi_pa= th)) + shutil.copy(spi_path, spi_path_rw) =20 - file_truncate(spi_path, 16 << 20) # Spansion S25FL128SDPBHICO is 1= 6 MiB + file_truncate(spi_path_rw, 16 << 20) # Spansion S25FL128SDPBHICO i= s 16 MiB =20 self.vm.set_console() kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE self.vm.add_args('-kernel', uboot_path, '-append', kernel_command_line, - '-drive', 'file=3D' + spi_path + ',if=3Dmtd,forma= t=3Draw', + '-drive', 'file=3D' + spi_path_rw + ',if=3Dmtd,fo= rmat=3Draw', '-no-reboot') self.vm.launch() self.wait_for_console_pattern('Enter \'help\' for a list') --=20 2.45.2