>No, that is definitely going to just mask the problem.
>
>These tests are designed to detect problems which will cause us "pain"
>later. The hashes are designed to be stable to whether something is
>built as a multiconfig or not shouldn't change its hashes. The tests
>are warning us that this is happening so we need to fix that.

Thanks, I think I already found the solution. I need to add the mc prefix before it is written to __BBHANDLERS variable and now I don't see any metadata hashes changing on test. I will submit a patch after oe-selftest for multiconfig finishes with success.

@@ -259,6 +259,9 @@ class BBHandlerNode(AstNode):
     def eval(self, data):
         bbhands = data.getVar('__BBHANDLERS', False) or []
         for h in self.hs:
+            if data.getVar('BB_CURRENT_MC', False):
+                h = data.getVar('BB_CURRENT_MC', False) + h
+             bbhands.append(h)
             data.setVarFlag(h, "handler", 1)
         data.setVar('__BBHANDLERS', bbhands)

Best regards,
Tomasz Dziendzielski

pt., 5 lut 2021 o 15:42 Richard Purdie <richard.purdie@linuxfoundation.org> napisał(a):
On Fri, 2021-02-05 at 15:26 +0100, Tomasz Dziendzielski wrote:
> I can already see the bitbake test failed, after adding "if d" it
> passed. Sorry that I forgot to run tests before submitting a patch.
> Another thing, I ran locally oe-selftest -r multiconfig and build
> fails with "When reparsing %s, the basehash value changed from %s to
> %s. The metadata is not deterministic and this needs to be fixed".
> During the build it appeared only if I made changes to the code
> during the build. Here it's most probably caused because of events'
> handlers renaming.

That is going to be a problem, we need to make sure the hashes are
deterministic.

> Do you think there is some way to handle this issue or I should just
> add:
>          ignore_mismatch = ((d.getVar("BB_HASH_IGNORE_MISMATCH") or
> '') == '1')
> +        if d.getVar("__BBMULTICONFIG", False):
> +            ignore_mismatch = True
> to bitbake/lib/bb/siggen.py?

No, that is definitely going to just mask the problem.

These tests are designed to detect problems which will cause us "pain"
later. The hashes are designed to be stable to whether something is
built as a multiconfig or not shouldn't change its hashes. The tests
are warning us that is happening so we need to fix that.

Cheers,

Richard