Warning message appear during runing oe-selftest. These warning messages appear at 2 test cases. - oeqa.selftest.devtool.DevtoolTests - oeqa.selftest.recipetool.RecipetoolTests The warning messages as follows: test_devtool_update_recipe_local_files (oeqa.selftest.devtool.DevtoolTests) ... OK (44.602s)WARNING: /home/ab/yocto-worker/nightly-oe-selftest/build/bitbake/lib/bb/parse/ast.py:40: ResourceWarning: unclosed file <_io.TextIOWrapper name=20 mode='w' encoding='UTF-8'> self.filename = filename test_recipetool_create (oeqa.selftest.recipetool.RecipetoolTests)WARNING: /home/ab/yocto-worker/nightly-oe-selftest/build/bitbake/lib/bb/cache.py:449: ResourceWarning: unclosed file <_io.TextIOWrapper name=23 mode='w' encoding='UTF-8'> value = pickled.load() WARNING: /home/ab/yocto-worker/nightly-oe-selftest/build/bitbake/lib/bb/cache.py:449: ResourceWarning: unclosed file <_io.TextIOWrapper name=23 mode='w' encoding='UTF-8'> value = pickled.load() WARNING: /home/ab/yocto-worker/nightly-oe-selftest/build/bitbake/lib/bb/data_smart.py:598: ResourceWarning: unclosed file <_io.TextIOWrapper name=23 mode='w' encoding='UTF-8'> self.overridedata[shortvar] = list(self.overridedata[shortvar]) WARNING: /home/ab/yocto-worker/nightly-oe-selftest/build/bitbake/lib/bb/parse/ast.py:40: ResourceWarning: unclosed file <_io.TextIOWrapper name=23 mode='w' encoding='UTF-8'> self.filename = filename
Just to update, I don't think it is these two test cases which trigger this, the warning sometimes appears and sometimes does not. It seems to be of a much reduced frequency compared to when this was originally reported and the traceback isn't accurate, we can't tell what the original file was :(. I'd love it if someone had a reliable reproducer for this, without one we're a bit stuck to know where this is coming from.
Since these and various other fixes, we've not seen these warnings: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=df63ae7edd544c5d86b549345ad1ca1c9deacc41 http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=f33fb239d60953aa3014bf694ab6d115054e5ab5 (this is only ever likely to be totally fixed in master)