Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts: Add invariant log closing #86306

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LukaszMrugala
Copy link
Collaborator

If Twister or Black Box tests failed, crashed, etc., log handles could linger and crash test cleanup.
Adding log closing to a finally section should prevent those issues.

Loggers should not be set up as globals, as it makes testing much harder.
Running multiple Twisters may cause for the logfiles to be still "in use".

When exiting main, close all logfiles and remove their handlers from all loggers.
Do that for conftest as well.

If BB tests failed, crashed, etc., log handles
could linger and crash test cleanup.
Adding log closing to a `finally` section
should prevent those issues.

Loggers should not be set up as globals,
as it makes testing much harder.
Running multiple Twisters may cause for the
logfiles to be still "in use".

When exiting main, close all logfiles
and remove their handlers from all loggers.
Do that for conftest as well.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
@LukaszMrugala
Copy link
Collaborator Author

Vaguely related to #86240?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants