Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 7774AC43334 for ; Tue, 28 Jun 2022 05:14:16 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 378C7843D8; Tue, 28 Jun 2022 07:14:14 +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="ncXRZCGd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 79BF5843E3; Tue, 28 Jun 2022 07:14:12 +0200 (CEST) Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) (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 6049D8427E for ; Tue, 28 Jun 2022 07:14:09 +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-x62e.google.com with SMTP id n10so10107153plp.0 for ; Mon, 27 Jun 2022 22:14:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=xUfIvOgehsOPXUkczgZ5eVNKz+Eq3Ee1xQGsKsphyxU=; b=ncXRZCGdQyOZtmpIzkoIXyLkYup+ohbxBB7Yy0C7bbEZV48t/ApyqQvGeekUyjRX+P 82SaYzQsYu57oMI/xDf7RI+pmLskbAnTIQU+MQEHKUSH4z7YbU/W+T1P7yFyfzXZQ0g1 3cxlYs1ImSO6CTSlw5YOTbR51nuzUtSEAuUetVZhL/ZTpOoSxRCRgwVBfjYzJxOGoQxj /P/mo5PVIq+lb2xXgvAdDjNdZabAAMWihcnLcxHGqB7buu/1PPhkMuFLQtzsDVfavAyM nqN9MYV+3VJQTs1E4OSqKqKu9tY8o8eKtjzm2uCpxja8We6G4jWP3cScuab3D79xXqif qklA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=xUfIvOgehsOPXUkczgZ5eVNKz+Eq3Ee1xQGsKsphyxU=; b=5TtEo0shejSGS6D00MHNj3L8yx8z7kjFkB809UbLdOXWjs8EZUKh+yBka3tnSo1jKF 3KscYcqZmoQQabkcHoNn0kJKB0LQdSTk/9IsJYs7TFAXznGZxYY/7BoTscmX9edJHWcQ TvsWSLvlTIRj5PzSpYrxU63iExJFwvNkxOuE7FAaCSdk5na0KNFHVtg5OlRY8cUGqw3n vNVpMjsxJNgxQVzwqZ49rTzhKWaton0jzUlZb6Vfot4dQrZv0lr1sINr2sK0QUDIqpkY hSwZNIyL0kNffTiFFr6WDBAASxlUCR6GF+dwABgDZieYXvz0bIfgz8xIMWDapQCptN3r rHoA== X-Gm-Message-State: AJIora8UAV3LHcGapAovTradpp+XeDeQi3pBrhoDFY0noZWDT8VVSQAl uQFGfgCYVHJ8CwrFm2pJ/YJa9g== X-Google-Smtp-Source: AGRyM1sGFQ5SJHqtlD2M8TWtcFMiwp+rcFThDHqzsRmbIFyENwATwpphoODxbenONIG+aZvRSKEVQg== X-Received: by 2002:a17:90b:314a:b0:1ed:3b95:9688 with SMTP id ip10-20020a17090b314a00b001ed3b959688mr19100795pjb.18.1656393247619; Mon, 27 Jun 2022 22:14:07 -0700 (PDT) Received: from laputa ([2400:4050:c3e1:100:f10c:7996:55bb:3621]) by smtp.gmail.com with ESMTPSA id z5-20020a056a00240500b005255165be67sm8369607pfh.23.2022.06.27.22.14.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jun 2022 22:14:06 -0700 (PDT) Date: Tue, 28 Jun 2022 14:14:03 +0900 From: AKASHI Takahiro To: Heinrich Schuchardt Cc: Vincent Stehl?? , u-boot@lists.denx.de, Simon Glass Subject: Re: [PATCH] efi: test/py: repair authenticated capsules tests Message-ID: <20220628051403.GB58312@laputa> Mail-Followup-To: AKASHI Takahiro , Heinrich Schuchardt , Vincent Stehl?? , u-boot@lists.denx.de, Simon Glass References: <20220627102319.151491-1-vincent.stehle@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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.6 at phobos.denx.de X-Virus-Status: Clean Heinrich, On Mon, Jun 27, 2022 at 12:46:07PM +0200, Heinrich Schuchardt wrote: > On 6/27/22 12:23, Vincent Stehlé wrote: > > The UEFI console initialisation has been modified by commit 68edbed454b8 > > ("efi_loader: initialize console size late"). A corresponding workaround is > > now necessary for the automated tests, as added to some of the tests > > already by commit e05bd68ed5fc ("test: work around for EFI terminal size > > probing"). > > > > Add the same workaround to the UEFI authenticated capsules tests to repair > > them. > > > > This can be tested with sandbox_defconfig, sandbox64_defconfig or > > sandbox_flattree_defconfig, plus CONFIG_EFI_CAPSULE_AUTHENTICATE=y. > > > > Signed-off-by: Vincent Stehlé > > Why are these tests not run in Gitlab? > Can't we permanently adjust one of said defconfigs for this purpose? > Or do we need a new defconfig for testing? Because we cannot turn on or off capsule authentication dynamically on a single U-Boot image, we cannot test non-signed test cases and signed test cases simultaneously in CI. That is why I proposed a new config file for sandbox with EFI_CAPSULE_AUTHENTICATE, but the idea was rejected (if I remember correctly, by Simon). That said, I also made a small change to unsigned test cases (test_efi_capsule_firmware(_*).py) so that they can *pass* even with EFI_CAPSULE_AUTHENTICATE enabled. (As you can image, however, actual capsule update never happens in this test environment.) commit e012550cd7d6 ("test/py: efi_capsule: check the results in case of CAPSULE_AUTHENTICATE") -Takahiro Akashi > Best regards > > Heinrich > > > Cc: Heinrich Schuchardt > > --- > > .../tests/test_efi_capsule/test_capsule_firmware_signed_fit.py | 3 +++ > > .../tests/test_efi_capsule/test_capsule_firmware_signed_raw.py | 2 ++ > > 2 files changed, 5 insertions(+) > > > > diff --git a/test/py/tests/test_efi_capsule/test_capsule_firmware_signed_fit.py b/test/py/tests/test_efi_capsule/test_capsule_firmware_signed_fit.py > > index 4400b8f1368..d6ca9b16745 100644 > > --- a/test/py/tests/test_efi_capsule/test_capsule_firmware_signed_fit.py > > +++ b/test/py/tests/test_efi_capsule/test_capsule_firmware_signed_fit.py > > @@ -40,6 +40,7 @@ class TestEfiCapsuleFirmwareSignedFit(object): > > with u_boot_console.log.section('Test Case 1-a, before reboot'): > > output = u_boot_console.run_command_list([ > > 'host bind 0 %s' % disk_img, > > + 'printenv -e PlatformLangCodes', # workaround for terminal size determination > > 'efidebug boot add -b 1 TEST host 0:1 /helloworld.efi', > > 'efidebug boot order 1', > > 'env set -e -nv -bs -rt OsIndications =0x0000000000000004', > > @@ -115,6 +116,7 @@ class TestEfiCapsuleFirmwareSignedFit(object): > > with u_boot_console.log.section('Test Case 2-a, before reboot'): > > output = u_boot_console.run_command_list([ > > 'host bind 0 %s' % disk_img, > > + 'printenv -e PlatformLangCodes', # workaround for terminal size determination > > 'efidebug boot add -b 1 TEST host 0:1 /helloworld.efi', > > 'efidebug boot order 1', > > 'env set -e -nv -bs -rt OsIndications =0x0000000000000004', > > @@ -192,6 +194,7 @@ class TestEfiCapsuleFirmwareSignedFit(object): > > with u_boot_console.log.section('Test Case 3-a, before reboot'): > > output = u_boot_console.run_command_list([ > > 'host bind 0 %s' % disk_img, > > + 'printenv -e PlatformLangCodes', # workaround for terminal size determination > > 'efidebug boot add -b 1 TEST host 0:1 /helloworld.efi', > > 'efidebug boot order 1', > > 'env set -e -nv -bs -rt OsIndications =0x0000000000000004', > > diff --git a/test/py/tests/test_efi_capsule/test_capsule_firmware_signed_raw.py b/test/py/tests/test_efi_capsule/test_capsule_firmware_signed_raw.py > > index 1b5a1bb42eb..2bbaa9cc55f 100644 > > --- a/test/py/tests/test_efi_capsule/test_capsule_firmware_signed_raw.py > > +++ b/test/py/tests/test_efi_capsule/test_capsule_firmware_signed_raw.py > > @@ -112,6 +112,7 @@ class TestEfiCapsuleFirmwareSignedRaw(object): > > with u_boot_console.log.section('Test Case 2-a, before reboot'): > > output = u_boot_console.run_command_list([ > > 'host bind 0 %s' % disk_img, > > + 'printenv -e PlatformLangCodes', # workaround for terminal size determination > > 'efidebug boot add -b 1 TEST host 0:1 /helloworld.efi', > > 'efidebug boot order 1', > > 'env set -e -nv -bs -rt OsIndications =0x0000000000000004', > > @@ -189,6 +190,7 @@ class TestEfiCapsuleFirmwareSignedRaw(object): > > with u_boot_console.log.section('Test Case 3-a, before reboot'): > > output = u_boot_console.run_command_list([ > > 'host bind 0 %s' % disk_img, > > + 'printenv -e PlatformLangCodes', # workaround for terminal size determination > > 'efidebug boot add -b 1 TEST host 0:1 /helloworld.efi', > > 'efidebug boot order 1', > > 'env set -e -nv -bs -rt OsIndications =0x0000000000000004', >