From patchwork Wed Nov 1 13:50:03 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: 740067 Delivered-To: patch@linaro.org Received: by 2002:a5d:538f:0:b0:32d:baff:b0ca with SMTP id d15csp294489wrv; Wed, 1 Nov 2023 06:51:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEX4XqGSQ/uWV8JywUpIoRSeCaSGcLimG+nt93DvUDe7Z4p+lcJdDKDPWLd17db1qmtGiW/ X-Received: by 2002:a05:620a:4889:b0:778:8b39:166e with SMTP id ea9-20020a05620a488900b007788b39166emr16064656qkb.20.1698846682771; Wed, 01 Nov 2023 06:51:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698846682; cv=none; d=google.com; s=arc-20160816; b=MLQIDOSfyQIsmogyxYN0d9yyK+4rN3ym7hQKU74PRkwkGlBHVOKGm/u/+7hvaBTdla CVJeCsTt6oCDzOeL/8YQM3bFA3V4afCr4UPEGhtQOT3yN757PkefcIzU9otSINPoJUGr nMGAepb8j27XN1qNtlkapYZ2cjTjJCw6whb9ri3cvAVp1YPvhnuVMlWcRECe9HFx6Sw8 TSqz/CKkMBVbeXbZK7QxbRewytQ7PdOWez9ZorEjEvryTUm5b0uNpiRgAMmV2AS2IoHr L4CrJVfo9k+E6cNuDLvIqx3OIa1en0P4wViYTnnbSW6Rz/dWcqmzp4jaYvHk8SHe0ach lOxg== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=65Q39Xa13SVlTaipeikSzc52X5lKj+6VWg/aEmU5DfA=; fh=z5PpRQTR+yzPnChvxo7cR0CCpTRcc9goVQJacEYzr74=; b=ybTwbcpsWLROOXxqGOfyajKJXYyyjQ9x4/sqhyycMFkX/mViV22j1N7YvcCN3cOzbi V60JIoGhwbf9OMeE4qR11kWBl7I7BYoNcQhftxVEle3hxu1x52Pr8N5wvUCo7VBAHcWc 5aL8swq13xJdX56T7xgGLY6cNZ0WkpLDH9CP0YZ5+mqMUfXXFcznyzyUtNhlwbx2MaHW fZaUKg//XyS/UHRXo7oQD1UgoMyll1lOdvzGiPYKrPzTLyYq4AjnTBErITfAixg02yc0 mtBGP5p83hkStTU2aVWFA9c7rWBc9z8UVMMb+IIhn1EKnr4pnwKNwF0wd4RFbXObBsw2 xn5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YcNSDiOg; 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 j6-20020a05620a288600b00773b6bed39esi2845238qkp.540.2023.11.01.06.51.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 Nov 2023 06:51:22 -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=YcNSDiOg; 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 1qyBc1-0001wt-Mt; Wed, 01 Nov 2023 09:50:25 -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 1qyBby-0001uq-6k for qemu-devel@nongnu.org; Wed, 01 Nov 2023 09:50:23 -0400 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qyBbn-0001Y8-5i for qemu-devel@nongnu.org; Wed, 01 Nov 2023 09:50:21 -0400 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2c5039d4e88so97741081fa.3 for ; Wed, 01 Nov 2023 06:50:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698846608; x=1699451408; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=65Q39Xa13SVlTaipeikSzc52X5lKj+6VWg/aEmU5DfA=; b=YcNSDiOgZYAsBCP+tYyNPsCuek4Iaf8YqhYazkNAavJpg5Vh5Y06TALe02Knaqm0yN jb8KCZGYnCqQVnwGF0uvMamqwF3JOXvxIaaYmp4mFCCQhN0kalLpjdnMqKKaXBLediJb HUWAnX+oOS+ikcjJ2D+Q+eEKlTYuBV/qXv2sCAI+remCPyqoOZPiGyHqEWBG/dRYu+uS HDHBWpUT+v44kFW3KAHiPaCllaCZvxxYhcpnSs+2cXQQnSIVmzcrElANchlESTDKAsfJ Y8KookUPFoVAxp7xWL4FBEupad+g3yOBpl1tQai6vM87sHrg+VgcXRne5A1NtidAcwsE 8XhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698846608; x=1699451408; h=content-transfer-encoding:mime-version: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=Wtu80H05+4EQNolElNrHb+RAcDGNDpoWIlC7A9i97WCur+xqNh/3KobQwzBMWsjzO/ MdNnpeL24Zk6GwYzkOxso+4omD0RFe7V8QFLv2hJNwWMn0GZFSXbfY977iZUSIcSmMg4 +sIhWIRJElI635ptDwrqqyf9EPIZ7FoC8MNBhFbJnNg0d5INTvIz1mwKllQFDTmH15Hp Y8lBW1JTXFh/ooA9Qx+oQstwFeBoarRLpfeKIz9MlNM3s0SqKdfgd7wmQa6zNgZlEBer oIIhmiA33LMvBYXR8qgUNeV9IvUI1jyJGBKskKzAPkH8+xs714AYTbApncRGRG5UPmww oxUg== X-Gm-Message-State: AOJu0YzZ185pa7a2ehHD3Xi33q12C2Rss++7sdFF6II39cnKBUnN0cqM laJ8iNahoKTnXPCwIJ0sOdutTQ== X-Received: by 2002:a2e:9943:0:b0:2c5:21e3:f21a with SMTP id r3-20020a2e9943000000b002c521e3f21amr12815356ljj.53.1698846608492; Wed, 01 Nov 2023 06:50:08 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id t14-20020a05600c198e00b004065e235417sm1674382wmq.21.2023.11.01.06.50.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 06:50:08 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id ABF8165736; Wed, 1 Nov 2023 13:50:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Alexandre Iooss , Mahmoud Mandour , Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [RFC PATCH] tests/avocado: update the tcg_plugins test Date: Wed, 1 Nov 2023 13:50:03 +0000 Message-Id: <20231101135004.1572916-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::230; envelope-from=alex.bennee@linaro.org; helo=mail-lj1-x230.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, 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 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")