From patchwork Mon Jul 29 15:27:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 815037 Delivered-To: patch@linaro.org Received: by 2002:adf:b359:0:b0:367:895a:4699 with SMTP id k25csp1319118wrd; Mon, 29 Jul 2024 08:28:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUYEn7dRaY5VRm6DB3JsjbnrKWp9AV1P/0zKq2eURQ8UORlJZFSBE1NCKNV4rPRbkZCalnyBB2qJs2/YeTlouqn X-Google-Smtp-Source: AGHT+IEvCwEYUsnzU08ZD6vKqq25NRgLqxTsKxT/br3dqGzvbVHDjwDfW7zY4DKtnfX1mG0w3fJx X-Received: by 2002:a05:620a:458d:b0:79f:947:8915 with SMTP id af79cd13be357-7a1e52564e7mr1036804285a.29.1722266885639; Mon, 29 Jul 2024 08:28:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722266885; cv=none; d=google.com; s=arc-20160816; b=meDCuSkaKYcf1JS8snp/CP3C7BA4usLclkUTtiDAgo1YrDiEBfpAlK3eV9AgHlsPoK XtZYdrpYrVR//3tfjIMAmJSt/ZNEvrN3CMClfbMpPz5JDSVSlCTH3lMwDKz0Z/xm+Wbx /MjJ9gJ6p8yszjtNvrG1bJzXLDyByUTAyyiAo4FvdgpkFFZfhDGgKizsJB2335TlT/56 glihDJ9qpsi15NLvu3OL2B4smVkUyECyzfpvyS+r62zMiUhN23pGvdGDqKGhKhzYx1xp O74bya4bx0ekW8s/2vRjAK7XsrBebu3DUDm1A+RRVoc2vuFvXQyhrtVcl6oqbuKJ3UE+ 3EZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1/zGXteK/S9WGQeoxuzITGtgb8/HqBY0j6sCJN6VEFg=; fh=xnAl8QX98odZLqr6Xt1AlT8vDt8DqBCZvQH2nMnmf3Q=; b=BcXITOtzjWZUNDZ/rL/ND9xS2sq9JFRsxBYFA1VkcKCGRXbSMCDFqOzBAPoHMUiOnB 1+AkggFJMGxY2ujOzCRHMowX/VwNpgCHiJ+82AYs/UVEjltXM56mijejZ55LnEKd14FD WaHJoYnc7JPl8COttFg6dv0W1qFVSqAZWM3dE5h8JmBZ7/xjSCTJTa+VvXF3kPiB700+ yl27+MmQFAObfy5Ro8PcbDRKvPZzT/qVNQY34qwYq4T8NREKWF3RdnUJiCZZG7m1gvEy IZXqVXbirfiQ3unwT9MF9Q8eDR7atvQO+pwEle/ACfS3T28iKh8mRb2mYBo+eqXg1IA+ 3yNA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QCo2B7Oi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44fe84077ebsi108293921cf.437.2024.07.29.08.28.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jul 2024 08:28:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QCo2B7Oi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P_=2E_Berrang=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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Thomas Weißschuh To make sure that the QAPI description stays valid, add a testcase. Suggested-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/qemu-devel/d9ce0234-4beb-4b90-b14c-76810d3b81d7@linaro.org/ Reviewed-by: Daniel P. Berrangé Acked-by: Markus Armbruster Signed-off-by: Thomas Weißschuh Tested-by: Philippe Mathieu-Daudé Message-ID: <20240724-qapi-firmware-json-v7-1-12341f7e362d@linutronix.de> Signed-off-by: Philippe Mathieu-Daudé --- 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']) From patchwork Mon Jul 29 15:27:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 815034 Delivered-To: patch@linaro.org Received: by 2002:adf:b359:0:b0:367:895a:4699 with SMTP id k25csp1318979wrd; Mon, 29 Jul 2024 08:27:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWskAiU0nLcYDF0BcWKqfoQx45mFVoX8nHarXyxnCivgJTwpNzoYyBQzoamUnV1+qkT5c7634GZ17teaCu5ROzr X-Google-Smtp-Source: AGHT+IFoHwQG09Eiowp707+9+C7inmgc/+6nlBbiKh90XH8Yk2IbzHEiL5ZeSKguMn89yVFYlXRl X-Received: by 2002:a05:622a:1350:b0:447:e079:af12 with SMTP id d75a77b69052e-45004da2ff3mr108291561cf.19.1722266863234; Mon, 29 Jul 2024 08:27:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722266863; cv=none; d=google.com; s=arc-20160816; b=wMCXkpp+ywqWZDBwK4i9RmJXrpt3Vsh6AmciKpozE4c2cC5utsyfN7anY+x5N2e+0q eCfqsbxzNfH0cjJc4RbjcIp90SAl3kPhIxV2IFjqGVAn56KvFFwo60o7aIpfq4VLjqZ5 ETY0SDmjU+jQxzpuV0J+nBgt/vvJ7lbCt9AhQwAy4Pvulkeijy/jRIC/eu+zW28p8B87 0Ir7COl9uQ3a9B9J3ZHaV0+v6bRKFUxshxivLVjnm9iGwK+vOIkJHGDutRdk4C8ZVj8O akYiECUJqZXHZHqpFdODA0jM//TrueImBDpnhdYVFDwHPVoekWvBm4LSWiHm7DPMezfA A3UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=X07qTbL83zQOZhtssmu4m+yBs6p/aBS1K1qhIZAMOfc=; fh=LrPQuEKVF+Dsx2F4DCB8BVVQW8BdXsyh1KCq0lVL1mo=; b=si3wVbCJhv8/3VFUU83qiAQIWVk6xzulgdKUPmH85kA84o/695XGpoXn0no4ayTbSW hvPnoMYxd+yRLBA3BC+dokKQfN1MmG1OIMP6muaHMJFQhaQZLLoIcsFxKdPC3A9Zhke4 WNNWeKDBR0LffqVmga0ga46ZoKWHAHmNuJndAlOP/PfyD4qm4iD84KBTfwKKKR8n36ue qvur6/xXPftKLGyB1xcJCj8RjvTcEGzNaHJTF9FxDHSrENBQW6bN+mYVJUKDB+8OU2vY 5h/emB+1EOgrKyNE+CQ+RHbbZS/HCH9WVoxSCvmxMUwE9FDBc5ftyk+jaGxpfzk8/V91 0kxg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FejViZJr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44fe840853esi103822401cf.507.2024.07.29.08.27.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jul 2024 08:27:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FejViZJr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-stable@nongnu.org, =?utf-8?q?Philippe_Mathieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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-finished' threw an exception (exception: unsupported operand type(s) for +: 'PosixPath' 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é Message-ID: <20240729120533.2486427-1-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- 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 @@ 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(): From patchwork Mon Jul 29 15:27:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 815039 Delivered-To: patch@linaro.org Received: by 2002:adf:b359:0:b0:367:895a:4699 with SMTP id k25csp1319262wrd; Mon, 29 Jul 2024 08:28:30 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWhI2He2YxDGzQRMLwMCYeuB55EPBDYYI8s9XOHexyyIHeUqzDl8Tfu1O6IDMhhwDhtymZ02rzC1N/7QJqH7LDU X-Google-Smtp-Source: AGHT+IHxcD6934xir2Ayr7WMacjWRNXyT7eYdFDbpX7BJ3UrKhOuoZ1ZZuFwCSmpkDkBlTDH3y4V X-Received: by 2002:a05:6808:1591:b0:3d9:28d0:fcd4 with SMTP id 5614622812f47-3db23a2fb62mr10719452b6e.5.1722266910549; Mon, 29 Jul 2024 08:28:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722266910; cv=none; d=google.com; s=arc-20160816; b=wwbhAelncIKwvy9FFFlPikh2xtbobKwkt7J2V9XyVtBDX+AcWOgnExZYnAN6kTakDX Ww18yx7iMxAf+MNiGyOZdSVgTnOiMq+AwN255LgigbJ6lFNstTGdR/BOMks6u565TAtP vMDup9uGILyIhyjGmacDH9CTwIW+Et5B1d3Nflb39tYKCHDaWzC/L5fgJWNoSGqAyXGo KjT7zYFO5LGQzfXcwPI61PXULlOQ4fuvSHfUwJR3/TZb72R3CJ7CPZK39rgxPnS6rxOC PLAIqlKcLT2Z5NenJwVN5kligeHvKDeynPi/uLi7IWkZwOs7ihXrxM8yI17PwaVIIBdc pjyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FL/ZPZYccUWSxTKfYMWLY3Pr4brfg/yi6VP3FOnE2ts=; fh=qi6M7+758Hm8qfC4GxHVnK55oMKkCiFOk69X0Z7vtIs=; b=GFpRrfv3MoyQCnpPa2apQFdTp8X1KZEQ0+xn5sQn4dWca/NWhzwzWd0UCw4QlZFXJd 8I4KTQNS0G51AL96cs0DFv+90M8Drtgf4IIBmzb3Rekl3u3ctWMDSbr+PjCgR58d0gxH rh7ZFgY1ixkEA3aP/eYqhVxlZvwlmMe+mETi8x11q/8obMr50/JzTynPib8TtSZuum6l 6qcbsKGV6i6Ur0fWDbc13nYsBzy6SEnedhGmuYTZS5vqwMrALE9HjRpYUcHwrnuajwEl 6ekfRlIjIppa350UJaK1ci78eVPuFBVAzEPSaHYiU8Ii760mDnwGrUhez2aCg/MzTppv Jvug==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UBciM1CR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44ff71cb24asi76818231cf.109.2024.07.29.08.28.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jul 2024 08:28:30 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UBciM1CR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?utf-8?q?Philippe_Mathieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Message-ID: <20240724175248.1389201-2-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- 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/pycotap-1.3.1-py3-none-any.whl new file mode 100644 index 0000000000000000000000000000000000000000..9c2c7d259365c8a0487228c6878e2c0b10ba6bdd GIT binary patch literal 5119 zcmeI0XH-+^*2hB?0-*~??*uUfq=gPrO$Z=_u0ZG@O^6~QNbe=o02+`gMUW;%Ec7O! zi(;gsC?Ft3iYPD6y)(}E&UnAx5BIF|JZGH`=ePD+XaE0u@5cy1M$Q5N0H^?|l6bQv zES3d80RXr$0|3W2z$d`L8-w%?J9a_|Q(1A4=i{ z)PdwgFGfrnh-nv{0;09#Ai6t_@|AgzZr?iK|5`(*Jq7N=Ia;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=$mn=>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{=WM3f4M*U~a+RHhav6sBbSOaS2Y&JOwH)?e~Mf z^MV!@G48+CkC?f*1fxo_pARp5Z4{7JBl4`(29!D703;qg0ut=3S%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>=eqiAR{y2l; z#uXDbw(<0|o?4PslQpjMu(&zBWl~@5!WGjD$I@`2Ybp=mRq*7K)ixkZH*BLp$7AX; zzqfoeer=XMBX8Gpdh<>P?;W~Qd#5{_C4Gg-cN_DZ4#H` z9tdOr5=;+xbVj9v@;>qReBh^fNk#n}1W6RJ%}CvFHh)Q8YQ;hlCS2YlNf_QKzlw|; zkhQl-tjnmku6rsa>(t`H+v+M)-tW}HvPfa!xebBc+jyw~3zvyH5f&#o*<{1#lNOaC zX6n0RZWePR=KwIxM`dN4wYI4hgs%U}c%@_jGWw=CeE$ox_Ndl~9;@EVv? zFuiDviL61-$1u7Tnykm1+%q%WGuEnoxOlP(&o{a^yqrmGoor%NhFc>UZ`H&$(zARi z3BvRv2I=BcyRAwMO2Nrqx1Kc(ZdInck*~XHimCXg9Cl4AaC6H4KGFj2iY2j2RNd zO~9pR`g(_?-_7?AKzgC4FMtWp&xoCeNQBa`phT8%LaaVl+8noinWeX6e78*Ce#R#~ zP9AP<8DC{lXVNGR2q@E5=PzY_!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=ze~ z17>;uG(DFblGQAu^@kK}oPqvHv&fj~hRzg$Qtm9|S21`?RntA73VsH2-S_n>jX23Cl}nlSiP&Lk68 zm@HB7f{g|fGDb9gP&q9BKFFntM)Q&qX=dt6ST1RFOmt(@m$a=k9`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}=nL1+3Zh zH6EIoTKc6ArI-PmjY`|iFD{=dw+HPptKPM#EyyZ*#W7XUXKQ9=EzE=C$aG5aJ2R-D z=&%*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%=FU1rhpipaa=uy@^Du zqzKid0xecCBgA)8LHkt|FQ46j%8>!Nl$Z-jvhGP$a4`wah8t#zOHC%YU#%{C-eNUY z4TLF=E=Qp8Cc62dYKyE5p>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>+=59pH+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=HdA^vqA&Ae>*FEUx_FA;Z{eFh0d_} z*WPy-%7^aoX4>~+dIrw>+90(=uEYyK=k9=a7t-PbW?kZqPa<;{GWliLc1mtM`Gj zxm~`iO`x#S>W%;hYC_B)2=@)%RMdof(?;E^)ki82x=>QafOvZt$a_6wvpwKW66KTo zl=lJ-S#js)spm=q1A8?-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=7#Fj2H}+mKORV0cX}{;UP4QsGC6$hCspopS7MY(g@1i&~Edy>; zAc=-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=vADJX 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 = { accepted = ">=1.1.0", installed = "1.2.3", canary = "meson" } +pycotap = { accepted = ">=1.1.0", installed = "1.3.1" } [docs] # Please keep the installed versions in sync with docs/requirements.txt From patchwork Mon Jul 29 15:27:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 815046 Delivered-To: patch@linaro.org Received: by 2002:adf:b359:0:b0:367:895a:4699 with SMTP id k25csp1319604wrd; Mon, 29 Jul 2024 08:29:30 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWwrgnlkW+pVyhPjqlIJmF4ABnb+TtAfiafT9k9PaWrz4/+TGOlwKrcEFwJOArRGEDMOYPVa+ERPVn9sUk3/FCJ X-Google-Smtp-Source: AGHT+IFlsAcshxkC+xeoozvT1ZV1CvUPyOh3DeaHE62D37BX3GKcRKtxE5jAxdbg8qKKMhjxOu6v X-Received: by 2002:a05:6214:2024:b0:6b5:44c2:843b with SMTP id 6a1803df08f44-6bb55a83d8emr108951666d6.46.1722266969928; Mon, 29 Jul 2024 08:29:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722266969; cv=none; d=google.com; s=arc-20160816; b=fhUxREwnyQQur4J201g7R+NzTxVMBnFWnSQRRKLtlklrjhNi09Y8nyQM8yHlavBH3v Ddpj1C5YZ5c0O9hpXDqrSWtzP67W1vdgVBhjgphNC7c/KaxuVCjbNcMVSuKLnbUWlvIa F4BGXoGN8E9Ovyne+Gi27H3p1YcUslO+aonO6pkoWhCSwLGB2wi4Uen8OKrFFXccLooz wk3IkYWkJPc0NRGc7UeXFQdUJ9jIgExUgAkth7b4jDQlvjYXnG1ac+4R2G+NGJVzMCnM hKchnbtbGsf2YkgkaogY75pSxLy5JZFuB9WpdtuRSkjHVZj8IIcQLS8X/+2pJCGAMVRY YYpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KBqoPLgA3/9ZofvfJWZLzCibdmlqkba0mV85fMinUUM=; fh=qi6M7+758Hm8qfC4GxHVnK55oMKkCiFOk69X0Z7vtIs=; b=d5d+HSTt29pTIeMmxEsfg8hqlrBnwD4Vuio2jtLOWNK76Ory/O9NhtY/xp6kQkC5b7 2GQaqBEfcuowwiP17ZzGfHl61EjAFsaOvIo7XeUEIBx9gTAfmQ2S2bB3Lo8JeBbANnQs poqqLL+q1ifB7xqucRjZPtC83ih6zNmO87qm9mnW54e+HUUNbFJn6umKExXjGbhq2+yd eA3i9tGA5Ic95wqILj0crRU163qA4Y0EPFOU7MU7O6BqmIzEAFpBBA5IsSFQ8rv7gHY8 8yLOwLwbAm5LT+J9tvQ+mtFj7VEKxQENKQ7RLYpEOb3NqwftEi0ZM6YVlJ6TQC9XD1d4 RW8A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NaVbAlV8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6bb3faab6e8si108680876d6.377.2024.07.29.08.29.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jul 2024 08:29:29 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NaVbAlV8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?utf-8?q?Philippe_Mathieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Tested-by: Philippe Mathieu-Daudé Message-ID: <20240724175248.1389201-3-thuth@redhat.com> [PMD: Updated MAINTAINERS] Signed-off-by: Philippe Mathieu-Daudé --- 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 = 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 = 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 = _build_dir() + +def has_cmd(name, args=None): + """ + 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 = ('which', name) + + try: + _, stderr, exitcode = run_cmd(args) + except Exception as e: + exitcode = -1 + stderr = str(e) + + if exitcode != 0: + cmd_line = ' '.join(args) + err = 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 = (cmd,) + + ok, errstr = has_cmd(*cmd) + if not ok: + return (False, errstr) + + return (True, '') + +def run_cmd(args): + subp = subprocess.Popen(args, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + universal_newlines=True) + stdout, stderr = subp.communicate() + ret = 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=False, vm=None): + assert not keep_sending or send_string + if vm is None: + vm = test.vm + console = vm.console_file + console_logger = logging.getLogger('console') + while True: + if send_string: + vm.console_socket.sendall(send_string.encode()) + if not keep_sending: + send_string = None # send only once + try: + msg = console.readline().decode().strip() + except UnicodeDecodeError: + msg = 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 = '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=None, + interrupt_string='\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, such: + + 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=None, + vm=None): + """ + 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=vm) + +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=None): + """ + 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 = os.getenv('QEMU_TEST_QEMU_BINARY') + arch = None + + workdir = None + log = logging.getLogger('qemu-test') + + def setUp(self, bin_prefix): + self.assertIsNotNone(self.qemu_bin, 'QEMU_TEST_QEMU_BINARY must be set') + self.arch = self.qemu_bin.split('-')[-1] + + self.workdir = 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 = pycotap.TAPTestRunner(message_log = pycotap.LogMode.LogToError, + test_output_log = pycotap.LogMode.LogToError) + path = os.path.basename(sys.argv[0])[:-3] + unittest.main(module = None, testRunner = tr, argv=["__dummy__", path]) + + +class QemuSystemTest(QemuBaseTest): + """Facilitates system emulation tests.""" + + cpu = None + machine = None + _machinehelp = None + + def setUp(self): + self._vms = {} + + 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 = run_cmd([self.qemu_bin, '-M', 'help'])[0]; + if self._machinehelp.find(machinename) < 0: + self.skipTest('no support for machine ' + machinename) + self.machine = 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 = {'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=self.qemu_bin): + self.skipTest("%s accelerator does not seem to be " + "available" % accelerator) + + def require_netdev(self, netdevname): + netdevhelp = 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 = 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 = QEMUMachine(self.qemu_bin, base_temp_dir=self.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='default') + + def get_vm(self, *args, name=None): + if not name: + name = str(uuid.uuid4()) + if self._vms.get(name) is None: + self._vms[name] = 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 = self.vm.args.index(arg) + 1 + if idx < len(self.vm.args): + self.vm.args[idx] = value + else: + self.vm.args.append(value) + + def tearDown(self): + for vm in self._vms.values(): + vm.shutdown() + super().tearDown() From patchwork Mon Jul 29 15:27:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 815040 Delivered-To: patch@linaro.org Received: by 2002:adf:b359:0:b0:367:895a:4699 with SMTP id k25csp1319350wrd; Mon, 29 Jul 2024 08:28:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVbr0SxpsVkw9AAP0HFO0yWdv014iRTrQwxmck2+RZFxoQLIQxn16p6iw3sAF4phmMUz2QRPBDiItJxQhsxLT0q X-Google-Smtp-Source: AGHT+IFwdcXpEunxhJEP5bMcQx3g2zJ76GFpDDD0XZEoyg8e1L3ldrsUYgWnWYIiH75rFcCkIPBD X-Received: by 2002:a05:6214:19cc:b0:6b5:e0a2:988f with SMTP id 6a1803df08f44-6bb55b22449mr118381346d6.47.1722266925809; Mon, 29 Jul 2024 08:28:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722266925; cv=none; d=google.com; s=arc-20160816; b=fH0Q+kHlsZXkHcNCSP4ZHpF8fixnaGIKINLlMFO4zabTJjZV/AoK/25iza3dNAbfgM 0RcmowDtmEJ1lfoqfd8tuJyenogg2NILn7c/O92AdWiW+OFKlMSr2/vyfqcVpq+DDcny wVVI7GzZW3q5jkS6Vtcb31uw5BFk+D9NQuMu8486ePhNBVDUbyabp12Ozg7m9oXyVZBW ugJWB0W0q+jV4KwC6iseBp62wtQV2p/rd2rdNIwzjYAYRcoSWCJpTInsASOqjOCNhdnD Mx2gWkz+oQAMzV00dr+SQ2/38wbO77fuUxtOG7Xy2rizUsvkk9hFPYBdU//T/y63fVJj 07Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=f7BE/CfrHJNluE1SRipI94yPsTEJHS+QxQjczrrTgwI=; fh=qi6M7+758Hm8qfC4GxHVnK55oMKkCiFOk69X0Z7vtIs=; b=uPpP+SehNSISHZ/205L5PR5ib7JI7lIe91zIhxCkljyn0PmPGHQ6xNtDAdc2C6xzny E6GS3pw3v3GWAmCWhy3EEkjJysA0IERtA/BFmF7O27DlBjnj3Gh3hPNfuKN/Q3wQsC1y Ntn3KXGLJKnWo91LjKwIo4FxXCNj0FiIYTxnUOFWtuWaCskGanI7tCrtpZH+ts/8dc+/ asRQGhNpG3Si32ZHjZVe1kJ589MGaxjbjLbOdxugX6+fOtlDMULegoOd5Y2nQmKgqHAr EOgA2+nhdzuZGt/0Wt7SmN3y+P9XxKz4+z0Mht9Wr/mURARWBrFIqbNZlbLDdOagzFDa a4dw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zyci+QYP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6bb3f8ce27esi104438766d6.51.2024.07.29.08.28.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jul 2024 08:28:45 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zyci+QYP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?utf-8?q?Philippe_Mathieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Tested-by: Philippe Mathieu-Daudé Message-ID: <20240724175248.1389201-4-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- 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, softfloat, qtest and decodetree tests" - @echo " $(MAKE) bench Run speed tests" + @echo " $(MAKE) check Run block, qapi-schema, unit, softfloat, 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 for 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 report" - @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 avocado 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 avocado 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." From patchwork Mon Jul 29 15:27:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 815036 Delivered-To: patch@linaro.org Received: by 2002:adf:b359:0:b0:367:895a:4699 with SMTP id k25csp1319116wrd; Mon, 29 Jul 2024 08:28:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUN77jeLKPEdBJLjF1Gg2Rnndi4SVPNXfSICRn8uGsFzD0im4aKQdi6UgrgTkLFMfUZtfAd/LtyiYaTxQq0Sfnp X-Google-Smtp-Source: AGHT+IHsu+E8Jn86o+7S9Okhrdt5JLFKVUBuwI3xUFJuw1Z1u/pjSKlZ6ou4MuvVWvxHm47O1RQl X-Received: by 2002:a05:6830:3707:b0:703:7821:d9e with SMTP id 46e09a7af769-70940c98bbemr10843662a34.30.1722266885594; Mon, 29 Jul 2024 08:28:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722266885; cv=none; d=google.com; s=arc-20160816; b=kqH3fkl9AEsGtfiIBQAWf9llVhvZlvuC152HTHvL8c7ka2uHqTnFz/J0Us3bBCf9hO zICFK5+KzmW5dfE+37yM68RBim8Ae6l5ErjO54sWGhYF/J5LJlzYqmIAAoShZAXWFmlB L+jaYBsRqogyjBCBEslzB29TdlykGTo2co9VUv/o7anjurd5gfwS7HzE35zjaD/1FhZl rKTl8qZxYEc6NMTw1whiyRa0Eb3sTIcbQdIHR6cp2JvJnHY4/zFqytsI5vS1yobASkAi abY5b9nRK80GTNLKd2wQcAR3PoTGfkn20QkhYEbPvfBnVkXEUR6cYWMOB4/YGXkx2LL5 +2uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8PomybOz3qZzuYIDD9gWq6wUwpi3wx9FNYbcCkKRftw=; fh=IBGKi66tyuZv6j+HlwNNom5hnQJyXZYPNb735jZBZjY=; b=h2qhat7A+NIeRzzfYBjxJvc11bjrFdN1oXnKGiKc/Zat0XVTXPih2tgDWk82Ax4RUW uMoo2fL6w0lrKDh/1NgG9fNP5phKFUDlAriKd7Zx8Q+JjrffbaseAP9826wrKCemkF1V d2wB06zTTx15c/nF6MQPwIktGMVjqM9UEYGOlh5/Qvvan1h0dYJrI1FcRBpw8msvJ+4y SqM1YihkJLJMjFUdngvkZwwgtGnvdy+Rg2eJIMaXKtoIQL+9Lp/llo/wC8P0BTYefUKB wQfZgkf0laoK5z39MlW+wA3skPSGLzjHUbrZi68amPpthmGjsLFCL+12aRSuvEarIS1T S0dQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PLBRy+BC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a1d73998c1si1094358285a.53.2024.07.29.08.28.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jul 2024 08:28:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PLBRy+BC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Fabiano Rosas , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Tested-by: Philippe Mathieu-Daudé 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é --- 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 tests" + @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: check-acceptance: check-acceptance-deprecated-warning | check-avocado +FUNCTIONAL_TARGETS=$(patsubst %-softmmu,check-functional-%, $(filter %-softmmu,$(TARGETS))) +.PHONY: $(FUNCTIONAL_TARGETS) +$(FUNCTIONAL_TARGETS): + @$(MAKE) SPEED=thorough $(subst -functional,-func,$@) + +.PHONY: check-functional +check-functional: + @$(MAKE) SPEED=thorough check-func-quick + # Consolidated targets .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 there +if get_option('tcg_interpreter') + subdir_done() +endif + +# Timeouts for individual tests that can be slow e.g. with debugging enabled +test_timeouts = { +} + +tests_generic = [ +] + +tests_x86_64_quick = [ +] + +tests_x86_64_thorough = [ +] + +foreach speed : ['quick', 'thorough'] + foreach dir : target_dirs + if not dir.endswith('-softmmu') + continue + endif + + target_base = dir.split('-')[0] + test_emulator = emulators['qemu-system-' + target_base] + + if speed == 'quick' + suites = ['func-quick', 'func-' + target_base] + target_tests = get_variable('tests_' + target_base + '_quick', []) + tests_generic + else + suites = ['func-' + speed, 'func-' + target_base + '-' + speed, speed] + target_tests = get_variable('tests_' + target_base + '_' + speed, []) + endif + + test_deps = roms + test_env = environment() + if have_tools + test_env.set('QEMU_TEST_QEMU_IMG', meson.global_build_root() / 'qemu-img') + test_deps += [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') From patchwork Mon Jul 29 15:27:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 815047 Delivered-To: patch@linaro.org Received: by 2002:adf:b359:0:b0:367:895a:4699 with SMTP id k25csp1319632wrd; Mon, 29 Jul 2024 08:29:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXL1ZjlTygQTr4XyP8j6v8yDDr3pTlsY9ZBihYS7B8HLsT0wgJFW15rhbMpCz0HthwwG+iZ29366P2oVECUNyxh X-Google-Smtp-Source: AGHT+IErunVKggvZObq+Wxo/C2AW6yNEkKvhaZY9pes5iadv5Sv89mtl4uMp3xQMoqCBYnXEdXhB X-Received: by 2002:a05:6214:1106:b0:6b7:9a0a:33db with SMTP id 6a1803df08f44-6bb56373786mr133683426d6.23.1722266977180; Mon, 29 Jul 2024 08:29:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722266977; cv=none; d=google.com; s=arc-20160816; b=TtKaAiF8xUawNvQJoNIejQHqdzBFeA6IDod6KLZWqQFLouiSOG5WpiQqdSmN9lryKX N80tPZpQPfMGZt0RS+3q5xRHCPJ9G2Kff5qvG2C90cTgeMI5b11ZaNrm5+/Vt0c3knJU a8uODp1YqmrV7bIHnkQKhiebBHa69YsYdqcvICqrrULSmDF8AoQaEGjkxxQcqWc8AF85 dQFyems9kpsNJ/O2l1YLx35Vzkzrdw6x2HWnAKAQVz6OP0tNToHe0Od8dAZU/Q0F5phH RKaWu9AKoXD3ERvkqjFB+x1x75L6Ld2ersJTm+b0oBSzZb/Lz2uYOewgZEkpngZZk3kR 2PxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7TtsHovYmaBnbaX00mMSIqbmFg0IKysPj85jWQOERIQ=; fh=lGhQQv5JLl963h3tt3oDogg6211zJupGFaH7lvsaE60=; b=CM47GRosDLIWk5fz2FzyLbz5GT+2+NtWMPJ+GRkdG0c9iatHcWb0LhiRxSd6NL35cv gOROFP7PSdKLl6UeJjdbiUVtQLkhmYWVb+dAmM+1aeIbdRt+50x3bJ+EQtEZMZi8L/zE +VRe5CFzh3wnPv8PfrTjCQ6m+MxNgwKsfFpgyhtwo5tvYpt1EzEqMUhYUhj7+d2DnWoo yCvbTSa00vJd4tiPT6vkgzMvKAh5W92KEzCdEvMDtHnCPzUK3U8ruqpKhxGmyHDC7uHX jqXrFsHelRmlngWZ5xMFKIqIWIsspdBNv/9DGlAS6rEzNgB/90bhBsT1hwR1cVz03Dzo lNSg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZjcSRUyU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6bb3fa8654csi100022156d6.194.2024.07.29.08.29.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jul 2024 08:29:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZjcSRUyU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-ID: <20240724175248.1389201-6-thuth@redhat.com> [PMD: Updated MAINTAINERS] Signed-off-by: Philippe Mathieu-Daudé --- 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 => functional/test_cpu_queries.py} (89%) mode change 100644 => 100755 rename tests/{avocado/empty_cpu_model.py => functional/test_empty_cpu_model.py} (84%) mode change 100644 => 100755 rename tests/{avocado/mem-addr-space-check.py => functional/test_mem_addr_space.py} (93%) mode change 100644 => 100755 rename tests/{avocado/pc_cpu_hotplug_props.py => functional/test_pc_cpu_hotplug_props.py} (90%) mode change 100644 => 100755 rename tests/{avocado/virtio_version.py => functional/test_virtio_version.py} (98%) mode change 100644 => 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 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 @@ -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 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 = { } tests_generic = [ + 'empty_cpu_model', ] tests_x86_64_quick = [ + 'cpu_queries', + 'mem_addr_space', + 'pc_cpu_hotplug_props', + 'virtio_version', ] tests_x86_64_thorough = [ diff --git a/tests/avocado/cpu_queries.py b/tests/functional/test_cpu_queries.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. -from avocado_qemu import QemuSystemTest +from qemu_test import QemuSystemTest class QueryCPUModelExpansion(QemuSystemTest): """ @@ -33,3 +35,6 @@ def test(self): e = self.vm.cmd('query-cpu-model-expansion', model=model, type='full') self.assertEqual(e['model']['name'], c['name']) + +if __name__ == '__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 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__ == '__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 -from avocado_qemu import QemuSystemTest +from qemu_test import QemuSystemTest import time 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=machine:q35 - :avocado: tags=arch:x86_64 - With pse36 feature ON, a processor has 36 bits of addressing. So it can access up to a maximum of 64GiB of memory. Memory hotplug region begins at 4 GiB boundary when "above_4g_mem_size" is 0 (this would be true when @@ -52,9 +51,6 @@ def test_phybits_low_pse36(self): def test_phybits_low_pae(self): """ - :avocado: tags=machine:q35 - :avocado: tags=arch: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): def test_phybits_ok_pentium_pse36(self): """ - :avocado: tags=machine:q35 - :avocado: tags=arch:x86_64 - Setting maxmem to 59.5G and making sure that QEMU can start with the same options as the failing case above with pse36 cpu feature. """ @@ -91,9 +84,6 @@ def test_phybits_ok_pentium_pse36(self): def test_phybits_ok_pentium_pae(self): """ - :avocado: tags=machine:q35 - :avocado: tags=arch: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): def test_phybits_ok_pentium2(self): """ - :avocado: tags=machine:q35 - :avocado: tags=arch: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): def test_phybits_low_nonpse36(self): """ - :avocado: tags=machine:q35 - :avocado: tags=arch: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=machine:q35 - :avocado: tags=arch: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 cpus @@ -182,9 +163,6 @@ def test_phybits_low_tcg_q35_70_amd(self): def test_phybits_low_tcg_q35_71_amd(self): """ - :avocado: tags=machine:q35 - :avocado: tags=arch: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): def test_phybits_ok_tcg_q35_70_amd(self): """ - :avocado: tags=machine:q35 - :avocado: tags=arch: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): def test_phybits_ok_tcg_q35_71_amd(self): """ - :avocado: tags=machine:q35 - :avocado: tags=arch: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): def test_phybits_ok_tcg_q35_71_intel(self): """ - :avocado: tags=machine:q35 - :avocado: tags=arch: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): def test_phybits_low_tcg_q35_71_amd_41bits(self): """ - :avocado: tags=machine:q35 - :avocado: tags=arch:x86_64 - AMD processor with 41 bits. Max cpu hw address = 2 TiB. By setting maxram above 1012 GiB - 32 GiB - 4 GiB = 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): def test_phybits_ok_tcg_q35_71_amd_41bits(self): """ - :avocado: tags=machine:q35 - :avocado: tags=arch:x86_64 - AMD processor with 41 bits. Max cpu hw address = 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): def test_phybits_low_tcg_q35_intel_cxl(self): """ - :avocado: tags=machine:q35 - :avocado: tags=arch: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 GiB and starts after the cxl memory window. @@ -335,9 +295,6 @@ def test_phybits_low_tcg_q35_intel_cxl(self): def test_phybits_ok_tcg_q35_intel_cxl(self): """ - :avocado: tags=machine:q35 - :avocado: tags=arch:x86_64 - Same as above but here we do not reserve any cxl memory window. Hence, with the exact same parameters as above, QEMU should start fine even 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__ == '__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 . # -from avocado_qemu import QemuSystemTest +from qemu_test import QemuSystemTest class OmittedCPUProps(QemuSystemTest): - """ - :avocado: tags=arch:x86_64 - :avocado: tags=cpu:qemu64 - """ + def test_no_die_id(self): self.vm.add_args('-nodefaults', '-S') self.vm.add_args('-smp', '1,sockets=2,cores=2,threads=2,maxcpus=8') self.vm.add_args('-device', 'qemu64-x86_64-cpu,socket-id=1,core-id=0,thread-id=0') self.vm.launch() self.assertEqual(len(self.vm.cmd('query-cpus-fast')), 2) + +if __name__ == '__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 from qemu.machine import QEMUMachine -from avocado_qemu import QemuSystemTest +from qemu_test import QemuSystemTest # Virtio Device IDs: VIRTIO_NET = 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=arch:x86_64 """ # 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__ == '__main__': + QemuSystemTest.main() From patchwork Mon Jul 29 15:27:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 815038 Delivered-To: patch@linaro.org Received: by 2002:adf:b359:0:b0:367:895a:4699 with SMTP id k25csp1319251wrd; Mon, 29 Jul 2024 08:28:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUK+WcT0YjdFVi5agbexqkcRclxw+WH1Hep7a/NMzUjCuup9qQ0Bhe6Db3DieDAVjFR0WBchH1zveBinVJ0kDgZ X-Google-Smtp-Source: AGHT+IFcH84xmB9Q8KMZ1NzUU43ZYiDEciJrVOa8o4CLwcEwzVS2mwvVNffhAaIf+TexXjRCQOWB X-Received: by 2002:a05:620a:4588:b0:79f:17f4:7154 with SMTP id af79cd13be357-7a1e560eecbmr1496730085a.3.1722266908793; Mon, 29 Jul 2024 08:28:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722266908; cv=none; d=google.com; s=arc-20160816; b=WCm45r6ddEbdBdRdySqT36sX3PQR/VMe7/JHbybGuarb0e7cuf8ktTLuuhEls1zxeL SgjIuEVxrqGOgDTj5pY6ueFMieA9BbB78ms9gMHqeKIrZMnMVFyZXar4OJBSpKBNpLxk n6mJ3F8GrB5UTNL7fEcy0744pKMS+UJbuJVZ8OHCUkzTkTJcHe5UiYm0uD7VXVjJfiba fEyJILWTakku0p/7Edo3rH8HYSr5xBvPsOmlR0Oq1RkQ+ECdDz08ymQkvet61Ygtn02a G42De+Jgqm3u4s5vOUDzRHZ0EuxvIsPUAQKiO/E+BN5VdsBOZl+PEvyUUZJmUWNjcAz2 OkYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+FkWKuKtm3cf9wl2kIVdOE8LPsOxAfVlikpttFpluek=; fh=lGhQQv5JLl963h3tt3oDogg6211zJupGFaH7lvsaE60=; b=yW162gfpumL9TRudMiAxEkrVfTcF4G5/m55yZhtfO1ed/ObSi9CtVTbDDXd3w+KCpM 6WHwjW61HleXxCtNhUTSTBnxyna2OdFSkZCBFLZ+UslMFPWhzTJFWrY22AvhDaGqZLOG FnoJLQ/UFxDkJXsfMyb+YZIWdYDH3Jd47bin0mOUHMS3kblTG1C6n1F5aDUN8N64fevm VCcbWOsXbTinkYyyvKa8L1SCJzXNnqXcoX8A1CRzbgoULZAarkBv3OJPmxeBnd0Hy4sn 5HhLQS5P3FzSdAdHx2IbOVD+UZykyOukhBieg1qAX9kfyNNW/91zyQDT27y+btfU88Py x+Tw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pR5LumrK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a1d746239bsi1052623185a.447.2024.07.29.08.28.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jul 2024 08:28:28 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pR5LumrK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-ID: <20240724175248.1389201-7-thuth@redhat.com> [PMD: More uses of set_machine(), updated MAINTAINERS] Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 3 + tests/functional/meson.build | 6 ++ .../test_info_usernet.py} | 11 ++- .../test_ppc_74xx.py} | 74 ++++++++----------- .../version.py => functional/test_version.py} | 13 ++-- 5 files changed, 56 insertions(+), 51 deletions(-) rename tests/{avocado/info_usernet.py => functional/test_info_usernet.py} (87%) mode change 100644 => 100755 rename tests/{avocado/ppc_74xx.py => functional/test_ppc_74xx.py} (74%) mode change 100644 => 100755 rename tests/{avocado/version.py => functional/test_version.py} (78%) mode change 100644 => 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 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 @@ -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 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 = { tests_generic = [ 'empty_cpu_model', + 'info_usernet', + 'version', +] + +tests_ppc_quick = [ + 'ppc_74xx', ] tests_x86_64_quick = [ diff --git a/tests/avocado/info_usernet.py b/tests/functional/test_info_usernet.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. -from avocado_qemu import QemuSystemTest +from qemu_test import QemuSystemTest from qemu.utils import get_info_usernet_hostfwd_port class InfoUsernet(QemuSystemTest): - """ - :avocado: tags=machine:none - """ def test_hostfwd(self): self.require_netdev('user') + self.set_machine('none') self.vm.add_args('-netdev', 'user,id=vnet,hostfwd=:127.0.0.1:0-:22') self.vm.launch() res = 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 than' ' zero')) + +if __name__ == '__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. -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 class ppc74xxCpu(QemuSystemTest): - """ - :avocado: tags=arch:ppc - :avocado: tags=accel:tcg - """ + timeout = 5 def test_ppc_7400(self): - """ - :avocado: tags=cpu: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') def test_ppc_7410(self): - """ - :avocado: tags=cpu: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') def test_ppc_7441(self): - """ - :avocado: tags=cpu: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') def test_ppc_7445(self): - """ - :avocado: tags=cpu: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') def test_ppc_7447(self): - """ - :avocado: tags=cpu: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') def test_ppc_7447a(self): - """ - :avocado: tags=cpu: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') def test_ppc_7448(self): - """ - :avocado: tags=cpu: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') def test_ppc_7450(self): - """ - :avocado: tags=cpu: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') def test_ppc_7451(self): - """ - :avocado: tags=cpu: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') def test_ppc_7455(self): - """ - :avocado: tags=cpu: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') def test_ppc_7457(self): - """ - :avocado: tags=cpu: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') def test_ppc_7457a(self): - """ - :avocado: tags=cpu: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__ == '__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. -from avocado_qemu import QemuSystemTest +from qemu_test import QemuSystemTest class Version(QemuSystemTest): - """ - :avocado: tags=quick - :avocado: tags=machine:none - """ + def test_qmp_human_info_version(self): + self.set_machine('none') self.vm.add_args('-nodefaults') self.vm.launch() res = self.vm.cmd('human-monitor-command', command_line='info version') self.assertRegex(res, r'^(\d+\.\d+\.\d)') + +if __name__ == '__main__': + QemuSystemTest.main() From patchwork Mon Jul 29 15:27:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 815044 Delivered-To: patch@linaro.org Received: by 2002:adf:b359:0:b0:367:895a:4699 with SMTP id k25csp1319510wrd; Mon, 29 Jul 2024 08:29:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXP96KSM5OWOw7zfzh3nXpwGo/B/WnkV32/gW4l19lsqAIg3yA5zWW3QX8LKqc/nlvFHcPonN48pf3sLPF6LZjU X-Google-Smtp-Source: AGHT+IHOCwT3J3iNnO4nEeNYlBGXH7WA6oxKSNVAwYlhBoY4Hp/E4A1TqmVyqjfwsQgTDzs7jdlE X-Received: by 2002:a05:6358:52c6:b0:1ac:65e9:1678 with SMTP id e5c5f4694b2df-1addf580c95mr899479055d.22.1722266955182; Mon, 29 Jul 2024 08:29:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722266955; cv=none; d=google.com; s=arc-20160816; b=UBkRZVZ7b/DlCkqWK0PcQR++7H4aCHxFEg3iSgLkKzFaGNQ2wIasSXlS5ap4C2YiQQ sKyWYZaYkh9FXUqaAzg9JoiFdcAdQVyf20UstU+A8VXX8nyiXqJgakiPdrcFvkLJLSBx lfzESkf8J4utZ4aQzY2Chgqs4iUPn01YzQaAA6PPTdZEyn+L2y2rOLsFn/XGOsNgi1lV yNUWLnspZvqTa4YZ7fVg09qGmQWuqaeyQD6T/ygHhWjwL6oAhaP+9zJmUBanDuJ3wLjw 9p/9nQJiM6BmGj1x8FAOyoKHCj5uHbrGlUpFDTIfmfFJEo1DeBx42wtwWVnfUNe+8Lha YkYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nIHOLD5EbcXB4owPcPVKVliv892NjsZAXtrM5p8AqZ4=; fh=qi6M7+758Hm8qfC4GxHVnK55oMKkCiFOk69X0Z7vtIs=; b=G2M4wEJGo9YOnIxfql75IwdkWDlR6tHdXfsoeSA1QjHqIYBDmeWGHs02FweVpFW2u+ 7h1PGA68BLLg139c7k9q6RGD5E2upWUGUJw4dewOfGlTWOkItRnSqG12dPwR5NODU3vC AGY1dne+zRWqAhXny3GURrFddSDDuVqHjT11nzk3bImsLxiCb4nVFn5Pzg77pPeNF/yN 6vJK+WDV91M/V8VqK5w8KHUDnlXZFthZZOF5IMtMN+51gKkXHbCyOTIFSKSzydT3Lv/5 wdcnZpT2bGyW6pLM2ltkqj4IT2kDMYvg0VUKHHFBAlT3EJwfGh9t998Qo/NjlWNEzqrx 4u6w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AJNp2+KM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a1d7474baesi1083315885a.601.2024.07.29.08.29.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jul 2024 08:29:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AJNp2+KM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?utf-8?q?Philippe_Mathieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Thomas Huth Nothing thrilling in here, it's just a straight forward conversion. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-ID: <20240724175248.1389201-14-thuth@redhat.com> [PMD: More uses of set_machine(), updated MAINTAINERS] Signed-off-by: Philippe Mathieu-Daudé --- 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 => functional/test_x86_cpu_model_versions.py} (92%) mode change 100644 => 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 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 = [ 'mem_addr_space', 'pc_cpu_hotplug_props', 'virtio_version', + 'x86_cpu_model_versions', ] tests_x86_64_thorough = [ diff --git a/tests/avocado/x86_cpu_model_versions.py b/tests/functional/test_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 . # - -import avocado_qemu import re -class X86CPUModelAliases(avocado_qemu.QemuSystemTest): +from qemu_test import QemuSystemTest + +class X86CPUModelAliases(QemuSystemTest): """ Validation of PC CPU model versions and CPU model aliases @@ -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 aliases - - :avocado: tags=machine: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 version - - :avocado: tags=machine:pc-i440fx-4.1 """ + self.set_machine('pc-i440fx-4.1') self.vm.add_args('-S') self.vm.launch() @@ -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=machine:none """ + self.set_machine('none') self.vm.add_args('-S') self.vm.launch() @@ -243,21 +241,16 @@ def test_none_alias(self): self.validate_aliases(cpus) -class CascadelakeArchCapabilities(avocado_qemu.QemuSystemTest): +class CascadelakeArchCapabilities(QemuSystemTest): """ Validation of Cascadelake arch-capabilities - - :avocado: tags=arch:x86_64 """ def get_cpu_prop(self, prop): cpu_path = self.vm.cmd('query-cpus-fast')[0].get('qom-path') return self.vm.cmd('qom-get', path=cpu_path, property=prop) def test_4_1(self): - """ - :avocado: tags=machine:pc-i440fx-4.1 - :avocado: tags=cpu: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 have arch-capabilities') def test_4_0(self): - """ - :avocado: tags=machine:pc-i440fx-4.0 - :avocado: tags=cpu:Cascadelake-Server - """ + self.set_machine('pc-i440fx-4.0') self.vm.add_args('-S') self.set_vm_arg('-cpu', 'Cascadelake-Server,x-force-features=on,check=off,' @@ -281,10 +271,7 @@ def test_4_0(self): 'pc-i440fx-4.0 + Cascadelake-Server should not have arch-capabilities') def test_set_4_0(self): - """ - :avocado: tags=machine:pc-i440fx-4.0 - :avocado: tags=cpu:Cascadelake-Server - """ + self.set_machine('pc-i440fx-4.0') # command line must override machine-type if CPU model is not versioned: 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-capabilities should have arch-capabilities') def test_unset_4_1(self): - """ - :avocado: tags=machine:pc-i440fx-4.1 - :avocado: tags=cpu:Cascadelake-Server - """ + self.set_machine('pc-i440fx-4.1') self.vm.add_args('-S') self.set_vm_arg('-cpu', 'Cascadelake-Server,x-force-features=on,check=off,' @@ -308,10 +292,7 @@ def test_unset_4_1(self): 'pc-i440fx-4.1 + Cascadelake-Server,-arch-capabilities should not have arch-capabilities') def test_v1_4_0(self): - """ - :avocado: tags=machine:pc-i440fx-4.0 - :avocado: tags=cpu: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') def test_v2_4_0(self): - """ - :avocado: tags=machine:pc-i440fx-4.0 - :avocado: tags=cpu: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=on,check=off,' @@ -335,10 +313,7 @@ def test_v2_4_0(self): 'pc-i440fx-4.0 + Cascadelake-Server-v2 should have arch-capabilities') def test_v1_set_4_0(self): - """ - :avocado: tags=machine:pc-i440fx-4.0 - :avocado: tags=cpu: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-capabilities should have arch-capabilities') def test_v2_unset_4_1(self): - """ - :avocado: tags=machine:pc-i440fx-4.1 - :avocado: tags=cpu: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=on,check=off,' @@ -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-capabilities should not have arch-capabilities') + +if __name__ == '__main__': + QemuSystemTest.main() From patchwork Mon Jul 29 15:27:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 815041 Delivered-To: patch@linaro.org Received: by 2002:adf:b359:0:b0:367:895a:4699 with SMTP id k25csp1319385wrd; Mon, 29 Jul 2024 08:28:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUtFp+uIUi5TSOQDXAwB3+JpPjM9707ECNC7CGf4et4mYewSv78S7a6rw6k13T/q85eR+muFpL25Lk11olfY4mK X-Google-Smtp-Source: AGHT+IG0pJ+LFCr7NGL3QbBkAW1sV50qHdNfR1Qn3MQcbBrIDZwdyiNJmpi3L3YniwOoP7o+tdk2 X-Received: by 2002:a05:6808:1a0a:b0:3d9:3ded:1fc3 with SMTP id 5614622812f47-3db23cef892mr13391988b6e.17.1722266930812; Mon, 29 Jul 2024 08:28:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722266930; cv=none; d=google.com; s=arc-20160816; b=ZibXkT2Kn87j2518nNGF4HiyBEqLaR44YyIafDalULtOrK9JtHOUHHzLxl31zivX/P JEeS/msX2xEJJaXjwWAxa2NgQCiVgGog3wt4WEB1T8Ctg6JMbSAUbJTD7EMZdpNcmaMv 5qqqmWZ4cIYFEgYMZJ7dAjIHgmYRZRbvewC0n3VcC91eI/dn3FbLPC+8zm1r6T97CNvj afsJqkDnztq2hTay3btcpU20LdIFnudAVdYEkTky1ipzr+djAQT6XfIL5M3aqO7j1BnH 4t/YrbqtUGB0IVmCh+nzPzMQ4K+HPrcWzorbX0Bw4lqxxPAqEtWh6RXV4wm3tl4AhYWC urxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hJ0+ehSPNMw3L+RsXx/3bfW5qZR45CYyWXKfYU5cn30=; fh=nNxWXwXkGMtwvcfSn7i4L5vUDZWWPWzH8AYR4Y8PY88=; b=m1Ff0sIJGr5YuL/VuU9Ozam6TuZkF0vZuCLgYZsb7siJYiQGj65DmWFmhVa1VdIyJO T0fl8geMPgD/xGSt6OuARKxmM45Dd3Czpzf/d3jMu1IcQ8+6SHfM2flZ9pLvnvIBe/5Y 2F3dIPdlvqtyzt5ZvRNbjw9aNBIQLDlJ2vZRrxCMKQOjx0Ubf8D5Bn9/5L0egUhDOZH5 IuPabdgyqmN+gabb8pChofROlNpkNHtfF0ScfVcTmWApQnu6URXk6eP85qThqAWXY8u4 X6oC7b4hF4LCrU93kANPby9weM2FO6ziENRvAt3MXZkkE87Tvs8UHcAuwsSaoofZQSb4 cHnQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jkC+IoiQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6bb3fb19777si104503036d6.575.2024.07.29.08.28.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jul 2024 08:28:50 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jkC+IoiQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Alistair Francis , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Tested-by: Philippe Mathieu-Daudé Message-ID: <20240724175248.1389201-16-thuth@redhat.com> [PMD: Updated MAINTAINERS] Signed-off-by: Philippe Mathieu-Daudé --- 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 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=accel:tcg - """ - timeout = 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=arch:riscv32 - :avocado: tags=machine:spike - """ - self.boot_opensbi() - - def test_riscv64_spike(self): - """ - :avocado: tags=arch:riscv64 - :avocado: tags=machine:spike - """ - self.boot_opensbi() - - def test_riscv32_sifive_u(self): - """ - :avocado: tags=arch:riscv32 - :avocado: tags=machine:sifive_u - """ - self.boot_opensbi() - - def test_riscv64_sifive_u(self): - """ - :avocado: tags=arch:riscv64 - :avocado: tags=machine:sifive_u - """ - self.boot_opensbi() - - def test_riscv32_virt(self): - """ - :avocado: tags=arch:riscv32 - :avocado: tags=machine:virt - """ - self.boot_opensbi() - - def test_riscv64_virt(self): - """ - :avocado: tags=arch:riscv64 - :avocado: tags=machine: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 = [ 'ppc_74xx', ] +tests_riscv32_quick = [ + 'riscv_opensbi', +] + +tests_riscv64_quick = [ + 'riscv_opensbi', +] + tests_x86_64_quick = [ '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 = 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__ == '__main__': + QemuSystemTest.main() From patchwork Mon Jul 29 15:27:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 815043 Delivered-To: patch@linaro.org Received: by 2002:adf:b359:0:b0:367:895a:4699 with SMTP id k25csp1319504wrd; Mon, 29 Jul 2024 08:29:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV5ollPmTHvESgr1JM/Qw9ihZw1gi66XyltgwQ3PdeNg3p5wg9MzkBnM0g8zKG4tC+K33p2gOGeylbfoucPQAKa X-Google-Smtp-Source: AGHT+IFZsIBDVAdT0UebC9ajaphCJmThyp9cdLd5O5E8CktFiGmhZRAH8+lYbdGOoNJWhk3/SeIm X-Received: by 2002:a05:622a:1191:b0:44f:ddaa:c21b with SMTP id d75a77b69052e-45004dd8452mr105544401cf.23.1722266954780; Mon, 29 Jul 2024 08:29:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722266954; cv=none; d=google.com; s=arc-20160816; b=fLExgh7+JgjW4K3UI0dRLz4osIyTj1+hP1cnTZI+pSGJxcpPzVtCR54D5XwuzhOgYD lNOdfIlxL3AF32pqMYbLsrv3xNYZKUcn6L9N99g7CkFMuLh3skQzTVYQnaTytWSWzoO+ gJMwBkkSt16yB1hC244SJZb8q78BUBxy03cAbP7yEMnx9uLCz1cT6uypbB3NdH0Br/C3 pH8JMsqDdiQ9TqlJ3YjWytG/wR474/GgzAtFj8l+ZV3y684ZRr1+o+OfN3o/RB8/o7cc UtIxpg4zP4Xt7dyVHsCfHhQcJOexOayjUTzD3qZNn2kIVsoWeofdqlVAQlgfc8/9UhnT OmnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=v9+uYHMIghgd2LjabzUJzhrVG79tp1J2HB1deB4p2GI=; fh=lGhQQv5JLl963h3tt3oDogg6211zJupGFaH7lvsaE60=; b=iiy0qkNmHAyYSEqoEeJnFh85mrUIPe4V91wphV2gzx+8VyAG6Hzl5cCJCO1I9OUKSq oorSZ0Pt3PHsfwIUOs9OWVdKX6bPX34azF3SE48a0/ktPa9sqnqkIpNbb/Yr8RKXijBH Mh+RrXhKYY4G5MEvfyArUeA5+dszldeKaSTqpGnrvyPDCXCicXmdOHx58rNNV38jrDnA F2Vm4Pn2K3TTKSmHHiIhy+3W62riEikQn6S72uJlxYYHyUCJYAkq6akd3NNfH520xq9G sR+wyEfCJ4UUHEPKd9zKhybvEVIyGNIp/8VQC4iBvkamY6ViukpU6rWUy8GiTNqhNZcx dHPA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=crQT4POT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44fe8137964si103410651cf.33.2024.07.29.08.29.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jul 2024 08:29:14 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=crQT4POT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Signed-off-by: Thomas Huth Message-ID: <20240724175248.1389201-24-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- .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-template.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 -.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=1 + - export QEMU_TEST_ALLOW_UNTRUSTED_CODE=1 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 -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 build-system-ubuntu: @@ -53,14 +53,14 @@ check-system-ubuntu: IMAGE: ubuntu2204 MAKE_CHECK_ARGS: check -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 build-system-debian: @@ -85,14 +85,14 @@ check-system-debian: IMAGE: debian MAKE_CHECK_ARGS: check -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 crash-test-debian: @@ -129,14 +129,14 @@ check-system-fedora: IMAGE: fedora MAKE_CHECK_ARGS: check -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 @@ -243,14 +243,14 @@ check-system-centos: IMAGE: centos9 MAKE_CHECK_ARGS: check -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 @@ -274,14 +274,14 @@ check-system-opensuse: IMAGE: opensuse-leap MAKE_CHECK_ARGS: check -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 # @@ -302,15 +302,15 @@ build-system-flaky: ppc64-softmmu rx-softmmu s390x-softmmu sh4-softmmu x86_64-softmmu MAKE_CHECK_ARGS: check-build -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 -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 build-cfi-ppc64-s390x: extends: @@ -523,14 +523,14 @@ check-cfi-ppc64-s390x: IMAGE: fedora MAKE_CHECK_ARGS: check -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 build-cfi-x86_64: extends: @@ -557,14 +557,14 @@ check-cfi-x86_64: IMAGE: fedora MAKE_CHECK_ARGS: check -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 tsan-build: extends: .native_build_job_template From patchwork Mon Jul 29 15:27:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 815048 Delivered-To: patch@linaro.org Received: by 2002:adf:b359:0:b0:367:895a:4699 with SMTP id k25csp1319654wrd; Mon, 29 Jul 2024 08:29:41 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWub0TmMgvCr7CrPmspxQGRu9KOGsj483c786zZNJpxWCmsnZRxA+S818P1+IHw70FB1a39PVso/Er9thnQW2SP X-Google-Smtp-Source: AGHT+IEDceYL1KCqdBHNoort5MOQM6Xdjqi23aXR4dSMxFvSAOCbTAAJctsg3SRIdDVmUn/sT8ij X-Received: by 2002:a05:6214:c48:b0:6b4:e702:56ee with SMTP id 6a1803df08f44-6bb559a0816mr76037346d6.11.1722266981351; Mon, 29 Jul 2024 08:29:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722266981; cv=none; d=google.com; s=arc-20160816; b=SK6i44rnUftxFuEfPikhKbtLbumUOOwmk+qshNUm6MB5xuogBruL6wZu3mIzciRbzd hsTJk0ASD6QckKubSSdn4/qNnSyk+OgxD79QJSHa23MhIdzZ6SwZrE7fqS/rX7PWxD1V 5+nPgjkVQgZBy2Qd++dOF4XKlXMYAsUSd89BCpdvaEQzLJYDsvNOkokiiFXyHDXob8kd J9kdFFuL+xWXziVkD2wgN1kIT4lxcjrb4153FlLJdfwy/sUAJv5s0joLhCtuCVTZL/gD K7zPYvdum7kXIfu7CNLi7vsYfOZOjCcSZX6hN85JqeWxAXWacCQQ7SD/FCl5I9g0d9sK dXvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=24RQoEKyoT+5UpLOepmNrf2/RkiZNFw5AqywzTwtt80=; fh=2YuGMIHCKS5W/N503i7KJHequyP8t3veMFb+DWNaJwo=; b=V02MGS3jVq0p5nv+DDqGA9dtonS3xH+9jEQvhtfcfOVub1Egt7DbbsH/BPb6u5H3qn Hss2AYstQIVGsPX3Vf2DGQYfNt9xMhtq5EcdJuhKwH642bqzR6F3Hj6HifM0LLcOUVF9 fW9u1CWU89ia137Oc2N2tPZMt1FiDHhhVLHrV81AQv5uTYTKG6gnWvyTCEINeJmsQcu+ KrT1+wFpXP+ofzf+MN00MIR9Gg3fhcV5a53Qqyl7EUNA7Vw84ioJ2XUN7JLnC4SEJBsp XgSWIsfjF1YdBc/lFT1GqN72MJKxYOgy3RqkZr/w2RdAN3KrjOTutEM3Xdb4BCU3SCJ2 Se8A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wCHCdxfW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6bb3faa96eesi107148336d6.340.2024.07.29.08.29.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jul 2024 08:29:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wCHCdxfW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , =?utf-8?q?Alex_Benn=C3=A9e?= , Akihiko Odaki , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Cleber Rosa The SSL certificate installed at mipsdistros.mips.com has expired: 0 s:CN = mipsdistros.mips.com i:C = US, O = Amazon, OU = Server CA 1B, CN = 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ée Signed-off-by: Cleber Rosa Reviewed-by: Akihiko Odaki Tested-by: Philippe Mathieu-Daudé Message-ID: <20240726134438.14720-2-crosa@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- 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=endian:little :avocado: tags=cpu:I7200 """ - kernel_url = ('https://mipsdistros.mips.com/LinuxDistro/nanomips/' + kernel_url = ('http://mipsdistros.mips.com/LinuxDistro/nanomips/' 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/' 'generic_nano32r6el_page4k.xz') kernel_hash = '477456aafd2a0f1ddc9482727f20fe9575565dd6' @@ -312,7 +312,7 @@ def test_mips_malta32el_nanomips_16k_up(self): :avocado: tags=endian:little :avocado: tags=cpu:I7200 """ - kernel_url = ('https://mipsdistros.mips.com/LinuxDistro/nanomips/' + kernel_url = ('http://mipsdistros.mips.com/LinuxDistro/nanomips/' 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/' 'generic_nano32r6el_page16k_up.xz') kernel_hash = 'e882868f944c71c816e832e2303b7874d044a7bc' @@ -325,7 +325,7 @@ def test_mips_malta32el_nanomips_64k_dbg(self): :avocado: tags=endian:little :avocado: tags=cpu:I7200 """ - kernel_url = ('https://mipsdistros.mips.com/LinuxDistro/nanomips/' + kernel_url = ('http://mipsdistros.mips.com/LinuxDistro/nanomips/' 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/' 'generic_nano32r6el_page64k_dbg.xz') kernel_hash = '18d1c68f2e23429e266ca39ba5349ccd0aeb7180' From patchwork Mon Jul 29 15:27:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 815045 Delivered-To: patch@linaro.org Received: by 2002:adf:b359:0:b0:367:895a:4699 with SMTP id k25csp1319584wrd; Mon, 29 Jul 2024 08:29:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVLR7lKAOjZX59dAelkWO2MEgkld/yWl1YZTT1jEHH5xwQBPav9/R1vBfRTP04Dj4gy3Xo2QRSAKhb+idaRIMpt X-Google-Smtp-Source: AGHT+IGAZ7nYnMAcftPO2O3QR/IDHiRZtnFIeNVKx4f6PDBwntjVv6XYJPvYkxmPtWaOipI+/m/v X-Received: by 2002:a05:620a:f0e:b0:79f:84f:5b40 with SMTP id af79cd13be357-7a1e5258545mr945607785a.35.1722266968207; Mon, 29 Jul 2024 08:29:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722266968; cv=none; d=google.com; s=arc-20160816; b=SgpZ8GQUiH2f00dYLm6PPUNqp6+O/jfeJBOiNvhJUIiaLHG/Nec7pzaXYigQ523LUB 7xfSAFF8aCJgAgG40puW8y88Efkei8W9ztrS4zDazwHp7wecBsSHVgrZK1lkNdG3gq8A c/c28q70ioL9uy4yRRlpaCNrIMa5XEpsbXXhGDXIvEmAWQRqGgYGurEa4o0o49EyJLhS Fg46gaoZPFv+beHeXC9HHATksgKPMphz6cnCKLdcUs4TXhpfa5IWAi9ovbgNon2+WSrv 0n3gjdPRhBKhr0f0jYGkK2ZbHMWJgarC/RAM7HT2ronyiWA6tLFMRX06EaAA1TjDwqex EaCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zXdSwZIkaei7IVXcOo85+RXKqlbMq+68sLXgYS3E5lM=; fh=Wll5zcIshwC25KTNRStP4nPuF6V2l9tJ4yFbKqJqmtg=; b=lc2LSrXEHm8x62SalzgTx5SMo381hJFyHCzKP7LUDud5Zvu7s9gsE+sT7IxfdxWQx8 HpHfFfZiYhNel7gfk79bHET5D2T3j5ONv0eKXCAqLkdxob4edXOyUc9uy7ZKNyiagdPb IhGs6PuizC5nz5f/aLL0hE0WHTa2CkHggJefb9Q4FB/Xzz3XAPyF1Po8udgYSxOJqHHU j1ytwkKlniwBa2yOcZH35LlsOzxH17T3NLxmeuuqR2i+21OjGVSR4KuzwJ06+PFdVnqw ptyKgmzWrSVAcB4dAZu+oN8pmKerYNlQ7/JaWuFSQgTOxxDQ0hN4NFYKSxqUqxq2PfLP OLWA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=so0frPNn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a1d739b8e9si1081121985a.13.2024.07.29.08.29.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jul 2024 08:29:28 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=so0frPNn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , Akihiko Odaki , =?utf-8?q?Philippe_Mathieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Message-ID: <20240726134438.14720-3-crosa@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- 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() - def do_test_mips_malta32el_nanomips(self, kernel_url, kernel_hash): - kernel_path_xz = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + def do_test_mips_malta32el_nanomips(self, kernel_path_xz): kernel_path = 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 = '477456aafd2a0f1ddc9482727f20fe9575565dd6' - self.do_test_mips_malta32el_nanomips(kernel_url, kernel_hash) + kernel_path_xz = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + self.do_test_mips_malta32el_nanomips(kernel_path_xz) 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 = 'e882868f944c71c816e832e2303b7874d044a7bc' - self.do_test_mips_malta32el_nanomips(kernel_url, kernel_hash) + kernel_path_xz = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + self.do_test_mips_malta32el_nanomips(kernel_path_xz) 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 = '18d1c68f2e23429e266ca39ba5349ccd0aeb7180' - self.do_test_mips_malta32el_nanomips(kernel_url, kernel_hash) + kernel_path_xz = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + self.do_test_mips_malta32el_nanomips(kernel_path_xz) def test_aarch64_xlnx_versal_virt(self): """ From patchwork Mon Jul 29 15:27:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 815042 Delivered-To: patch@linaro.org Received: by 2002:adf:b359:0:b0:367:895a:4699 with SMTP id k25csp1319477wrd; Mon, 29 Jul 2024 08:29:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX9F+U9G7ZDLElhevDpR4oAK44J65Dl+RbsKXuFCSyVjj7oSW1i6DM6Xwv9H6RwtO/vRJY8drL9ivVAqGW8JTUH X-Google-Smtp-Source: AGHT+IEjulebzFtDcynPFSCwH4hSmfIeIYZg6DWlmEg5RD4nSZiB8JJJYuUHj02RbILknget0+3V X-Received: by 2002:a05:6214:2385:b0:6b5:46bf:be30 with SMTP id 6a1803df08f44-6bb55a251f0mr103281516d6.24.1722266949549; Mon, 29 Jul 2024 08:29:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722266949; cv=none; d=google.com; s=arc-20160816; b=eoKqENY+6UmIqGOU2ap1n9K/ri/q3LenXqDu67/p+ZlWs5/jCNG4evRnLu2V4DkQSf ZWR+Xvyi1GyFnNNpu1DWRbsVPuwiHJYxS840u/SsQ/vP22I7dEM946UDlIMUpUPZshBU PRB7weu0Xc8j5LJeMaZPr3yUKzgRTlg1f0DivPg7o/kzAaT3tdR6khetP89/moGMXY6L 2AeNkCIiuUHnEb4joWyxOybDoQsXZf6j5U1RaFANKKEwsHGbCyU7XHIJuSOH4zVRxzOd J6+CKGLyZ5/2XtK/wly2WbpX9g4ms842mG8E3CZNGvtUHjpIxsIud1JkIL4/1Hqnm2kW OMEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jz7Ox8GZ4fBgHa8IWcCtoxPXphT3ERQSEGlUxQOFD08=; fh=PSVFDF1a+oVgWkrNnh7N8bjIsMUCUrL9kx2tVskKYTY=; b=DiIPnFu+ObqwgJm3HENxWVwO7PEISi/AyuUDLnokiRz0rvzZB/L8DdqXHRFkEYS/WY 4DIX2VNtdO7PLRzKi9mJC83VParcxJzOL0q/m+ocTiGZYWA7NjRBS+xfMj8vxJPM6VS2 1F1wFLchwWyFJG0FUqWIkvz7pkuTwhaFMRo//jLfpVjYS8nCTk3mCOWPb3rLlo1IfnTh 29LgSaPEF6KEMyWiN3QOBNJV3PpmlM1FpBHEl/6GEvHC4Mt8yC7ZTCu9gzl4Rx75/fSg uScc7daucTW/mkXWDIZUv8WTKWjNDZR8pRISa9zrEmeZfxP8qQumAxFfx5vdfLdONsks iHcA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Srp3SKyW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6bb3f8cb6e0si107331586d6.84.2024.07.29.08.29.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jul 2024 08:29:09 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Srp3SKyW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , Akihiko Odaki , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Message-ID: <20240726134438.14720-9-crosa@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- 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 = '65523a1835949b6f4553be96dec1b6a38fb05501' spi_path = self.fetch_asset(spi_url, asset_hash=spi_hash) + spi_path_rw = os.path.join(self.workdir, os.path.basename(spi_path)) + shutil.copy(spi_path, spi_path_rw) - file_truncate(spi_path, 16 << 20) # Spansion S25FL128SDPBHICO is 16 MiB + file_truncate(spi_path_rw, 16 << 20) # Spansion S25FL128SDPBHICO is 16 MiB self.vm.set_console() kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE self.vm.add_args('-kernel', uboot_path, '-append', kernel_command_line, - '-drive', 'file=' + spi_path + ',if=mtd,format=raw', + '-drive', 'file=' + spi_path_rw + ',if=mtd,format=raw', '-no-reboot') self.vm.launch() self.wait_for_console_pattern('Enter \'help\' for a list')