Commit Graph

235 Commits

Author SHA1 Message Date
Frederic Martinsons
5116f2b2cf rust: provide examples for C library generation in rust
rust-c-lib-example is a little rust code which provide
a single function to print a formatted date (via the chrono crate)
from an input timestamp in millisecond. It has the necessary FFI
annotation and inherit cargo_c class for the C ABI compatible
library generation.

rust-c-lib-example is meson project for the C code which
will call the print_date function from rust-c-lib-example
if no argument is provided, if any argument is provided
it will print "Hello world in rust from C!"

add a runtime test case to check if all went well.

(From OE-Core rev: bb177c7764b1bc47157d57d7a34930e59a7acef3)

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-21 16:15:35 +01:00
Yang Xu
1bdcd76d29 oeqa/selftest/ssate: Add test for find_siginfo
Previously some dependencies couldn't be followed through their siginfo
files. This has been fixed, add a test to ensure this doesn't regress.

(From OE-Core rev: a59cd1502ff14c5d8ccb04385bf4a3ad338d998d)

Signed-off-by: Yang Xu <yang.xu@mediatek.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-09 13:23:33 +01:00
Martin Jansa
92f8d99fe0 selftest: multiconfig-image-packager: try to respect IMAGE_LINK_NAME
* this still assumes that IMAGE_LINK_NAME will contain IMAGE_BASENAME
  which will be BPN 'multiconfig-image-packager' and that replacing
  it with 'core-image-minimal' will match with the actual IMAGE_LINK_NAME
  from core-image-minimal recipe - there is no good way to query
  core-image-minimal's context, but this is still closer than assuming:
  core-image-minimal-${MCMACHINE}.${MCIMGTYPE}
  which works only with the current default:
  IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}"

