From patchwork Sat Oct 5 23:37:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Armin Wolf X-Patchwork-Id: 1993212 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XLhgF6SGwz1xtV for ; Sun, 6 Oct 2024 10:38:17 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1sxELd-0006qE-Pr; Sat, 05 Oct 2024 23:38:05 +0000 Received: from mout.gmx.net ([212.227.17.22]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1sxELb-0006pq-Ny for fwts-devel@lists.ubuntu.com; Sat, 05 Oct 2024 23:38:03 +0000 X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from mx-amd-b650.users.agdsn.de ([141.30.226.129]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MLQxX-1tF2JV3xQZ-00N6BU for ; Sun, 06 Oct 2024 01:38:03 +0200 From: Armin Wolf To: fwts-devel@lists.ubuntu.com Subject: [PATCH 1/2] lib: fwts_acpi_object_eval: Do not return FWTS_OK if method lookup fails Date: Sun, 6 Oct 2024 01:37:57 +0200 Message-Id: <20241005233758.708112-1-W_Armin@gmx.de> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-Provags-ID: V03:K1:vVNd8KjwldHoJ3+I4I8o5HtX4SEz5+aTPuLlgVj1hm7YEvl45jq nROT0Pu1zf//cHFkhgfhRZGUh1drQg1fBaakIiQggFUFwSbT7wiGaw3wDSvz2+ZLbbrSqN2 IJV2iqcIGrp3gQ2i/Zs31SGfhTzZpeINlIqneyBpma0eWaneOZUNLeSOUGYDihihv49fE2/ ird5MI93ECC0Id5J4viJw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:EXYapqQvwSc=;FbpW5F1z4glWZQnDMC5cauURUjM jxdciMxq4o4qrKQQS3ws6M1u+lZ/PIO8YT3U31N8qg3WRaHnnsj9V31AJMrNu+almBsRc/FLd EsJqJ4Os65GV29JJNsYwx+KLel4O1uFHOMFzacIYo51mQEq26bXvzkeIEyNkdgXg4HEoXkod+ kxCu5FM2IDzvunbLNy610dm2U34FtPjKEHPRuIli8vNKIRhlgmaUvWM5nn4y1gcf4qJzXmUdv dXgGiK+m2wuugVoheMBr9RrErvNrWn3q2WujrSMwo+AqgqUkFvvdczFpZ0z+d/ZVOhRhaPApQ vxXXkIf7q/x0xkGRc0xROjbLhhtB8SSEiYazeSzFe1ev48opFKbHdHRErU1N/eS7tfAyF8zR/ FZBp6PxvkwqZVX6slMgOs46nynSgxk6Cd43XAgCMkTPDGfIc5Z7c6/64NEuslTG4rKN2lFaby l40N2+9yQtKEcboPedbHBGfcMFWFP3A/Yc3lmS+m3967Er95MNYBVjh0skXqn9J48iFetwuTT uLavB5ZR2mOwZfwiFxh6r87QctmaQTaIUjk9fbmUs3ZK0MH23QSsTX4ybBBYHAOVFc1sGM0Nm 16GTwsUTkRRMwfj6cHtCwTciU6MX7AensYivCsl1FsbmlD3AAmk7ADY8dKU2hIt2bxbb+5Er6 6GYvi2Qg9wmFi32Gni+rYY+MJNWzSXKdS4HBd8a8mMc/yGsRHyLo3er2LwXxvNo7YXJ5vC/Vp bbFcFIzGxLO/yXm4IOJ3sTwAI+p21NIgNTe6kU/ejfMrc+s4qDuoTGtLZNGAiuIIPnGxeiUWP IDkRb/tfqm6B8rdPZ6aXLGRQ== Received-SPF: pass client-ip=212.227.17.22; envelope-from=W_Armin@gmx.de; helo=mout.gmx.net X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" If for some reason the lookup of an ACPI method fails with an error different than AE_NOT_FOUND, FWTS_OK is returned. Fix this by instead returning FWTS_ERROR in such cases. Signed-off-by: Armin Wolf Acked-by: Ivan Hu --- src/lib/src/fwts_acpi_object_eval.c | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.39.5 diff --git a/src/lib/src/fwts_acpi_object_eval.c b/src/lib/src/fwts_acpi_object_eval.c index 37f67eb8..1c2de735 100644 --- a/src/lib/src/fwts_acpi_object_eval.c +++ b/src/lib/src/fwts_acpi_object_eval.c @@ -1222,6 +1222,13 @@ int fwts_evaluate_method(fwts_framework *fw, } } + if (ACPI_FAILURE(status)) { + const char *exception = AcpiFormatException(status); + fwts_log_info(fw, "ACPICA Exception %s during lookup of method %s", + exception, name); + return FWTS_ERROR; + } + return FWTS_OK; }