[oe-commits] [openembedded-core] 03/09: HACK: signing: Add extra test debug

git at git.openembedded.org git at git.openembedded.org
Sun Mar 8 08:21:53 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 06b497703af74847b912dd93abd6bf85cfa88eab
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Dec 4 20:20:52 2019 +0000

    HACK: signing: Add extra test debug
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oe/sstatesig.py                |  6 ++++++
 meta/lib/oeqa/selftest/cases/signing.py | 16 +++++++++++++++-
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index d24e373..9db1a20 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -105,6 +105,8 @@ class SignatureGeneratorOEBasicHashMixIn(object):
         self.unlockedrecipes = { k: "" for k in self.unlockedrecipes }
         self.buildarch = data.getVar('BUILD_ARCH')
         self._internal = False
+        self.tempdebug = bool(data.getVar("TEMPDEBUG"))
+
         pass
 
     def tasks_resolved(self, virtmap, virtpnmap, dataCache):
@@ -192,10 +194,14 @@ class SignatureGeneratorOEBasicHashMixIn(object):
                 self.lockedhashes[tid] = h_locked
                 self._internal = True
                 unihash = self.get_unihash(tid)
+                uh2 =  self._get_unihash(tid)
                 self._internal = False
                 #bb.warn("Using %s %s %s" % (recipename, task, h))
+                if self.tempdebug and recipename == "ed":
+                    bb.warn("Using %s %s %s %s %s %s %s %s" % (recipename, task, h, h_locked, unihash, uh2, self.unihash[tid], self.taskhash[tid]))
 
                 if h != h_locked and h_locked != unihash:
+                    bb.warn("Mismatch warning")
                     self.mismatch_msgs.append('The %s:%s sig is computed to be %s, but the sig is locked to %s in %s'
                                           % (recipename, task, h, h_locked, var))
 
diff --git a/meta/lib/oeqa/selftest/cases/signing.py b/meta/lib/oeqa/selftest/cases/signing.py
index 202d549..58f7efa 100644
--- a/meta/lib/oeqa/selftest/cases/signing.py
+++ b/meta/lib/oeqa/selftest/cases/signing.py
@@ -191,6 +191,7 @@ class LockedSignatures(OESelftestTestCase):
 
         feature = 'require %s\n' % locked_sigs_file
         feature += 'SIGGEN_LOCKEDSIGS_TASKSIG_CHECK = "warn"\n'
+        feature += 'TEMPDEBUG = "1"\n'
         self.write_config(feature)
 
         # Build a locked recipe
@@ -221,4 +222,17 @@ class LockedSignatures(OESelftestTestCase):
         patt = r'The %s:do_package sig is computed to be \S+, but the sig is locked to \S+ in SIGGEN_LOCKEDSIGS\S+' % test_recipe
         found_warn = re.search(patt, ret.output)
 
-        self.assertIsNotNone(found_warn, "Didn't find the expected warning message. Output: %s" % ret.output)
+        extradebug = ""
+        if not found_warn:
+            #extradebug = bitbake(test_recipe + " -e").output
+            extradebug = runCmd('cat bitbake-cookerdaemon.log').output
+            extradebug += bitbake(test_recipe + " -S none").output
+            extradebug += runCmd('ls -la tmp/stamps/*/ed/*').output
+            feature = 'SUMMARY_${PN} = "test locked signature2%s"\n' % uuid.uuid4()
+            write_file(recipe_append_path, feature)
+            ret2 = bitbake(test_recipe)
+            found_warn2 = re.search(patt, ret2.output)
+            extradebug += "\nFound %s\n\n" % str(found_warn2)
+            extradebug += ret2.output
+
+        self.assertIsNotNone(found_warn, "Didn't find the expected warning message. Output: %s, Extra debug: %s" % (ret.output, extradebug))

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list