Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76483C4338F for ; Fri, 23 Jul 2021 02:07:30 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8376A60E99 for ; Fri, 23 Jul 2021 02:07:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8376A60E99 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 99EBE82C54; Fri, 23 Jul 2021 04:07:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Gp6+5xV/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3A8E882C4C; Fri, 23 Jul 2021 04:07:14 +0200 (CEST) Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) (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 9917E829F8 for ; Fri, 23 Jul 2021 04:07:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oi1-x234.google.com with SMTP id t14so385180oiw.0 for ; Thu, 22 Jul 2021 19:07:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xEfFovZ9amsMYKDkl5C4gRakM3ARehuN6kzxW02TFps=; b=Gp6+5xV/xuCbbWqdf9yHH5QZ/OOwlpJnjiIQtHCJfcjBqPxYa0oxNwa0ed9ypEqZiV tw6d1jnpx5JQi+DA8FDM7VICoMt08YH6NuSTSHKKGXgFN2/6iVnA3fGYt4JX7sDlqM6Z HQMQ0sw3tcUs4ERAZRPRRb3lc5TYit0Mrbveg= 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=xEfFovZ9amsMYKDkl5C4gRakM3ARehuN6kzxW02TFps=; b=LNEWaQRJ8wjpthq+xh7Pht48UOdhA6XvwRTzI97FbrHhnhdU7vpV96jlBd8q1SGEF9 KcjXk6AvDHB8ZOFMQ9kLNqqotHec36CbcwbixLE61KtZ9srskbrTiyCRu+FycKFda6yD vUeiwp04B7KEiVoJO7bvu+e4I2Cj42/JiYKFYwshKhqvZYJojHBm1xO+lRKP/lOJs1JC 1hX3GaiLS8m0vgf8Pcbr6+VKLOnc7OQLC1Po3BkdwJvX+Ju1BXc214tVEankyuIUgVpv VUYFsdKgD109WQP0FuN5aO4UOuvzJ2nZxV2lT8xR/NFWapRVRxiUkmbFEyGnxHqpluep r7dQ== X-Gm-Message-State: AOAM532MAeGSmJRk2C4tKtMpXubp1YEPXYDMWMeFTrX5WmDIp7YULshM mDJJS+2vjsZ0VH7aJAWNPCcmyBeEe2lx1+Fz X-Google-Smtp-Source: ABdhPJzlTDtR/1XpVuF9iCOJz9sJ4p1wbaTsm/Wy8yXJotJCSJMlIzZNKBFQdy3xH870vJknUHIWZQ== X-Received: by 2002:a54:4608:: with SMTP id p8mr7559610oip.110.1627006028989; Thu, 22 Jul 2021 19:07:08 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id c18sm2665633ots.81.2021.07.22.19.07.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jul 2021 19:07:08 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Stephen Warren , Stephen Warren , Simon Glass , Thirupathaiah Annapureddy Subject: [PATCH v2 1/4] test: Allow vboot tests to run in parallel Date: Thu, 22 Jul 2021 20:07:01 -0600 Message-Id: <20210723020704.1932476-2-sjg@chromium.org> X-Mailer: git-send-email 2.32.0.432.gabb21c7263-goog In-Reply-To: <20210723020704.1932476-1-sjg@chromium.org> References: <20210723020704.1932476-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.103.2 at phobos.denx.de X-Virus-Status: Clean Update the tests to use separate working directories, so we can run them in parallel. It also makes it possible to see the individual output files after the tests have completed. Signed-off-by: Simon Glass --- (no changes since v1) test/py/tests/test_vboot.py | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/test/py/tests/test_vboot.py b/test/py/tests/test_vboot.py index 6dff6779d17..095e00cce36 100644 --- a/test/py/tests/test_vboot.py +++ b/test/py/tests/test_vboot.py @@ -24,6 +24,7 @@ For configuration verification: Tests run with both SHA1 and SHA256 hashing. """ +import os import shutil import struct import pytest @@ -34,16 +35,16 @@ import vboot_evil # Only run the full suite on a few combinations, since it doesn't add any more # test coverage. TESTDATA = [ - ['sha1', '', None, False, True], - ['sha1', '', '-E -p 0x10000', False, False], - ['sha1', '-pss', None, False, False], - ['sha1', '-pss', '-E -p 0x10000', False, False], - ['sha256', '', None, False, False], - ['sha256', '', '-E -p 0x10000', False, False], - ['sha256', '-pss', None, False, False], - ['sha256', '-pss', '-E -p 0x10000', False, False], - ['sha256', '-pss', None, True, False], - ['sha256', '-pss', '-E -p 0x10000', True, True], + ['sha1-basic', 'sha1', '', None, False, True], + ['sha1-pad', 'sha1', '', '-E -p 0x10000', False, False], + ['sha1-pss', 'sha1', '-pss', None, False, False], + ['sha1-pss-pad', 'sha1', '-pss', '-E -p 0x10000', False, False], + ['sha256-basic', 'sha256', '', None, False, False], + ['sha256-pad', 'sha256', '', '-E -p 0x10000', False, False], + ['sha256-pss', 'sha256', '-pss', None, False, False], + ['sha256-pss-pad', 'sha256', '-pss', '-E -p 0x10000', False, False], + ['sha256-pss-required', 'sha256', '-pss', None, True, False], + ['sha256-pss-pad-required', 'sha256', '-pss', '-E -p 0x10000', True, True], ] @pytest.mark.boardspec('sandbox') @@ -52,9 +53,9 @@ TESTDATA = [ @pytest.mark.requiredtool('fdtget') @pytest.mark.requiredtool('fdtput') @pytest.mark.requiredtool('openssl') -@pytest.mark.parametrize("sha_algo,padding,sign_options,required,full_test", +@pytest.mark.parametrize("name,sha_algo,padding,sign_options,required,full_test", TESTDATA) -def test_vboot(u_boot_console, sha_algo, padding, sign_options, required, +def test_vboot(u_boot_console, name, sha_algo, padding, sign_options, required, full_test): """Test verified boot signing with mkimage and verification with 'bootm'. @@ -365,7 +366,9 @@ def test_vboot(u_boot_console, sha_algo, padding, sign_options, required, run_bootm(sha_algo, 'multi required key', '', False) cons = u_boot_console - tmpdir = cons.config.result_dir + '/' + tmpdir = os.path.join(cons.config.result_dir, name) + '/' + if not os.path.exists(tmpdir): + os.mkdir(tmpdir) datadir = cons.config.source_dir + '/test/py/tests/vboot/' fit = '%stest.fit' % tmpdir mkimage = cons.config.build_dir + '/tools/mkimage' -- 2.32.0.432.gabb21c7263-goog