From patchwork Mon Jan 21 11:43:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 156196 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp6281698jaa; Mon, 21 Jan 2019 03:44:14 -0800 (PST) X-Google-Smtp-Source: ALg8bN6k0Fe8MaxJKOqIcXQAgymJVUN2Pf7e1wAViYAmY0V9yzqBHmcL0FfgjGDuQtaTanfpTGFy X-Received: by 2002:a50:a246:: with SMTP id 64mr26902590edl.43.1548071053913; Mon, 21 Jan 2019 03:44:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548071053; cv=none; d=google.com; s=arc-20160816; b=UkdgaUdbAUJ1+LP+i4o5XkrE0Qgolzvo6WQ3P1JkgL/F3p/spbtm6RKXAkA8WgWSmz y17pk3fxID5taS8DbQVHt4T6qOyURCNQZaipaegKrGjYAqkHra4fgCeCtES7MtAkcneV qoCKM/eVRMYby/Ji2cgyB+S4VkCS6c7o9/mTUmpR0M4MuKA4M9xG5HISYF2VAaRiFJLk WuVoWUIOuecORr4+jcaBZ0Zd/vjedPz8gqBRAHA3rS/640iHBVbBbVn/6pMKnoc+awaO V688npt/1BPs16yZI9eNFtOw62Rkvp6MwHZHwEj3G94hbUB/CwhJr2wn1aIxX8DaFsp5 XbJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:references:in-reply-to:message-id:date:to:from; bh=uws6iJMX34WCNS6ZoJ9Ty9ys3Wcg+2FWuMbRdayjLmI=; b=qI/Yha19k0GoXWkKfgePVqXlVhjYm+wra3/s7+Ayr0vHyxj+QMpVoObTUAnOETKu1e xEZyE4/UvBD/uJBbLkQPv5ZriXyYM4RHyvxWxDtP0u5lJtKMcFqRkY1sfiC4Ysb2Qez/ tXMonTcL5SPIW/tvFjFV45qVH3bNgMnNnqfTGtYaC1XFGWpslNItBBkU4ZLDOUe8K8WN SKzogkq73e/Nq2RdHEM0gnbnxJAiABzoSzyeORVYTTxyByOfqW31fUAvmd/dvRoi7nmf 4YsV/UPyj4PX450gg/zLi1+ZI3HH/tP6pHo2F60GN/n+1Wh/7uPWTO8Cm3tbVNjW/pbh YzkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id w5si1808007edr.322.2019.01.21.03.44.13; Mon, 21 Jan 2019 03:44:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 824C6C21E13; Mon, 21 Jan 2019 11:43:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id D8A93C21E39; Mon, 21 Jan 2019 11:43:40 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C34BAC21BE5; Mon, 21 Jan 2019 11:43:36 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lists.denx.de (Postfix) with ESMTPS id 6BAF3C21C27 for ; Mon, 21 Jan 2019 11:43:36 +0000 (UTC) Received: from LT02.fritz.box ([84.118.159.3]) by mail.gmx.com (mrgmx102 [212.227.17.174]) with ESMTPSA (Nemesis) id 0LaJWs-1hV2PQ1mzm-00m4bP; Mon, 21 Jan 2019 12:43:34 +0100 From: Heinrich Schuchardt To: Alexander Graf Date: Mon, 21 Jan 2019 12:43:14 +0100 Message-Id: <20190121114314.15741-3-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190121114314.15741-1-xypron.glpk@gmx.de> References: <20190121114314.15741-1-xypron.glpk@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:bEqiwaysi3plLiLJic86gi5UaAla1C3OIRvovGm6/sA9lP0wIAp VVJK6Yai9fL9njnKxBpP21nHojzWR0v9mQ38usUoENbtAPk6a7NSF4M5Uk/Y1DcsVfMcqUp bnOKt+tWVRS3NWLMdhwHTs2JlKIrQfoV+OVKiIkK1RGjn/h3BrnBbg3nwWhJc1oD6MnJ8h5 ovMLTs3myYXkHAbebwRHA== X-UI-Out-Filterresults: notjunk:1; V03:K0:VzPRYMORMr4=:3AEKMO9Sz6KHXk5vukYHbW 4bTWxtFFEXvpjkaoLWZugkwywg8bCO9DKT3Jv/MIonqiBMqri9Nt5dPqNeloQ2rY819qIiZBG HECnc0UGWSo6DgJlgn3jwGjxStigXknc+pJVguUEAoGFMMdXIPGQvN5xNQf2VtHhzjvseZoPo wgfpnQ1aU0YO+Fpj17G4yplAUcV6myOXzs8NSKSbfuPwYhAFo7kySubEH1EEOxm2fb2pK5kHU GTBWVi/DnxxgHpqr/DX6TpRt/iZ3nNb/DtQwjUTfQiDz/MrteGFGSwYDz7K9n884NV0SQUl26 QUhTwKRTCgxiwjOark/Dk0V2lgR8HxQi9BLVuL4+QYlRHthROtA2bv/17BCMu4QnDrSU6S2jM eAcB7aJD0Z+VXCm/mUchOrtvng9bBo2UKHV7aGCMdJyslJsA+t+FaVSqscaJcLYy/SZ9ljdUd zehAamVq5fWCyQDCXvj9mfmzIsiNco6cCNIJKGmtn6d+wxpp9hSmGLlT15mhagNrxLnugYc1y ozxg+NdN2wQW8K3aBhzTDsFCInUjEkZhmoCEA1WUgOSgWvNTJPp6qPMZF79iUQuxNdWGveo6X eCPOEgM+knaVvBPzF0aSDOaV+o8KVHc6RWriP9Hs3zEfwzHlQpcYb2oNUUIR7617pnsW/IOSU gvYfl1Td16X2Nsaw7TabVWN/cmvym0nUGn2M0IYT/xJt1+OElBivJREu0FCwdYBJMBHPD0uR7 Db6XtaInTBHdJYhNA8KTpGgKALr172VBKyzjIQvdByFkWW7zF4D8c42w12zEQTEpUuOZIQ+T0 PIiQgUfBpCvbfU8sPRj3pGGnz6sg934jdLIa4I57pwZ3ZDOHn/27ECSqWEfsvW36IOFJlE8ae rQHAS2lEOkOm9EQB9F9o/2dRP5roAcZ7u+s8W3AZpu0B3zVnU1bf5hKpjXgBdS Cc: u-boot@lists.denx.de, Heinrich Schuchardt , trini@konsulko.com Subject: [U-Boot] [PATCH v3 2/2] efi_selftest: fix variables test for GetNextVariableName() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" From: AKASHI Takahiro There is a bug in efi variables test. Fix it with some cosmetic improvements. Please note that efi variables test still fails at QueryVariableInfo() and GetVariable(), but this is not due to a change in this patch. ==8<== Testing EFI API implementation Selected test: 'variables' Setting up 'variables' Setting up 'variables' succeeded Executing 'variables' .../u-boot/lib/efi_selftest/efi_selftest_variables.c(60): TODO: QueryVariableInfo failed .../u-boot/lib/efi_selftest/efi_selftest_variables.c(131): TODO: GetVariable returned wrong length 7 .../u-boot/lib/efi_selftest/efi_selftest_variables.c(133): TODO: GetVariable returned wrong value Executing 'variables' succeeded Boot services terminated Summary: 0 failures ==>8== Signed-off-by: AKASHI Takahiro Reviewed-by: Heinrich Schuchardt --- v3 no change v2 no change --- lib/efi_selftest/efi_selftest_variables.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/efi_selftest/efi_selftest_variables.c b/lib/efi_selftest/efi_selftest_variables.c index ffc8cad329..47a8e7fb95 100644 --- a/lib/efi_selftest/efi_selftest_variables.c +++ b/lib/efi_selftest/efi_selftest_variables.c @@ -141,19 +141,22 @@ static int execute(void) if (ret == EFI_NOT_FOUND) break; if (ret != EFI_SUCCESS) { - efi_st_todo("GetNextVariableName failed\n"); - break; + efi_st_error("GetNextVariableName failed (%u)\n", + (unsigned int)ret); + return EFI_ST_FAILURE; } if (!efi_st_memcmp(&guid, &guid_vendor0, sizeof(efi_guid_t)) && !efi_st_strcmp_16_8(varname, "efi_st_var0")) - flag |= 2; + flag |= 1; if (!efi_st_memcmp(&guid, &guid_vendor1, sizeof(efi_guid_t)) && !efi_st_strcmp_16_8(varname, "efi_st_var1")) flag |= 2; } - if (flag != 3) - efi_st_todo( + if (flag != 3) { + efi_st_error( "GetNextVariableName did not return all variables\n"); + return EFI_ST_FAILURE; + } /* Delete variable 1 */ ret = runtime->set_variable(L"efi_st_var1", &guid_vendor1, 0, 0, NULL);