From: Alexander Kanavin <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Alexander Kanavin <alex@linutronix.de>
Subject: [PATCH 5/9] selftest/sstatetests: fix up printdiff test to match rework of printdiff logic
Date: Thu, 14 Dec 2023 14:45:24 +0100 [thread overview]
Message-ID: <20231214134528.1973602-5-alex@linutronix.de> (raw)
In-Reply-To: <20231214134528.1973602-1-alex@linutronix.de>
The rework changes the console output significantly: where previously
printdiff would report the most basic invalid tasks it could find,
with this change the most top-level tasks are reported instead. This
is not a problem as diffsigs has its own task recursion facility, and will
track down the actual change anyway. However the changes still need to be reflected
in the selftests.
Note that printdiff is run on one specific target task rather than
overall do_build for a recipe. Otherwise find_siginfo would run
glob.glob("*/*/*taskname*") against autobuilder sstate cache for each
of those tasks (six or seven times) - this is an expensive operation
taking several minutes, and it's best to do it only once per test.
[YOCTO #15289]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
.../perlcross_%.bbappend} | 0
meta/lib/oeqa/selftest/cases/sstatetests.py | 40 +++++++++----------
2 files changed, 18 insertions(+), 22 deletions(-)
rename meta-selftest/recipes-test/{quilt-native/quilt-native_%.bbappend => perlcross/perlcross_%.bbappend} (100%)
diff --git a/meta-selftest/recipes-test/quilt-native/quilt-native_%.bbappend b/meta-selftest/recipes-test/perlcross/perlcross_%.bbappend
similarity index 100%
rename from meta-selftest/recipes-test/quilt-native/quilt-native_%.bbappend
rename to meta-selftest/recipes-test/perlcross/perlcross_%.bbappend
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py
index f52ca77c09c..f5b3437d86b 100644
--- a/meta/lib/oeqa/selftest/cases/sstatetests.py
+++ b/meta/lib/oeqa/selftest/cases/sstatetests.py
@@ -824,14 +824,17 @@ TMPDIR = "${{TOPDIR}}/tmp-sstateprintdiff-difftmp-{}"
# Check if printdiff walks the full dependency chain from the image target to where the change is in a specific recipe
- def test_image_minimal_vs_quilt(self):
- expected_output = ("Task quilt-native:do_install couldn't be used from the cache because:",
+ def test_image_minimal_vs_perlcross(self):
+ expected_output = ("Task core-image-minimal:do_create_spdx couldn't be used from the cache because:",
"We need hash",
"most recent matching task was")
- expected_sametmp_output = expected_output + ("Variable do_install value changed",'+ echo "this changes the task signature"')
+ expected_sametmp_output = expected_output + (
+"Hash for task dependency perlcross-native:do_install changed from",
+"Variable do_install value changed",
+'+ echo "this changes the task signature"')
expected_difftmp_output = expected_output
- self.run_test_printdiff_changerecipe("core-image-minimal", "quilt-native", "-c do_install quilt-native",
+ self.run_test_printdiff_changerecipe("core-image-minimal:do_create_spdx", "perlcross", "-c do_install perlcross-native",
"""
do_install:append() {
echo "this changes the task signature"
@@ -843,15 +846,15 @@ expected_sametmp_output, expected_difftmp_output)
def test_gcc_runtime_vs_gcc_source(self):
gcc_source_pn = 'gcc-source-%s' % get_bb_vars(['PV'], 'gcc')['PV']
- expected_output = ("Task {}:do_preconfigure couldn't be used from the cache because:".format(gcc_source_pn),
+ expected_output = ("Task gcc-runtime:do_package_write_rpm couldn't be used from the cache because:",
"We need hash",
"most recent matching task was")
- expected_sametmp_output = expected_output + ("Variable do_preconfigure value changed",'+ print("this changes the task signature")')
- #FIXME: printdiff is supposed to find at least one preconfigure task signature in the sstate cache, but isn't able to
- #expected_difftmp_output = expected_output
- expected_difftmp_output = ()
+ expected_sametmp_output = expected_output + ("Hash for task dependency {}:do_preconfigure changed from".format(gcc_source_pn),
+"Variable do_preconfigure value changed",
+'+ print("this changes the task signature")')
+ expected_difftmp_output = expected_output
- self.run_test_printdiff_changerecipe("gcc-runtime", "gcc-source", "-c do_preconfigure {}".format(gcc_source_pn),
+ self.run_test_printdiff_changerecipe("gcc-runtime:do_package_write_rpm", "gcc-source", "-c do_preconfigure {}".format(gcc_source_pn),
"""
python do_preconfigure:append() {
print("this changes the task signature")
@@ -861,22 +864,15 @@ 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:",
+ expected_output = ("Task core-image-minimal:do_populate_lic_deploy couldn't be used from the cache because:",
"We need hash",
"most recent matching task was")
- expected_sametmp_output = expected_output + ("Variable base_do_configure value changed",'+ echo "this changes base_do_configure() definiton "')
+ expected_sametmp_output = expected_output + ("Hash for task dependency gnu-config-native:do_configure changed from",
+"Variable base_do_configure value changed",
+'+ 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:do_populate_lic_deploy",
"""
INHERIT += "base-do-configure-modified"
""",
--
2.39.2
next prev parent reply other threads:[~2023-12-14 13:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-14 13:45 [PATCH 1/9] oeqa/selftest/sstatetests: re-work CDN tests, add local cache tests Alexander Kanavin
2023-12-14 13:45 ` [PATCH 2/9] gnu-config: delete do_compile task Alexander Kanavin
2023-12-14 13:45 ` [PATCH 3/9] bitbake/runqueue: initialize RunQueueExecute before printdiff rather than after Alexander Kanavin
2023-12-14 14:39 ` [OE-core] " Richard Purdie
2023-12-14 17:28 ` Alexander Kanavin
2023-12-15 16:04 ` Richard Purdie
2023-12-15 16:49 ` Alexander Kanavin
2023-12-15 16:56 ` Richard Purdie
2023-12-14 13:45 ` [PATCH 4/9] bitbake/runqueue: rework 'bitbake -S printdiff' logic Alexander Kanavin
2023-12-14 13:45 ` Alexander Kanavin [this message]
2023-12-14 13:45 ` [PATCH 6/9] sstatesig/find_siginfo: unify a disjointed API Alexander Kanavin
2023-12-14 13:45 ` [PATCH 7/9] bitbake-diffsigs/runqueue: adapt to reworked find_siginfo() Alexander Kanavin
2023-12-14 13:45 ` [PATCH 8/9] bitbake/runqueue: prioritize local stamps over sstate signatures in printdiff Alexander Kanavin
2023-12-14 13:45 ` [PATCH 9/9] bitbake/runqueue: add debugging for find_siginfo() calls Alexander Kanavin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231214134528.1973602-5-alex@linutronix.de \
--to=alex.kanavin@gmail.com \
--cc=alex@linutronix.de \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox