selftest/tinfoil: fix a race condition
PATCH 1/1 selftest/tinfoil: fix a race condition
Both test_parse_recipe_initial_datastore and the preceding test operate on the same recipe, and both change recipe metadata and re-parse it. In some situations bitbake backend from the first test is catching the change done by the second test and interprets it as non-deterministic metadata (not sure if this sentence is entirely technically correct though :).
The easiest way to avoid is to make the tests operate on two different recipes.
[YOCTO #13812]
--- meta/lib/oeqa/selftest/cases/tinfoil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/selftest/cases/tinfoil.py +1 -1
@@ -68,7 +68,7 @@ class TinfoilTests(OESelftestTestCase): def test_parse_recipe_initial_datastore(self): with bb.tinfoil.Tinfoil() as tinfoil: tinfoil.prepare(config_only=False, quiet=2) - testrecipe = 'mdadm' + testrecipe = 'psplash' best = tinfoil.find_best_provider(testrecipe) if not best: self.fail('Unable to find recipe providing %s' % testrecipe)
Signature · 1 line
2.25.1
Quoted 8 lines · Alexander Kanavin
Both
test_parse_recipe_initial_datastoreand the preceding test operate on the same recipe, and both change recipe metadata and re- parse
it. In some situations bitbake backend from the first test is catching the change done by the second test and interprets it as non-deterministic metadata (not sure if this sentence is entirely technically correct though :).
Quoted 4 lines
The easiest way to avoid is to make the tests operate on two different recipes.
[YOCTO #13812]
I'm not sure its this simple unfortunately.
The big question is whether injected changes from the first "session" should persist into the second "session" or whether things should be reset to a consistent state between them.
Yes, this will fix the test but I'm not sure its fixing the underlying problem :(
Cheers,
Richard
Quoted 23 lines
Signed-off-by Alexander Kanavin <[email protected]>--- meta/lib/oeqa/selftest/cases/tinfoil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/lib/oeqa/selftest/cases/tinfoil.py +1
-1@@ -68,7 +68,7 @@ class TinfoilTests(OESelftestTestCase): def test_parse_recipe_initial_datastore(self): with bb.tinfoil.Tinfoil() as tinfoil: tinfoil.prepare(config_only=False, quiet=2) - testrecipe = 'mdadm' + testrecipe = 'psplash' best = tinfoil.find_best_provider(testrecipe) if not best: self.fail('Unable to find recipe providing %s' %testrecipe)
Signature · 1 line
2.25.1
Quoted 9 lines · Richard Purdie
I'm not sure its this simple unfortunately.
The big question is whether injected changes from the first "session" should persist into the second "session" or whether things should be reset to a consistent state between them.
Yes, this will fix the test but I'm not sure its fixing the underlying problem :(
There's nothing else that can be done on the test side, and what goes on in the backend is way over my head, I'm afraid :-(
Alex