From patchwork Fri Apr 19 06:55:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 790187 Delivered-To: patch@linaro.org Received: by 2002:adf:e6ca:0:b0:346:15ad:a2a with SMTP id y10csp922027wrm; Thu, 18 Apr 2024 23:56:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWcTwn0ib/i8zZyjYOQwheSOuCRa8ccNjfCr9XETPphKiyvpNhAaxhJHdlwsYQkpNu6ixNu5WIa/YW3okMK8CJp X-Google-Smtp-Source: AGHT+IFK9oUOzZGQ+C3cENOMK4iDXlsu2Xi7rGZOTDBhIQbnNm94oj2EjryTpF7pC+NvIlfZa2oS X-Received: by 2002:a17:906:234c:b0:a52:4047:df5b with SMTP id m12-20020a170906234c00b00a524047df5bmr805103eja.73.1713509806608; Thu, 18 Apr 2024 23:56:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713509806; cv=none; d=google.com; s=arc-20160816; b=LHsADbnKVzzSi3FFjxPYhDc/5UCNX7vMPf9eGKTzwd2is5ibRuIGgvOsBciUw/d74y X9b0dDK0G6z3WXRKG++LOL2/xznyXGuHsEWEa2scB76DWT0E8GgouZQzOHaisYz7Bcmj zW8FzgLDYAYNbKrMKE5hnh4PG3Ac39AwuboiwFpXuaH4okk8YdVvF6ISAmaNERDTtb0k AmnNrPLur18ed7zhM8nML6kP8YSu6g0MkRStmQoQNqZahWugvBZT2vxIaMmIik/AYIIB v2hnT2sPl4Luu1wIM/S0stE2xhBaDf9jjRMvoi5s+5s5qAfNzxy3VDiB6UEjztrYifcf im8A== 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=3R18ND/V3iH4N/j/VBi7hJce3HPo7DjlB7DwH2301JM=; fh=WsxX/MtpAy/GihNoM0Uw3JmpOQd9TnDQAtsquJqrNec=; b=EnAWGiVLiwNSQ2Osnaz595/rt7/1NKKf3RYfVmaz6g9hODk5B650Ozu3MUGgZmXmgf ishRXL23Nuxs3Y2m3Yc56waFFfiXekArgW1eXd7twuU9VgsNKDQaOHFr1/+m0rmoRft0 nH6KBs329rFTukQVkrFKh6wB1XANoSoFvFdBPUOahr4cU4CBu5c8cXRxk/J5jV8ddHLa KDBZAqArgnH3SkCE6Gyr/4HqE71vdJvbcaiq8pR3w4KJ45hCTFoK81/yajoU2zHH35Ub Dhy++OMRsj8+vSfIC2j/oDrEVpqIqf6v1AQSC0QdICDEJB1ZAijixvacua9Q6LAdjYYm OPPw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 gg14-20020a170906e28e00b00a55761a2eaesi1460744ejb.115.2024.04.18.23.56.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 23:56:46 -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; 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=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 9D1D388684; Fri, 19 Apr 2024 08:56:19 +0200 (CEST) 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 2BF5688684; Fri, 19 Apr 2024 08:56:18 +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=-1.2 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_SOFTFAIL 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 3474588010 for ; Fri, 19 Apr 2024 08:56:16 +0200 (CEST) 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 7DD242F; Thu, 18 Apr 2024 23:56:43 -0700 (PDT) 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 566CD3F792; Thu, 18 Apr 2024 23:56:13 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Tom Rini , Sughosh Ganu Subject: [PATCH v2 4/4] test: capsule: Generate capsules through config file Date: Fri, 19 Apr 2024 12:25:42 +0530 Message-Id: <20240419065542.1160527-5-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240419065542.1160527-1-sughosh.ganu@linaro.org> References: <20240419065542.1160527-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 1a62c26047..d1c0067064 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 = "Test04"; efi-capsule { @@ -165,4 +166,5 @@ }; }; }; +#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 80b12977d6..b5abd7ab45 100644 --- a/test/py/tests/test_efi_capsule/conftest.py +++ b/test/py/tests/test_efi_capsule/conftest.py @@ -88,6 +88,13 @@ def efi_capsule_data(request, u_boot_config): check_call('cp %s/Test* %s' % (u_boot_config.build_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)