]> code.ossystems Code Review - openembedded-core.git/commit
oeqa: tear down oeqa decorators if one of them raises an exception in setup
authorAlexander Kanavin <alex.kanavin@gmail.com>
Tue, 20 Apr 2021 17:32:58 +0000 (19:32 +0200)
committerSteve Sakoman <steve@sakoman.com>
Tue, 27 Apr 2021 14:35:09 +0000 (04:35 -1000)
commitd004c39ae70077c2c6f59afcfdecb6e9378cf692
treebf850ff5aea0e77d65105067ed79486752fe6905
parent1a1bce6d9a84d268fd2c0e87a33dc4591d792dd0
oeqa: tear down oeqa decorators if one of them raises an exception in setup

Some of the decorators need proper cleanup, such as OETimeout
which sets a signal handler that needs to be cleared via teardown.
If this is not done then the signal gets called later with unpredictable effects.

This can be seen if there's a test that is skipped via a decorator and sets a timeout
at the same time: the timeout isn't cleared, and is invoked later in a
completely unrelated context. The test case for this is added in the
next commit.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit f42a08e1aabf1ca57e0c09d69fb69cc717c7f156)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/lib/oeqa/core/case.py
meta/lib/oeqa/core/decorator/oetimeout.py