From patchwork Tue Nov 7 14:23:38 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: 741902 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1649331wrr; Tue, 7 Nov 2023 06:29:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IFd5OF5dtqzDI+1DdrE/3j6vR9gBDeQScFsnggkcKuRTUwMUfYSLkpZbgaw8Ia8mYVzCaqU X-Received: by 2002:a7b:c4d5:0:b0:405:39c1:a98b with SMTP id g21-20020a7bc4d5000000b0040539c1a98bmr2469577wmk.20.1699367382883; Tue, 07 Nov 2023 06:29:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699367382; cv=none; d=google.com; s=arc-20160816; b=GFSd0iKzsmoSUAUOUa/0zn+OwtL0GtOUxia4syF+M2Ug2NioBpMsnARm9TAt9FjbDX +c0J+txBI1Muiv8ajAXtU83SMx0Ov+Yl3xlAtiLjzcdFCoPBSH3xIDh/AE3E3EHQxxJW zQ7MpbK0Xnd9WoC08ioZIin5GpGteg9oej5cAUtB0mddGQcM42Hkbi4VEByvz1ZlpBNz B4gNJSBr6/7GNRVmbl/+vhO764Gr/OJbISlDkaojb9lVWnIQgxddhXrnD1n9bFfLzDne DXDKEHc+VFJvD/WQsvB0V5hADF1td8P/xH6207mTZ4Hd+3E6Ia+ghudUJPbipORW0ST+ HFXw== 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=Nzv3ijX6aA4Ef+mTXMoyBo/VonVr+hfDPrYo/eu8U5o=; fh=h23CtUX0WsZGLlSmt0qwFl18Y1Sl6DOF/equeji0/f0=; b=o9+WC4/m3nRJR9k8rUxcADSxA11U9PI1uySG+EWEYICH4hkhk9K+DojSqisunR86Ra EVSVMGb2Vfq9XyZPLwa17xyJdhwB387eTAdmU8KsOcuN7LxNvt+slmXqjw04jV9s2RYH pkV1wUUntvrU/iZ9b9KcqhrzO9i+wdociVXirplX1w/PIy69IGKPCCrhEMO0tHFjeNCf inKNktgLySW6h02KbweSaE82lbMeELJnwhjLLpwUjI9DKv/Be/plBUejBKnjwJ5jBUg+ tC2xiG335nlxq1ESZkTSJTqoE6LMt7KYV7QGmciB6eN0H0M4TYqZ054xmpdI82bYxUQ1 ORiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=we8g5SAT; 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 ay24-20020a05600c1e1800b004090029c3d7si10549706wmb.13.2023.11.07.06.29.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Nov 2023 06:29:42 -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=we8g5SAT; 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 1r0N0N-0004XT-6d; Tue, 07 Nov 2023 09:24:35 -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 1r0Mzu-0004Dk-PB for qemu-devel@nongnu.org; Tue, 07 Nov 2023 09:24:06 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r0Mzr-0007Yt-6o for qemu-devel@nongnu.org; Tue, 07 Nov 2023 09:24:06 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4083f61322fso41718905e9.1 for ; Tue, 07 Nov 2023 06:24:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699367042; x=1699971842; 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=Nzv3ijX6aA4Ef+mTXMoyBo/VonVr+hfDPrYo/eu8U5o=; b=we8g5SATC0f0WEFU9jotrEvpRra6ESAJnbd8lK4+nPSN/63kBLwJhyzyACgIDbhk0B giIxJKY73UcmTwFW6cr3iFdUKi4XVq6d/+VJu+xQIi1XnON6ZMxXYpanUO/+i+e4pA64 DxrZbY3vFlw+FDVKMUMVDjhXdaGQmkgUZVhMpXyYDS/3ghEsCETCsjdkyWCu3Q9dFla/ FFyakwtB7oQo1MHWnhxBy42w+j8mgakKshxM37IwLYwrMX0syu8LKswpLRFXlHRnQ8VA adnWlF53qqVzULZo27rDsx4QoiZI2uYAX3K68GJ1n2/QFUiClkr1kMRtAR5PIe0c+6P2 61gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699367042; x=1699971842; 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=Nzv3ijX6aA4Ef+mTXMoyBo/VonVr+hfDPrYo/eu8U5o=; b=WSkQAbKGPQRwNNl4ot+Mkc2xDQ7+yRz+OC7N5Ng9GNv5G9JY/ikXZDHFK8FYaLQfiH ztyULz8HMFq5ysL87UCbvFaasrIo0Rfs0usPAi162WfyE0RVIYTlkZEc1qJVTC1iq1u7 itKrpSzLwjXV4RzDzm4bYUFbP1TW6GR3ut/5znI7YYCZF8ZnEwr6A796JN7Jl4q3hSUW vgaqZ35GkGRrtfuhxZjHQPx/HTsrSwYpXfDEvXTpf3qkk+YHOyxCnNIfO8r8QO/e9lJO e0jHgsMzvpZq80L1/GkxLYxtNNbSCSeJTbUQKpJQ5qoE7al7HqQUOLlZP/HeG9XpW8Hq cghw== X-Gm-Message-State: AOJu0YyOfbBBwJiVWgo5xWWOcRJ2wJEc6c7v/RYMsiDQs+gIuZrELPjo Wg8coIbAkZ/ceae8Cr/9OVi3Kg== X-Received: by 2002:a05:600c:4fc8:b0:404:f9c1:d5d7 with SMTP id o8-20020a05600c4fc800b00404f9c1d5d7mr2354983wmq.25.1699367041931; Tue, 07 Nov 2023 06:24:01 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id bh5-20020a05600c3d0500b004094e565e71sm16446623wmb.23.2023.11.07.06.23.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 06:23:58 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 446516575D; Tue, 7 Nov 2023 14:23:55 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , Alexandre Iooss , Mahmoud Mandour , Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 07/23] tests/avocado: update the tcg_plugins test Date: Tue, 7 Nov 2023 14:23:38 +0000 Message-Id: <20231107142354.3151266-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231107142354.3151266-1-alex.bennee@linaro.org> References: <20231107142354.3151266-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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 Acked-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20231106185112.2755262-8-alex.bennee@linaro.org> 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")