[OE-core] [PATCH] selftest/tinfoil: fix a race condition

Richard Purdie richard.purdie at linuxfoundation.org
Sat Feb 29 21:39:29 UTC 2020


On Sat, 2020-02-29 at 20:47 +0100, Alexander Kanavin wrote:
> 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]

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

> Signed-off-by: Alexander Kanavin <alex.kanavin at gmail.com>
> ---
>  meta/lib/oeqa/selftest/cases/tinfoil.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/lib/oeqa/selftest/cases/tinfoil.py
> b/meta/lib/oeqa/selftest/cases/tinfoil.py
> index 42a1b6b4f4..1bbb7eeec7 100644
> --- a/meta/lib/oeqa/selftest/cases/tinfoil.py
> +++ b/meta/lib/oeqa/selftest/cases/tinfoil.py
> @@ -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)
> -- 
> 2.25.1
> 



More information about the Openembedded-core mailing list