From patchwork Tue Jul 21 10:35:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 245594 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2791685ilg; Tue, 21 Jul 2020 03:37:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDsjwYq3udFpx92PFUTe6DlItsz2Qx23fI/IN+Pdxzs/7yzWh6hEDuVZkyr72L8mNbk18C X-Received: by 2002:a05:6402:1d97:: with SMTP id dk23mr25972057edb.1.1595327867887; Tue, 21 Jul 2020 03:37:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595327867; cv=none; d=google.com; s=arc-20160816; b=QRTHv8CI+8KNwd3Bbexblj3lMK4bAR7mOO4ldJJvXMekOIUdQt0a2qDjRmq/so6qDI wOEafY4lkRKtEssPAJC59RrFl/5KEsD8U20p8SP+o38lOQJqPMLDCrg4L0FhFmjD91BT /7FckdaoRvs9yCYFNMYSM+mAAHjzNIGF5khGFy46MmtU3EaqlI33x1LU4B2AZeQB+QVE Wzb25fvJ2OFAK+2bJ2OeGSDwyB9dXEVcwpzAb6qe5cuIAaa17v+1gHbMky+x3e3XsF+d gxGl+GIwgvL3b51246g0hgpFiDrSjdRA4iX8kriz/SXVolC6T2XYbi3UQatQYm1lveZ+ 8FNg== 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:dkim-signature; bh=2EkDCxlJI0IZv3RelChfhGjq3K+0yqCSIRuJgiLgOIs=; b=BN132NSVIHD8QXh9myM/LmQNttSelCohqhAH2ALcmYtUenrjsAQzVA/kxgPqJs03YL ASlLoOywwvaDuou5oy5U1UbQsqg60KLRrYE1B4/6xr5I8BJ3naPp6e0aFOlz4FTW6ue+ cc/vnhjYFPerSLHI67Mj9Nel18U27+DIfFZYJN9/XETWXbJZ1wWe0BCE52pl8zTKN+G9 HfMmZx6Nuyr8PYfr4Tt+9iDfaq0C9glTlbXO1BJdZlxkZlA8Tw22HZ068P+wUAGZ1OHk 4oepLbVUwZhkq7Mp3MwOPQ3M/KG9dJOk73zEDUVYScIc9rjkdkKvw6wUww4i+xJOL1iY yxAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="W//70qpb"; 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=pass (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 n3si13039866eji.720.2020.07.21.03.37.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 03:37:47 -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; dkim=pass header.i=@linaro.org header.s=google header.b="W//70qpb"; 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=pass (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 D0ACA81F56; Tue, 21 Jul 2020 12:36:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="W//70qpb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9AA6E81C3C; Tue, 21 Jul 2020 12:36:32 +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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) (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 7090B81C17 for ; Tue, 21 Jul 2020 12:36:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pl1-x644.google.com with SMTP id q17so10066624pls.9 for ; Tue, 21 Jul 2020 03:36:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2EkDCxlJI0IZv3RelChfhGjq3K+0yqCSIRuJgiLgOIs=; b=W//70qpbsul7BkN6L+xgfl19pLDO20uUUeIyA53mMXd9kwCPpx2y58P7flZT3dlEfu qVxij+LDUC+kbEOnZF1pL1uOCxSeAeGPY7o7kG1hdXeRBSY+lB1ZjBPTmxNgu1utxbeP hnQIEFadlai7CzgfUF+WnUdy3Ub8OePzsAyVTqH/u5vt6ZIEEepKVDHwDCpqQ8MGFUJq qd5fpKY9n+3+BUVhd3gOlGm112nFBM1M5rn3oFZ72V2+WmZxNKpdcIraaeuMQTfQASUU qtLpVicuFpE0dEEuKIOmN0Dr3UyQwQPlXW9JWTJ4znw1x15J1QPbWt0BcVrAjR2K556/ MeLQ== 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=2EkDCxlJI0IZv3RelChfhGjq3K+0yqCSIRuJgiLgOIs=; b=hVFZp0WgTSJAWhQ+0AUQZtBBul9vxTJDVMcXcT9amLzCGAyU8UxXIN+ytuGhgTH2wH b4i5dDj3Xr6sCE4WeziWXieDceZu82G/R/i2euMmGBG4xxFWSw8u3u6onIatKxkkYP44 dWOlibN/LDnCHgy5Vxad3fphfMqViSbCCV2XJpFoS6WXayav00rXt5q1WgY6Xd4HLJMy YGizgjJi0Co61eIdgf1NEOkDY1rOTaHr/BO/EArzvQe5W2xS9VOcjDgWLYDc+rwyNFAq +dLmYgb9VZnlXPCZ829KEmvwmMnq5v8BL9U7G03g6hqMH7wM1OyOHayiGyhaMpoi8rys IAdA== X-Gm-Message-State: AOAM531CzLA06A1e4Ht5FWbuTznmUDYhKV2r7ZzvLZhnnYMuYq9Wp9di uZ7BSVanbX9ZkxDYBBYDLa9LeQ== X-Received: by 2002:a17:902:c209:: with SMTP id 9mr21740755pll.133.1595327783674; Tue, 21 Jul 2020 03:36:23 -0700 (PDT) Received: from localhost.localdomain (p6e424d9a.tkyea130.ap.so-net.ne.jp. [110.66.77.154]) by smtp.gmail.com with ESMTPSA id q20sm19838276pfn.111.2020.07.21.03.36.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 03:36:23 -0700 (PDT) From: AKASHI Takahiro To: xypron.glpk@gmx.de, agraf@csgraf.de Cc: sughosh.ganu@linaro.org, mail@patrick-wildt.de, u-boot@lists.denx.de, AKASHI Takahiro Subject: [PATCH v5 7/8] test/py: efi_secboot: small rework for adding a new test Date: Tue, 21 Jul 2020 19:35:23 +0900 Message-Id: <20200721103524.5956-8-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200721103524.5956-1-takahiro.akashi@linaro.org> References: <20200721103524.5956-1-takahiro.akashi@linaro.org> 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 It won't be very useful to customize HELLO_PATH and EFI_SECBOOT_IMAGE_NAME under the current code base. So just remove them. Signed-off-by: AKASHI Takahiro --- test/py/tests/test_efi_secboot/conftest.py | 10 +++------- test/py/tests/test_efi_secboot/defs.py | 6 ------ 2 files changed, 3 insertions(+), 13 deletions(-) -- 2.27.0 diff --git a/test/py/tests/test_efi_secboot/conftest.py b/test/py/tests/test_efi_secboot/conftest.py index c0943b62501d..70a0b9183611 100644 --- a/test/py/tests/test_efi_secboot/conftest.py +++ b/test/py/tests/test_efi_secboot/conftest.py @@ -25,13 +25,8 @@ def efi_boot_env(request, u_boot_config): Return: A path to disk image to be used for testing """ - global HELLO_PATH - image_path = u_boot_config.persistent_data_dir - image_path = image_path + '/' + EFI_SECBOOT_IMAGE_NAME - - if HELLO_PATH == '': - HELLO_PATH = u_boot_config.build_dir + '/lib/efi_loader/helloworld.efi' + image_path = image_path + '/test_efi_secboot.img' try: mnt_point = u_boot_config.build_dir + '/mnt_efisecure' @@ -98,7 +93,8 @@ def efi_boot_env(request, u_boot_config): shell=True) # Copy image - check_call('cp %s %s' % (HELLO_PATH, mnt_point), shell=True) + check_call('cp %s/lib/efi_loader/helloworld.efi %s' % + (u_boot_config.build_dir, mnt_point), shell=True) # Sign image check_call('cd %s; sbsign --key db.key --cert db.crt helloworld.efi' diff --git a/test/py/tests/test_efi_secboot/defs.py b/test/py/tests/test_efi_secboot/defs.py index ba6b9f391e60..14891fcd3a00 100644 --- a/test/py/tests/test_efi_secboot/defs.py +++ b/test/py/tests/test_efi_secboot/defs.py @@ -1,14 +1,8 @@ # SPDX-License-Identifier: GPL-2.0+ -# Disk image name -EFI_SECBOOT_IMAGE_NAME = 'test_efi_secboot.img' - # Owner guid GUID = '11111111-2222-3333-4444-123456789abc' # v1.5.1 or earlier of efitools has a bug in sha256 calculation, and # you need build a newer version on your own. EFITOOLS_PATH = '' - -# Hello World application for sandbox -HELLO_PATH = ''