Age | Commit message (Collapse) | Author |
|
If S doesn't exist, do_qa_patch would fail. Fix the code to not fail
in this situation.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The "libdir" QA check tries to open every file it finds as an ELF. If
it finds a dangling symlink that looks like a library by the filename it
will try to open it and fail with FileNotFoundError error. As this
dangling symlink probably points to a real file, silently absorb the
error.
[ YOCTO #13949 ]
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Commit f673d3d239799fb1ab50f4aa5d44187666aa0cd7 introduced a warning for
virtual/ being used in RPROVIDES and RDEPENDS. Make it possible to
disable the warning by removing "virtual-slash from WARN_QA.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We should be pointing people at VIRTUAL-RUNTIME, not virtual so tweak
the warning. Try and make it clear the difference between the build
dependencies and the runtime ones.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Fixes [YOCTO #14538]
Recipes shouldn't use "virtual/" in RPROVIDES and RDEPENDS. This was
addressed already in recipes in meta-oe and oe-core. Add a test for
this in insane.bbclass to ensure no regressions occur.
Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Ola x Nilsson <olani@axis.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
adjtime was overlooked in the original commit.
Signed-off-by: Ola x Nilsson <olani@axis.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Uses the new foreach_runtime_provider_pkgdata() API to look up all
possible runtime providers of a given dependency when resolving
file-rdeps. This allows the check to correctly handle RPROVIDES for
non-virtual dependencies
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
When showing paths to the user we don't want to include the whole build
directory. Passing the package name to package_qa_clean_path strips
this completely.
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The SRC_URI tests are a better fit for the new do_recipe_qa task, move them
there.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If the distro feature usrmerge is set, all files from /bin are moved to
/usr/bin, i.e. /usr/bin/sh is the same as /bin/sh and should be allowed be
ignored, because it's always present.
Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
|
|
In some cases, pathlib.Path.glob() might throw FileNotFoundError when
file/directory disappear while it is iterating over them.
This "warning" is not important enough to crash build in this case so
just take a bb.note of the problem and move on.
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Reported-by: Mark Hatle <mark.hatle@amd.com>
Closes: https://lists.openembedded.org/g/openembedded-core/message/189254
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
On S=WORKDIR recipes, the unimplemented-ptest check will scan the whole
WORKDIR and "see" disappearing file and directory.
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Reported-by: Mark Hatle <mark.hatle@amd.com>
Closes: https://lists.openembedded.org/g/openembedded-core/message/189254
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
if there is a "test" or "tests" subdirectory at toplevel, this usually
means we have some unit tests available.
This test is very good at detecting handcrafted tests and I was not able
to find any false positive.
False positive can be dealt with the usual INSANE_SKIP mechanism
Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr>
Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
|
|
most build-systems have a way to implement a "make check" or equivalent
command that will run tests in the source directory.
This heuristic will detect the keywords in the build-system configuration
that activates tests.
Note that in the case of autotools, we use Makefile.in as our source
instead of Makefile.am to easily follow includes. Filenaming conventions
for autotools files are not reliable enough to do naive matching.
Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr>
Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
|
|
match_line_in_files will look for a regex in all files matching a glob.
we use iglob to avoid a complete, recursive scan of all source. iglob is
based on python iterators and will scan as we walk through the directories
pytest are detected by looking for "import pytest" or "from pytest" in any
python file.
perl Test:: is detetected by looking for any t/*.t in the toplevel source
directory.
Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr>
Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
|
|
This infrastructure will use heuristics to detect when package sources seem
to have unit tests implemented but no ptest have been implemented in the
recipe.
No heuristics have been implemented at this point, only the infrastructure
to skip the test when ptest are implemented.
This is part of python_do_qa_patch since we need the sources in their final
state but do not need any configuration done
A missing-ptest QA test already existed but it was used for a different
purpose and overridden by ptest.bbclass. Thus, a new QA keyword was added
Note: The QA test is not enabled by default and may be enabled to hunt
down potential ptests with:
WARN_QA += "unimplemented-ptest"
Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr>
Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
|
|
Operating systems limit the shebang to a maximum number of bytes.
This patch makes the shebang-size check count raw bytes instead of UTF-8 characters.
Signed-off-by: Jan Garcia <j@n-garcia.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The use of coremeta_path was removed with commit 61a881fdbe (insane:
Improve patch-status layer filtering) when the patch-status QA test was
generalized.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Absent maintainer entries are as well a frequent source of friction, as they are checked
only in selftest, and so aren't revealed until autobuilder runs.
The selftest is retained as it also checks for obsolete entries in maintainers.inc
(not possible to do in insane class).
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This was done in a selftest, but that is too late and creates
friction in integration as errors are not seen until autobuilder fails.
Bonus fix: SUMMARY check wasn't even working, as in the absence
of one set in the recipe there is a default value set from bitbake.conf.
I left DESCRIPTION check out for now, as many recipes don't actually
have it, and it's set from SUMMARY (plus a dot) if absent.
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
There is a need to run QA checks that can operate entirely from
recipe metadata and do not need any of the build artefacts or
source code. After some deliberation it was concluded that such
checks are best collected in their own task that runs as early as possible,
and so this commit adds the task.
Like package_qa, the task is sstate enabled, but doesn't (yet)
register the qa results into sstate.
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
architectures
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Now that we have layer overrides, we can easily enable patch-status in
ERROR_QA without the hardcoded code making it easier for other layers
to opt into the checks.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Existing implementation required to list both specific problematic apis, and files that
use them: neither is necessary as both are seen in package_qa error messages, and
can cause excessive amount of exception lines, if there are too many files, or
they are installed in arch-specific locations. Also, the value of INSANE_SKIP
should be the test that needs to be skipped, and in this case it wasn't.
Also, all problematic recipes are now correctly listed.
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
* to be used by standalone script scripts/contrib/patchreview.py
as well
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
* this block was using just 3
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Currently, whilst patch errors or warnings are shown, the errors don't stop builds.
The configuration isn't very configurable from WARN_QA and ERROR_QA either.
This patch:
* Uses the standard mechanisms to handle the patch fuzz warnings/errors
* Makes Upstream-Status checking configurable from WARN/ERROR_QA
* Allows that checking to be used with non-core layers
* Makes patch-fuzz an error by default
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Check for known symbols that should have been redirected to 64bit
variants when -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64 are set.
Signed-off-by: Ola x Nilsson <olani@axis.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
|
|
GitHub redirects /archive/ URLs to codeload.github.com, a dedicated
service for caching git archives:
$ wget -v https://github.com/unicode-org/icu/archive/refs/tags/release-72-1.zip
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/unicode-org/icu/zip/refs/tags/release-72-1 [following]
This is not the case for uploaded artifacts:
$ wget -v https://github.com/unicode-org/icu/releases/download/release-72-1/icu4c-72_1-data-bin-l.zip.asc
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/49244766/... [following]
Check for codeload.github.com URLs in the src-uri-bad check in case
the SRC_URI contains this final URL, and not the public URI.
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
|
|
Some versions of hashlib don't appear to implement the second FIPS
related argument. Detect this and support both versions.
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The full path of patch may contain '/meta/' but not in oe-core, skip
patches by checking it starts with oe-core full path or not.
Signed-off-by: Yang Xu <yang.xu@mediatek.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
|
|
Move classes to classes-global or classes-recipe as appropriate to take
advantage of new bitbake functionality to check class scope/usage.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|