From patchwork Tue Feb 9 20:10:38 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: 1438654 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=Kt3HF2aw; 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 4DZvDv4Pkhz9sCD for ; Wed, 10 Feb 2021 07:11:59 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7C29682ADC; Tue, 9 Feb 2021 21:11:46 +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="Kt3HF2aw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E153182ACB; Tue, 9 Feb 2021 21:10:54 +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-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (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 A5B3282AB7 for ; Tue, 9 Feb 2021 21:10:47 +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-wm1-x333.google.com with SMTP id j21so4730381wmj.0 for ; Tue, 09 Feb 2021 12:10:47 -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=pMNHW9hzSZJYP9BJ8NfXBd+Ktyc8kuz7JtyZ3/isqq0=; b=Kt3HF2awRM+i3DkskA3PzVTjurwqhnhfJzrL4xCcCrcP+Pc6pa7QRvBBNF2GvaDuom wTVWtdf49wTH4Wzye4xhX3qfengSIf5WFkn1w9pzvfuLdurgsczxZ5kLs+pQtvdrTS7X b62WhBVCWxiuqVEukd3LunGS/yKHvbhc/a1NmEZFUyPQqRagFi0bufsGZiZnFYyonekq fmcKaW6a4+dOkdK/akEsNlslzwivIojDclWDacyEuJEpmQrxkosB9ExwuPLcSd3vVmLg CZSrXW9He3ux4NQyW4PIbif9kVepvUnQBX6a8rg9G7a4gJmE1uthuS5mL8+DJdlAA+nN PFrA== 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=pMNHW9hzSZJYP9BJ8NfXBd+Ktyc8kuz7JtyZ3/isqq0=; b=Mq2fRRseaQsz7hOhBNw2IgDBOwsqrJbXle6yPz65sK/angtiIAWsSQAe3G1yW1ZS/n 2spA6F2O/eC3zDrk0wOzkSun78O0+ONvF8T3uLYREaA+ufktrOgRMBM3ZiFTWoE+d4eU 72T+ZscPcTaWpGwFQdcYgNfc2T9USGSe63UDvM0swrUW89mVcpiTkuWXFDc3HOg2tb/c ub7JtBtBis2n73ztxNI2Ap7rdvQWADyhs/FhWsZgDmgvzvZB3A0pXnUJVf1aVXmVZIq6 twCuTO+5FiOmfiTNcF+S46UDQ2qzSSH+we64BblHgHe3CMP4ZBO4R3wtnLWNMgzTXrLE tSQA== X-Gm-Message-State: AOAM531iEfVUmDURgLEziKl7QBbvRu/wzI/14QY1Y0CagJKjXDYQCcGW JW7dAZDXqtG9p4Z/9TYXkO3hsg== X-Google-Smtp-Source: ABdhPJyJ3zxWhNYgh1ho+rxQ8dSBytUXltreqk5gRmueKwmDj8FrIUlgZYiyp9ZsscqF5pt48Mj5pA== X-Received: by 2002:a7b:cc98:: with SMTP id p24mr5076249wma.113.1612901447268; Tue, 09 Feb 2021 12:10:47 -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 r17sm37951601wro.46.2021.02.09.12.10.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 12:10:46 -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: Tue, 9 Feb 2021 21:10:38 +0100 Message-Id: <20210209201038.28747-6-jorge@foundries.io> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210209201038.28747-1-jorge@foundries.io> References: <20210209201038.28747-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