From patchwork Tue Feb 9 19:34:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jorge Ramirez-Ortiz, Foundries" X-Patchwork-Id: 1438595 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foundries.io header.i=@foundries.io header.a=rsa-sha256 header.s=google header.b=cyxf9XNl; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DZtR85HHdz9sCD for ; Wed, 10 Feb 2021 06:35:45 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4849882AD2; Tue, 9 Feb 2021 20:35:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foundries.io header.i=@foundries.io header.b="cyxf9XNl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F3F60826AE; Tue, 9 Feb 2021 20:34:52 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 40827826AE for ; Tue, 9 Feb 2021 20:34:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jorge@foundries.io Received: by mail-wr1-x431.google.com with SMTP id g6so10477786wrs.11 for ; Tue, 09 Feb 2021 11:34:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qyOEk8wtfoAwKyJiHgojmiQ1ksztWTf798zIE5Jz1H0=; b=cyxf9XNl3+lfMJFfnA4N+lx0Y4sQT2tUoKelerrLksiMtiIN/0ZWnXL3RdqhoBpooe tytXPo9y9ffdWH2GJ4I8P27Lnzp2Ipr2bDE5AjFGDl2i3/qbgnNQQ1jpnVYvTN7W+gZV CK6m67VWzv67lDUPfQnGLj/zjrq+tA2CDI21b9B8NOEHA5Cd5TB5qGg+nBQGKrpNYkby X4Ai4iC065l9H0b1LJt0iOfYJB9Q6YyQR+mvgs8NtZa9geA8EP8uS5gkCihA04oY0SEn nE3KF180X7sc/99PD5ksgsXC2I6TukGuVDaUgUvsnCH/6Le/lf2gty6H+vAsBic0aRq3 CR6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qyOEk8wtfoAwKyJiHgojmiQ1ksztWTf798zIE5Jz1H0=; b=C/kj0p9+rHa7x8xGQRVBAi9EinaJXtCRLcliGZHetp6UTocXhHQb72+VnmWmVq1tso RXAFLo1O+t+ZcHmtIcxyB+BEii6f1nHAAOWc/ItcKHda8axyzeAA9+nVGxcPTImoGJ30 2kVb66ZGMm5B1cXma7I66cAgBwF4zWq7Anb/ZOEWgs0Z3k9pqzwHMUTKjQgJ394PFZ06 RXtv1iad4ttSnxYV16+Ehi8XglVf7AVK3FH9e/Ok4cP3bHcQZL2u/gFN78OND23plR7b 6PvVfEgxT6a6vKuF/vyTQ0CfOGUoR6GJRBeuDCfZm9E1eOI6sf4pReMDl4+9RtYkMAQt JK5g== X-Gm-Message-State: AOAM531Jb9skRYelpA3chRy0Ra+HMeUTMW+KT8ugBEUyLwjwun9BJqXZ PAQOYLiGDQFnI1/60IB/YXcApQ== X-Google-Smtp-Source: ABdhPJypvBYRKOrzkpwOVBPGUBS8YhDhOx9T5mT3Ehayuxxuhz/kDB+XPyz+PjdYeMYSxEcB9ZHeww== X-Received: by 2002:a5d:4a8b:: with SMTP id o11mr20368278wrq.346.1612899284853; Tue, 09 Feb 2021 11:34:44 -0800 (PST) Received: from localhost.localdomain (182.red-79-146-86.dynamicip.rima-tde.net. [79.146.86.182]) by smtp.gmail.com with ESMTPSA id a132sm6621471wmf.42.2021.02.09.11.34.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 11:34:44 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge@foundries.io, sjg@chromium.org, jens.wiklander@linaro.org Cc: igor.opaniuk@foundries.io, u-boot@lists.denx.de Subject: [PATCHv4 6/6] test: py: add initial coverage for scp03 cmd Date: Tue, 9 Feb 2021 20:34:13 +0100 Message-Id: <20210209193413.26572-6-jorge@foundries.io> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210209193413.26572-1-jorge@foundries.io> References: <20210209193413.26572-1-jorge@foundries.io> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean From: Igor Opaniuk Add initial test coverage for SCP03 command. Signed-off-by: Igor Opaniuk --- test/py/tests/test_scp03.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/py/tests/test_scp03.py diff --git a/test/py/tests/test_scp03.py b/test/py/tests/test_scp03.py new file mode 100644 index 0000000000..2b584db24d --- /dev/null +++ b/test/py/tests/test_scp03.py @@ -0,0 +1,27 @@ +# Copyright (c) 2021, Foun +# +# SPDX-License-Identifier: GPL-2.0+ +# +# SCP03 command test + +""" +This tests SCP03 command in U-boot. + +For additional details check doc/usage/scp03.rst +""" + +import pytest +import u_boot_utils as util + +@pytest.mark.buildconfigspec('cmd_scp03') +def test_scp03(u_boot_console): + """Enable and provision keys with SCP03 + """ + + success_str1 = "SCP03 is enabled" + success_str2 = "SCP03 is provisioned" + + response = u_boot_console.run_command('scp03 enable') + assert success_str1 in response + response = u_boot_console.run_command('scp03 provision') + assert success_str2 in response