From patchwork Fri Nov 3 19:59:34 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: 740708 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp8198wrr; Fri, 3 Nov 2023 13:02:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFd4QqcVKjpWY7iBudjje/We6DLBfaQMOFKnrdc0fSh+T+yJGvlyr+txL1L1WIg0lqKI2kj X-Received: by 2002:a05:620a:304:b0:77a:5112:c1de with SMTP id s4-20020a05620a030400b0077a5112c1demr7792300qkm.6.1699041753786; Fri, 03 Nov 2023 13:02:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699041753; cv=none; d=google.com; s=arc-20160816; b=rfRKC+hIvY06BzDfqoWCR+GecJdC2ieS4gf6+NNJmK6AxWNPT50X4gywPmdaXDle9W nYRgGwUxUj5o9IMMJUf+sSlopq3PITuxn0R0VYtLptKb9nTg/NyFSdPj+Yaxb41bJSKB xsQ7nGP2gL7b8mSQ0hGK+GEZfjO9N5w5ZB4/GVmndhNY8LPHSQWTM23i/TnmjZnLHmOn MgDiEUV+i6xPntPvxJZenGjdm9e9/6fDP1weamj0mjto96FXbpx9TnM/dO5xSv+NiIVD aKMQyfEc0LFnvzlAcPj5d71sBghiyISoHy8+SBS/0ZSuaXFBRGx1If/zKYRgXRUrwloJ Jgyw== 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=65Q39Xa13SVlTaipeikSzc52X5lKj+6VWg/aEmU5DfA=; fh=Kx2XI2Yx2wBtcq6Uh/oWjWfpY5DZOGguZfb2uQrLFXM=; b=QaxD23r8pNIjt85jFt2+MCR58DjIvVBJBThH2/V96C0KgdAdMF15JHkRcjGlF1JQYt M6Zn05dzedqhsswhSBigyZFFibgBM1OpZYEBEqT6wC8CmfJ2ZuWwT0HgdHiUMAPRLk0W QSS4K34vSAV4G7qxhSzYEBJ4QhOh1ylW2qLMfj5M0KN5fWv1SAuvL7Jsh+Dlrl4mOO9V Ds+72cdG+4am0CtoCCZnaDu4iQeJZUVRulklnv+MiAyfk5AnLBN80Hpareh3UCOmLdGo gIPIReuRzJI3Nj1hlGxD3vH5K6g0iC+PGcOL4hvCAUIUXhadOmyjBf3GSfW/IHxpuFum CJEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="S/5189rd"; 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 t15-20020a05620a450f00b007770bfd349fsi2169729qkp.603.2023.11.03.13.02.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Nov 2023 13:02:33 -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="S/5189rd"; 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 1qz0La-0000GC-W8; Fri, 03 Nov 2023 16:00:51 -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 1qz0L2-00089Z-U2 for qemu-devel@nongnu.org; Fri, 03 Nov 2023 16:00:18 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qz0Kr-0005Pg-2V for qemu-devel@nongnu.org; Fri, 03 Nov 2023 16:00:13 -0400 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-32ded3eb835so1645395f8f.0 for ; Fri, 03 Nov 2023 13:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699041603; x=1699646403; 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=65Q39Xa13SVlTaipeikSzc52X5lKj+6VWg/aEmU5DfA=; b=S/5189rdrzIODu6XJTAI8OjJ17L3wbY6u0e5W33XW1+CZD1BdBp39jqplM+Pml/8BP Ca9s1Be8kPQMtEn1lY7EL8q6oSDYetBEn/8pHP6v4lF0qZ6arzgfA3yqL+QumdV0Em2T RIZpQTRTlfW75DNot5v+idoFXyShv+D/PDFldBuCFzCvPkgEtcmoNbCOEN3E0YOezxye Xfv4YcXdpLFxdwUXQx6SnFAbfzdj/gsJjqIN5ORDOrleitsixBvA0VxDEZ0hLSvMeTiH /9NCmXQtG9AhMHOtu0kOr4aAzaa6d18WbaTh1wMiqRCMy/DDngWqEU4VP2hIVbfxP70c YIag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699041603; x=1699646403; 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=65Q39Xa13SVlTaipeikSzc52X5lKj+6VWg/aEmU5DfA=; b=PIEjfRhtNMbno7NJ7iEzT9soyIkHEMC8R91VO+LIHs5q20pLvqqNYLOHctnCRpHf+u Yu0Bd65Wqb2WjmV+CR/s2c1LtgPxjTqAzDl/sKOHc0IDGjq5Y+77mzH/6b4MT9dk5nm+ JoPFT+iq9+RHFQZgIG4JqfESax0yTrJ4btm1+eiir5VAGPJfe1ZDXUfnermAosgwnJEH 9fMbVBb2/wmsQKSnt5tyDzbfWUkzi5d3tZZe7NKGvth1WHUzZHfhgMyMmT5ATu8ih3Gm HNFYY80bfc63eToq1r7z6qBZvxhp22eaj9DQ1+psssemerGUDxI6EB2qDH/jEw9SC3Tv miLQ== X-Gm-Message-State: AOJu0YxQO6RXaQzTWyCk6m+2XLNek4MM+4bxWFvE5fXbJyqtA/iCOdk3 6gvuj/NMzLf+ZlaaJ6cf3412pA== X-Received: by 2002:a5d:67c7:0:b0:31a:d871:7ae7 with SMTP id n7-20020a5d67c7000000b0031ad8717ae7mr15801970wrw.29.1699041603100; Fri, 03 Nov 2023 13:00:03 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id p12-20020adfe60c000000b0032d886039easm2608287wrm.14.2023.11.03.12.59.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 13:00:00 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 5461F65746; Fri, 3 Nov 2023 19:59:57 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Peter Maydell , "Edgar E. Iglesias" , Song Gao , qemu-arm@nongnu.org, =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Wainer dos Santos Moschetta , Weiwei Li , Marcel Apfelbaum , Ilya Leoshkevich , Daniel Henrique Barboza , Yanan Wang , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?C=C3=A9dri?= =?utf-8?q?c_Le_Goater?= , Paolo Bonzini , David Hildenbrand , Brian Cain , qemu-ppc@nongnu.org, Palmer Dabbelt , qemu-riscv@nongnu.org, Eduardo Habkost , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Alistair Francis , Liu Zhiwei , Cleber Rosa , qemu-s390x@nongnu.org, Laurent Vivier , Yoshinori Sato , Nicholas Piggin , Thomas Huth , John Snow , Alexandre Iooss , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Mahmoud Mandour , Daniel Henrique Barboza , Bin Meng , Beraldo Leal , Richard Henderson , Michael Rolnik Subject: [PATCH 07/29] tests/avocado: update the tcg_plugins test Date: Fri, 3 Nov 2023 19:59:34 +0000 Message-Id: <20231103195956.1998255-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231103195956.1998255-1-alex.bennee@linaro.org> References: <20231103195956.1998255-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=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 --- 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")