From: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
To: bitbake-devel@lists.openembedded.org
Cc: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Subject: [PATCH 2/4] toaster/test: Handle ProcessLookupError, log warning in console
Date: Tue, 12 Dec 2023 15:17:06 +0100 [thread overview]
Message-ID: <20231212141708.19395-2-alassane.yattara@savoirfairelinux.com> (raw)
In-Reply-To: <20231212141708.19395-1-alassane.yattara@savoirfairelinux.com>
Note: While addressing warnings on the autobuilder, we encountered relevant warnings
where attempts were made to terminate processes that were not running.
To enhance visibility, we have opted to catch the ProcessLookupError exception
and log a warning in the console rather than suppressing it.
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
---
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/tests/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
-logger = 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 = 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")
class TestCommands(TestCase):
--
2.34.1
next prev parent reply other threads:[~2023-12-12 14:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 14:17 [PATCH 1/4] toaster/test: bug-fix element click intercepted in browser/test_layerdetails_page.py Alassane Yattara
2023-12-12 14:17 ` Alassane Yattara [this message]
2023-12-12 14:17 ` [PATCH 3/4] toaster/test: fix Copyright Alassane Yattara
2023-12-12 14:17 ` [PATCH 4/4] toaster/test: Fixes functional tests warning on autobuilder Alassane Yattara
2023-12-13 13:58 ` [bitbake-devel] " Richard Purdie
2023-12-13 14:13 ` Alassane Yattara
2023-12-13 14:30 ` Alassane Yattara
2023-12-12 20:21 ` [bitbake-devel] [PATCH 1/4] toaster/test: bug-fix element click intercepted in browser/test_layerdetails_page.py Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231212141708.19395-2-alassane.yattara@savoirfairelinux.com \
--to=alassane.yattara@savoirfairelinux.com \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).