From mboxrd@z Thu Jan 1 00:00:00 1970 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 345B2C46CA2 for ; Fri, 15 Dec 2023 09:39:28 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web11.59369.1702633167836450727 for ; Fri, 15 Dec 2023 01:39:27 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=EC5zxsiJ; spf=pass (domain: savoirfairelinux.com, ip: 208.88.110.44, mailfrom: alassane.yattara@savoirfairelinux.com) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 37EA19C3644 for ; Fri, 15 Dec 2023 04:39:27 -0500 (EST) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id xOGCOFL_w_5c; Fri, 15 Dec 2023 04:39:26 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id E3EFB9C279C; Fri, 15 Dec 2023 04:39:26 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com E3EFB9C279C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1702633166; bh=BkeybDozN5OZVIQ0bVa2lGke12WHwRHsSfwhz4Ulb6c=; h=From:To:Date:Message-Id:MIME-Version; b=EC5zxsiJNJ9ZMPUIqoYrAiUOOeg7BnM6n8yohVH8R9bgkBnx11Y2nwRYsHcmaJjQL pf+Ja/jaH1Pl5nsc+7qe04jWRi+eK+az4a4fklXuBt79CvFFtQbx2h2UH305jkvGIp QM0CGTKheTFlth2fr2fXVZEUx8JaSdnQWLwzd3sdKyvC+RKzLi2VUIen31XJO9kqZb 0/cycFFQxeRxyEzr098Vmy6UK32baxkYQ9tZWb2svmbEV8dZO1V3aHwNLTg4O/jrYe 1evejGbDx36eSLmw19mjXTB4CR/r8FgZqkuoxAiiWHM/oibXod2tVXweeGFCypSWtk c6vqvSyKJV7rA== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id 5y7DYelyPFoe; Fri, 15 Dec 2023 04:39:26 -0500 (EST) Received: from jedi.. (unknown [196.127.183.75]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 1765B9C3453; Fri, 15 Dec 2023 04:39:25 -0500 (EST) From: Alassane Yattara To: toaster@lists.yoctoproject.org Cc: Alassane Yattara Subject: [PATCH v3 2/5] toaster/test: Handle ProcessLookupError, log warning in console Date: Fri, 15 Dec 2023 10:39:16 +0100 Message-Id: <20231215093919.100274-2-alassane.yattara@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231215093919.100274-1-alassane.yattara@savoirfairelinux.com> References: <20231215093919.100274-1-alassane.yattara@savoirfairelinux.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 15 Dec 2023 09:39:28 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/toaster/message/6110 Note: While addressing warnings on the autobuilder, we encountered releva= nt warnings where attempts were made to terminate processes that were not running. To enhance visibility, we have opted to catch the ProcessLookupError exce= ption and log a warning in the console rather than suppressing it. Signed-off-by: Alassane Yattara --- lib/toaster/tests/commands/test_runbuilds.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/toaster/tests/commands/test_runbuilds.py b/lib/toaster/t= ests/commands/test_runbuilds.py index 738d36e9..849c227e 100644 --- a/lib/toaster/tests/commands/test_runbuilds.py +++ b/lib/toaster/tests/commands/test_runbuilds.py @@ -22,8 +22,6 @@ import signal import logging =20 =20 -logger =3D logging.getLogger("toaster") - class KillRunbuilds(threading.Thread): """ Kill the runbuilds process after an amount of time """ def __init__(self, *args, **kwargs): @@ -43,7 +41,7 @@ class KillRunbuilds(threading.Thread): pid =3D pidfile.read() os.kill(int(pid), signal.SIGTERM) except ProcessLookupError: - logger.warning("Runbuilds not running or already killed") + logging.warning("Runbuilds not running or already killed") =20 =20 class TestCommands(TestCase): --=20 2.34.1