Skip to contentSkip to conversation

sstatetests: Add OLDEST_KERNEL to allarch tests

PATCH New Richard Purdie 1 participant 2 messages Jan 11, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 sstatetests: Add OLDEST_KERNEL to allarch tests

Some architectures vary OLDEST_KERNEL and this shouldn't change the allarch signatures but in current OE-Core can/does. Add differing values to the test configs to ensure we catch this in future (we want to keep a 32 and 64 bit machine here to test that as well).

---
 meta/lib/oeqa/selftest/cases/sstatetests.py | 2 ++
 1 file changed, 2 insertions(+)
meta/lib/oeqa/selftest/cases/sstatetests.py +2 -0
index 2be96f1781b..70ef10cda53 100644
@@ -342,10 +342,12 @@ TCLIBCAPPEND = \"\"
 MACHINE = \"qemux86-64\"
 BB_SIGNATURE_HANDLER = "OEBasicHash"
 """
+        #OLDEST_KERNEL is arch specific so set to a different value here for testing
         configB = """
 TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\"
 TCLIBCAPPEND = \"\"
 MACHINE = \"qemuarm\"
+OLDEST_KERNEL = \"3.3.0\"
 BB_SIGNATURE_HANDLER = "OEBasicHash"
 """
         self.sstate_allarch_samesigs(configA, configB)
Signature · 1 line
2.32.0
#1 lore raw

PATCH 2/2 oeqa/sstate: Fix allarch samesigs test

The allarch sstate sigs test is supposed to compare the allarch sigs but does not. Fix this.

Also rename the common function to make it clear it isn't just used by the allarch test.

---
 meta/lib/oeqa/selftest/cases/sstatetests.py | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
meta/lib/oeqa/selftest/cases/sstatetests.py +10 -3
index 70ef10cda53..96b2d115ed7 100644
@@ -350,7 +350,7 @@ MACHINE = \"qemuarm\"
 OLDEST_KERNEL = \"3.3.0\"
 BB_SIGNATURE_HANDLER = "OEBasicHash"
 """
-        self.sstate_allarch_samesigs(configA, configB)
+        self.sstate_common_samesigs(configA, configB, allarch=True)
 
     def test_sstate_nativesdk_samesigs_multilib(self):
         """
@@ -374,9 +374,9 @@ require conf/multilib.conf
 MULTILIBS = \"\"
 BB_SIGNATURE_HANDLER = "OEBasicHash"
 """
-        self.sstate_allarch_samesigs(configA, configB)
+        self.sstate_common_samesigs(configA, configB)
 
-    def sstate_allarch_samesigs(self, configA, configB):
+    def sstate_common_samesigs(self, configA, configB, allarch=False):
 
         self.write_config(configA)
         self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash")
@@ -404,6 +404,13 @@ BB_SIGNATURE_HANDLER = "OEBasicHash"
         self.maxDiff = None
         self.assertEqual(files1, files2)
 
+        if allarch:
+            allarchdir = os.path.basename(glob.glob(self.topdir + "/tmp-sstatesamehash/stamps/all-*-linux")[0])
+
+            files1 = get_files(self.topdir + "/tmp-sstatesamehash/stamps/" + allarchdir)
+            files2 = get_files(self.topdir + "/tmp-sstatesamehash2/stamps/" + allarchdir)
+            self.assertEqual(files1, files2)
+
     def test_sstate_sametune_samesigs(self):
         """
         The sstate checksums of two identical machines (using the same tune) should be the
Signature · 1 line
2.32.0