From patchwork Sun Feb 14 15:27:28 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: 1440293 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=85.214.62.61; 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=WiK2Ztge; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DdrjV1Sw2z9sBJ for ; Mon, 15 Feb 2021 02:28:30 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3556882748; Sun, 14 Feb 2021 16:27:58 +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="WiK2Ztge"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CEE508270A; Sun, 14 Feb 2021 16:27:44 +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-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) (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 240DE826FB for ; Sun, 14 Feb 2021 16:27:40 +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-x433.google.com with SMTP id v15so5634578wrx.4 for ; Sun, 14 Feb 2021 07:27:40 -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=69XwDOK8DSTN2n8ANZh+ZPkqpCEkOL7WvsN2ksdz2GI=; b=WiK2ZtgeQeDrbD/4LNu+qa23XO85J60d/G3wq+T11Lz++mUuc+9bDBut0U9oXM3XOF 3lLJ/7/42bRU39cEvDlK/3/9U7nbf95ruJbM5gSTJ8t0a1gmDGYwjeW8s9q+nMRBVJl0 +xiOrlNDfUVsogGq8TOiaoD2E7ZlfxwqCfx/Wh2frtC+u8rVMLnYpk6AJ6o+vnLsIJMe JIcngxzZ9/IMDRbHpQmntNYpNVSVa5GchVmpDVZc+mobGu5AkFpJRtm4K3XCpm0VjYYU GGSA4uPrYYBvnjb4Z6jYvHGW3DCIBy2hkl73AoLLrHAOwRJi8XcKrIZ7N5iVxxzM8gUj eitw== 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=69XwDOK8DSTN2n8ANZh+ZPkqpCEkOL7WvsN2ksdz2GI=; b=X0mPQ5XHT21OqKp7Q95HlnqQ65WN5tp0mepoYop/Pwy/4dKgR6Y/Yrgwnfg5MSRJP8 q6yBL1SDjwfk5kQu3pOZUuYG6/0lDQQee4XkgvNX20o6PU8rd8w9KHi8gkF/+p+bs3o3 5rpbCOJAzp1EjV488W7UWUdc85htCep5uuuYMhGqGeylSJH36fhdPysJJ5IPf9xy3qio xO5T1lM5zATzlnTpi28Bbv0YEzRx4iYEQbtvGLZpMGxa7K+ZzRdD3Hv8V1VuOmyonM41 KsdvbVDF1xYjEPCpQVfMGbZH7FUbNDfVXUKHMxEGjZsK53dcFe+wEkd6/uJY4vspvlWx 9vcw== X-Gm-Message-State: AOAM531HRJdTCUM0gmXPV4ew3j1a1vhbexfPiwizq3PAGCFWGFja4iNx iLycKxhpjmtKFngGQgUsPsQmvcFTgUnOhA== X-Google-Smtp-Source: ABdhPJwsSfj/bmiI2VF5la104wnApNyqBEjuJGTDVaCo/3eBCv1bmym0F7gWW+Xql0FPGf13N5W9ug== X-Received: by 2002:adf:ea48:: with SMTP id j8mr14270881wrn.197.1613316459783; Sun, 14 Feb 2021 07:27:39 -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 f7sm10520801wmh.39.2021.02.14.07.27.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Feb 2021 07:27:39 -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: [PATCHv5 6/6] test: py: add initial coverage for scp03 cmd Date: Sun, 14 Feb 2021 16:27:28 +0100 Message-Id: <20210214152728.8628-7-jorge@foundries.io> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210214152728.8628-1-jorge@foundries.io> References: <20210214152728.8628-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 Reviewed-by: Simon Glass --- 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..1f689252dd --- /dev/null +++ b/test/py/tests/test_scp03.py @@ -0,0 +1,27 @@ +# Copyright (c) 2021 Foundries.io Ltd +# +# 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