Thanks Ross. v2 sent: https://patchwork.yoctoproject.org/project/oe-core/patch/[email protected]/
- Switched the `devtool modify -x` extract dir to `with tempfile.TemporaryDirectory()`. - For the created layer's parent dir I kept `tempfile.mkdtemp()` + `track_for_cleanup()` instead of a `with` block. `OESelftestTestCase.tearDown()` runs the queued teardown commands - including `bitbake-layers remove-layer` - before it deletes `track_for_cleanup()` paths. A body-scoped `with` deletes the layer directory when the test method returns, i.e. before `tearDown` runs, so `remove-layer` then fails on a `bblayers.conf` that points at a missing layer. I confirmed this with an actual oe-selftest run: teardown fails with the `with` form and is clean with `mkdtemp()` + `track_for_cleanup()`. I also added `|| true` to that `remove-layer`, matching the existing devtool tests. - Dropped the `bitbake -c cleansstate` call as you noted - the test only does `devtool modify`, so it wasn't doing anything. Verified on current master: `test_devtool_modify_kernel_cfg_subdirs PASSED`, no teardown warnings. On Mon, Jun 22, 2026 at 10:52 PM Ross Burton <[email protected]> wrote: > On 18 Jun 2026, at 10:17, Siva Balasubramanian via lists.openembedded.org > <[email protected]> wrote: > > + tempparentdir = tempfile.mkdtemp(prefix='devtoolqa') > > + self.track_for_cleanup(tempparentdir) > > I know that this is what other tests so, but using “with > tempfile.TemporaryDirectory(…)” is neater. > > > + bitbake('%s -c cleansstate' % realrecipe) > > There should be no reason to call cleansstate. This is usually a proxy > for “I want to cause this recipe to rebuild” which can be done with > "bitbake -C unpack [recipe]”, but as this test just does a ‘devtool modify’ > I’m not sure what it’s achieving? > > > + tempdir = tempfile.mkdtemp(prefix='devtoolqa') > > + self.track_for_cleanup(tempdir) > > As above. > > Ross -- Sivakumar B
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#239490): https://lists.openembedded.org/g/openembedded-core/message/239490 Mute This Topic: https://lists.openembedded.org/mt/119864379/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