[YOCTO #12937]

(From OE-Core rev: d4403365af6a5b9aa3b87ef8fd689d3bbcd23318)

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>
2023-06-29 11:28:32 +01:00
Richard Purdie
8d887d226b selftest/license: Exclude from world
These test recipes shouldn't be built as part of world builds. Some recent
changes are exposing issues from this so exclude them.

(From OE-Core rev: 80d3f5586cd060ae69fbc6dec2e8978d87da10ba)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-01 08:07:51 +01:00
Thomas Roos
6c8fe83bb5 oeqa: adding selftest-hello and use it to speed up tests
Adding a selftest version of hello world to run it in tests where no download is necessary.
Also using this in several tests to speed them up.
Using the -native version wherever possible will also speed up tests a lot.

[YOCTO #11142]

(From OE-Core rev: c3f26b63934888df0e3cd563c1c2804eb78a368e)

Signed-off-by: Thomas Roos <throos@amazon.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-22 10:53:49 +01:00
Frederic Martinsons
e7e7999b23 zvariant: add ptest feature for zvariant test suite
Below is the output of run-ptest script under qemu

root@qemux86-64:~# /usr/lib/zvariant/ptest/run-ptest

running 37 tests
test framing_offset_size::tests::framing_offset_size_bump ... ok$<2>
test owned_value::tests::from_value ... ok$<2>
test object_path::unit::owned_from_reader ... ok$<2>
test str::tests::from_string ... ok$<2>
test signature::tests::signature_slicing ... ok$<2>
test str::tests::test_ordering ... ok$<2>
test owned_value::tests::map_conversion ... ok$<2>
test owned_value::tests::serde ... ok$<2>
test tests::enums ... ok$<2>
test tests::derive ... ok$<2>
test tests::f64_value ... ok$<2>
test tests::i16_value ... ok$<2>
test tests::fd_value ... ok$<2>
test tests::i32_value ... ok$<2>
test tests::i8_value ... ok$<2>
test tests::i64_value ... ok$<2>
test tests::ip_addr ... ok$<2>
test tests::issue_59 ... ok$<2>
test tests::issue_99 ... ok$<2>
test tests::array_value ... ok$<2>
test tests::object_path_value ... ok$<2>
test tests::dict_value ... ok$<2>
test tests::signature_value ... ok$<2>
test tests::serialized_size ... ok$<2>
test tests::struct_byte_array ... ok$<2>
test tests::struct_ref ... ok$<2>
test tests::str_value ... ok$<2>
test tests::option_value ... ok$<2>
test tests::struct_value ... ok$<2>
test tests::struct_with_hashmap ... ok$<2>
test tests::u16_value ... ok$<2>
test tests::u32_value ... ok$<2>
test tests::unit ... ok$<2>
test tests::u8_value ... ok$<2>
test tests::unit_fds ... ok$<2>
test tests::value_value ... ok$<2>
test tests::recursion_limits ... ok$<2>

test result: ok$<2>. 37 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.21s

root@qemux86-64:~#

(From OE-Core rev: 912bbec9fe44f22ab70c3553af6cb699543b8411)

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-05 11:07:26 +01:00
Dit Kozmaj
a60925d00a selftest: wic: Add test for --part-name argument
Add test for wic --part-name argument in .wks file.
Test three different cases:
- Set only the --part-name argument.
- Set only the --label argument. In this case the GPT partition label
  is set to the value of --label for compatibility reasons.
- Set both. In this case the code has been changed to set the GPT
  partition label to the --part-name value.

The test uses a test_gpt_partition_name.wks file created for this
purpose.

(From OE-Core rev: 06af6795cf6f079362303bddb39a14459e228e72)

Signed-off-by: Dit Kozmaj <dit.kozmaj@kynetics.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-13 11:56:07 +01:00
Richard Purdie
bf4b5bd0bd zvariant: Exclude from world for now to avoid reproducibility issues
Ultimately we'll remove this and use for better rust reproducibility
testing too.

(From OE-Core rev: 6c6536a41bfb8651fe94d90898207c5b53673e44)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-01 11:36:26 +01:00
Frederic Martinsons
ad460bb6aa meta-selftest: provide a recipe for zvariant
This recipe is for showing a "real world" example of
a crate that depends on some git repositories.

Usually, this kind of crate is built within a global
workspace (here it is the zbus project) and so
doesn't need a Cargo.lock on its own.

For the sake of the demonstration, I had to tweak things
a little to be able to compile zvariant in standalone
(no relative path in dependency, no symlink to LICENSE
provide a Cargo.lock)

The use case where the crate had some git repository
in dependency is very common for "private" crate that
are not aimed to be published on crates.io.
When the project grow bigger, it is common to have
a bin and multiple lib developped in parallel, and these
libs are surely on a git repostitory.

A test case have been also added to check for:
  - the previous patch about git subpath parameter and devtool
  - the correctness of overriding dependencies (first patch of the
series)

(From OE-Core rev: 409e045f96f69877de6f36ed14c5c19a9cb74eaf)

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-01 11:36:26 +01:00
Fawzi KHABER
3ae3669468 oeqa/selftest/cases/package.py: adding unittest for package rename conflicts
This Unittest tries to rename a package, using an already used name and
fails on do_package.

Reviewed-by: Yoann CONGAL <yoann.congal@smile.fr>
(From OE-Core rev: c3fe173d5196506d89aa464ba56aabcf581a60db)

Signed-off-by: Fawzi KHABER <fawzi.khaber@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-30 12:32:30 +01:00
Martin Jansa
e1334b120e selftest: wic: respect IMAGE_LINK_NAME also in test_rawcopy_plugin_qemu
* this one is more tricky, because the test_rawcopy_plugin.wks.in file
  is used while building core-image-minimal-mtdutils, but the image filename
  inside wks.in is from core-image-minimal, so we cannot just let bitbake
  expand IMAGE_LINK_NAME, use separate variable set in the same config fragment
  IMAGE_LINK_NAME_CORE_IMAGE_MINIMAL

[YOCTO #12937]

(From OE-Core rev: 8864ee825fdc52fe7a8cf93876c81c639fba66f4)

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>
2023-03-22 13:53:29 +00:00
Martin Jansa
5ec86bd4fa git-submodule-test: disable upstream version check
* this is one of the failures from distrodata.Distrodata.test_checkpkg:

  2023-03-11 14:26:21,482 - oe-selftest - INFO - ======================================================================
  2023-03-11 14:26:21,482 - oe-selftest - INFO - FAIL: test_checkpkg (distrodata.Distrodata.test_checkpkg)
  2023-03-11 14:26:21,482 - oe-selftest - INFO - ----------------------------------------------------------------------
  2023-03-11 14:26:21,482 - oe-selftest - INFO - Traceback (most recent call last):
    File "/OE/build/poky/meta/lib/oeqa/selftest/cases/distrodata.py", line 40, in test_checkpkg
      self.assertTrue(len(regressed_failures) == 0 and len(regressed_successes) == 0, msg)
  AssertionError: False is not true :
  The following packages failed upstream version checks. Please fix them using UPSTREAM_CHECK_URI/UPSTREAM_CHECK_REGEX
  (when using tarballs) or UPSTREAM_CHECK_GITTAGREGEX (when using git). If an upstream version check cannot be performed
  (for example, if upstream does not use git tags), you can set UPSTREAM_VERSION_UNKNOWN to '1' in the recipe to acknowledge
  that the check cannot be performed.
  git-submodule-test
  binutils

  Stdout:
  Loading cache...done.
  Loaded 0 entries from dependency cache.
  Parsing recipes...done.
  Parsing of 947 .bb files complete (0 cached, 947 parsed). 1764 targets, 46 skipped, 0 masked, 0 errors.
  ----------------------------------------------------------------------
  2023-03-11 14:26:21,482 - oe-selftest - INFO - Ran 1 test in 193.764s
  2023-03-11 14:26:21,482 - oe-selftest - INFO - FAILED
  2023-03-11 14:26:21,483 - oe-selftest - INFO -  (failures=1)
  2023-03-11 14:26:26,258 - oe-selftest - INFO - RESULTS:

  martin@jama /OE/build/poky/build $ devtool check-upgrade-status git-submodule-test
  NOTE: Could not list remote: Fetcher failure for URL: 'gitsm://git.yoctoproject.org/git-submodule-test;branch=master'.
    The command git -c gc.autoDetach=false -c core.pager=cat ls-remote git://git.yoctoproject.org/git-submodule-test refs/tags/* gave empty output unexpectedly
  INFO: git-submodule-test        1.0             UNKNOWN_BROKEN  None

  and there are no tags in this test repo:
  $ git ls-remote git://git.yoctoproject.org/git-submodule-test
  a2885dd7d25380d23627e7544b7bbb55014b16ee        HEAD
  d199bbf9ed2216bd1f38aec000d865ae08279119        refs/heads/changed-url
  a2885dd7d25380d23627e7544b7bbb55014b16ee        refs/heads/master
  049da4a6cb198d7c0302e9e8b243a1443cb809a7        refs/heads/ssh-gitsm-tests
  bbe99a1465c5cc52720936d075ddbc5ebe2ed731        refs/meta/cgit

* the binutils failure is strange, when I've added some debug output
  to see why it's listed the issue disappeared, maybe some temporary
  network glitch or something

(From OE-Core rev: 3d1951902d8ad87baae5216e8e12a7d3356a923c)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-14 17:13:11 +00:00
Ross Burton
598fafb89e meta-selftest/files: add ptest to static-passwd/-group
As ptest-runner creates a new user, we need to add it to the testing
static passwd file.

(From OE-Core rev: 009726f04c000cc50ce44305669bd8e940e64a9c)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-27 22:53:56 +00:00
Pavel Zhukov
2e18bbb307 oeqa/selftest/wic: Add test for uefi-kernel loader
This is regression test for [1].
[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=15033

(From OE-Core rev: d8ef15bb9ef652bf85002fe523ff5060b47bca6a)

Signed-off-by: Pavel Zhukov <pavel@zhukoff.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-26 11:49:00 +00:00
Peter Marko
72201b63f6 systemd: add group sgx to udev package
>From NEWS for v250:
* Device nodes for the Software Guard eXtension enclaves (sgx_vepc) are
  now also owned by the system group "sgx".

>From NEWS for v248:
* Intel SGX enclave device nodes (which expose a security feature of
  newer Intel CPUs) will now be owned by a new system group "sgx".

Fixes following journal error entry during startup:
  /lib/udev/rules.d/50-udev-default.rules:43 Unknown group 'sgx', ignoring
This is seen already on kirkstone.

(From OE-Core rev: bab455cd9b1b82e778f8523a767eb281edf6689e)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-26 11:49:00 +00:00
Richard Purdie
db47e8aa9e layer.conf: Update to use mickledore as the layer series name
OE-Core has changes which do need careful evaluation for compatibilty,
such as the addpylib directive. Move the core later names to mickledore
so layers can mark their compatibility as such.

Also increase the version number for core. If we do make further changes
that need layer changes, we'll update the version again so layers can mark
compatibility within the series.

(From OE-Core rev: 57239d66b933c4313cf331d35d13ec2d0661c38f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-03 15:47:29 +00:00
Alexander Kanavin
c9c2b6b613 devtool: process local files only for the main branch
devtool modify/upgrade are not currently equipped to handle conditional local files
in SRC_URI, and provide only the main no-override set in a workspace under
source/component/oe-local-files/ (this is done via meta/classes/devtool-source.bbclass).

On the other hand, updating the changes from workspace into a recipe
is run iteratively against all overrides; this works for patches (as they
all are directed into their own override branches in the workspace
git source tree), but breaks down when trying to match local files
in a workspace against local files in overridden SRC_URI lists, resulting in
bad recipe breakage.

(there's an additional twist here: existing code has a guard against this
but the guard relies on metadata in workspace .bbappend that is only there
in modify operations, but not upgrades. This commit replaces the guard
with a general check that will work everywhere).

Implementing multiple sets of local files is significant work; let's for now
simply not touch local files in recipes except when on the no-override variant.

Also, adjust the selftest cases to include conditional local files in sample
recipes, so the situation is covered by the tests.

(From OE-Core rev: 3a8654b860fa98f94e80c3c3fff359ffed14bbe7)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-31 17:10:21 +00:00
Richard Purdie
4901c9d471 base: Switch to use addpylib directive and BB_GLOBAL_PYMODULES
Since bitbake now supports an official method to inject python modules,
switch to it.

Anyone using OE_EXTRA_IMPORTS will need to adjust their code accordingly,
probably switching to their own module namespace.

Also switch to using BB_GLOBAL_PYMODULES to list the global modules
to import.

(From OE-Core rev: 1f56155e91da2030ee0a5e93037c62e1349ba89f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-08 11:15:47 +00:00
Peter Marko
992cbe8184 meta-selftest/staticids: add render group for systemd
(From OE-Core rev: 5b761270267063afb0462d1ebf99cabe32ff4e0a)

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-11-15 09:38:37 +00:00
Alexander Kanavin
b3d0e068f7 selftest: add a copy of previous mtd-utils version to meta-selftest
The latest version update eliminated all custom patches, and the selftest
expects them.

(From OE-Core rev: 95298a7f1ad29c0fc0d02772d646116709ac355f)

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>
2022-11-08 22:47:17 +00:00
Richard Purdie
f18a7dee06 oeqa/runtime/virgl: Update test to match new mesa version
The output string changed slightly in new mesa versions so update
the test to match.

(From OE-Core rev: 2f1a233e75e7202e2959fee3437def388262c57a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-22 21:39:21 +01:00
Vyacheslav Yurkov
6cd5db1e62 oeqa/selftest: Add lower layer test for overlayfs-etc
Place a test file on the /etc by means of overlayfs-user recipe.
Perform QA checks to make sure that:
- When lower layer is exposed, that it's read-only to avoid undefined behavior
- By default lower layer is not exposed

(From OE-Core rev: 2fc742178675598208b400d9889a1681249d7eea)

Signed-off-by: Vyacheslav Yurkov <v.yurkov@precitec.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-09 12:24:43 +01:00
Ross Burton
8cbbc0ac7d meta-selftest/poison: improve sysroot poisoning test case
It was discovered by Martin Jansa that the sysroot poisoning errors are
not functioning as they should. Due to either a bug from day 1 or a
bad rebase, -Werror=poison-system-directories is only passed when GCC
is invoking _just_ the preprocessor, not the compiler.

Demonstrate this by expanding the test case to exercise not just $CPP,
but also $CC for both C and C++ languages. This improved test case now
fails.

(From OE-Core rev: 3ff9e67e278f6548952592675fc88ba41d1a8e96)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-07 21:28:41 +01:00
Pavel Zhukov
077bf3c410 selftest: Add regression test for rpm filesnames
Escaping globs and quoting in rpm spec files is tricky and requires a
bit of dancing. In addition to that it changes from time to time.
Adding (simple) regression test for different types of filename
patterns. Cover brackets and parentheses in first iteration

[Yocto #13746]

(From OE-Core rev: 142432217c152970249884fad240f7441cb1a2ad)

Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-21 22:51:42 +01:00
Paulo Neves
f0ee900859 utils: create_cmdline_shebang_wrapper preserve permission and ownership
The .real command was not given the same permissions and ownership as
the original pre-wrap file and this is now fixed.

A situation where the original pre-wrap file did not have write
permissions would cause a failure in the wrapping is also fixed.

Test update also included.

(From OE-Core rev: 47973fd4f3fbb0af1a0d1bc2c39f2900a963177d)

Signed-off-by: Paulo Neves <ptsneves@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-04 15:15:14 +01:00
Paulo Neves
eb997a6801 utils: Add cmdline_shebang_wrapper util.
Useful to work around shebang relocation issues, where
shebangs are too long or have arguments in them, thus preventing them
from using the /usr/bin/env shebang.

(From OE-Core rev: 6edc1fffcbe1405d8c309a75643d7d6cd9a92848)

Signed-off-by: Paulo Neves <ptsneves@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-01 12:37:52 +01:00
Paulo Neves
00458ee0f8 oeqa/selftest: Test staged .la and .pc files
These files are checked by qa_check_staged but there was no
test cases for whether the tests actually worked. Now there
are.

(From OE-Core rev: 2a96719a201cb7b8db774718adec89dbd7e1aec3)

Signed-off-by: Paulo Neves <ptsneves@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-01 12:37:52 +01:00
Paulo Neves
53f0ee8d42 oeqa/selftest: Add test for shebang overflow
Make sure we do not stage any executable with a bigger shebang
than 128. Fixes [1]

[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=11053

(From OE-Core rev: 280f68528c93b5ffab888c99190accf59e807a3f)

Signed-off-by: Paulo Neves <ptsneves@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-01 12:37:52 +01:00
Richard Purdie
a26721d83b oe-selftest-image: Ensure the image has sftp as well as dropbear
We need sftp so that scp works with recent openssh. Use the packagegroup
instead of a direct dependency to ensure this.

(From OE-Core rev: 2b76c8e5fc8802bbe54371119e6bf6312bf2a8ec)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-30 10:27:17 +01:00
Richard Purdie
f707d9bb96 selftest/multiconfig: Test that multiconfigs in separate layers works
We should test that mutliconfigs from a layer work, not just build/conf.
This adds such a test.

[YOCTO #13566]

(From OE-Core rev: 2306261fb85d5d03145989c3af9c6897111644ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-11 10:28:22 +01:00
Ross Burton
f28cca6abc oeqa/selftest: add test for git working correctly inside pseudo
The fix for CVE-2022-24765 in git[1] breaks any use of git inside
pseudo. Add a simple test case to oe-selftest to verify that at least
basic uses of git work fine under pseudo.

[1] 8959555cee

(From OE-Core rev: 46822268040a23dbb81f71fe35aee8c2663a31f6)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-07 22:31:21 +01:00
Richard Purdie
0436965a40 layer.conf: Post release codename changes
Post release add langdale to the series names.

(From OE-Core rev: dc3b319a5fc47372bc111da5bc26d7dda1b17598)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-27 11:21:04 +01:00
Richard Purdie
5d6dff5947 libxshmfence: Correct LICENSE to HPND
The license in this code is listed as MIT and whilst it is compatible with and
usable as MIT, it actually looks like HPND. Clarify the license field accordingly.

(From OE-Core rev: 922b645f443c33060a8990d32e6b7b62ea5497c3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-15 17:30:34 +01:00
Stefan Herbrechtsmeier
6d715aafec oeqa: selftest: overlayfs: add test for image with fstab entry
(From OE-Core rev: 67f1959a46beec5edf133f2f8b02635feea7e599)

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-04 17:14:15 +00:00
Peter Kjellerstedt
83766c9fff meta, meta-selftest: Replace more non-SPDX license identifiers
In commit ceda3238 (meta/meta-selftest/meta-skeleton: Update LICENSE
variable to use SPDX license identifiers) all LICENSE variables were
updated to only use SPDX license identifiers.

This does the same for comments and other variables where it is
appropriate to use the official SPDX license identifiers. There are
still references to, e.g., "GPLv3", but they are then typically in
descriptive text where they refer to the license in a generic sense.

(From OE-Core rev: 165759dced7fbe73b1db2ede67047896071dc6d0)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-01 23:44:59 +00:00
Pavel Zhukov
da344db43c patch.py: Prevent git repo reinitialization
There were few bugs in the _isInitialized() function which might trigger
git repo to be reinitialized and patches failing to apply.

(From OE-Core rev: 80500ecda4c1bc8812e6e078b6b0db5ec46624de)

Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-25 12:41:23 +00:00
Richard Purdie
364319817a layer.conf: Update to use kirkstone
Update the layers to use the kirkstone namespace. No compatibility is made
for honister due to the variable renaming.

(From OE-Core rev: 4a180aa5b30cc0906072d5b1e970eea41f1ce642)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-21 23:37:26 +00:00
Peter Kjellerstedt
42243c9e22 oeqa/selftest/bblogging: Add logging tests for bb.build.exec_func with shell/python code
The situation regarding logging is different when a function called by
bb.build.exec_func() fails compared to when the task code fails
directly. There is a recent fix in bitbake to solve that and these
tests will hopefully prevent regressions.

(From OE-Core rev: 50ccfaa8b3ed340ee7f906934b211a1c73eb8db5)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-21 21:53:52 +00:00
Richard Purdie
b0130fcf91 meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX license identifiers
An automated conversion using scripts/contrib/convert-spdx-licenses.py to
convert to use the standard SPDX license identifiers. Two recipes in meta-selftest
were not converted as they're that way specifically for testing. A change in
linux-firmware was also skipped and may need a more manual tweak.

(From OE-Core rev: ceda3238cdbf1beb216ae9ddb242470d5dfc25e0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-20 16:45:25 +00:00
Richard Purdie
ae00fcd638 selftest/bbtests: Add tests for git floating tag resolution
This test ensures that where a floating tag is used for a git url, there
aren't a number of different bugs such as inconsistent source revisions
for the tag within a given build and that the recipe is reparsed at each
run to ensure the tag is checked.

A test is also added to ensure that the build fails if SRCPV (get_srcrev())
isn't used yet there is a floating tag.

(From OE-Core rev: 33554ba3c034fc31744b27392afe751d645d6c2e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-17 17:51:03 +00:00
Alexander Kanavin
b93bd0e85e mdadm: update 4.1 -> 4.2
Drop 0001-Compute-abs-diff-in-a-standard-compliant-way.patch
(upstream refactored code)
mdadm-fix-ptest-build-errors.patch
(upstream fixed the issue)

(From OE-Core rev: acf82e36996c082f52c02d50b06965f74ef87430)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-11 10:53:44 +00:00
Vyacheslav Yurkov
822adf5c9f wic: image for overlayfs-etc tests
Introduce wic image for overlayfs-etc tests with a dedicated /data
partition and configurable kernel parameters

(From OE-Core rev: f9a2b08c07ff1270d5b3e8d72d17b6d5fde5bf96)

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-12 11:27:24 +00:00
Vyacheslav Yurkov
57979576f3 overlayfs: meta-selftest recipe fix
Avoid strict assignment in the recipe to allow overrides in .inc file

(From OE-Core rev: 2006e157d7dae3fd6aefd8f0f84afa0371b69449)

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-30 22:31:52 +01:00
Richard Purdie
ddcf16d1f7 meta: Add explict branch to git SRC_URIs
There is uncertainty about the default branch name in git going forward.
To try and cover the different possible outcomes, add branch names to all
git:// and gitsm:// SRC_URI entries.

This update was made with the script added to contrib in this patch which
aims to help others convert other layers.

(From OE-Core rev: b51c405faf6f8c0365f7533bfaf470d79152a463)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-30 18:56:47 +01:00
Kristian Klausen
b8c0f073f6 wic/bootimg-efi: Add Unified Kernel Image option
"A unified kernel image is a single EFI PE executable combining an EFI
stub loader, a kernel image, an initramfs image, and the kernel command
line.

[...]

Images of this type have the advantage that all metadata and payload
that makes up the boot entry is monopolized in a single PE file that can
be signed cryptographically as one for the purpose of EFI
SecureBoot."[1]

This commit adds a create-unified-kernel-image=true option to the
bootimg-efi plugin for creating a Unified Kernel Image[1] and installing
it into $BOOT/EFI/Linux/ with a .efi extension per the the Boot Loader
Specification[1][2]. This is useful for implementing Secure Boot.

systemd-boot is the only mainstream bootloader implementing the
specification, but GRUB should be able to boot the EFI binary, this
commit however doesn't implement the necessary changes to the GRUB
config generation logic to boot the Unified Kernel Image.

[1] https://systemd.io/BOOT_LOADER_SPECIFICATION/#type-2-efi-unified-kernel-images
[2] https://systemd.io/BOOT_LOADER_SPECIFICATION/

(From OE-Core rev: b0573f240525df561ddef6e47cb285b217d38487)

Signed-off-by: Kristian Klausen <kristian@klausen.dk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-04 15:03:53 +01:00
Richard Purdie
d08c9290e8 oeqa/selftest: Add tests for bitbake shell/python task output
We've seen issues where shell/python tasks lose their log file entries
or output and also where output is duplicated. Add some tests to attempt
to spot regressions in this area in future.

(From OE-Core rev: 414020a9bd656ee61efe2f47db1b31d86b15c1c8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-23 22:13:53 +01:00
Ross Burton
df6edbc33a selftest/python-async-test: set precise BSD license
"BSD" is ambiguous, use the precise license BSD-3-Clause.

(From OE-Core rev: 78a8427eb11d2931afcbf2a24d2441bf08bac0cf)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-04 08:44:10 +01:00
Vyacheslav Yurkov
44bbb74b76 overlayfs: meta-selftest recipe
The recipe demonstrates example usage of overlayfs bbclass

(From OE-Core rev: 1ad7a6fdd6382a30f1d9e115840ce8243b7fce2f)

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-12 06:26:15 +01:00
Vyacheslav Yurkov
9b5fbdea3d systemd-machine-units: add bbappend for meta-selftest
(From OE-Core rev: 797ab6d3237c3248778ea3c9304e92dcc94a67da)

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-12 06:26:15 +01:00
Richard Purdie
bb6ddc3691 Convert to new override syntax
This is the result of automated script conversion:

scripts/contrib/convert-overrides.py <oe-core directory>

converting the metadata to use ":" as the override character instead of "_".

(From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02 15:44:10 +01:00
Richard Purdie
83b9c24889 layer.conf: Update to add post 3.3 release honister series
(From OE-Core rev: c0f43f19fecfd16f973c2d2f8227106c46b451bb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-18 11:37:24 +01:00
Dorinda Bassey
e1f2f51698 meta-selftest: Add HOMEPAGE / DESCRIPTION
Added HOMEPAGE and DESCRIPTION for recipes with missing
descriptions or homepage.

(From OE-Core rev: f36f176dc0316a79ae288c3b4f6c2eab366810dd)

Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-16 17:52:21 +00:00
Richard Purdie
15cb12188e layer.conf: Update for hardknott release series
(From OE-Core rev: d430bf39f2f2ecdf989b33f7405751844d783fc5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-15 14:57:03 +00:00
Ross Burton
b0df39edd7 oeqa/selftest: add test to verify that poisoned sysroots are detected
Add a recipe that explicitly searches /usr/include, and use that in
oe-selftest to verify that host include paths are correctly causing
build failures.

(From OE-Core rev: b3e3eba796b843021b264f0e98dc30f983775d58)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-10 10:30:39 +00:00
Jan-Simon Moeller
8784e75a71 Add core-image-weston to reproducible build tests
This change adds core-image-weston to the reproducible build test.
For this we also need to update the static-group and static-passwd.

Besides the world package build which includes the wayland package,
this adds a wayland/weston-based image to the reproducible build test.

(From OE-Core rev: ffc4de47988ccf7568eecc8a27e8964beeaaacfb)

Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-02 20:39:35 +00:00
Richard Purdie
d54cada062 selftest/incompatible_lic: Update the tests after the 'or-later' license handling changes
With the separate of the "-only" and "-or-later" licenses, we need to
update the tests to match the messages now given in the output.

Also use a mix of canonicalised and non-canonlised names in the
reference recipes to help test those cases and ensure coverage.

(From OE-Core rev: b7f38af7ac9449178c603c5349808b8c0dd84d35)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-21 22:01:28 +00:00
hongxu
92a68c5ea4 apt: add nativesdk support
1. Add nativesdk support
- Apply the same patches of native
- Generate the same apt.conf.sample of native

2. Create user '_apt' to fix apt runtime warning
[snip]
$ apt update
...
W: No sandbox user '_apt' on the system, can not drop privileges
[snip]

RP: Add comment about need to user
RP: Add user to selftest static-passwd
(From OE-Core rev: be36b825ada573b2a7df9884eaab78664928594a)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-16 22:39:36 +00:00
Richard Purdie
919d8d2973 meta-selftest/staticids: Add ids for other recipes
Add dhcpc's uid/gid to the static configs used by meta-selftest for
testing since dhcpc was added to OE-Core.

Also realised many other ids were missing for other OE-Core recipes
so also add those.

(From OE-Core rev: 120551f30d86d3d5bd992c50b6751cb715a57e30)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-30 14:01:07 +00:00
Trevor Woerner
50734c7f71 selftest-chown: add test for fifos
Verify that fifos are properly handled by the build system.

(From OE-Core rev: 53988b6389ce618d4cff52bd09ae91108beca354)

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-30 14:01:07 +00:00
Paul Eggleton
87b38ee1c1 oe-selftest: fitimage: add test for signing FIT images
Add a new test to verify signing FIT images. Also includes testing for
the newly introduced FIT_SIGN_INDIVIDUAL, UBOOT_MKIMAGE,
UBOOT_MKIMAGE_SIGN, and UBOOT_MKIMAGE_SIGN_ARGS variables.

(From OE-Core rev: 3c054762278fd8c5dd827dbac15f4fa066e6c19e)

Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20 00:03:04 +00:00
Paul Barker
f50b230c27 bitbake.conf: Prevent pyc file generation in pseudo context
This also effectively reverts commit b6d30c21b0:
    bitbake.conf: Extend PSEUDO_IGNORE_PATHS to ${COREBASE}/meta

The contents of ${COREBASE}/meta were ignored as pyc files could be
generated for the contents of the lib subdirectory if python modules
were imported within a pseudo context. However this doesn't protect us
from pyc files being generated in the lib directories for other layers.
It's far better to tell python not to produce pyc files when running
under pseudo (by setting the PYTHONDONTWRITEBYTECODE variable) as this
will cover any location where pyc files could possibly be created. This
variable is set in FAKEROOTBASEENV so that it applies to the
bitbake-worker instance for fakeroot tasks, preventing pyc files from
being generated for imports in python tasks themselves.

Also add a test case to ensure that pyc files are not created in tasks
which are executed under pseudo.

(From OE-Core rev: 73d538f20743017a44cea4c20dbe09a0327cfc71)

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20 00:03:04 +00:00
Ross Burton
eda1c1459d wic-image-minimal: only depend on syslinux on x86 targets
Following other examples, only depend on syslinux when targetting x86.

(From OE-Core rev: c58fcc1379ca5755a5b670f79b75e94370d4943c)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-15 22:51:56 +00:00
Diego Sueiro
75b74f6b8d wic: Introduce empty plugin to create unformatted empty partitions
The empty wic plugin is used to create unformatted empty partitions for wic
images.

To use it you must pass "empty" as argument for the "--source" parameter in
the wks file. For example:
    part foo --source empty --ondisk sda --size="1024" --align 1024

Also adds a selftest for this plugin where the 'Fstype' column from 'wic
ls' should be empty for the second partition as listed in
test_empty_plugin.wks.

(From OE-Core rev: 77d174fc80663403ef76c5b808aafc1117d3545c)

Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-15 22:51:56 +00:00
Alexander Kanavin
6a6dbae43d selftest/virgl: drop the custom 30 sec timeout
This is occasionally reached on the AB; I am not sure if it is due to
host overload, or guest malfunction, but let's use the default 300 sec and
see if it helps.

[YOCTO #14097]

(From OE-Core rev: 93a0352e2e8539d109f6d3ddc0ed02b3b9256e86)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-20 11:11:46 +01:00
Ross Burton
d6bc178f33 selftest: add test for recipes with patches in overrides
devtool doesn't quite behave right when a recipe has patches applied in overrides, so
add a test case to exercise that behaviour.

(From OE-Core rev: ad89c3254cc6c06026f1bebe23ec3717c1546633)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-08 08:08:32 +01:00
Richard Purdie
dd82e01426 selftest/recipetool: Drop globbing SRC_URI test, no longer supported
Globbing is a bad idea in SRC_URI, it breaks the task checksums and
can't really be fixed. Since we're removing it, drop the test for
its interaction with recipetool.

(From OE-Core rev: 8bf93fa89aa1ba73f6eec05b95d6e8ca5f7d4c4b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-26 09:04:04 +01:00
Alexander Kanavin
cdb0abc90e meta-selftest: correct the virgl test for 5.8 kernels
(From OE-Core rev: 879bbe341b47ff576de76b2e8929df9f72f7f813)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-25 01:00:37 +01:00
Paul Barker
c7a85ba791 selftest-nopackages: New recipe in meta-selftest
This provides a test recipe which is known to inherit the nopackages
bbclass.

(From OE-Core rev: fe7096f1b921139b85fc22e3c948350521fe3406)

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-09 13:13:59 +01:00
Paul Barker
13980f7445 selftest-ed: Support native builds
This allows tests to switch to selftest-ed-native which has far fewer
dependencies than selftest-ed.

(From OE-Core rev: cb40325e2fcdf2036b71af5fcf01984d11ef2934)

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-09 13:13:59 +01:00
Paul Barker
c20cb1a00e selftest: git-submodule-test: New recipe for testing a gitsm SRC_URI
(From OE-Core rev: ee6de1281ee16df0d43f635a12881b39fd9061d0)

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-09 13:13:59 +01:00
Martin Jansa
047d3f39f5 meta-selftest: add test for .patch file with long filename and without subject
(From OE-Core rev: 7c3e17f34c74e838990006aaf570df501aa2c167)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-04 13:27:29 +01:00
Martin Jansa
456e7ab513 meta-selftest: add test of .gitignore in tarball
(From OE-Core rev: 8ee4f7c076b0fdbfc5b9d6b5bbbf8a02f5d062a7)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-04 13:27:29 +01:00
Alexander Kanavin
c4087787bc devtool: do not write md5sums into upgraded recipes
This will drop them md5sums from recipes that still have them,
and will not re-add them for recipes where they're already
removed.

[RP: Added fix for the test recipe]
(From OE-Core rev: 1609e77a4db04a4c01cbbff17261cd57e8f816ee)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-21 10:52:07 +01:00
Richard Purdie
f1fdd5812e layer.conf: Move to gatesgarth naming
We're still compatible with dunfell from the core perspective so
that is left for compatibility (probably for the next week or two).

(From OE-Core rev: 1e79324f8290b820fee034b0d4a8c353027879da)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-18 06:33:36 +01:00
Richard Purdie
f135cb3659 oeqa/selftest: Add test for conflicting sysroot provider
sysroot-test depends on virtual/sysroot-test which we build for one machine,
switch machine, switch provider of virtual/sysroot-test and check that the
sysroot is correctly cleaned up. The files in the two providers overlap
so can cause errors if the sysroot code doesn't function correctly.

Yes, sysroot-test should be machine specific really to avoid this, however
the sysroot cleanup should also work.

This adds a test for bug:

[YOCTO #13702]

(From OE-Core rev: 24ca62b3c1fd404b67d549b29aeeacf913e6dc86)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-26 14:00:50 +01:00
Daisuke Yamane
caa530a277 selftest/package: Add test to ensure ownership is preserved
Yocto Bug: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13806

Add test_preserve_ownership to selftest/package.
This test creates a file, a directory and a symbolic link and changes ownership,
then compares with them installed in rootfs to ensure ownership is preserved.

[Test without a commit 'bitbake: lib/bb/utils.py: Preserve ownership of symlink']
| 2020-03-14 10:01:14,519 - oe-selftest - INFO - test_preserve_ownership (package.PackageTests)
| 2020-03-14 10:56:44,612 - oe-selftest - INFO - Check ownership of /etc/selftest-chown/file
| 2020-03-14 10:56:44,770 - oe-selftest - INFO - Check ownership of /etc/selftest-chown/dir
| 2020-03-14 10:56:44,822 - oe-selftest - INFO - Check ownership of /etc/selftest-chown/symlink
| 2020-03-14 10:56:44,879 - oe-selftest - ERROR - Incrrect ownership /etc/selftest-chown/symlink [root:root]
| 2020-03-14 10:56:45,884 - oe-selftest - INFO -  ... FAIL

[Test with a commit 'bitbake: lib/bb/utils.py: Preserve ownership of symlink']
| 2020-03-14 10:58:49,599 - oe-selftest - INFO - test_preserve_ownership (package.PackageTests)
| 2020-03-14 11:51:39,947 - oe-selftest - INFO - Check ownership of /etc/selftest-chown/file
| 2020-03-14 11:51:40,013 - oe-selftest - INFO - Check ownership of /etc/selftest-chown/dir
| 2020-03-14 11:51:40,063 - oe-selftest - INFO - Check ownership of /etc/selftest-chown/symlink
| 2020-03-14 11:51:41,118 - oe-selftest - INFO -  ... ok

(From OE-Core rev: 88c1824468109d0f78d5fee7b71baa1f3944db7f)

Signed-off-by: Daisuke Yamane <daisuke.yamane@cybertrust.co.jp>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-26 14:00:50 +01:00
Richard Purdie
a6092298c8 layer.conf: Update to LAYERSERIES_CORENAME to dunfell
Update the layer core name to the new release name.

(From OE-Core rev: 090bb3b44ba0cc01c29942c00d43e910d1ff735e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-15 22:23:19 +00:00
Peter Kjellerstedt
86f318e524 incompatible_lic.py: Add tests for incompatible licenses with wildcards
Suggested-by: Quentin Schulz <quentin.schulz@streamunlimited.com>
(From OE-Core rev: ef7c44c9bdf30a02ccc71f26c27aab45d6adf1fb)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-16 23:25:50 +00:00
Alexander Kanavin
7081beeb18 selftest: check that 'devtool upgrade' correctly drops backported patches
There was a regression in this functionality that went unnoticed
due to lack of tests.

(From OE-Core rev: a75e4eceb703b2b13ddd4ba3dea3a86af0b0a9eb)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-21 23:08:20 +00:00
Ross Burton
feea1ef48d recipeutils-test: use a small dependency in the dummy recipe
recipeutils-test has virtual/libx11 as a DEPENDS, but this will cause errors if
the recipe is built in an environment without x11 in DISTRO_FEATURES.

This dependency isn't actually used for anything so we could remove it, but to
save updating the test cases too just swap virtual/libx11 for zlib.

[ YOCTO #13611 ]

(From OE-Core rev: 7dbd72a08a81436d9ddd168f44e5c13e28eaff99)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-04 13:39:05 +00:00
Alexander Kanavin
d1fb08991e selftest: skip virgl test on centos 7 entirely
With the sdl frontend, qemu isn't able to even boot fully,
so let's skip the test early.

(From OE-Core rev: 7b0708da20e4f04070837e5696e4fa3ee5990e8f)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-04 13:39:05 +00:00
Trevor Gamblin
c16d1ff13f aspell: upgrade from 0.60.7 to 0.60.8
New version fixes CVE-2019-17544 as well as various other bugs.

CVE: CVE-2019-17544

RP: Added tweak to fix meta-selftest
(From OE-Core rev: 3b788da31af6296a0404ed6080aef17708d61303)

Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-19 23:18:34 +01:00
Richard Purdie
81780d4758 layer.conf: Update for zeus series
(From OE-Core rev: a5c9709b8da6e7ad62167b5036e7f454a62aa83e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-08 20:47:34 +01:00
Joshua Watt
2b74cece39 oeqa: Test multiconfig parsing
Add a test to verify that when multiconfig conf files changed, recipes
are correctly reparsed.

[YOCTO #13541]

(From OE-Core rev: a424ef0a0c49123f4518e8fef993fd10f6fc5f4e)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27 13:02:17 +01:00
Oleksandr Kravchuk
2cf7d0f0b3 aspell: update to 0.60.7
Removed patch was upstreamed.

(From OE-Core rev: 78189e465f5b7afa756fe20de024c83b3d5ea9a5)

Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-12 16:23:57 +01:00
Ross Burton
a4bb53437e fortran-helloworld: neaten recipe
Use ${FC} instead of constructing the fortran name/arguments explictly, and
clean up installation.

(From OE-Core rev: a0d85e117fb636ffa12253b19f0ab2b5055e6380)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-31 23:03:01 +01:00
William Bourque
835f7eac06 meta/lib/oeqa: Test for bootimg-biosplusefi Source
Add unittests for bootimg-biosplusefi SourcePlugin in wic module.
First test check wic creation works correctly.
Second test uses qemu to boot image and checks that it has both
EFI and BIOS files in a single partition.

(From OE-Core rev: e0c3436241afca93f107e325d1b9ffcdebf706cd)

Signed-off-by: William Bourque <wbourque@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-23 22:26:28 +01:00
Ross Burton
f0c76ce18c fortran-helloworld: add a very dumb Fortran Hello World for testing
For future runtime testing something more complex is preferred but this is
sufficient to exercise the cross compiler.

(From OE-Core rev: 7d5f39ca717fa1caea357a4366bbf106386432c0)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-27 12:20:36 +01:00
Quentin Schulz
e3d0dd9163 selftests: add tests for INCOMPATIBLE_LICENSE
One bug went unnoticed without these selftests: an INCOMPATIBLE_LICENSE
with a non-SPDX license for a package with that non-SPDX license wasn't
enforcing the denial of build for said package. See
4b6ce4604c ("meta: license: fix non-SPDX
license being removed from INCOMPATIBLE_LICENSE")

While adding a test for that particular case, let's add a few more so
that we cover a handful more use cases of INCOMPATIBLE_LICENSE.

(From OE-Core rev: 6c2ca52218c196e7ccf6b3275bffc3e3a04193c6)

Signed-off-by: Quentin Schulz <quentin.schulz@streamunlimited.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-12 10:54:40 +01:00
Richard Purdie
32df42cff5 multiconfig: Adapt to bitbake switch 'multiconfig' -> 'mc'
(From OE-Core rev: 8a6f7c1e455156966f467008645fef14db679ccf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-10 14:46:38 +01:00
Richard Purdie
ffae400179 meta/lib+scripts: Convert to SPDX license headers
This adds SPDX license headers in place of the wide assortment of things
currently in our script headers. We default to GPL-2.0-only except for the
oeqa code where it was clearly submitted and marked as MIT on the most part
or some scripts which had the "or later" GPL versioning.

The patch also drops other obsolete bits of file headers where they were
encoountered such as editor modelines, obsolete maintainer information or
the phrase "All rights reserved" which is now obsolete and not required in
copyright headers (in this case its actually confusing for licensing as all
rights were not reserved).

More work is needed for OE-Core but this takes care of the bulk of the scripts
and meta/lib directories.

The top level LICENSE files are tweaked to match the new structure and the
SPDX naming.

(From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09 16:31:55 +01:00
Richard Purdie
22a02542b1 layer.conf: Update to warrior release name series
(From OE-Core rev: 13e45fffb66c7cb7ba0d07bed063c0c5ce57004b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-02 15:24:11 +01:00
Richard Purdie
aed0bc5382 meta-selftest/virgl: Exclude centos7 from the kmscube test
This test does not work on centos7 so diable it (as was done in the
original series before we thought it was working).

(From OE-Core rev: c27cdf83bc2b8ff802a5c4e0b49f18174af8e34a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-11 05:36:37 -07:00
Alexander Kanavin
d3c7d1a036 selftest: add tests for virgl GL acceleration
Note that the tests require that the host machine has a X display,
has mesa development files installed and is able to create OpenGL contexts.

(From OE-Core rev: 2868e8dfb9e62b49cd06f6c2d010405079d3a71c)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-04 14:27:06 +00:00
Richard Purdie
d9018a3d9c selftest: Add multiconfig test
Add a test for a multiconfig build which mixes tiny and musl builds
along with using the mcextend class to combine and package multiple images
into another image. This gives the multiconfig a decent test in a scenario
users may use.

(From OE-Core rev: 0c7fa15a7350808242754944243f01155bc6784c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-04 14:27:06 +00:00
Alexander Kanavin
eca87bf2b4 selftest/distrodata: un-break the upstream version check test
And fix the reported upstream check failures.

(From OE-Core rev: 63af0edcd954fac530ba17b04e5df5837cddc0a4)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-11 10:39:08 +00:00
Khem Raj
b71c20a8b0 recipeutils-test: Add missing LIC_FILES_CHKSUM
Fixes
ERROR: QA Issue: recipeutils-test: Recipe file fetches files and does
not have license file information (LIC_FILES_CHKSUM) [license-checksum]

(From OE-Core rev: ee65f7ab11302982124bcd1974a05c87342ab28e)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Paul Eggleton
5cd79e8147 oe-selftest: add some tests for recipeutils module
Add some tests for functions in meta/lib/oe/recipeutils.py, in
particular for a few issues I've just fixed. I haven't added tests for
all of the functions - some of them are already being tested via devtool
in any case.

(From OE-Core rev: 72d0cb3f8f1e69aeef93ea0bc90db3e8b8d6f94c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03 12:20:00 +00:00
Richard Purdie
4482befac6 meta-selftest/error: Cleanup large trailing whitespace
(From OE-Core rev: 0772b6de9dfbb276845c0a08ebcce41896b8056e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:36 +00:00
Richard Purdie
5c7f5e2d3b oeqa/selftest/buildoptions: Ensure diskmon tests run consistently
Heartbeat events default to once a second and we need to ensure we have
enough time in the task to see them.

Add a nostamp delay task 5s long so we can have a consistently timed
task which doesn't need cleanup or have unneeded dependencies. This
ensures we should deterministically see the disk moinitor events
regardless of the state of the build. This is done in a way which
doesn't corrupt build state or need cleanup and is efficient.

(From OE-Core rev: ecc49ee8986929e2429d948000a0ca588fe63959)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:36 +00:00