From patchwork Mon Nov 6 18:50:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 741435 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1255783wrr; Mon, 6 Nov 2023 10:54:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IELMJLpWhFs7XvD3UmQpu8wc62inYobIxs1/P54YajJn4JwN/T3ALaqo3O4Q+lCcNF+HMHs X-Received: by 2002:a05:620a:1a90:b0:775:9c23:1da9 with SMTP id bl16-20020a05620a1a9000b007759c231da9mr32591853qkb.49.1699296855142; Mon, 06 Nov 2023 10:54:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699296855; cv=none; d=google.com; s=arc-20160816; b=f03D1gI4aVs37EFpq75DjTFAIKGebBnMFAZUC3NXce2BZQUWn+VXBbk2Vp69Ol/NQ6 n3NU2Jjj6khPcqcnQW7ctbSaTkMQuvja7yNbLDogtVWm0CH2igIfFXA6FStIEAZyUc4Q E66eniK0slMXCJhJavq6zM5OYAiOgoD3FY1ddWzj5+nGTb7k0a371Cr2yAeCB3GFVRU+ SOOMhG5Y/nit3zS/qhd3sDpGxlIjhnsrpfOnlV1sfB/wN5KrdiyOlrI57lB7KM6k6yWq C6B2TaLYyEaR3kq3jYzLAStM16XYi430Ceu0vqeBIZeW091VwPBp27xo3pdFirb81R09 6LnA== 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=UIqdfI1rvGTDtr96W/cBcKJ1TJ7DmV0zgw8mFEB58m8=; fh=U0fQ/TEMYRkMTqc5M8yqkHNAvsHnqCUzjrC4ODuigME=; b=g96ylAM37XP3qDt/m08goCzdP3SRbHpWhrdZi4hYqZhH1ExXIdIujEZ55cWtAuvnyy 8I77P4cs3QWR5ebedZa8A3Rle9aKScx+HrI8HjnV9uKyAK50U1BNIMbWXN9LV5sykJlV tHb+DHjZ25g2uNTsjpL5U724aRtfsddJZVPySTEvozMcsxFAi7JMb6hy25tyz1XfiKWo ZFS+awRI+uC4Nh3ELADpEGZrGFVhPx9LvKF+CRZd335FqjoaljB6lVksfS+9VCcEuQWt TX31mO2SEP+/QlqaCNEQtJgYpHYINbitzHciP9hAuiHPdiNNRXZ1REN29+TBeDJLbAsL CMOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DrYk7V3P; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h7-20020a05620a244700b0077419b27782si6324056qkn.339.2023.11.06.10.54.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Nov 2023 10:54:15 -0800 (PST) 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=DrYk7V3P; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r04h6-00065H-5Q; Mon, 06 Nov 2023 13:51:28 -0500 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 1r04h2-0005zC-Ec for qemu-devel@nongnu.org; Mon, 06 Nov 2023 13:51:24 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r04gz-0000yl-5b for qemu-devel@nongnu.org; Mon, 06 Nov 2023 13:51:24 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4083ac51d8aso36880095e9.2 for ; Mon, 06 Nov 2023 10:51:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699296679; x=1699901479; 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=UIqdfI1rvGTDtr96W/cBcKJ1TJ7DmV0zgw8mFEB58m8=; b=DrYk7V3PnJ2Loc8CZ+e+yUsAGvAGSw99lBsND5rH4I2seEeXLtoN4pNeWrDjGKvgev fRLKjvRZiAiVGXxw4eFzu1ljaezE3zzhRA9Z14Cw/em1LaLNpyz1zNiPDvjm56ZdQ5Oz xN75smVjqtAjlID1M2ccpcK1fN1OoXOSYexQLEW6RCV0Tb3sPXPdoYLnYAQ4zvjnO9o5 992xDN2a1ovCDN01m2F99h/E6MZ1wb3xedgZHMNS2Wn0eFTZ0ewKut/s+69doJ6eBqil 1/SJlDGLpY2CKdDAeSjjw/eIF/YemNah27tOSfA7hx5R3m8ac8T9y2kijK63M3OYCFYx Bfyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699296679; x=1699901479; 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=UIqdfI1rvGTDtr96W/cBcKJ1TJ7DmV0zgw8mFEB58m8=; b=E9wCdYJ8dRe2jkgRZ6RAJWJYU1a/2NYkMjaYMuCiEHBsEQ8v8bWbTTEU60wIQqnNef 2NsKZejgYDY1dl5vT+Y9c+xeW6iQchEBf16+NvUz2z8C0r8Nkg/7fjnDXJw0xwVH1UGz l91kDTzsZcqNn9khzh9LoI9/yaeiDBUEAZLUaKCQcB0V77QyKOikX6mdmIKOxvF1nsaA RBVsnuEae5VDHLlU9sakMhokXWhDt6ansbuhD7zRcnNOsET3cj/rk3ohrcZtZwzy7B7U upMnCUMxbwlsQ8cJU0iKxqtDx9zKsyi4G2Afjxj259/FdSV//UhCaStUZeeX4JFdO1PZ 3Y+g== X-Gm-Message-State: AOJu0YyQMcvi/jRJKnk1FPJBuPNsaSbERKbHtLc4ZgT8lAPuUszBZV7R ZfiuGq6GEAvRBdAkiyF1qK1eiD4Mqb8iYFnQVbKC9g== X-Received: by 2002:a05:600c:198a:b0:402:98cd:a3e9 with SMTP id t10-20020a05600c198a00b0040298cda3e9mr521120wmq.32.1699296679460; Mon, 06 Nov 2023 10:51:19 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a16-20020a5d5710000000b0031aef72a021sm284214wrv.86.2023.11.06.10.51.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 10:51:15 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 1C8836575A; Mon, 6 Nov 2023 18:51:13 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Laurent Vivier , =?utf-8?q?Alex_Benn=C3=A9e?= , Mahmoud Mandour , Cleber Rosa , Wainer dos Santos Moschetta , Paolo Bonzini , Thomas Huth , Beraldo Leal , Alexandre Iooss , John Snow , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Chris Wulff , Marek Vasut , Richard Henderson Subject: [PATCH 07/22] tests/avocado: update the tcg_plugins test Date: Mon, 6 Nov 2023 18:50:57 +0000 Message-Id: <20231106185112.2755262-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231106185112.2755262-1-alex.bennee@linaro.org> References: <20231106185112.2755262-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org There are a number of things that are broken on the test currently so lets fix that up: - replace retired Debian kernel for tuxrun_baseline one - remove "detected repeat instructions test" since ea185a55 - log total counted instructions/memory accesses Signed-off-by: Alex Bennée Message-Id: <20231103195956.1998255-8-alex.bennee@linaro.org> Acked-by: Richard Henderson --- tests/avocado/tcg_plugins.py | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/tests/avocado/tcg_plugins.py b/tests/avocado/tcg_plugins.py index 642d2e49e3..15fd87b2c1 100644 --- a/tests/avocado/tcg_plugins.py +++ b/tests/avocado/tcg_plugins.py @@ -54,13 +54,11 @@ def run_vm(self, kernel_path, kernel_command_line, class PluginKernelNormal(PluginKernelBase): def _grab_aarch64_kernel(self): - kernel_url = ('http://security.debian.org/' - 'debian-security/pool/updates/main/l/linux-signed-arm64/' - 'linux-image-4.19.0-12-arm64_4.19.152-1_arm64.deb') - kernel_sha1 = '2036c2792f80ac9c4ccaae742b2e0a28385b6010' - kernel_deb = self.fetch_asset(kernel_url, asset_hash=kernel_sha1) - kernel_path = self.extract_from_deb(kernel_deb, - "/boot/vmlinuz-4.19.0-12-arm64") + kernel_url = ('https://storage.tuxboot.com/20230331/arm64/Image') + kernel_sha256 = 'ce95a7101a5fecebe0fe630deee6bd97b32ba41bc8754090e9ad8961ea8674c7' + kernel_path = self.fetch_asset(kernel_url, + asset_hash=kernel_sha256, + algorithm = "sha256") return kernel_path def test_aarch64_virt_insn(self): @@ -88,6 +86,10 @@ def test_aarch64_virt_insn(self): m = re.search(br"insns: (?P\d+)", s) if "count" not in m.groupdict(): self.fail("Failed to find instruction count") + else: + count = int(m.group("count")) + self.log.info(f"Counted: {count} instructions") + def test_aarch64_virt_insn_icount(self): """ @@ -111,9 +113,13 @@ def test_aarch64_virt_insn_icount(self): with plugin_log as lf, \ mmap.mmap(lf.fileno(), 0, access=mmap.ACCESS_READ) as s: - m = re.search(br"detected repeat execution @ (?P0x[0-9A-Fa-f]+)", s) - if m is not None and "addr" in m.groupdict(): - self.fail("detected repeated instructions") + + m = re.search(br"insns: (?P\d+)", s) + if "count" not in m.groupdict(): + self.fail("Failed to find instruction count") + else: + count = int(m.group("count")) + self.log.info(f"Counted: {count} instructions") def test_aarch64_virt_mem_icount(self): """ @@ -145,3 +151,5 @@ def test_aarch64_virt_mem_icount(self): callback = int(m[1]) if inline != callback: self.fail("mismatched access counts") + else: + self.log.info(f"Counted {inline} memory accesses")