From patchwork Thu Jul 4 07:35:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 809939 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1043596wru; Thu, 4 Jul 2024 00:42:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU1tW6h3pGq8djW7uvRVSe1RFTAAwTOqL6GxTsZakTNl1uODi+eer6xivrmwg2orXa1ZGDGkG2UifXUUYP0ezcW X-Google-Smtp-Source: AGHT+IG765KrxBxD9VGAG88sqnMAhBtMZHqG3kAARP0ICTvGT0oIqOFR5sKOWLt6Oslu14TEVnlb X-Received: by 2002:a05:6402:27d3:b0:58b:bb69:763e with SMTP id 4fb4d7f45d1cf-58e7ad255aemr471080a12.7.1720078930745; Thu, 04 Jul 2024 00:42:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720078930; cv=none; d=google.com; s=arc-20160816; b=UpVQ1Iws1eAFdIazPw/48wRXntKq7gS/HQX3+Epmea2W2Q40kRJMrlMzrsJX1THPrO stI8oT7jAYwE7MmC2XMvMIQ5s3DT+R74ZH8n89Ld80ymBlJ66h/m8pJQZvuVL133n0SP rD+6QlpY+2zFsIvy63AKjhXedn75N/UMZSNgrI6hwOSHxXUMX91Lpmp64rUTpwBOzwaG 6f6XmJksSZbiRZqrgYvadLhUmby3c4lWqFnXVqio9cWfHv2vtgi19JcUGIKVJ0ZKnLTo Fl0jgyouTMy9mGdsOdKkIXc/Qh9W7qRtLFWO0sPQW7r14ipzNKYC1ZCAUViLTiLjoyAc Yz8A== 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; bh=u3d8Z9VYZUxYF1T7/nUgQA/M6Hx7QI16NPsqU7V4sjE=; fh=ez1zzjhC0XWyqTp7tWutqrA/nFdALDnQKrnQnXYhk5Q=; b=YQ3L0csTCy7EgUtgx5ryF9ms3v7hYK794dQT+bMHQrg56UAoEd4KmTtH2b5nk588QS RAJopuoZrW4hN2aN5gSihDTA8lVC3FGH0bS+v38DQwikdaWtBztflI0Ms8ECsBcdtszJ ovXysUg/zH5042iUEBXCom97RbR88Mz6o3omsKPkfXMwhaHmlusHPt5HCqros3Ujwdoe D3CsvdPB/tOxfppG7SFKT9UmbQDT9tEQOa9jEriwAjrFmJlr6d0Qk2dREI9C0BAco7gV 07XKlf3YfICHz5YTtkxzN1hvy1iwxSPbpgi1Vc8NvAkoM1JvvxCUFhx02CHjGSfYgJhT 3buA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-586151867c6si7156575a12.555.2024.07.04.00.42.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jul 2024 00:42:10 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C36CF88936; Thu, 4 Jul 2024 09:38:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 2F744888CC; Thu, 4 Jul 2024 09:38:04 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 3665F8889D for ; Thu, 4 Jul 2024 09:38:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sughosh.ganu@linaro.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B788B367; Thu, 4 Jul 2024 00:38:26 -0700 (PDT) Received: from a079122.blr.arm.com (a079122.arm.com [10.162.17.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 955FA3F762; Thu, 4 Jul 2024 00:37:58 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Tom Rini , Ilias Apalodimas , Heinrich Schuchardt , Simon Glass , Marek Vasut , Mark Kettenis , Fabio Estevam , Michal Simek , Sughosh Ganu Subject: [RFC PATCH v2 32/48] test: lmb: invoke the LMB unit tests from a separate script Date: Thu, 4 Jul 2024 13:05:28 +0530 Message-Id: <20240704073544.670249-33-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240704073544.670249-1-sughosh.ganu@linaro.org> References: <20240704073544.670249-1-sughosh.ganu@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean With the LMB tests moved under a separate class of unit tests, invoke these from a separate script which would allow for a system reset once the tests have been run. This enables clearing up the LMB memory map after having run the tests. Signed-off-by: Sughosh Ganu --- Changes since V1: New patch test/py/tests/test_lmb.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test/py/tests/test_lmb.py diff --git a/test/py/tests/test_lmb.py b/test/py/tests/test_lmb.py new file mode 100644 index 0000000000..b6f9ff9c6a --- /dev/null +++ b/test/py/tests/test_lmb.py @@ -0,0 +1,24 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright 2024 Linaro Ltd +# +# Run the LMB tests + +import pytest + +base_script = ''' +ut lmb -f +''' + +@pytest.mark.boardspec('sandbox') +def test_lmb(u_boot_console): + cons = u_boot_console + cmd = base_script + + with cons.log.section('LMB Unit Test'): + output = cons.run_command_list(cmd.splitlines()) + + assert 'Failures: 0' in output[-1] + + # Restart so that the LMB memory map starts with + # a clean slate for the next set of tests. + u_boot_console.restart_uboot()