From patchwork Tue Nov 21 07:00:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 745684 Delivered-To: patch@linaro.org Received: by 2002:a5d:5052:0:b0:32d:baff:b0ca with SMTP id h18csp1726130wrt; Mon, 20 Nov 2023 23:01:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IGrp8J80GUM5KfG+KnkYEXcl+VYRLH/lCEWEb8tU/gT7RbdXWkusCulBZ4UPLHF6uMgv6hF X-Received: by 2002:a17:906:7956:b0:9cf:35a7:9ea5 with SMTP id l22-20020a170906795600b009cf35a79ea5mr6695132ejo.74.1700550115629; Mon, 20 Nov 2023 23:01:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700550115; cv=none; d=google.com; s=arc-20160816; b=M/R7oyfZyzmq3uZO9q2LhPgDfc1wdJqRg7vLQ06jOsjXE1vpzOf/8Gtg560/axHa2L O8F/d0cqRIOFUIktfb5W+9MNu4Un73DiGgguGxVagGZSQZL/zX8xDQzi7pCudDeWpPrV 6Pr/Qw/cUunMVR0+ItKfSfpnXRnJDD6jfDjVlHPp75VYgLsMiMZLzrNRMSmI4vxTOiqO 3QYQ477X1FUJBO0BuOUwOuvCwhYJ/2l3CEYvlEQgHE1jFfU2SB+YmYzyfHNcoRsksFO2 E3dxnsJJs3vhX++fdPvhsk/klFdbYZFtMwxxJrCKl56XDXX9U64qYndCdj1UQx1zLw7G PZDA== 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; bh=5/IlyWgE5HUd+JoN1cZn1MTP1gCVOMXPzfOhfReOfuI=; fh=OiwEO3ecU/ysFuwJ4p/ZzPF8Vl0eoEBcm4GPxH0hI7s=; b=zQdsAzZMZ4OBMVY0cmmhvHn/sTdk5Ok1cIKhEpIUjyjOHiNTCxoyrVl4lha2bKOeKX J7QegdFVxqITT1Nmo08388aDInYidWX4+iS0SppF117Jvc4YgQ0DNVCrzZRzeTvovcc4 t7GW+WDaQQJBMB4nUtawAdznEtC4+NVyOz2hrbQDdRb5jIGNzJFrPCkV4WO9ipFaojVo fprB8CsLuQ/LXUODQsXusp/Kplrye++NEVf25/kBgNLvBWcXk5AMc2L+LKIDJt1ICJkd 9yjgh+JZh9MqQpmxAY5PsfqYf8sJzFyoGU9AqbdtvztTnQ/yeCner5CQFnxTZHD/JMjG 3MTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id a98-20020a509eeb000000b005435c436b31si5602611edf.591.2023.11.20.23.01.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 23:01:55 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (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 3233987585; Tue, 21 Nov 2023 08:01:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 0AEC58757E; Tue, 21 Nov 2023 08:01:01 +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=-1.2 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id E68BF867E2 for ; Tue, 21 Nov 2023 08:00:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sughosh.ganu@linaro.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D1C05FEC; Mon, 20 Nov 2023 23:01:44 -0800 (PST) Received: from a079122.blr.arm.com (a079122.arm.com [10.162.17.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 312703F7CE; Mon, 20 Nov 2023 23:00:55 -0800 (PST) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Tom Rini , Masahisa Kojima , Sughosh Ganu Subject: [PATCH 4/4] test: capsule: Generate capsules through config file Date: Tue, 21 Nov 2023 12:30:28 +0530 Message-Id: <20231121070028.2614095-5-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231121070028.2614095-1-sughosh.ganu@linaro.org> References: <20231121070028.2614095-1-sughosh.ganu@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean Add logic to generate capsules through a config file while testing the EFI capsule update functionality. Capsule generation through config file is enabled on the sandbox variant. Signed-off-by: Sughosh Ganu --- test/py/tests/test_efi_capsule/capsule_gen_binman.dts | 2 ++ test/py/tests/test_efi_capsule/conftest.py | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/test/py/tests/test_efi_capsule/capsule_gen_binman.dts b/test/py/tests/test_efi_capsule/capsule_gen_binman.dts index e8a1858509..c4e9ebac46 100644 --- a/test/py/tests/test_efi_capsule/capsule_gen_binman.dts +++ b/test/py/tests/test_efi_capsule/capsule_gen_binman.dts @@ -54,6 +54,7 @@ }; }; +#if !defined(CONFIG_EFI_USE_CAPSULE_CFG_FILE) capsule1 { filename = "Test01"; efi-capsule { @@ -319,3 +320,4 @@ }; }; }; +#endif /* CONFIG_EFI_USE_CAPSULE_CFG_FILE */ diff --git a/test/py/tests/test_efi_capsule/conftest.py b/test/py/tests/test_efi_capsule/conftest.py index dd41da9284..d3702180ef 100644 --- a/test/py/tests/test_efi_capsule/conftest.py +++ b/test/py/tests/test_efi_capsule/conftest.py @@ -87,6 +87,13 @@ def efi_capsule_data(request, u_boot_config): % (u_boot_config.source_dir, u_boot_config.build_dir, data_dir, data_dir, data_dir), shell=True) os.environ['PYTHONPATH'] = pythonpath + capsule_cfg_file_gen = u_boot_config.buildconfig.get('config_efi_use_capsule_cfg_file') + if capsule_cfg_file_gen: + cfg_file = u_boot_config.source_dir + '/' + u_boot_config.buildconfig.get('config_efi_capsule_cfg_file')[1:-1] + check_call('cd %s; ' + '%s/tools/mkeficapsule -f %s' + % (data_dir, u_boot_config.build_dir, cfg_file), shell=True) + # Create a disk image with EFI system partition check_call('virt-make-fs --partition=gpt --size=+1M --type=vfat %s %s' % (mnt_point, image_path), shell=True)