* [PATCH] oeqa/targetcontrol: Attempt to fix log closure warning message
@ 2020-07-03 10:35 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2020-07-03 10:35 UTC (permalink / raw)
To: openembedded-core
We continue to see the warning message:
WARNING: lib/bb/daemonize.py:76: ResourceWarning: unclosed file <_io.TextIOWrapper
name='build/tmp/work/qemux86_64-poky-linux/oe-selftest-image/1.0-r0/testimage/qemurunner_log.20200703011821'
mode='a' encoding='UTF-8'>
I've been unable to reprodue this but believe its caused by garbage
collection of the FileHandler used in QemuTarget being delayed until
after a new tinfoil instance is created by a subseqent test.
Force the log file to be closed when we stop using it to avoid this.
[YOCTO #13961]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/lib/oeqa/targetcontrol.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py
index 7bbba6016b2..19f5a4ea7e9 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -187,6 +187,7 @@ class QemuTarget(BaseTarget):
except:
pass
self.logger.removeHandler(self.loggerhandler)
+ self.loggerhandler.close()
self.connection = None
self.ip = None
self.server_ip = None
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-03 10:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-03 10:35 [PATCH] oeqa/targetcontrol: Attempt to fix log closure warning message Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.