oeqa/selftest: check if rm_work is enabled
PATCH 1/1 oeqa/selftest: check if rm_work is enabled
rm_work if enabled leads to some tests failing that rely on artifacts being present. Check if rm_work.bbclass is included and show an error and exit if it is.
Fixes [YOCTO #12694]
--- meta/lib/oeqa/selftest/context.py | 4 ++++ 1 file changed, 4 insertions(+)
meta/lib/oeqa/selftest/context.py +4 -0
@@ -187,6 +187,10 @@ class OESelftestTestContextExecutor(OETestContextExecutor): self.tc.logger.error("You have buildhistory enabled already and this isn't recommended for selftest, please disable it first.") raise OEQAPreRun + if "rm_work.bbclass" in self.tc.td["BBINCLUDED"]: + self.tc.logger.error("You have rm_work enabled which isn't recommended while running oe-selftest. Please disable it before continuing.") + raise OEQAPreRun + if "PRSERV_HOST" in self.tc.td: self.tc.logger.error("Please unset PRSERV_HOST in order to run oe-selftest") raise OEQAPreRun
Signature · 1 line
2.17.1
Quoted 17 lines · Anuj Mittal
rm_workif enabled leads to some tests failing that rely on artifacts being present. Check if rm_work.bbclass is included and show an error and exit if it is.Fixes [YOCTO #12694]
Signed-off-by Anuj Mittal <[email protected]>--- meta/lib/oeqa/selftest/context.py | 4 ++++ 1 file changed, 4 insertions(+)meta/lib/oeqa/selftest/context.py +0
-0
meta/lib/oeqa/selftest/context.py class OESelftestTestContextExecutor(OETestContextExecutor): · line 196
Quoted 10 lines
meta/lib/oeqa/selftest/context.py +4
-0@@ -187,6 +187,10 @@ class OESelftestTestContextExecutor(OETestContextExecutor): self.tc.logger.error("You have buildhistory enabled already and this isn't recommended for selftest, please disable it first.") raise OEQAPreRun + if "rm_work.bbclass" in self.tc.td["BBINCLUDED"]: + self.tc.logger.error("You have rm_work enabled which isn't recommended while running oe-selftest. Please disable it before continuing.") + raise OEQAPreRun + if "PRSERV_HOST" in self.tc.td: self.tc.logger.error("Please unset PRSERV_HOST in order to run oe-selftest") raise OEQAPreRun
Enabling rm_work should NOT be an error, and eventually it should not trigger any warnings. OEQA should only test the results of a build not how the build was done.
I reviewed some of the rm_work related defects:
1. https://bugzilla.yoctoproject.org/show_bug.cgi?id=12647
The warning was intentional based on Paul's comment.
2. https://bugzilla.yoctoproject.org/show_bug.cgi?id=12655
The logs seem to only say that the error goes away when rm_work is NOT enabled. I'd prefer to understand what it is that's causing the failure and perhaps add to the packages recipe so that the output passes the OEQA tests.
3. https://bugzilla.yoctoproject.org/show_bug.cgi?id=12694
Title was: oe-selftest should warn if rm_work is enabled but the commit makes it an error.
Any disagreement about making it be a warning?
rm_work saves lots of storage space so I'm reluctant to make OEQA require that it is NOT used.
Signature · 2 lines
# Randy MacLeod # Wind River Linux
Quoted 24 lines · Randy MacLeod
Quoted 23 lines · Anuj Mittal
rm_workif enabled leads to some tests failing that rely on artifacts being present. Check if rm_work.bbclass is included and show an error and exit if it is.Fixes [YOCTO #12694]
Signed-off-by Anuj Mittal <[email protected]>--- meta/lib/oeqa/selftest/context.py | 4 ++++ 1 file changed, 4 insertions(+)meta/lib/oeqa/selftest/context.py +0
-0@@ -187,6 +187,10 @@ classOESelftestTestContextExecutor(OETestContextExecutor):
self.tc.logger.error("You have buildhistory enabled
already and this isn't recommended for selftest, please disable it first.")
raise OEQAPreRun
Quoted 15 lines
Quoted 11 lines
meta/lib/oeqa/selftest/context.py +2
-0+ if "rm_work.bbclass" in self.tc.td["BBINCLUDED"]: + self.tc.logger.error("You have rm_work enabled whichisn't recommended while running oe-selftest. Please disable it before continuing.")
meta/lib/oeqa/selftest/context.py +2
-0+ raise OEQAPreRun + if "PRSERV_HOST" in self.tc.td: self.tc.logger.error("Please unset PRSERV_HOST inorder to run oe-selftest")
raise OEQAPreRunEnabling
rm_workshould NOT be an error, and eventually it should not trigger any warnings. OEQA should only test the results of a build not how the build was done.
I'm torn on this. My thoughts:
I'd really like the results of oe-selftest to be consistent and deterministic. If we expect it to work with and without rm_work we really start having to test both, otherwise you can comparatively easily find odd failures with one and not the other. I've accidentally left it enabled, then puzzled over odd test results for an age on too many occasions :(.
I'm still of the view that rm_work is a horrible hack. Its one I've bent over backwards to try and keep working over the years[1] since a lot of people use it, that doesn't mean its any less of a hack though as when you understand what it does and how it does it, it really is horrible.
([1]I made 26 out of 47 changes to the class in the past 12 years)
If you step back and think about it, the use of rm_work precludes tests from poking into WORKDIR or at the very least makes them have to care about a lot of very specific task ordering of tasks which may or may not be present. It doesn't seem unreasonable for selftests to actually look in WORKDIR to ensure builds are doing the correct things.
Quoted 4 lines
I reviewed some of the
rm_workrelated defects:1. https://bugzilla.yoctoproject.org/show_bug.cgi?id=12647
The warning was intentional based on Paul's comment.
There were two issues, one rm_work, the other warning piece isn't an issue.
Quoted 5 lines
2. https://bugzilla.yoctoproject.org/show_bug.cgi?id=12655
The logs seem to only say that the error goes away whenrm_workis NOT enabled. I'd prefer to understand what it is that's causing the failure and perhaps add to the packages recipe so that the output passes the OEQA tests.
The issue is that the test looks for an intermediate file in WORKDIR/sysroot-destdir. rm_work removes it before the test can find it.
Quoted 8 lines
3. https://bugzilla.yoctoproject.org/show_bug.cgi?id=12694
Title was: oe-selftest should warn ifrm_workis enabled but the commit makes it an error.Any disagreement about making it be a warning?
rm_worksaves lots of storage space so I'm reluctant to make OEQA require that it is NOT used.
We're not requiring OEQA not use it globally, we're requiring oe- selftest not enable it. The other OEQA components (image, SDK, eSDK tests) all are unaffected.
As things stand today several tests break with it. I've no doubt we could 'fix' them in some way to avoid the problems but do we require any new test author to test with and without rm_work? Do we start requiring the autobuilder test both combinations?
When the user runs oe-selftest, I really want them to get the same results as our autobuilder so we're consistent everywhere. We've had numerous problems in that regard, e.g. buildhistory enabled/not enabled and I think its reasonable for the code to check for things which are known to introduce inconsistency? We have made a lot of progress in being much more consistent.
Cheers,
Richard
Quoted 25 lines · Richard Purdie
Quoted 24 lines · Randy MacLeod
Quoted 23 lines · Anuj Mittal
rm_workif enabled leads to some tests failing that rely on artifacts being present. Check if rm_work.bbclass is included and show an error and exit if it is.Fixes [YOCTO #12694]
Signed-off-by Anuj Mittal <[email protected]>--- meta/lib/oeqa/selftest/context.py | 4 ++++ 1 file changed, 4 insertions(+)meta/lib/oeqa/selftest/context.py +0
-0@@ -187,6 +187,10 @@ classOESelftestTestContextExecutor(OETestContextExecutor):
self.tc.logger.error("You have buildhistory enabled
already and this isn't recommended for selftest, please disable it first.")
raise OEQAPreRun
Quoted 15 lines
Quoted 12 lines
Quoted 11 lines
meta/lib/oeqa/selftest/context.py +2
-0+ if "rm_work.bbclass" in self.tc.td["BBINCLUDED"]: + self.tc.logger.error("You have rm_work enabled whichisn't recommended while running oe-selftest. Please disable it before continuing.")
meta/lib/oeqa/selftest/context.py +2
-0+ raise OEQAPreRun + if "PRSERV_HOST" in self.tc.td: self.tc.logger.error("Please unset PRSERV_HOST inorder to run oe-selftest")
raise OEQAPreRunQuoted 3 lines
Enabling
rm_workshould NOT be an error, and eventually it should not trigger any warnings. OEQA should only test the results of a build not how the build was done.
Uh, oh. I had written this email but then realized that the parts of oeqa that require that rm_work be disabled are testing the internals of the build so I swear I didn't send the email! :)
Quoted 10 lines
I'm torn on this. My thoughts:
I'd really like the results of oe-selftest to be consistent and deterministic. If we expect it to work with and without
rm_workwe really start having to test both, otherwise you can comparatively easily find odd failures with one and not the other. I've accidentally left it enabled, then puzzled over odd test results for an age on too many occasions :(.
Quoted 6 lines
I'm still of the view that
rm_workis a horrible hack. Its one I've bent over backwards to try and keep working over the years[1] since a lot of people use it, that doesn't mean its any less of a hack though as when you understand what it does and how it does it, it really is horrible.
([1]I made 26 out of 47 changes to the class in the past 12 years)
Good to know. It is still useful so I guess it'll stay around until storage is just incredibly cheap. Aren't we there yet:
https://jcmit.net/flash2015.htm
If rm_work is such a hack, maybe we should schedule it to be removed.
Quoted 6 lines
If you step back and think about it, the use of
rm_workprecludes tests from poking into WORKDIR or at the very least makes them have to care about a lot of very specific task ordering of tasks which may or may not be present. It doesn't seem unreasonable for selftests to actually look in WORKDIR to ensure builds are doing the correct things.
I agree!
Quoted 23 lines
Quoted 5 lines
I reviewed some of the
rm_workrelated defects:1. https://bugzilla.yoctoproject.org/show_bug.cgi?id=12647
The warning was intentional based on Paul's comment.There were two issues, one
rm_work, the other warning piece isn't an issue.Quoted 5 lines
2. https://bugzilla.yoctoproject.org/show_bug.cgi?id=12655
The logs seem to only say that the error goes away whenrm_workis NOT enabled. I'd prefer to understand what it is that's causing the failure and perhaps add to the packages recipe so that the output passes the OEQA tests.The issue is that the test looks for an intermediate file in WORKDIR/sysroot-destdir.
rm_workremoves it before the test can find it.Quoted 4 lines
3. https://bugzilla.yoctoproject.org/show_bug.cgi?id=12694
Title was: oe-selftest should warn ifrm_workis enabled but the commit makes it an error.
Quoted 8 lines
Quoted 4 lines
Any disagreement about making it be a warning?
rm_worksaves lots of storage space so I'm reluctant to make OEQA require that it is NOT used.We're not requiring OEQA not use it globally, we're requiring oe- selftest not enable it. The other OEQA components (image, SDK, eSDK tests) all are unaffected.
Yeah, once I realized that yesterday, I decided not to send my email (which managed to escape somehow anyway).
Quoted 6 lines
As things stand today several tests break with it. I've no doubt we could 'fix' them in some way to avoid the problems but do we require any new test author to test with and without
rm_work? Do we start requiring the autobuilder test both combinations?
Quoted 6 lines
When the user runs oe-selftest, I really want them to get the same results as our autobuilder so we're consistent everywhere. We've had numerous problems in that regard, e.g. buildhistory enabled/not enabled and I think its reasonable for the code to check for things which are known to introduce inconsistency? We have made a lot of progress in being much more consistent.
I see. That makes sense.
We'll continue with some builds using rm_work and the ones that run oeqa omitting that feature.
Thanks for the background Richard.
../Randy
Quoted 8 lines
Cheers,
Richard
Signature · 2 lines
# Randy MacLeod # Wind River Linux