Skip to contentSkip to conversation

selftest/SStatePrintdiff: ensure all base signatures are present in sstate in test_image_minimal_vs_base_do_configure

PATCH In review Alexander Kanavin 2 participants 2 messages Jan 10, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftest/SStatePrintdiff: ensure all base signatures are present in sstate in test_image_minimal_vs_base_do_configure

The test relies on all tasks in the dependency tree of the tasks being changed having valid signatures in sstate, so that the recursive discovery of the base invalid tasks stops there, and doesn't go further.

This may not always occur, particularly when hash equivalency combined with different build host architectures prevents them from getting created in regular builds:
https://autobuilder.yoctoproject.org/typhoon/#/builders/127/builds/2725/steps/15/logs/stdio

The other two tests (that change specific recipes) already ensure this, but this test (which changes a basic task definition) does not.

---
 meta/lib/oeqa/selftest/cases/sstatetests.py | 34 ++++++++++++---------
 1 file changed, 19 insertions(+), 15 deletions(-)
meta/lib/oeqa/selftest/cases/sstatetests.py +19 -15
index 6a6c2e5f11a..f7632286450 100644
@@ -797,13 +797,14 @@ TMPDIR = "${{TOPDIR}}/tmp-sstateprintdiff-difftmp-{}"
         for item in expected_difftmp_output:
             self.assertIn(item, result_difftmp.output, msg = "Item {} not found in output:\n{}".format(item, result_difftmp.output))
 
-    def run_test_printdiff_changeconfig(self, target, change_content, expected_sametmp_output, expected_difftmp_output):
+    def run_test_printdiff_changeconfig(self, target, change_bbtasks, change_content, expected_sametmp_output, expected_difftmp_output):
         import time
         self.write_config("""
 TMPDIR = "${{TOPDIR}}/tmp-sstateprintdiff-sametmp-{}"
 """.format(time.time()))
         bitbake("--runall build --runall deploy_source_date_epoch {}".format(target))
         bitbake("-S none {}".format(target))
+        bitbake(" ".join(change_bbtasks))
         self.append_config(change_content)
         result_sametmp = bitbake("-S printdiff {}".format(target))
 
@@ -859,24 +860,27 @@ expected_sametmp_output, expected_difftmp_output)
 
     # Check if changing a really base task definiton is reported against multiple core recipes using it
     def test_image_minimal_vs_base_do_configure(self):
-        expected_output = ("Task zstd-native:do_configure couldn't be used from the cache because:",
-"Task texinfo-dummy-native:do_configure couldn't be used from the cache because:",
-"Task ldconfig-native:do_configure couldn't be used from the cache because:",
-"Task gettext-minimal-native:do_configure couldn't be used from the cache because:",
-"Task tzcode-native:do_configure couldn't be used from the cache because:",
-"Task makedevs-native:do_configure couldn't be used from the cache because:",
-"Task pigz-native:do_configure couldn't be used from the cache because:",
-"Task update-rc.d-native:do_configure couldn't be used from the cache because:",
-"Task unzip-native:do_configure couldn't be used from the cache because:",
-"Task gnu-config-native:do_configure couldn't be used from the cache because:",
+        change_bbtasks = ('zstd-native:do_configure',
+'texinfo-dummy-native:do_configure',
+'ldconfig-native:do_configure',
+'gettext-minimal-native:do_configure',
+'tzcode-native:do_configure',
+'makedevs-native:do_configure',
+'pigz-native:do_configure',
+'update-rc.d-native:do_configure',
+'unzip-native:do_configure',
+'gnu-config-native:do_configure')
+
+        expected_output = ["Task {} couldn't be used from the cache because:".format(t) for t in change_bbtasks] + [
 "We need hash",
-"most recent matching task was")
-        expected_sametmp_output = expected_output + (
+"most recent matching task was"]
+
+        expected_sametmp_output = expected_output + [
 "Variable base_do_configure value changed",
-'+	echo "this changes base_do_configure() definiton "')
+'+	echo "this changes base_do_configure() definiton "']
         expected_difftmp_output = expected_output
 
-        self.run_test_printdiff_changeconfig("core-image-minimal",
+        self.run_test_printdiff_changeconfig("core-image-minimal",change_bbtasks,
 """
 INHERIT += "base-do-configure-modified"
 """,
Signature · 1 line
2.39.2
#1 lore raw

Patchtest results for [PATCH] selftest/SStatePrintdiff: ensure all base signatures are present in sstate in test_image_minimal_vs_base_do_configure

Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:

---
Testing patch /home/patchtest/share/mboxes/selftest-SStatePrintdiff-ensure-all-base-signatures-are-present-in-sstate-in-test_image_minimal_vs_base_do_configure.patch

FAIL: test shortlog length: Edit shortlog so that it is 90 characters or less (currently 117 characters) (test_mbox.TestMbox.test_shortlog_length)

PASS: pretest pylint (test_python_pylint.PyLint.pretest_pylint)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test pylint (test_python_pylint.PyLint.test_pylint)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)

SKIP: pretest src uri left files: Patch cannot be merged (test_metadata.TestMetadata.pretest_src_uri_left_files)
SKIP: test CVE check ignore: No modified recipes, skipping test (test_metadata.TestMetadata.test_cve_check_ignore)
SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum modified not mentioned: No modified recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test src uri left files: Patch cannot be merged (test_metadata.TestMetadata.test_src_uri_left_files)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!