From a9eb80b1a2a737a1432ab0260cc4140ae38cc739 Mon Sep 17 00:00:00 2001 From: Steffen Eiden Date: Wed, 16 Apr 2025 12:57:40 +0200 Subject: [PATCH] pvattest: Fix successful 'check' evaluation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Invert the polarization of the successful state. The checks are considered to be successful if there are no issues. Therefore, test for an empty issue list and not for a non-empty. Fixes: 697dcc0f6bbf ("rust/pvattest: Add check command") Reported-by: Reinhard Buendgen Reviewed-by: Jan Höppner Reviewed-by: Marc Hartmayer Signed-off-by: Steffen Eiden Signed-off-by: Jan Höppner --- rust/pvattest/src/cmd/check.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/pvattest/src/cmd/check.rs b/rust/pvattest/src/cmd/check.rs index d2b1a6cc..5a10b650 100644 --- a/rust/pvattest/src/cmd/check.rs +++ b/rust/pvattest/src/cmd/check.rs @@ -129,7 +129,7 @@ pub fn check(opt: &CheckOpt) -> Result { firmware_check.check(&mut issues); let res = CheckResult { - successful: !issues.is_empty(), + successful: issues.is_empty(), issues, image_host_key, attest_host_key,