]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
oeqa/selftest: Fix single threaded race issue
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 6 Oct 2025 13:09:02 +0000 (14:09 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 8 Oct 2025 12:55:29 +0000 (13:55 +0100)
commita165bec28ffc75fd44b1fdb02a0d3a80c5a4769b
tree50df8b9167090dcbbbc5f54a7e7caf4f39743aa3
parent517666671ba2cc79b2ada3390d4ae0f2beb95caf
oeqa/selftest: Fix single threaded race issue

oe-selftest sets up separate build directories to run the tests in.
To to this, environment paths pointing at the previous build directory
are updated. In the multi-threaded case this is fine as the thread is
destroyed and the parent remains unchanged but in the single threaded
case, the environment is broken afterwards. This can mean we try and access
a directory which is in the process of being deleted (e.g. by clobberdir).

Restore the environment afterwards regardless to ensure the single threaded
case doesn't try and access the build directory which is now being deleted.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/context.py