summaryrefslogtreecommitdiffstats
path: root/meta-selftest
diff options
context:
space:
mode:
Diffstat (limited to 'meta-selftest')
-rw-r--r--meta-selftest/COPYING.MIT17
-rw-r--r--meta-selftest/classes/base-do-configure-modified.bbclass3
-rw-r--r--meta-selftest/classes/test-mkimage-wrapper.bbclass19
-rw-r--r--meta-selftest/conf/layer.conf4
-rw-r--r--meta-selftest/conf/multiconfig/muslmc.conf2
-rw-r--r--meta-selftest/files/static-group17
-rw-r--r--meta-selftest/files/static-passwd10
-rw-r--r--meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py3
-rw-r--r--meta-selftest/lib/oeqa/runtime/cases/virgl.py18
-rw-r--r--meta-selftest/lib/pseudo_pyc_test1.py1
-rw-r--r--meta-selftest/lib/pseudo_pyc_test2.py1
-rw-r--r--meta-selftest/recipes-devtools/mtd/mtd-utils-selftest/0001-tests-Remove-unused-linux-fs.h-header-from-includes.patch31
-rw-r--r--meta-selftest/recipes-devtools/mtd/mtd-utils-selftest_git.bb77
-rw-r--r--meta-selftest/recipes-devtools/python/python-async-test.inc16
-rw-r--r--meta-selftest/recipes-devtools/python/python3-async-test_0.6.2.bb2
-rw-r--r--meta-selftest/recipes-devtools/rust/rust-c-lib-example-bin_git.bb16
-rw-r--r--meta-selftest/recipes-devtools/rust/rust-c-lib-example-crates.inc79
-rw-r--r--meta-selftest/recipes-devtools/rust/rust-c-lib-example_git.bb15
-rw-r--r--meta-selftest/recipes-extended/hello-rs/hello-rs-crates.inc8
-rw-r--r--meta-selftest/recipes-extended/hello-rs/hello-rs/0001-Greet-OE-Core.patch24
-rw-r--r--meta-selftest/recipes-extended/hello-rs/hello-rs_0.1.0.bb22
-rw-r--r--meta-selftest/recipes-extended/sysdig/sysdig-selftest/0055-Add-cstdint-for-uintXX_t-types.patch38
-rw-r--r--meta-selftest/recipes-extended/sysdig/sysdig-selftest/0099-cmake-Pass-PROBE_NAME-via-CFLAGS.patch29
-rw-r--r--meta-selftest/recipes-extended/sysdig/sysdig-selftest_0.28.0.bb66
-rw-r--r--meta-selftest/recipes-test/aspell/aspell_%.bbappend (renamed from meta-selftest/recipes-test/aspell/aspell_0.60.6.1.bbappend)0
-rw-r--r--meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb23
-rw-r--r--meta-selftest/recipes-test/base-files/base-files_%.bbappend2
-rw-r--r--meta-selftest/recipes-test/binutils/binutils_%.bbappend2
-rw-r--r--meta-selftest/recipes-test/container-image/container-image-testpkg.bb2
-rw-r--r--meta-selftest/recipes-test/cpp/.gitignore1
-rw-r--r--meta-selftest/recipes-test/cpp/cmake-example.bb25
-rw-r--r--meta-selftest/recipes-test/cpp/cmake-example/run-ptest10
-rw-r--r--meta-selftest/recipes-test/cpp/cpp-example.inc24
-rw-r--r--meta-selftest/recipes-test/cpp/files/CMakeLists.txt61
-rw-r--r--meta-selftest/recipes-test/cpp/files/cpp-example-lib.cpp33
-rw-r--r--meta-selftest/recipes-test/cpp/files/cpp-example-lib.hpp21
-rw-r--r--meta-selftest/recipes-test/cpp/files/cpp-example.cpp18
-rw-r--r--meta-selftest/recipes-test/cpp/files/meson.build38
-rw-r--r--meta-selftest/recipes-test/cpp/files/meson.options3
-rw-r--r--meta-selftest/recipes-test/cpp/files/test-cpp-example.cpp25
-rw-r--r--meta-selftest/recipes-test/cpp/meson-example.bb27
-rw-r--r--meta-selftest/recipes-test/cpp/meson-example/run-ptest10
-rw-r--r--meta-selftest/recipes-test/delay/delay.bb12
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-patch-overrides.bb8
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemuarm/arm.patch5
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemux86/x86.patch5
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-patch-overrides/source1
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-ignored.bb9
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch7
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch.expected16
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.tar.gzbin0 -> 205 bytes
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-local/file31
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb6
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-localonly.bb3
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-localonly/file31
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-long-filename.bb9
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch7
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch.expected16
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-long-filename/devtool-test-long-filename.tar.gzbin0 -> 180 bytes
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-patch-gz.bb2
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch37
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb4
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded5
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb6
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded6
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb16
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb.upgraded15
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb22
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb.upgraded19
-rw-r--r--meta-selftest/recipes-test/error/error.bb2
-rw-r--r--meta-selftest/recipes-test/fortran/files/hello.f955
-rw-r--r--meta-selftest/recipes-test/fortran/fortran-helloworld.bb24
-rw-r--r--meta-selftest/recipes-test/gcc-source/gcc-source_%.bbappend2
-rw-r--r--meta-selftest/recipes-test/git-submodule-test/git-submodule-test.bb26
-rw-r--r--meta-selftest/recipes-test/gitrepotest/gitrepotest.bb16
-rw-r--r--meta-selftest/recipes-test/gitrepotest/gitrepotest/0001-testpatch.patch9
-rw-r--r--meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline-fail.bb4
-rw-r--r--meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.bb5
-rw-r--r--meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.inc16
-rw-r--r--meta-selftest/recipes-test/images/oe-selftest-image.bb3
-rw-r--r--meta-selftest/recipes-test/images/wic-image-minimal.bb5
-rw-r--r--meta-selftest/recipes-test/license/incompatible-license-alias.bb5
-rw-r--r--meta-selftest/recipes-test/license/incompatible-license.bb5
-rw-r--r--meta-selftest/recipes-test/license/incompatible-licenses.bb5
-rw-r--r--meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb5
-rw-r--r--meta-selftest/recipes-test/logging-test/logging-test.bb34
-rw-r--r--meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb44
-rw-r--r--meta-selftest/recipes-test/multiconfig/multiconfig-test-parse.bb11
-rw-r--r--meta-selftest/recipes-test/nopackages/selftest-nopackages.bb6
-rw-r--r--meta-selftest/recipes-test/overlayfs-user/overlayfs-user.bb22
-rw-r--r--meta-selftest/recipes-test/packagenameconflict/packagenameconflict.bb10
-rw-r--r--meta-selftest/recipes-test/perlcross/perlcross_%.bbappend2
-rw-r--r--meta-selftest/recipes-test/poison/poison.bb20
-rw-r--r--meta-selftest/recipes-test/postinst/postinst_1.0.bb20
-rw-r--r--meta-selftest/recipes-test/pseudo-pyc-test/pseudo-pyc-test.bb15
-rw-r--r--meta-selftest/recipes-test/recipetool/files/selftest-replaceme-src-globfile1
-rw-r--r--meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb6
-rw-r--r--meta-selftest/recipes-test/recipeutils/recipeutils-test.inc5
-rw-r--r--meta-selftest/recipes-test/recipeutils/recipeutils-test/anotherfile0
-rw-r--r--meta-selftest/recipes-test/recipeutils/recipeutils-test/somefile0
-rw-r--r--meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb13
-rw-r--r--meta-selftest/recipes-test/selftest-chown/selftest-chown.bb30
-rw-r--r--meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb13
-rw-r--r--meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb4
-rw-r--r--meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb4
-rw-r--r--meta-selftest/recipes-test/selftest-hello/files/helloworld.c8
-rw-r--r--meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb19
-rw-r--r--meta-selftest/recipes-test/selftest-users/acreategroup.bb32
-rw-r--r--meta-selftest/recipes-test/selftest-users/bcreategroup.bb37
-rw-r--r--meta-selftest/recipes-test/selftest-users/ccreategroup.bb34
-rw-r--r--meta-selftest/recipes-test/selftest-users/creategroup1.bb30
-rw-r--r--meta-selftest/recipes-test/selftest-users/creategroup2.bb32
-rw-r--r--meta-selftest/recipes-test/selftest-users/dcreategroup.bb33
-rw-r--r--meta-selftest/recipes-test/selftest-users/useraddbadtask.bb20
-rw-r--r--meta-selftest/recipes-test/sysroot-test/sysroot-la-test_1.0.bb16
-rw-r--r--meta-selftest/recipes-test/sysroot-test/sysroot-pc-test_1.0.bb12
-rw-r--r--meta-selftest/recipes-test/sysroot-test/sysroot-shebang-test_1.0.bb12
-rw-r--r--meta-selftest/recipes-test/sysroot-test/sysroot-test-arch1_1.0.bb14
-rw-r--r--meta-selftest/recipes-test/sysroot-test/sysroot-test-arch2_1.0.bb14
-rw-r--r--meta-selftest/recipes-test/sysroot-test/sysroot-test_1.0.bb6
-rw-r--r--meta-selftest/recipes-test/systemd-machine-units/systemd-machine-units_%.bbappend2
-rw-r--r--meta-selftest/recipes-test/testrpm/files/testfile.txt1
-rw-r--r--meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb18
-rw-r--r--meta-selftest/recipes-test/wrapper/cmdline-shebang-wrapper-test.bb30
-rw-r--r--meta-selftest/recipes-test/wrapper/files/test.awk2
-rw-r--r--meta-selftest/wic/overlayfs_etc.wks.in4
-rw-r--r--meta-selftest/wic/test_biosplusefi_plugin.wks6
-rw-r--r--meta-selftest/wic/test_efi_plugin.wks6
-rw-r--r--meta-selftest/wic/test_empty_plugin.wks4
-rw-r--r--meta-selftest/wic/test_gpt_partition_name.wks7
-rw-r--r--meta-selftest/wic/test_rawcopy_plugin.wks.in2
-rw-r--r--meta-selftest/wic/test_uefikernel.wks5
132 files changed, 1811 insertions, 73 deletions
diff --git a/meta-selftest/COPYING.MIT b/meta-selftest/COPYING.MIT
deleted file mode 100644
index 89de354795..0000000000
--- a/meta-selftest/COPYING.MIT
+++ /dev/null
@@ -1,17 +0,0 @@
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/meta-selftest/classes/base-do-configure-modified.bbclass b/meta-selftest/classes/base-do-configure-modified.bbclass
new file mode 100644
index 0000000000..9175bb8ad9
--- /dev/null
+++ b/meta-selftest/classes/base-do-configure-modified.bbclass
@@ -0,0 +1,3 @@
+base_do_configure:append () {
+ echo "this changes base_do_configure() definiton "
+}
diff --git a/meta-selftest/classes/test-mkimage-wrapper.bbclass b/meta-selftest/classes/test-mkimage-wrapper.bbclass
new file mode 100644
index 0000000000..7c98d7b71e
--- /dev/null
+++ b/meta-selftest/classes/test-mkimage-wrapper.bbclass
@@ -0,0 +1,19 @@
+# Class to test UBOOT_MKIMAGE and UBOOT_MKIMAGE_SIGN
+# (in conjunction with kernel-fitimage.bbclass)
+#
+# SPDX-License-Identifier: MIT
+#
+
+UBOOT_MKIMAGE = "test_mkimage_wrapper"
+UBOOT_MKIMAGE_SIGN = "test_mkimage_signing_wrapper"
+
+test_mkimage_wrapper() {
+ echo "### uboot-mkimage wrapper message"
+ uboot-mkimage "$@"
+}
+
+test_mkimage_signing_wrapper() {
+ echo "### uboot-mkimage signing wrapper message"
+ uboot-mkimage "$@"
+}
+
diff --git a/meta-selftest/conf/layer.conf b/meta-selftest/conf/layer.conf
index 0626b2a3ea..48ca8464f9 100644
--- a/meta-selftest/conf/layer.conf
+++ b/meta-selftest/conf/layer.conf
@@ -9,4 +9,6 @@ BBFILE_COLLECTIONS += "selftest"
BBFILE_PATTERN_selftest = "^${LAYERDIR}/"
BBFILE_PRIORITY_selftest = "5"
-LAYERSERIES_COMPAT_selftest = "thud"
+addpylib ${LAYERDIR}/lib oeqa
+
+LAYERSERIES_COMPAT_selftest = "scarthgap"
diff --git a/meta-selftest/conf/multiconfig/muslmc.conf b/meta-selftest/conf/multiconfig/muslmc.conf
new file mode 100644
index 0000000000..043cd1ccc3
--- /dev/null
+++ b/meta-selftest/conf/multiconfig/muslmc.conf
@@ -0,0 +1,2 @@
+TCLIBC = "musl"
+TMPDIR = "${TOPDIR}/tmp-mc-musl"
diff --git a/meta-selftest/files/static-group b/meta-selftest/files/static-group
index 9213b8e9bc..f7a66de24d 100644
--- a/meta-selftest/files/static-group
+++ b/meta-selftest/files/static-group
@@ -11,4 +11,19 @@ avahi:x:509:
avahi-autoipd:x:510:
rpc:x:511:
rpcuser:x:513:
-
+dhcpcd:x:514:
+sshd:x:516:
+lpadmin:x:517:
+crontab:x:518:
+tracing:x:519:
+pulse:x:520:
+bind:x:521:
+builder:x:522:
+_apt:x:523:
+weston-launch:x:524:
+weston:x:525:
+wayland:x:526:
+render:x:527:
+sgx:x:528:
+ptest:x:529:
+xuser:x:530:
diff --git a/meta-selftest/files/static-passwd b/meta-selftest/files/static-passwd
index 412f85d469..cc6c5acd5c 100644
--- a/meta-selftest/files/static-passwd
+++ b/meta-selftest/files/static-passwd
@@ -9,3 +9,13 @@ avahi-autoipd:x:510:510::/:/bin/nologin
rpc:x:511:511::/:/bin/nologin
distcc:x:512:nogroup::/:/bin/nologin
rpcuser:x:513:513::/var/lib/nfs:/bin/nologin
+dhcpcd:x:514:514::/:/bin/nologin
+tester:x:515:515::/:/bin/nologin
+sshd:x:516:516::/:/bin/nologin
+pulse:x:520:520::/:/bin/nologin
+bind:x:521:521::/:/bin/nologin
+builder:x:522:522::/:/bin/nologin
+_apt:x:523:523::/:/bin/nologin
+weston:x:525:525::/:/bin/nologin
+ptest:x:529:529::/:/bin/nologin
+xuser:x:530:530::/:/bin/nologin
diff --git a/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py b/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py
index 64a3502370..d2f0f88f7d 100644
--- a/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py
+++ b/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py
@@ -10,7 +10,8 @@ class DnfSelftest(DnfTest):
import tempfile
cls.temp_dir = tempfile.TemporaryDirectory(prefix="oeqa-remotefeeds-")
cls.repo_server = HTTPService(os.path.join(cls.tc.td['WORKDIR'], 'oe-rootfs-repo'),
- cls.tc.target.server_ip)
+ '0.0.0.0', port=cls.tc.target.server_port,
+ logger=cls.tc.logger)
cls.repo_server.start()
@classmethod
diff --git a/meta-selftest/lib/oeqa/runtime/cases/virgl.py b/meta-selftest/lib/oeqa/runtime/cases/virgl.py
new file mode 100644
index 0000000000..f19cdee9f0
--- /dev/null
+++ b/meta-selftest/lib/oeqa/runtime/cases/virgl.py
@@ -0,0 +1,18 @@
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+import subprocess
+import oe.lsb
+
+class VirglTest(OERuntimeTestCase):
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_kernel_driver(self):
+ status, output = self.target.run('dmesg|grep virgl')
+ self.assertEqual(status, 0, "Checking for virgl driver in dmesg returned non-zero: %d\n%s" % (status, output))
+ self.assertIn("features: +virgl", output, "virgl acceleration seems to be disabled:\n%s" %(output))
+
+ @OETestDepends(['virgl.VirglTest.test_kernel_driver'])
+ def test_kmscube(self):
+ status, output = self.target.run('kmscube')
+ self.assertEqual(status, 0, "kmscube exited with non-zero status %d and output:\n%s" %(status, output))
+ self.assertIn('renderer: "virgl', output, "kmscube does not seem to use virgl:\n%s" %(output))
diff --git a/meta-selftest/lib/pseudo_pyc_test1.py b/meta-selftest/lib/pseudo_pyc_test1.py
new file mode 100644
index 0000000000..b59abdd536
--- /dev/null
+++ b/meta-selftest/lib/pseudo_pyc_test1.py
@@ -0,0 +1 @@
+STRING = "pseudo_pyc_test1"
diff --git a/meta-selftest/lib/pseudo_pyc_test2.py b/meta-selftest/lib/pseudo_pyc_test2.py
new file mode 100644
index 0000000000..fb67a978e0
--- /dev/null
+++ b/meta-selftest/lib/pseudo_pyc_test2.py
@@ -0,0 +1 @@
+STRING = "pseudo_pyc_test2"
diff --git a/meta-selftest/recipes-devtools/mtd/mtd-utils-selftest/0001-tests-Remove-unused-linux-fs.h-header-from-includes.patch b/meta-selftest/recipes-devtools/mtd/mtd-utils-selftest/0001-tests-Remove-unused-linux-fs.h-header-from-includes.patch
new file mode 100644
index 0000000000..73d4a8475f
--- /dev/null
+++ b/meta-selftest/recipes-devtools/mtd/mtd-utils-selftest/0001-tests-Remove-unused-linux-fs.h-header-from-includes.patch
@@ -0,0 +1,31 @@
+From 6fb10bd18488ed84776675bc1b2982800a51d839 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 6 Aug 2022 20:14:38 -0700
+Subject: [mtd-utils][PATCH] tests: Remove unused linux/fs.h header from includes
+
+This header is not needed, moreover it includes linux/mount.h which is
+now in conflict[1] with glibc provided sys/mount.h from glibc 2.36 onwards
+
+[1] https://sourceware.org/glibc/wiki/Release/2.36
+
+Upstream-Status: Submitted [https://lists.infradead.org/pipermail/linux-mtd/2022-August/094667.html]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tests/fs-tests/lib/tests.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/tests/fs-tests/lib/tests.c b/tests/fs-tests/lib/tests.c
+index d1a2e0c..3db0426 100644
+--- a/tests/fs-tests/lib/tests.c
++++ b/tests/fs-tests/lib/tests.c
+@@ -35,7 +35,6 @@
+ #include <sys/vfs.h>
+ #include <sys/mount.h>
+ #include <sys/statvfs.h>
+-#include <linux/fs.h>
+ #include <linux/jffs2.h>
+
+ #include "tests.h"
+--
+2.37.1
+
diff --git a/meta-selftest/recipes-devtools/mtd/mtd-utils-selftest_git.bb b/meta-selftest/recipes-devtools/mtd/mtd-utils-selftest_git.bb
new file mode 100644
index 0000000000..ca2141c972
--- /dev/null
+++ b/meta-selftest/recipes-devtools/mtd/mtd-utils-selftest_git.bb
@@ -0,0 +1,77 @@
+SUMMARY = "Tools for managing memory technology devices"
+HOMEPAGE = "http://www.linux-mtd.infradead.org/"
+DESCRIPTION = "mtd-utils tool is a generic Linux subsystem for memory devices, especially Flash devices."
+SECTION = "base"
+LICENSE = "GPL-2.0-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
+ file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
+
+inherit autotools pkgconfig update-alternatives
+
+DEPENDS = "zlib e2fsprogs util-linux"
+RDEPENDS:mtd-utils-tests += "bash"
+
+PV = "2.1.4"
+
+SRCREV = "c7f1bfa44a84d02061787e2f6093df5cc40b9f5c"
+SRC_URI = "git://git.infradead.org/mtd-utils.git;branch=master \
+ file://0001-tests-Remove-unused-linux-fs.h-header-from-includes.patch \
+ "
+
+S = "${WORKDIR}/git"
+
+# xattr support creates an additional compile-time dependency on acl because
+# the sys/acl.h header is needed. libacl is not needed and thus enabling xattr
+# regardless whether acl is enabled or disabled in the distro should be okay.
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)} lzo jffs ubifs"
+PACKAGECONFIG[lzo] = "--with-lzo,--without-lzo,lzo"
+PACKAGECONFIG[xattr] = "--with-xattr,--without-xattr,acl"
+PACKAGECONFIG[crypto] = "--with-crypto,--without-crypto,openssl"
+PACKAGECONFIG[jffs] = "--with-jffs,--without-jffs"
+PACKAGECONFIG[ubifs] = "--with-ubifs,--without-ubifs"
+PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
+
+CPPFLAGS:append:riscv64 = " -pthread -D_REENTRANT"
+
+EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} ${@bb.utils.contains('PACKAGECONFIG', 'xattr', '', '-DWITHOUT_XATTR', d)} -I${S}/include' 'BUILDDIR=${S}'"
+
+# Use higher priority than corresponding BusyBox-provided applets
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE:${PN} = "flashcp flash_eraseall flash_lock flash_unlock nanddump nandwrite"
+ALTERNATIVE:${PN}-ubifs = "ubiattach ubidetach ubimkvol ubirename ubirmvol ubirsvol ubiupdatevol"
+
+ALTERNATIVE_LINK_NAME[nandwrite] = "${sbindir}/nandwrite"
+ALTERNATIVE_LINK_NAME[nanddump] = "${sbindir}/nanddump"
+ALTERNATIVE_LINK_NAME[ubiattach] = "${sbindir}/ubiattach"
+ALTERNATIVE_LINK_NAME[ubidetach] = "${sbindir}/ubidetach"
+ALTERNATIVE_LINK_NAME[ubimkvol] = "${sbindir}/ubimkvol"
+ALTERNATIVE_LINK_NAME[ubirename] = "${sbindir}/ubirename"
+ALTERNATIVE_LINK_NAME[ubirmvol] = "${sbindir}/ubirmvol"
+ALTERNATIVE_LINK_NAME[ubirsvol] = "${sbindir}/ubirsvol"
+ALTERNATIVE_LINK_NAME[ubiupdatevol] = "${sbindir}/ubiupdatevol"
+ALTERNATIVE_LINK_NAME[flash_eraseall] = "${sbindir}/flash_eraseall"
+ALTERNATIVE_LINK_NAME[flash_lock] = "${sbindir}/flash_lock"
+ALTERNATIVE_LINK_NAME[flash_unlock] = "${sbindir}/flash_unlock"
+ALTERNATIVE_LINK_NAME[flashcp] = "${sbindir}/flashcp"
+
+do_install () {
+ oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
+}
+
+PACKAGES =+ "mtd-utils-misc mtd-utils-tests"
+PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "jffs", "mtd-utils-jffs2", "", d)}"
+PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "ubifs", "mtd-utils-ubifs", "", d)}"
+
+FILES:mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool"
+FILES:mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*"
+FILES:mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image"
+FILES:mtd-utils-tests = "${libexecdir}/mtd-utils/*"
+
+BBCLASSEXTEND = "native nativesdk"
+
+# git/.compr.c.dep:46: warning: NUL character seen; rest of line ignored
+# git/.compr.c.dep:47: *** missing separator. Stop.
+PARALLEL_MAKE = ""
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-devtools/python/python-async-test.inc b/meta-selftest/recipes-devtools/python/python-async-test.inc
new file mode 100644
index 0000000000..a7dd1744f2
--- /dev/null
+++ b/meta-selftest/recipes-devtools/python/python-async-test.inc
@@ -0,0 +1,16 @@
+SUMMARY = "Python framework to process interdependent tasks in a pool of workers"
+HOMEPAGE = "http://github.com/gitpython-developers/async"
+SECTION = "devel/python"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=88df8e78b9edfd744953862179f2d14e"
+
+inherit pypi
+
+PYPI_PACKAGE = "async"
+
+SRC_URI[md5sum] = "9b06b5997de2154f3bc0273f80bcef6b"
+SRC_URI[sha256sum] = "ac6894d876e45878faae493b0cf61d0e28ec417334448ac0a6ea2229d8343051"
+
+RDEPENDS:${PN} += "python3-threading"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/meta-selftest/recipes-devtools/python/python3-async-test_0.6.2.bb b/meta-selftest/recipes-devtools/python/python3-async-test_0.6.2.bb
new file mode 100644
index 0000000000..22e241afb3
--- /dev/null
+++ b/meta-selftest/recipes-devtools/python/python3-async-test_0.6.2.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-async-test.inc
diff --git a/meta-selftest/recipes-devtools/rust/rust-c-lib-example-bin_git.bb b/meta-selftest/recipes-devtools/rust/rust-c-lib-example-bin_git.bb
new file mode 100644
index 0000000000..47d878597a
--- /dev/null
+++ b/meta-selftest/recipes-devtools/rust/rust-c-lib-example-bin_git.bb
@@ -0,0 +1,16 @@
+DESCRIPTION = "A simple example for C wrapper around a rust library"
+HOMEPAGE = "https://gitlab.com/fmartinsonsHome/rust-c-lib-example"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=cb9c441273ed8a029701a086befbfc63"
+
+SRC_URI = " \
+ git://gitlab.com/fmartinsonsHome/rust-c-lib-example.git;branch=main;protocol=https \
+"
+
+SRCREV = "fc53c457f69aa5221ec1f8619a007e8150db5e60"
+S = "${WORKDIR}/git"
+
+DEPENDS = "rust-c-lib-example"
+
+inherit meson pkgconfig
+
diff --git a/meta-selftest/recipes-devtools/rust/rust-c-lib-example-crates.inc b/meta-selftest/recipes-devtools/rust/rust-c-lib-example-crates.inc
new file mode 100644
index 0000000000..05f5949203
--- /dev/null
+++ b/meta-selftest/recipes-devtools/rust/rust-c-lib-example-crates.inc
@@ -0,0 +1,79 @@
+SRC_URI += " \
+ crate://crates.io/android-tzdata/0.1.1 \
+ crate://crates.io/android_system_properties/0.1.5 \
+ crate://crates.io/autocfg/1.1.0 \
+ crate://crates.io/bumpalo/3.13.0 \
+ crate://crates.io/cc/1.0.82 \
+ crate://crates.io/cfg-if/1.0.0 \
+ crate://crates.io/chrono/0.4.26 \
+ crate://crates.io/core-foundation-sys/0.8.4 \
+ crate://crates.io/iana-time-zone/0.1.57 \
+ crate://crates.io/iana-time-zone-haiku/0.1.2 \
+ crate://crates.io/js-sys/0.3.64 \
+ crate://crates.io/libc/0.2.147 \
+ crate://crates.io/log/0.4.19 \
+ crate://crates.io/num-traits/0.2.16 \
+ crate://crates.io/once_cell/1.18.0 \
+ crate://crates.io/proc-macro2/1.0.66 \
+ crate://crates.io/quote/1.0.32 \
+ crate://crates.io/syn/2.0.28 \
+ crate://crates.io/time/0.1.45 \
+ crate://crates.io/unicode-ident/1.0.11 \
+ crate://crates.io/wasi/0.10.0+wasi-snapshot-preview1 \
+ crate://crates.io/wasm-bindgen/0.2.87 \
+ crate://crates.io/wasm-bindgen-backend/0.2.87 \
+ crate://crates.io/wasm-bindgen-macro/0.2.87 \
+ crate://crates.io/wasm-bindgen-macro-support/0.2.87 \
+ crate://crates.io/wasm-bindgen-shared/0.2.87 \
+ crate://crates.io/winapi/0.3.9 \
+ crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \
+ crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \
+ crate://crates.io/windows/0.48.0 \
+ crate://crates.io/windows-targets/0.48.1 \
+ crate://crates.io/windows_aarch64_gnullvm/0.48.0 \
+ crate://crates.io/windows_aarch64_msvc/0.48.0 \
+ crate://crates.io/windows_i686_gnu/0.48.0 \
+ crate://crates.io/windows_i686_msvc/0.48.0 \
+ crate://crates.io/windows_x86_64_gnu/0.48.0 \
+ crate://crates.io/windows_x86_64_gnullvm/0.48.0 \
+ crate://crates.io/windows_x86_64_msvc/0.48.0 \
+"
+
+SRC_URI[android-tzdata-0.1.1.sha256sum] = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
+SRC_URI[android_system_properties-0.1.5.sha256sum] = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+SRC_URI[autocfg-1.1.0.sha256sum] = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+SRC_URI[bumpalo-3.13.0.sha256sum] = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1"
+SRC_URI[cc-1.0.82.sha256sum] = "305fe645edc1442a0fa8b6726ba61d422798d37a52e12eaecf4b022ebbb88f01"
+SRC_URI[cfg-if-1.0.0.sha256sum] = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+SRC_URI[chrono-0.4.26.sha256sum] = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5"
+SRC_URI[core-foundation-sys-0.8.4.sha256sum] = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
+SRC_URI[iana-time-zone-0.1.57.sha256sum] = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613"
+SRC_URI[iana-time-zone-haiku-0.1.2.sha256sum] = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
+SRC_URI[js-sys-0.3.64.sha256sum] = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a"
+SRC_URI[libc-0.2.147.sha256sum] = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
+SRC_URI[log-0.4.19.sha256sum] = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4"
+SRC_URI[num-traits-0.2.16.sha256sum] = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2"
+SRC_URI[once_cell-1.18.0.sha256sum] = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
+SRC_URI[proc-macro2-1.0.66.sha256sum] = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9"
+SRC_URI[quote-1.0.32.sha256sum] = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965"
+SRC_URI[syn-2.0.28.sha256sum] = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567"
+SRC_URI[time-0.1.45.sha256sum] = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
+SRC_URI[unicode-ident-1.0.11.sha256sum] = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c"
+SRC_URI[wasi-0.10.0+wasi-snapshot-preview1.sha256sum] = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
+SRC_URI[wasm-bindgen-0.2.87.sha256sum] = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342"
+SRC_URI[wasm-bindgen-backend-0.2.87.sha256sum] = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd"
+SRC_URI[wasm-bindgen-macro-0.2.87.sha256sum] = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d"
+SRC_URI[wasm-bindgen-macro-support-0.2.87.sha256sum] = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
+SRC_URI[wasm-bindgen-shared-0.2.87.sha256sum] = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"
+SRC_URI[winapi-0.3.9.sha256sum] = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+SRC_URI[winapi-i686-pc-windows-gnu-0.4.0.sha256sum] = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+SRC_URI[winapi-x86_64-pc-windows-gnu-0.4.0.sha256sum] = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+SRC_URI[windows-0.48.0.sha256sum] = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
+SRC_URI[windows-targets-0.48.1.sha256sum] = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f"
+SRC_URI[windows_aarch64_gnullvm-0.48.0.sha256sum] = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
+SRC_URI[windows_aarch64_msvc-0.48.0.sha256sum] = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
+SRC_URI[windows_i686_gnu-0.48.0.sha256sum] = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
+SRC_URI[windows_i686_msvc-0.48.0.sha256sum] = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
+SRC_URI[windows_x86_64_gnu-0.48.0.sha256sum] = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
+SRC_URI[windows_x86_64_gnullvm-0.48.0.sha256sum] = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
+SRC_URI[windows_x86_64_msvc-0.48.0.sha256sum] = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
diff --git a/meta-selftest/recipes-devtools/rust/rust-c-lib-example_git.bb b/meta-selftest/recipes-devtools/rust/rust-c-lib-example_git.bb
new file mode 100644
index 0000000000..6e7c250b92
--- /dev/null
+++ b/meta-selftest/recipes-devtools/rust/rust-c-lib-example_git.bb
@@ -0,0 +1,15 @@
+DESCRIPTION = "A simple example for rust C library"
+HOMEPAGE = "https://gitlab.com/fmartinsonsHome/rust-c-lib-example"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=cb9c441273ed8a029701a086befbfc63"
+
+SRC_URI = " \
+ git://gitlab.com/fmartinsonsHome/rust-c-lib-example.git;branch=main;protocol=https \
+"
+
+SRCREV = "fc53c457f69aa5221ec1f8619a007e8150db5e60"
+S = "${WORKDIR}/git"
+
+inherit cargo_c
+
+require ${BPN}-crates.inc
diff --git a/meta-selftest/recipes-extended/hello-rs/hello-rs-crates.inc b/meta-selftest/recipes-extended/hello-rs/hello-rs-crates.inc
new file mode 100644
index 0000000000..9646482b28
--- /dev/null
+++ b/meta-selftest/recipes-extended/hello-rs/hello-rs-crates.inc
@@ -0,0 +1,8 @@
+# Autogenerated with 'bitbake -c update_crates hello-rs'
+
+# from Cargo.lock
+SRC_URI += " \
+ crate://crates.io/figlet-rs/0.1.5 \
+"
+
+SRC_URI[figlet-rs-0.1.5.sha256sum] = "4742a071cd9694fc86f9fa1a08fa3e53d40cc899d7ee532295da2d085639fbc5"
diff --git a/meta-selftest/recipes-extended/hello-rs/hello-rs/0001-Greet-OE-Core.patch b/meta-selftest/recipes-extended/hello-rs/hello-rs/0001-Greet-OE-Core.patch
new file mode 100644
index 0000000000..7569ccef7b
--- /dev/null
+++ b/meta-selftest/recipes-extended/hello-rs/hello-rs/0001-Greet-OE-Core.patch
@@ -0,0 +1,24 @@
+From 3aea1ece0ca6ac0bf0ffe42736827af22966f767 Mon Sep 17 00:00:00 2001
+From: Alex Kiernan <alexk@zuma.ai>
+Date: Wed, 27 Dec 2023 09:55:48 +0000
+Subject: [PATCH] Greet "OE-Core"
+
+Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
+Upstream-Status: Inappropriate
+---
+ src/main.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/main.rs b/src/main.rs
+index f4a310758b19..224eca65c38d 100644
+--- a/src/main.rs
++++ b/src/main.rs
+@@ -3,7 +3,7 @@ use hello_lib::greet;
+
+ fn main() {
+ let standard_font = FIGfont::standard().unwrap();
+- let greeting = greet(None);
++ let greeting = greet(Some("OE-Core"));
+ let figure = standard_font.convert(&greeting);
+ println!("{}", figure.unwrap());
+ }
diff --git a/meta-selftest/recipes-extended/hello-rs/hello-rs_0.1.0.bb b/meta-selftest/recipes-extended/hello-rs/hello-rs_0.1.0.bb
new file mode 100644
index 0000000000..9a136f2978
--- /dev/null
+++ b/meta-selftest/recipes-extended/hello-rs/hello-rs_0.1.0.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Simple hello world example"
+HOMEPAGE = "https://github.com/akiernan/hello-bin"
+LICENSE = "Unlicense"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7246f848faa4e9c9fc0ea91122d6e680"
+
+SRC_URI = "git://github.com/akiernan/hello-bin.git;protocol=https;branch=main;subpath=rust \
+ file://0001-Greet-OE-Core.patch \
+ git://github.com/akiernan/hello-lib.git;protocol=https;branch=main;name=hello-lib;destsuffix=hello-lib;type=git-dependency \
+ "
+SRCREV = "d3d096eda182644868f8e7458dcfa538ff637db3"
+
+SRCREV_FORMAT .= "_hello-lib"
+SRCREV_hello-lib = "59c84574e844617043cf337bc8fa537cf87ad8ae"
+
+S = "${WORKDIR}/rust"
+
+inherit cargo cargo-update-recipe-crates ptest-cargo
+
+# Remove this when the recipe is reproducible
+EXCLUDE_FROM_WORLD = "1"
+
+require ${BPN}-crates.inc
diff --git a/meta-selftest/recipes-extended/sysdig/sysdig-selftest/0055-Add-cstdint-for-uintXX_t-types.patch b/meta-selftest/recipes-extended/sysdig/sysdig-selftest/0055-Add-cstdint-for-uintXX_t-types.patch
new file mode 100644
index 0000000000..e564958dad
--- /dev/null
+++ b/meta-selftest/recipes-extended/sysdig/sysdig-selftest/0055-Add-cstdint-for-uintXX_t-types.patch
@@ -0,0 +1,38 @@
+From 3d076ea588eb3c7f334133b4c31172a14beadf5b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 2 Feb 2023 20:18:27 -0800
+Subject: [PATCH] Add <cstdint> for uintXX_t types
+
+gcc 13 moved some includes around and as a result <cstdint> is no
+longer transitively included [1]. Explicitly include it
+for uintXX_t.
+
+[1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
+
+Upstream-Status: Submitted [https://github.com/falcosecurity/libs/pull/862]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ userspace/libsinsp/filter/parser.h | 1 +
+ userspace/libsinsp/filter_value.h | 1 +
+ 2 files changed, 2 insertions(+)
+
+--- a/userspace/libsinsp/filter/parser.h
++++ b/userspace/libsinsp/filter/parser.h
+@@ -18,6 +18,7 @@ limitations under the License.
+ #pragma once
+
+ #include "ast.h"
++#include <cstdint>
+
+ //
+ // Context-free Grammar for Sinsp Filters
+--- a/userspace/libsinsp/filter_value.h
++++ b/userspace/libsinsp/filter_value.h
+@@ -18,6 +18,7 @@ limitations under the License.
+ #pragma once
+
+ #include <string.h>
++#include <cstdint>
+ #include <utility>
+
+ // Used for CO_IN/CO_PMATCH filterchecks using PT_CHARBUFs to allow
diff --git a/meta-selftest/recipes-extended/sysdig/sysdig-selftest/0099-cmake-Pass-PROBE_NAME-via-CFLAGS.patch b/meta-selftest/recipes-extended/sysdig/sysdig-selftest/0099-cmake-Pass-PROBE_NAME-via-CFLAGS.patch
new file mode 100644
index 0000000000..903ccdf36a
--- /dev/null
+++ b/meta-selftest/recipes-extended/sysdig/sysdig-selftest/0099-cmake-Pass-PROBE_NAME-via-CFLAGS.patch
@@ -0,0 +1,29 @@
+From ed8969a233adb6bf701de96d0fd0570e5ddcc787 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 21 Mar 2022 19:35:48 -0700
+Subject: [PATCH] cmake: Pass PROBE_NAME via CFLAGS
+
+This helps compliation of driver code where its calling modprobe on the
+given kernel module via system() API
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7dceb7ae..e156c36f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -149,6 +149,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ if(NOT DEFINED PROBE_NAME)
+ set(PROBE_NAME "scap")
+ endif()
++ add_definitions(-DPROBE_NAME="${PROBE_NAME}")
+
+ set(DRIVERS_REPO "https://download.sysdig.com/scap-drivers")
+
+--
+2.35.1
+
diff --git a/meta-selftest/recipes-extended/sysdig/sysdig-selftest_0.28.0.bb b/meta-selftest/recipes-extended/sysdig/sysdig-selftest_0.28.0.bb
new file mode 100644
index 0000000000..2ce85fe451
--- /dev/null
+++ b/meta-selftest/recipes-extended/sysdig/sysdig-selftest_0.28.0.bb
@@ -0,0 +1,66 @@
+SUMMARY = "A New System Troubleshooting Tool Built for the Way You Work"
+DESCRIPTION = "Sysdig is open source, system-level exploration: capture \
+system state and activity from a running Linux instance, then save, \
+filter and analyze."
+HOMEPAGE = "http://www.sysdig.org/"
+LICENSE = "Apache-2.0 & (MIT | GPL-2.0-only)"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f8fee3d59797546cffab04f3b88b2d44"
+
+inherit cmake pkgconfig
+
+#OECMAKE_GENERATOR = "Unix Makefiles"
+JIT ?= "jit"
+JIT:mipsarchn32 = ""
+JIT:mipsarchn64 = ""
+JIT:riscv64 = ""
+JIT:riscv32 = ""
+JIT:powerpc = ""
+JIT:powerpc64le = ""
+JIT:powerpc64 = ""
+
+#DEPENDS += "libb64 lua${JIT} zlib c-ares grpc-native grpc curl ncurses jsoncpp \
+# tbb jq openssl elfutils protobuf protobuf-native jq-native valijson"
+RDEPENDS:${PN} = "bash"
+
+SRC_URI = "git://github.com/draios/sysdig.git;branch=dev;protocol=https;name=sysdig \
+ git://github.com/falcosecurity/libs;protocol=https;branch=master;name=falco;subdir=git/falcosecurity-libs \
+ file://0055-Add-cstdint-for-uintXX_t-types.patch;patchdir=./falcosecurity-libs \
+ file://0099-cmake-Pass-PROBE_NAME-via-CFLAGS.patch \
+ "
+SRCREV_sysdig = "4fb6288275f567f63515df0ff0a6518043ecfa9b"
+SRCREV_falco= "caa0e4d0044fdaaebab086592a97f0c7f32aeaa9"
+
+SRCREV_FORMAT = "sysdig_falco"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECMAKE = "\
+ -DBUILD_DRIVER=OFF \
+ -DMINIMAL_BUILD=ON \
+ -DUSE_BUNDLED_DEPS=OFF \
+ -DCREATE_TEST_TARGETS=OFF \
+ -DDIR_ETC=${sysconfdir} \
+ -DLUA_INCLUDE_DIR=${STAGING_INCDIR}/luajit-2.1 \
+ -DFALCOSECURITY_LIBS_SOURCE_DIR=${S}/falcosecurity-libs \
+ -DVALIJSON_INCLUDE=${STAGING_INCDIR}/valijson \
+"
+
+#CMAKE_VERBOSE = "VERBOSE=1"
+
+FILES:${PN} += " \
+ ${DIR_ETC}/* \
+ ${datadir}/zsh/* \
+ ${prefix}/src/* \
+"
+# Use getaddrinfo_a is a GNU extension in libsinsp
+# It should be fixed in sysdig, until then disable
+# on musl
+# Something like this https://code.videolan.org/ePirat/vlc/-/commit/01fd9fe4c7f6c5558f7345f38abf0152e17853ab is needed to fix it
+COMPATIBLE_HOST:libc-musl = "null"
+COMPATIBLE_HOST:mips = "null"
+COMPATIBLE_HOST:riscv64 = "null"
+COMPATIBLE_HOST:riscv32 = "null"
+COMPATIBLE_HOST:powerpc = "null"
+COMPATIBLE_HOST:powerpc64le = "null"
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/aspell/aspell_0.60.6.1.bbappend b/meta-selftest/recipes-test/aspell/aspell_%.bbappend
index 205720982c..205720982c 100644
--- a/meta-selftest/recipes-test/aspell/aspell_0.60.6.1.bbappend
+++ b/meta-selftest/recipes-test/aspell/aspell_%.bbappend
diff --git a/meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb b/meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb
index 922518bc39..e1e473fe80 100644
--- a/meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb
+++ b/meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb
@@ -4,12 +4,11 @@
SUMMARY = "GNU Aspell spell-checker"
SECTION = "console/utils"
+HOMEPAGE = "https://ftp.gnu.org/gnu/aspell/"
-LICENSE = "LGPLv2 | LGPLv2.1"
+LICENSE = "LGPL-2.0-only | LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
-PR = "r1"
-
SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz"
SRC_URI[md5sum] = "e66a9c9af6a60dc46134fdacf6ce97d7"
SRC_URI[sha256sum] = "f52583a83a63633701c5f71db3dc40aab87b7f76b29723aeb27941eff42df6e1"
@@ -21,15 +20,15 @@ PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses"
PACKAGES += "libaspell libpspell libpspell-dev aspell-utils"
-FILES_${PN}-dbg += "${libdir}/aspell-0.60/.debu*"
-FILES_libaspell = "${libdir}/libaspell.so.* ${libdir}/aspell*"
-FILES_aspell-utils = "${bindir}/word-list-compress ${bindir}/aspell-import ${bindir}/run-with-aspell ${bindir}/pre*"
-FILES_${PN} = "${bindir}/aspell"
-FILES_libpspell = "${libdir}/libpspell.so.*"
-FILES_libpspell-dev = "${libdir}/libpspell* ${bindir}/pspell-config ${includedir}/pspell"
+FILES:${PN}-dbg += "${libdir}/aspell-0.60/.debu*"
+FILES:libaspell = "${libdir}/libaspell.so.* ${libdir}/aspell*"
+FILES:aspell-utils = "${bindir}/word-list-compress ${bindir}/aspell-import ${bindir}/run-with-aspell ${bindir}/pre*"
+FILES:${PN} = "${bindir}/aspell"
+FILES:libpspell = "${libdir}/libpspell.so.*"
+FILES:libpspell-dev = "${libdir}/libpspell* ${bindir}/pspell-config ${includedir}/pspell"
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
-ARM_INSTRUCTION_SET_armv6 = "arm"
+ARM_INSTRUCTION_SET:armv4 = "arm"
+ARM_INSTRUCTION_SET:armv5 = "arm"
+ARM_INSTRUCTION_SET:armv6 = "arm"
inherit autotools gettext
diff --git a/meta-selftest/recipes-test/base-files/base-files_%.bbappend b/meta-selftest/recipes-test/base-files/base-files_%.bbappend
new file mode 100644
index 0000000000..205720982c
--- /dev/null
+++ b/meta-selftest/recipes-test/base-files/base-files_%.bbappend
@@ -0,0 +1,2 @@
+# This bbappend is used to alter the recipe using the test_recipe.inc file created by tests.
+include test_recipe.inc
diff --git a/meta-selftest/recipes-test/binutils/binutils_%.bbappend b/meta-selftest/recipes-test/binutils/binutils_%.bbappend
new file mode 100644
index 0000000000..205720982c
--- /dev/null
+++ b/meta-selftest/recipes-test/binutils/binutils_%.bbappend
@@ -0,0 +1,2 @@
+# This bbappend is used to alter the recipe using the test_recipe.inc file created by tests.
+include test_recipe.inc
diff --git a/meta-selftest/recipes-test/container-image/container-image-testpkg.bb b/meta-selftest/recipes-test/container-image/container-image-testpkg.bb
index f8dd2290b3..929bc29753 100644
--- a/meta-selftest/recipes-test/container-image/container-image-testpkg.bb
+++ b/meta-selftest/recipes-test/container-image/container-image-testpkg.bb
@@ -2,7 +2,7 @@ LICENSE = "MIT"
INHIBIT_DEFAULT_DEPS = "1"
-do_install_append() {
+do_install:append() {
install -d ${D}${bindir}
touch ${D}${bindir}/theapp
}
diff --git a/meta-selftest/recipes-test/cpp/.gitignore b/meta-selftest/recipes-test/cpp/.gitignore
new file mode 100644
index 0000000000..30d388a12b
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/.gitignore
@@ -0,0 +1 @@
+build* \ No newline at end of file
diff --git a/meta-selftest/recipes-test/cpp/cmake-example.bb b/meta-selftest/recipes-test/cpp/cmake-example.bb
new file mode 100644
index 0000000000..aecfcf780a
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/cmake-example.bb
@@ -0,0 +1,25 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+SUMMARY = "A C++ example compiled with cmake."
+
+require cpp-example.inc
+
+SRC_URI += "file://CMakeLists.txt"
+
+inherit cmake-qemu
+
+PACKAGECONFIG[failing_test] = "-DFAILING_TEST=ON"
+
+FILES:${PN}-ptest += "${bindir}/test-cmake-example"
+
+do_run_tests () {
+ bbnote ${DESTDIR:+DESTDIR=${DESTDIR} }${CMAKE_VERBOSE} cmake --build '${B}' --target test -- ${EXTRA_OECMAKE_BUILD}
+ eval ${DESTDIR:+DESTDIR=${DESTDIR} }${CMAKE_VERBOSE} cmake --build '${B}' --target test -- ${EXTRA_OECMAKE_BUILD}
+}
+do_run_tests[doc] = "Run cmake --target=test using qemu-user"
+
+addtask do_run_tests after do_compile
diff --git a/meta-selftest/recipes-test/cpp/cmake-example/run-ptest b/meta-selftest/recipes-test/cpp/cmake-example/run-ptest
new file mode 100644
index 0000000000..94b620a198
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/cmake-example/run-ptest
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+test-cmake-example
+
+# Note: run-ptests exits with exit value from test-cmake-example
diff --git a/meta-selftest/recipes-test/cpp/cpp-example.inc b/meta-selftest/recipes-test/cpp/cpp-example.inc
new file mode 100644
index 0000000000..ad374be9d0
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/cpp-example.inc
@@ -0,0 +1,24 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+DEPENDS += "json-c"
+
+PV = "1.0"
+
+SRC_URI = "\
+ file://cpp-example.cpp \
+ file://cpp-example-lib.hpp \
+ file://cpp-example-lib.cpp \
+ file://test-cpp-example.cpp \
+ file://run-ptest \
+"
+
+S = "${WORKDIR}"
+
+inherit ptest
diff --git a/meta-selftest/recipes-test/cpp/files/CMakeLists.txt b/meta-selftest/recipes-test/cpp/files/CMakeLists.txt
new file mode 100644
index 0000000000..6fa6917d89
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/files/CMakeLists.txt
@@ -0,0 +1,61 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+cmake_minimum_required(VERSION 3.22)
+
+project(cmake-example
+ VERSION 1.0.0
+ LANGUAGES CXX
+)
+
+option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
+option(FAILING_TEST "Compile a failing unit test to test the test infrastructure" OFF)
+
+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD_REQUIRED On)
+set(CMAKE_CXX_EXTENSIONS Off)
+
+include(GNUInstallDirs)
+
+# Linking a small library makes the example more useful for testing.
+find_package(json-c)
+
+# A simple library linking json-c library found by pkgconfig
+add_library(cmake-example-lib cpp-example-lib.cpp cpp-example-lib.hpp)
+set_target_properties(cmake-example-lib PROPERTIES
+ VERSION ${PROJECT_VERSION}
+ SOVERSION ${PROJECT_VERSION_MAJOR}
+)
+target_link_libraries(cmake-example-lib PRIVATE json-c::json-c)
+
+install(TARGETS cmake-example-lib
+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+# A simple executable linking the library
+add_executable(cmake-example cpp-example.cpp)
+target_link_libraries(cmake-example PRIVATE cmake-example-lib)
+
+install(TARGETS cmake-example
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+)
+
+# A simple test executable for testing the library
+add_executable(test-cmake-example test-cpp-example.cpp)
+target_link_libraries(test-cmake-example PRIVATE cmake-example-lib)
+
+if (FAILING_TEST)
+ target_compile_definitions(test-cmake-example PRIVATE FAIL_COMPARISON_STR="foo")
+endif(FAILING_TEST)
+
+install(TARGETS test-cmake-example
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+)
+
+include(CTest)
+add_test(NAME test-cmake-example COMMAND test-cmake-example)
diff --git a/meta-selftest/recipes-test/cpp/files/cpp-example-lib.cpp b/meta-selftest/recipes-test/cpp/files/cpp-example-lib.cpp
new file mode 100644
index 0000000000..d3dc976864
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/files/cpp-example-lib.cpp
@@ -0,0 +1,33 @@
+/*
+ * Copyright OpenEmbedded Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#include <iostream>
+#include <string>
+#include <json-c/json.h>
+#include "cpp-example-lib.hpp"
+
+const std::string &CppExample::get_string()
+{
+ return test_string;
+}
+
+const char *CppExample::get_json_c_version()
+{
+ return json_c_version();
+}
+
+void CppExample::print_json()
+{
+ struct json_object *jobj;
+ const int flag = JSON_C_TO_STRING_SPACED | JSON_C_TO_STRING_PRETTY;
+
+ jobj = json_object_new_object();
+ json_object_object_add(jobj, "test_string", json_object_new_string(test_string.c_str()));
+
+ std::cout << json_object_to_json_string_ext(jobj, flag) << std::endl;
+
+ json_object_put(jobj); // Delete the json object
+}
diff --git a/meta-selftest/recipes-test/cpp/files/cpp-example-lib.hpp b/meta-selftest/recipes-test/cpp/files/cpp-example-lib.hpp
new file mode 100644
index 0000000000..0ad9e7b7b2
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/files/cpp-example-lib.hpp
@@ -0,0 +1,21 @@
+/*
+ * Copyright OpenEmbedded Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#pragma once
+
+#include <string>
+
+struct CppExample
+{
+ inline static const std::string test_string = "cpp-example-lib Magic: 123456789";
+
+ /* Retrieve a constant string */
+ const std::string &get_string();
+ /* Retrieve a constant string from a library */
+ const char *get_json_c_version();
+ /* Call a more advanced function from a library */
+ void print_json();
+};
diff --git a/meta-selftest/recipes-test/cpp/files/cpp-example.cpp b/meta-selftest/recipes-test/cpp/files/cpp-example.cpp
new file mode 100644
index 0000000000..9889554e0c
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/files/cpp-example.cpp
@@ -0,0 +1,18 @@
+/*
+ * Copyright OpenEmbedded Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#include "cpp-example-lib.hpp"
+
+#include <iostream>
+
+int main()
+{
+ auto cpp_example = CppExample();
+ std::cout << "C++ example linking " << cpp_example.get_string() << std::endl;
+ std::cout << "Linking json-c version " << cpp_example.get_json_c_version() << std::endl;
+ cpp_example.print_json();
+ return 0;
+}
diff --git a/meta-selftest/recipes-test/cpp/files/meson.build b/meta-selftest/recipes-test/cpp/files/meson.build
new file mode 100644
index 0000000000..0e2b55f3a2
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/files/meson.build
@@ -0,0 +1,38 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+project('meson-example', 'cpp',
+ version: '1.0.0',
+ default_options: ['cpp_std=c++17']
+ )
+
+jsoncdep = dependency('json-c')
+
+if get_option('FAILING_TEST').enabled()
+ add_project_arguments('-DFAIL_COMPARISON_STR=foo', language: 'cpp')
+endif
+
+mesonexlib = shared_library('mesonexlib',
+ 'cpp-example-lib.cpp', 'cpp-example-lib.hpp',
+ version: meson.project_version(),
+ soversion: meson.project_version().split('.')[0],
+ dependencies : jsoncdep,
+ install : true
+ )
+
+executable('mesonex',
+ 'cpp-example.cpp',
+ link_with : mesonexlib,
+ install : true
+ )
+
+test_mesonex = executable('test-mesonex',
+ 'test-cpp-example.cpp',
+ link_with : mesonexlib,
+ install : true
+)
+
+test('meson example test', test_mesonex)
diff --git a/meta-selftest/recipes-test/cpp/files/meson.options b/meta-selftest/recipes-test/cpp/files/meson.options
new file mode 100644
index 0000000000..58a0bf9e61
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/files/meson.options
@@ -0,0 +1,3 @@
+
+option('FAILING_TEST', type : 'feature', value : 'disabled',
+ description : 'Compile a failing unit test to test the test infrastructure')
diff --git a/meta-selftest/recipes-test/cpp/files/test-cpp-example.cpp b/meta-selftest/recipes-test/cpp/files/test-cpp-example.cpp
new file mode 100644
index 0000000000..83c9bfa844
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/files/test-cpp-example.cpp
@@ -0,0 +1,25 @@
+/*
+* Copyright OpenEmbedded Contributors
+*
+* SPDX-License-Identifier: MIT
+*/
+
+#include "cpp-example-lib.hpp"
+
+#include <iostream>
+
+/* This is for creating a failing test for testing the test infrastructure */
+#ifndef FAIL_COMPARISON_STR
+#define FAIL_COMPARISON_STR ""
+#endif
+
+int main() {
+ auto cpp_example = CppExample();
+ auto ret_string = cpp_example.get_string();
+ if(0 == ret_string.compare(CppExample::test_string + FAIL_COMPARISON_STR)) {
+ std::cout << "PASS: " << ret_string << " = " << CppExample::test_string << std::endl;
+ } else {
+ std::cout << "FAIL: " << ret_string << " != " << CppExample::test_string << std::endl;
+ return 1;
+ }
+}
diff --git a/meta-selftest/recipes-test/cpp/meson-example.bb b/meta-selftest/recipes-test/cpp/meson-example.bb
new file mode 100644
index 0000000000..14a7ca8dc9
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/meson-example.bb
@@ -0,0 +1,27 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+SUMMARY = "A C++ example compiled with meson."
+
+require cpp-example.inc
+
+SRC_URI += "\
+ file://meson.build \
+ file://meson.options \
+"
+
+inherit pkgconfig meson
+
+PACKAGECONFIG[failing_test] = "-DFAILING_TEST=enabled"
+
+FILES:${PN}-ptest += "${bindir}/test-mesonex"
+
+do_run_tests () {
+ meson test -C "${B}" --no-rebuild
+}
+do_run_tests[doc] = "Run meson test using qemu-user"
+
+addtask do_run_tests after do_compile
diff --git a/meta-selftest/recipes-test/cpp/meson-example/run-ptest b/meta-selftest/recipes-test/cpp/meson-example/run-ptest
new file mode 100644
index 0000000000..b1804f0096
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/meson-example/run-ptest
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+test-mesonex
+
+# Note: run-ptests exits with exit value from test-mesonex
diff --git a/meta-selftest/recipes-test/delay/delay.bb b/meta-selftest/recipes-test/delay/delay.bb
new file mode 100644
index 0000000000..f92d3d99e2
--- /dev/null
+++ b/meta-selftest/recipes-test/delay/delay.bb
@@ -0,0 +1,12 @@
+SUMMARY = "Recipe with a fixed delay task"
+DESCRIPTION = "Contains a delay task to be used to for testing."
+LICENSE = "MIT"
+
+INHIBIT_DEFAULT_DEPS = "1"
+EXCLUDE_FROM_WORLD = "1"
+
+do_delay() {
+ sleep 5
+}
+do_delay[nostamp] = "1"
+addtask delay \ No newline at end of file
diff --git a/meta-selftest/recipes-test/devtool/devtool-patch-overrides.bb b/meta-selftest/recipes-test/devtool/devtool-patch-overrides.bb
new file mode 100644
index 0000000000..f12bee0b3d
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-patch-overrides.bb
@@ -0,0 +1,8 @@
+SUMMARY = "devtool test for overrides and patches"
+LICENSE = "CLOSED"
+INHIBIT_DEFAULT_DEPS = "1"
+EXCLUDE_FROM_WORLD = "1"
+
+SRC_URI = "file://source;subdir=${BP}"
+SRC_URI:append:qemuarm = " file://arm.patch;striplevel=0"
+SRC_URI:append:qemux86 = " file://x86.patch;striplevel=0"
diff --git a/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemuarm/arm.patch b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemuarm/arm.patch
new file mode 100644
index 0000000000..e33a2753f9
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemuarm/arm.patch
@@ -0,0 +1,5 @@
+--- source.orig 2020-10-06 13:26:10.792688630 +0100
++++ source 2020-10-06 13:26:18.853424694 +0100
+@@ -1 +1 @@
+-This is a test for something
++This is a test for qemuarm
diff --git a/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemux86/x86.patch b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemux86/x86.patch
new file mode 100644
index 0000000000..1a0a175fa8
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemux86/x86.patch
@@ -0,0 +1,5 @@
+--- source.orig 2020-10-06 13:26:10.792688630 +0100
++++ source 2020-10-06 13:26:18.853424694 +0100
+@@ -1 +1 @@
+-This is a test for something
++This is a test for qemux86
diff --git a/meta-selftest/recipes-test/devtool/devtool-patch-overrides/source b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/source
new file mode 100644
index 0000000000..cc14ce627c
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/source
@@ -0,0 +1 @@
+This is a test for something
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-ignored.bb b/meta-selftest/recipes-test/devtool/devtool-test-ignored.bb
new file mode 100644
index 0000000000..6a3d58c884
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-ignored.bb
@@ -0,0 +1,9 @@
+LICENSE = "CLOSED"
+INHIBIT_DEFAULT_DEPS = "1"
+
+SRC_URI = "file://${BPN}.tar.gz \
+ file://${BPN}.patch"
+
+S = "${WORKDIR}/${BPN}"
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch b/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch
new file mode 100644
index 0000000000..96ea0eb4e3
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch
@@ -0,0 +1,7 @@
+diff --git a/ignored b/ignored
+index a579759..e3d7b43 100644
+--- a/ignored
++++ b/ignored
+@@ -1 +1 @@
+-I'm so ignored
++# I'm so ignored
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch.expected b/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch.expected
new file mode 100644
index 0000000000..68ec6d9875
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch.expected
@@ -0,0 +1,16 @@
+From 3a286343cc5cadd83f41d524ee3606ae51df9ee7 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Thu, 28 May 2020 01:32:31 +0200
+Subject: [PATCH] meta-selftest: add test of .gitignore in tarball
+
+---
+ ignored | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ignored b/ignored
+index a579759..e3d7b43 100644
+--- a/ignored
++++ b/ignored
+@@ -1 +1 @@
+-I'm so ignored
++# I'm so ignored
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.tar.gz b/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.tar.gz
new file mode 100644
index 0000000000..b2e9935eb9
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.tar.gz
Binary files differ
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-local/file3 b/meta-selftest/recipes-test/devtool/devtool-test-local/file3
new file mode 100644
index 0000000000..0f30e9eec4
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-local/file3
@@ -0,0 +1 @@
+The third file.
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb b/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb
index b377cb7605..d0fd697978 100644
--- a/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb
+++ b/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb
@@ -1,4 +1,4 @@
-LICENSE = "GPLv2+"
+LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
INHIBIT_DEFAULT_DEPS = "1"
@@ -7,10 +7,12 @@ SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/syslinux-${PV}.tar.x
file://file1 \
file://file2"
+SRC_URI:append:class-native = " file://file3"
+
SRC_URI[md5sum] = "92a253df9211e9c20172796ecf388f13"
SRC_URI[sha256sum] = "26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e"
-UPSTREAM_VERSION_UNKNOWN = "1"
S = "${WORKDIR}/syslinux-${PV}"
EXCLUDE_FROM_WORLD = "1"
+BBCLASSEXTEND = "native"
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb b/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb
index 3f7123cda0..e767619879 100644
--- a/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb
+++ b/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb
@@ -4,4 +4,7 @@ INHIBIT_DEFAULT_DEPS = "1"
SRC_URI = "file://file1 \
file://file2"
+SRC_URI:append:class-native = " file://file3"
+
EXCLUDE_FROM_WORLD = "1"
+BBCLASSEXTEND = "native"
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-localonly/file3 b/meta-selftest/recipes-test/devtool/devtool-test-localonly/file3
new file mode 100644
index 0000000000..0f30e9eec4
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-localonly/file3
@@ -0,0 +1 @@
+The third file.
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-long-filename.bb b/meta-selftest/recipes-test/devtool/devtool-test-long-filename.bb
new file mode 100644
index 0000000000..3ec22cae7f
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-long-filename.bb
@@ -0,0 +1,9 @@
+LICENSE = "CLOSED"
+INHIBIT_DEFAULT_DEPS = "1"
+
+SRC_URI = "file://${BPN}.tar.gz \
+ file://0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch"
+
+S = "${WORKDIR}/${BPN}"
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch b/meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch
new file mode 100644
index 0000000000..6aaf409ebc
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch
@@ -0,0 +1,7 @@
+diff --git a/patch-me b/patch-me
+index a20b29a..5e35d1b 100644
+--- a/patch-me
++++ b/patch-me
+@@ -1 +1 @@
+-please
++NO
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch.expected b/meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch.expected
new file mode 100644
index 0000000000..1bf25a61d0
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch.expected
@@ -0,0 +1,16 @@
+From 45ba3d107ea60777a6b6e134fd00fe5009749177 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Thu, 28 May 2020 02:03:39 +0200
+Subject: [PATCH] meta-selftest: add test for .patch file with long filename
+
+---
+ patch-me | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/patch-me b/patch-me
+index a20b29a..5e35d1b 100644
+--- a/patch-me
++++ b/patch-me
+@@ -1 +1 @@
+-please
++NO
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-long-filename/devtool-test-long-filename.tar.gz b/meta-selftest/recipes-test/devtool/devtool-test-long-filename/devtool-test-long-filename.tar.gz
new file mode 100644
index 0000000000..ab6242aae7
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-long-filename/devtool-test-long-filename.tar.gz
Binary files differ
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-patch-gz.bb b/meta-selftest/recipes-test/devtool/devtool-test-patch-gz.bb
index fc3799590c..e25b3d9747 100644
--- a/meta-selftest/recipes-test/devtool/devtool-test-patch-gz.bb
+++ b/meta-selftest/recipes-test/devtool/devtool-test-patch-gz.bb
@@ -1,4 +1,4 @@
-LICENSE = "GPLv2+"
+LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
DEPENDS = "libxres libxext virtual/libx11 ncurses"
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch
new file mode 100644
index 0000000000..c4f3f12666
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch
@@ -0,0 +1,37 @@
+commit ced2ec32b657a7f52604b2e16e5d5881041c517a
+Author: OpenEmbedded <oe.patch@oe>
+Date: Mon Nov 18 18:43:15 2019 +0100
+
+ Backport of the NEWS file from version 1.6.0
+
+diff --git a/doc/NEWS b/doc/NEWS
+index 69793fc..fd49b1c 100644
+--- a/doc/NEWS
++++ b/doc/NEWS
+@@ -1,3 +1,26 @@
++1.6.0 - 15 March 2015
++ - fix lstat64 support when unavailable - separate patches supplied by
++ Ganael Laplanche and Peter Korsgaard
++ - (#1506) new option "-D" / "--delay-start" to only show bar after N
++ seconds (Damon Harper)
++ - new option "--fineta" / "-I" to show ETA as time of day rather than time
++ remaining - patch supplied by Erkki Seppälä (r147)
++ - (#1509) change ETA (--eta / -e) so that days are given if the hours
++ remaining are 24 or more (Jacek Wielemborek)
++ - (#1499) repeat read and write attempts on partial buffer fill/empty to
++ work around post-signal transfer rate drop reported by Ralf Ramsauer
++ - (#1507) do not try to calculate total size in line mode, due to bug
++ reported by Jacek Wielemborek and Michiel Van Herwegen
++ - cleanup: removed defunct RATS comments and unnecessary copyright notices
++ - clean up displayed lines when using --watchfd PID, when PID exits
++ - output errors on a new line to avoid overwriting transfer bar
++
++1.5.7 - 26 August 2014
++ - show KiB instead of incorrect kiB (Debian bug #706175)
++ - (#1284) do not gzip man page, for non-Linux OSes (Bob Friesenhahn)
++ - work around "awk" bug in tests/016-numeric-timer in decimal "," locales
++ - fix "make rpm" and "make srpm", extend "make release" to sign releases
++
+ 1.5.3 - 4 May 2014
+ - remove SPLICE_F_NONBLOCK to fix problem with slow splice() (Jan Seda)
+
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb
index 333ecac7ed..fee5bee739 100644
--- a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb
+++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb
@@ -3,7 +3,9 @@ LICENSE = "Artistic-2.0"
LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02"
SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz \
- file://0001-Add-a-note-line-to-the-quick-reference.patch"
+ file://0001-Add-a-note-line-to-the-quick-reference.patch \
+ file://backported.patch \
+ "
UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml"
RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded
index 9d94f671db..d75df0c8c7 100644
--- a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded
+++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded
@@ -3,11 +3,12 @@ LICENSE = "Artistic-2.0"
LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02"
SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz \
- file://0001-Add-a-note-line-to-the-quick-reference.patch"
+ file://0001-Add-a-note-line-to-the-quick-reference.patch \
+ file://backported.patch \
+ "
UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml"
RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"
-SRC_URI[md5sum] = "062bca5ff33df1dd09472e7fc3bbe332"
SRC_URI[sha256sum] = "9dd45391806b0ed215abee4c5ac1597d018c386fe9c1f5afd2f6bc3b07fd82c3"
S = "${WORKDIR}/pv-${PV}"
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb b/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb
index 07b83276fb..2558a22ce5 100644
--- a/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb
+++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb
@@ -1,17 +1,17 @@
SUMMARY = "A simple tool to wait for a specific signal over DBus"
HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/dbus-wait"
SECTION = "base"
-LICENSE = "GPLv2"
+LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
DEPENDS = "dbus"
# Note: this is intentionally not the latest version in the original .bb
SRCREV = "1a3e1343761b30750bed70e0fd688f6d3c7b3717"
-PV = "0.1+git${SRCPV}"
+PV = "0.1+git"
PR = "r2"
-SRC_URI = "git://git.yoctoproject.org/dbus-wait"
+SRC_URI = "git://git.yoctoproject.org/dbus-wait;branch=master"
UPSTREAM_CHECK_COMMITS = "1"
RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded b/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded
index 32ec4b14fa..eaa8bd898d 100644
--- a/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded
+++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded
@@ -1,16 +1,16 @@
SUMMARY = "A simple tool to wait for a specific signal over DBus"
HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/dbus-wait"
SECTION = "base"
-LICENSE = "GPLv2"
+LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
DEPENDS = "dbus"
# Note: this is intentionally not the latest version in the original .bb
SRCREV = "6cc6077a36fe2648a5f993fe7c16c9632f946517"
-PV = "0.1+git${SRCPV}"
+PV = "0.1+git"
-SRC_URI = "git://git.yoctoproject.org/dbus-wait"
+SRC_URI = "git://git.yoctoproject.org/dbus-wait;branch=master"
UPSTREAM_CHECK_COMMITS = "1"
RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb b/meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb
new file mode 100644
index 0000000000..69c0d351ec
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb
@@ -0,0 +1,16 @@
+SUMMARY = "Pipe viewer test recipe for devtool upgrade test"
+LICENSE = "Artistic-2.0"
+LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02"
+
+SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz"
+UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml"
+RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"
+
+SRC_URI[md5sum] = "9365d86bd884222b4bf1039b5a9ed1bd"
+
+S = "${WORKDIR}/pv-${PV}"
+
+EXCLUDE_FROM_WORLD = "1"
+
+inherit autotools
+
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb.upgraded b/meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb.upgraded
new file mode 100644
index 0000000000..3ce7e85e10
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb.upgraded
@@ -0,0 +1,15 @@
+SUMMARY = "Pipe viewer test recipe for devtool upgrade test"
+LICENSE = "Artistic-2.0"
+LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02"
+
+SRC_URI[sha256sum] = "9dd45391806b0ed215abee4c5ac1597d018c386fe9c1f5afd2f6bc3b07fd82c3"
+SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz"
+UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml"
+RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"
+
+S = "${WORKDIR}/pv-${PV}"
+
+EXCLUDE_FROM_WORLD = "1"
+
+inherit autotools
+
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb b/meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb
new file mode 100644
index 0000000000..9abf80e6ed
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Pipe viewer test recipe for devtool upgrade test"
+LICENSE = "Artistic-2.0"
+LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02"
+
+SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz"
+UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml"
+RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"
+
+SRC_URI[md5sum] = "9365d86bd884222b4bf1039b5a9ed1bd"
+SRC_URI[sha1sum] = "63a0801350e812541c7f8e9ad74e0d6b629d0b39"
+SRC_URI[sha256sum] = "681bcca9784bf3cb2207e68236d1f68e2aa7b80f999b5750dc77dcd756e81fbc"
+SRC_URI[sha384sum] = "5fff6390465ff23dbf573fcf39dfad3aed2f92074a35e6c02abe58b7678858d90fa6572ff4cb56df8b3e217c739cdbe3"
+SRC_URI[sha512sum] = "32efe7071a363f547afc74e96774f711795edda1d2702823a347d0f9953e859b7d8c45b3e63e18ffb9e0d5ed5910be652d7d727c8676e81b6cb3aed0b13aec00"
+
+PR = "r5"
+
+S = "${WORKDIR}/pv-${PV}"
+
+EXCLUDE_FROM_WORLD = "1"
+
+inherit autotools
+
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb.upgraded b/meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb.upgraded
new file mode 100644
index 0000000000..cd2a0842f4
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb.upgraded
@@ -0,0 +1,19 @@
+SUMMARY = "Pipe viewer test recipe for devtool upgrade test"
+LICENSE = "Artistic-2.0"
+LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02"
+
+SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz"
+UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml"
+RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"
+
+SRC_URI[sha1sum] = "395ce62f4f3e035b86c77038f04b96c5aa233595"
+SRC_URI[sha256sum] = "9dd45391806b0ed215abee4c5ac1597d018c386fe9c1f5afd2f6bc3b07fd82c3"
+SRC_URI[sha384sum] = "218c8d2d097aeba5310be759bc20573f18ffa0b11701eac6dd2e7e14ddf13c6e0e094ca7ca026eaa05ef92a056402e36"
+SRC_URI[sha512sum] = "1cf9d7376fceefcd594d0a8b591afc8e11ce89f7210d10ad74438974ecebe9cc5d9ec4db9cc79e0566bfd2b0278c0cc263c07547803e7536432cd1ffd32d8a45"
+
+S = "${WORKDIR}/pv-${PV}"
+
+EXCLUDE_FROM_WORLD = "1"
+
+inherit autotools
+
diff --git a/meta-selftest/recipes-test/error/error.bb b/meta-selftest/recipes-test/error/error.bb
index 3c22e7cbeb..65d00a46d9 100644
--- a/meta-selftest/recipes-test/error/error.bb
+++ b/meta-selftest/recipes-test/error/error.bb
@@ -2,7 +2,7 @@ SUMMARY = "Error Test case that fails on do_compile"
DESCRIPTION = "This generates a compile time error to be used to for testing."
LICENSE = "MIT"
-INHIBIT_DEFAULT_DEPS = "1"
+INHIBIT_DEFAULT_DEPS = "1"
EXCLUDE_FROM_WORLD = "1"
do_compile() {
diff --git a/meta-selftest/recipes-test/fortran/files/hello.f95 b/meta-selftest/recipes-test/fortran/files/hello.f95
new file mode 100644
index 0000000000..a0745fc64d
--- /dev/null
+++ b/meta-selftest/recipes-test/fortran/files/hello.f95
@@ -0,0 +1,5 @@
+program helloworld
+
+ print * , "Hello World!"
+
+end program helloworld
diff --git a/meta-selftest/recipes-test/fortran/fortran-helloworld.bb b/meta-selftest/recipes-test/fortran/fortran-helloworld.bb
new file mode 100644
index 0000000000..3a46404477
--- /dev/null
+++ b/meta-selftest/recipes-test/fortran/fortran-helloworld.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Fortran Hello World"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+DEPENDS = "libgfortran"
+
+SRC_URI = "file://hello.f95"
+
+# These set flags that Fortran doesn't support
+SECURITY_CFLAGS = ""
+SECURITY_LDFLAGS = ""
+
+do_compile() {
+ ${FC} ${LDFLAGS} ${WORKDIR}/hello.f95 -o ${B}/fortran-hello
+}
+
+do_install() {
+ install -D ${B}/fortran-hello ${D}${bindir}/fortran-hello
+}
+
+python () {
+ if not d.getVar("FORTRAN"):
+ raise bb.parse.SkipRecipe("Fortran isn't enabled")
+}
diff --git a/meta-selftest/recipes-test/gcc-source/gcc-source_%.bbappend b/meta-selftest/recipes-test/gcc-source/gcc-source_%.bbappend
new file mode 100644
index 0000000000..205720982c
--- /dev/null
+++ b/meta-selftest/recipes-test/gcc-source/gcc-source_%.bbappend
@@ -0,0 +1,2 @@
+# This bbappend is used to alter the recipe using the test_recipe.inc file created by tests.
+include test_recipe.inc
diff --git a/meta-selftest/recipes-test/git-submodule-test/git-submodule-test.bb b/meta-selftest/recipes-test/git-submodule-test/git-submodule-test.bb
new file mode 100644
index 0000000000..90d9b66b2c
--- /dev/null
+++ b/meta-selftest/recipes-test/git-submodule-test/git-submodule-test.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Test recipe for fetching git submodules"
+HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/git-submodule-test/"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+UPSTREAM_VERSION_UNKNOWN = "1"
+
+SRC_URI = "gitsm://git.yoctoproject.org/git-submodule-test;branch=master"
+SRCREV = "a2885dd7d25380d23627e7544b7bbb55014b16ee"
+
+S = "${WORKDIR}/git"
+
+do_test_git_as_user() {
+ cd ${S}
+ git status
+}
+addtask test_git_as_user after do_unpack
+
+fakeroot do_test_git_as_root() {
+ cd ${S}
+ git status
+}
+do_test_git_as_root[depends] += "virtual/fakeroot-native:do_populate_sysroot"
+addtask test_git_as_root after do_unpack
diff --git a/meta-selftest/recipes-test/gitrepotest/gitrepotest.bb b/meta-selftest/recipes-test/gitrepotest/gitrepotest.bb
new file mode 100644
index 0000000000..f1b6c55833
--- /dev/null
+++ b/meta-selftest/recipes-test/gitrepotest/gitrepotest.bb
@@ -0,0 +1,16 @@
+SUMMARY = "Test recipe for git repo initialization"
+HOMEPAGE = "https://git.yoctoproject.org/git/matchbox-panel-2"
+LICENSE = "GPL-2.0-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+PATCHTOOL="git"
+
+SRC_URI = "git://git.yoctoproject.org/git/matchbox-panel-2;branch=master;protocol=https \
+ file://0001-testpatch.patch \
+ "
+
+SRCREV = "f82ca3f42510fb3ef10f598b393eb373a2c34ca7"
+
+S = "${WORKDIR}/git"
diff --git a/meta-selftest/recipes-test/gitrepotest/gitrepotest/0001-testpatch.patch b/meta-selftest/recipes-test/gitrepotest/gitrepotest/0001-testpatch.patch
new file mode 100644
index 0000000000..bccda17ee9
--- /dev/null
+++ b/meta-selftest/recipes-test/gitrepotest/gitrepotest/0001-testpatch.patch
@@ -0,0 +1,9 @@
+diff --git a/Makefile.am b/Makefile.am
+index 432a9b4..bbf7c74 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,3 +1,4 @@
++## This is useless comment to test if patch works
+ ACLOCAL_AMFLAGS = -I m4
+
+ SUBDIRS = matchbox-panel applets data po
diff --git a/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline-fail.bb b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline-fail.bb
new file mode 100644
index 0000000000..5146129666
--- /dev/null
+++ b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline-fail.bb
@@ -0,0 +1,4 @@
+require gitunpackoffline.inc
+
+# Clear the base.bbclass magic srcrev call
+fetcher_hashes_dummyfunc[vardepvalue] = ""
diff --git a/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.bb b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.bb
new file mode 100644
index 0000000000..d9a54690b2
--- /dev/null
+++ b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.bb
@@ -0,0 +1,5 @@
+require gitunpackoffline.inc
+
+TAGVALUE = "2.11"
+
+PV = "0.0+git"
diff --git a/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.inc b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.inc
new file mode 100644
index 0000000000..602e895199
--- /dev/null
+++ b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.inc
@@ -0,0 +1,16 @@
+SUMMARY = "Test recipe for fetching git submodules"
+HOMEPAGE = "https://git.yoctoproject.org/git/matchbox-panel-2"
+LICENSE = "GPL-2.0-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+TAGVALUE = "2.10"
+
+# Deliberately have a tag which has to be resolved but ensure do_unpack doesn't access the network again.
+SRC_URI = "git://git.yoctoproject.org/git/matchbox-panel-2;branch=master;protocol=https"
+SRC_URI:append:gitunpack-enable-recipe = ";tag=${TAGVALUE}"
+SRCREV = "f82ca3f42510fb3ef10f598b393eb373a2c34ca7"
+SRCREV:gitunpack-enable-recipe = ""
+
+S = "${WORKDIR}/git"
diff --git a/meta-selftest/recipes-test/images/oe-selftest-image.bb b/meta-selftest/recipes-test/images/oe-selftest-image.bb
index 5d4d10eef6..317a0712aa 100644
--- a/meta-selftest/recipes-test/images/oe-selftest-image.bb
+++ b/meta-selftest/recipes-test/images/oe-selftest-image.bb
@@ -1,6 +1,7 @@
SUMMARY = "An image used during oe-selftest tests"
-IMAGE_INSTALL = "packagegroup-core-boot dropbear"
+# libudev is needed for deploy mdadm via devtool
+IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-dropbear libudev"
IMAGE_FEATURES = "debug-tweaks"
IMAGE_LINGUAS = " "
diff --git a/meta-selftest/recipes-test/images/wic-image-minimal.bb b/meta-selftest/recipes-test/images/wic-image-minimal.bb
index e1da203b59..84d3721885 100644
--- a/meta-selftest/recipes-test/images/wic-image-minimal.bb
+++ b/meta-selftest/recipes-test/images/wic-image-minimal.bb
@@ -6,7 +6,10 @@ IMAGE_INSTALL = "packagegroup-core-boot"
IMAGE_FSTYPES = "wic"
-WKS_FILE_DEPENDS = "syslinux syslinux-native dosfstools-native mtools-native gptfdisk-native"
+WKS_FILE_DEPENDS = "dosfstools-native mtools-native gptfdisk-native"
+WKS_FILE_DEPENDS:append:x86 = " syslinux-native syslinux"
+WKS_FILE_DEPENDS:append:x86-64 = " syslinux-native syslinux"
+WKS_FILE_DEPENDS:append:x86-x32 = " syslinux-native syslinux"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
diff --git a/meta-selftest/recipes-test/license/incompatible-license-alias.bb b/meta-selftest/recipes-test/license/incompatible-license-alias.bb
new file mode 100644
index 0000000000..1af99e7809
--- /dev/null
+++ b/meta-selftest/recipes-test/license/incompatible-license-alias.bb
@@ -0,0 +1,5 @@
+SUMMARY = "Recipe with an alias of an SPDX license"
+DESCRIPTION = "Is licensed with an alias of an SPDX license to be used for testing"
+LICENSE = "GPLv3"
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/license/incompatible-license.bb b/meta-selftest/recipes-test/license/incompatible-license.bb
new file mode 100644
index 0000000000..6fdc58fd30
--- /dev/null
+++ b/meta-selftest/recipes-test/license/incompatible-license.bb
@@ -0,0 +1,5 @@
+SUMMARY = "Recipe with an SPDX license"
+DESCRIPTION = "Is licensed with an SPDX license to be used for testing"
+LICENSE = "GPL-3.0-only"
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/license/incompatible-licenses.bb b/meta-selftest/recipes-test/license/incompatible-licenses.bb
new file mode 100644
index 0000000000..47bd8d7c00
--- /dev/null
+++ b/meta-selftest/recipes-test/license/incompatible-licenses.bb
@@ -0,0 +1,5 @@
+SUMMARY = "Recipe with multiple SPDX licenses"
+DESCRIPTION = "Is licensed with multiple SPDX licenses to be used for testing"
+LICENSE = "GPL-2.0-only & GPL-3.0-only & LGPL-3.0-only"
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb b/meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb
new file mode 100644
index 0000000000..142d73158e
--- /dev/null
+++ b/meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb
@@ -0,0 +1,5 @@
+SUMMARY = "Recipe with a non-SPDX license"
+DESCRIPTION = "Is licensed with a non-SPDX license to be used for testing"
+LICENSE = "FooLicense"
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/logging-test/logging-test.bb b/meta-selftest/recipes-test/logging-test/logging-test.bb
new file mode 100644
index 0000000000..ac3fb46f45
--- /dev/null
+++ b/meta-selftest/recipes-test/logging-test/logging-test.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Destined to fail"
+LICENSE = "CLOSED"
+
+deltask do_patch
+INHIBIT_DEFAULT_DEPS = "1"
+
+do_shelltest() {
+ echo "This is shell stdout"
+ echo "This is shell stderr" >&2
+ exit 1
+}
+addtask do_shelltest
+
+python do_pythontest_exec_func_shell() {
+ bb.build.exec_func('do_shelltest', d)
+}
+addtask do_pythontest_exec_func_shell
+
+python do_pythontest_exit () {
+ print("This is python stdout")
+ sys.exit(1)
+}
+addtask do_pythontest_exit
+
+python do_pythontest_exec_func_python() {
+ bb.build.exec_func('do_pythontest_exit', d)
+}
+addtask do_pythontest_exec_func_python
+
+python do_pythontest_fatal () {
+ print("This is python fatal test stdout")
+ bb.fatal("This is a fatal error")
+}
+addtask do_pythontest_fatal
diff --git a/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb b/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb
new file mode 100644
index 0000000000..d7785cee2e
--- /dev/null
+++ b/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb
@@ -0,0 +1,44 @@
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+MCMACHINE:virtclass-mcextend-musl = "qemux86-64"
+MCMACHINE:virtclass-mcextend-tiny = "qemux86"
+MCIMGTYPE:virtclass-mcextend-musl = "ext4"
+MCIMGTYPE:virtclass-mcextend-tiny = "cpio.gz"
+
+MC_DEPLOY_DIR_IMAGE = "${TOPDIR}/tmp-mc-${MCNAME}/deploy/images/${MCMACHINE}"
+MC_DEPLOY_IMAGE_BASENAME = "core-image-minimal"
+
+do_install[mcdepends] += "mc::${MCNAME}:core-image-minimal:do_image_complete mc::${MCNAME}:virtual/kernel:do_deploy"
+
+do_install () {
+ install -d ${D}/var/lib/machines/${MCNAME}
+ install ${MC_DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME_CORE_IMAGE_MINIMAL}.${MCIMGTYPE} ${D}/var/lib/machines/${MCNAME}/${MC_DEPLOY_IMAGE_BASENAME}.${MCIMGTYPE}
+ install ${MC_DEPLOY_DIR_IMAGE}/bzImage ${D}/var/lib/machines/${MCNAME}
+}
+
+# for IMAGE_LINK_NAME, IMAGE_BASENAME
+inherit image-artifact-names
+
+python () {
+ mcname = d.getVar('MCNAME')
+ if not mcname:
+ raise bb.parse.SkipRecipe("Not a multiconfig target")
+ multiconfigs = d.getVar('BBMULTICONFIG') or ""
+ if mcname not in multiconfigs:
+ raise bb.parse.SkipRecipe("multiconfig target %s not enabled" % mcname)
+
+ # these will most likely start with my BPN multiconfig-image-packager, but I want them from core-image-minimal
+ # as there is no good way to query core-image-minimal's context lets assume that there are no overrides
+ # and that we can just replace IMAGE_BASENAME
+ image_link_name = d.getVar('IMAGE_LINK_NAME')
+ image_basename = d.getVar('IMAGE_BASENAME')
+ machine = d.getVar('MACHINE')
+ mcmachine = d.getVar('MCMACHINE')
+ image_to_deploy = d.getVar('MC_DEPLOY_IMAGE_BASENAME')
+ image_link_name_to_deploy = image_link_name.replace(image_basename, image_to_deploy).replace(machine, mcmachine)
+ bb.warn('%s: assuming that "%s" built for "%s" has IMAGE_LINK_NAME "%s"' % (d.getVar('PN'), mcmachine, image_to_deploy, image_link_name_to_deploy))
+ d.setVar('IMAGE_LINK_NAME_CORE_IMAGE_MINIMAL', image_link_name_to_deploy)
+}
+
+BBCLASSEXTEND = "mcextend:tiny mcextend:musl"
diff --git a/meta-selftest/recipes-test/multiconfig/multiconfig-test-parse.bb b/meta-selftest/recipes-test/multiconfig/multiconfig-test-parse.bb
new file mode 100644
index 0000000000..6236697453
--- /dev/null
+++ b/meta-selftest/recipes-test/multiconfig/multiconfig-test-parse.bb
@@ -0,0 +1,11 @@
+SUMMARY = "Test Multiconfig Parsing"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+do_showvar() {
+ bbplain "MCTESTVAR=${MCTESTVAR}"
+}
+addtask do_showvar
+
diff --git a/meta-selftest/recipes-test/nopackages/selftest-nopackages.bb b/meta-selftest/recipes-test/nopackages/selftest-nopackages.bb
new file mode 100644
index 0000000000..154df910e4
--- /dev/null
+++ b/meta-selftest/recipes-test/nopackages/selftest-nopackages.bb
@@ -0,0 +1,6 @@
+SUMMARY = "Test recipe for nopackages bbclass"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+INHIBIT_DEFAULT_DEPS = "1"
+inherit nopackages
diff --git a/meta-selftest/recipes-test/overlayfs-user/overlayfs-user.bb b/meta-selftest/recipes-test/overlayfs-user/overlayfs-user.bb
new file mode 100644
index 0000000000..3b59e37619
--- /dev/null
+++ b/meta-selftest/recipes-test/overlayfs-user/overlayfs-user.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Overlayfs class unit test"
+DESCRIPTION = "Contains an overlayfs configuration"
+LICENSE = "MIT"
+
+INHIBIT_DEFAULT_DEPS = "1"
+EXCLUDE_FROM_WORLD = "1"
+
+inherit_defer ${@bb.utils.contains("DISTRO_FEATURES", "overlayfs", "overlayfs", "", d)}
+include test_recipe.inc
+
+OVERLAYFS_WRITABLE_PATHS[mnt-overlay] += "/usr/share/my-application"
+
+do_install() {
+ install -d ${D}/usr/share/my-application
+ install -d ${D}${sysconfdir}
+ echo "Original file in /etc" >> ${D}${sysconfdir}/lower-layer-test.txt
+}
+
+FILES:${PN} += "\
+ ${exec_prefix} \
+ ${sysconfdir} \
+"
diff --git a/meta-selftest/recipes-test/packagenameconflict/packagenameconflict.bb b/meta-selftest/recipes-test/packagenameconflict/packagenameconflict.bb
new file mode 100644
index 0000000000..5d19a4dd25
--- /dev/null
+++ b/meta-selftest/recipes-test/packagenameconflict/packagenameconflict.bb
@@ -0,0 +1,10 @@
+SUMMARY = "Test case that tries to rename a package to an existing one and fails"
+DESCRIPTION = "This generates a packaging error when a package is renamed to a pre-existing name"
+LICENSE = "MIT"
+
+# Add a new package ${PN}-renametest
+PACKAGES += "${PN}-renametest"
+# ... and try to rename the ${PN}-dev to the new ${PN}-renametest (conflict)
+PKG:${PN}-dev = "${PN}-renametest"
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/perlcross/perlcross_%.bbappend b/meta-selftest/recipes-test/perlcross/perlcross_%.bbappend
new file mode 100644
index 0000000000..205720982c
--- /dev/null
+++ b/meta-selftest/recipes-test/perlcross/perlcross_%.bbappend
@@ -0,0 +1,2 @@
+# This bbappend is used to alter the recipe using the test_recipe.inc file created by tests.
+include test_recipe.inc
diff --git a/meta-selftest/recipes-test/poison/poison.bb b/meta-selftest/recipes-test/poison/poison.bb
new file mode 100644
index 0000000000..e9eee0cdba
--- /dev/null
+++ b/meta-selftest/recipes-test/poison/poison.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Sysroot poisoning test"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+LICENSE = "MIT"
+
+inherit nopackages
+
+# This test confirms that compiling code that searches /usr/include for headers
+# will result in compiler errors. This recipe should will fail to build and
+# oe-selftest has a test that verifies that.
+do_compile() {
+ bbnote Testing preprocessor
+ echo "int main(int argc, char** argv) {}" | ${CPP} -I/usr/include -
+ bbnote Testing C compiler
+ echo "int main(int argc, char** argv) {}" | ${CC} -x c -I/usr/include -
+ bbnote Testing C++ compiler
+ echo "int main(int argc, char** argv) {}" | ${CC} -x c++ -I/usr/include -
+}
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/postinst/postinst_1.0.bb b/meta-selftest/recipes-test/postinst/postinst_1.0.bb
index 913bfabf89..b936c4f44b 100644
--- a/meta-selftest/recipes-test/postinst/postinst_1.0.bb
+++ b/meta-selftest/recipes-test/postinst/postinst_1.0.bb
@@ -5,19 +5,19 @@ inherit allarch
PACKAGES = "${PN}-rootfs ${PN}-delayed-a ${PN}-delayed-b ${PN}-rootfs-failing"
-ALLOW_EMPTY_${PN}-rootfs = "1"
-ALLOW_EMPTY_${PN}-delayed-a = "1"
-ALLOW_EMPTY_${PN}-delayed-b = "1"
-ALLOW_EMPTY_${PN}-rootfs-failing = "1"
+ALLOW_EMPTY:${PN}-rootfs = "1"
+ALLOW_EMPTY:${PN}-delayed-a = "1"
+ALLOW_EMPTY:${PN}-delayed-b = "1"
+ALLOW_EMPTY:${PN}-rootfs-failing = "1"
-RDEPENDS_${PN}-delayed-a = "${PN}-rootfs"
-RDEPENDS_${PN}-delayed-b = "${PN}-delayed-a"
+RDEPENDS:${PN}-delayed-a = "${PN}-rootfs"
+RDEPENDS:${PN}-delayed-b = "${PN}-delayed-a"
TESTDIR = "${sysconfdir}/postinst-test"
# At rootfs time touch $TESTDIR/rootfs. Errors if the file already exists, or
# if the function runs on first boot.
-pkg_postinst_${PN}-rootfs () {
+pkg_postinst:${PN}-rootfs () {
set -e
if [ -z "$D" ]; then
@@ -36,7 +36,7 @@ pkg_postinst_${PN}-rootfs () {
# Depends on rootfs, delays until first boot, verifies that the rootfs file was
# written.
-pkg_postinst_ontarget_${PN}-delayed-a () {
+pkg_postinst_ontarget:${PN}-delayed-a () {
set -e
if [ ! -e ${TESTDIR}/rootfs ]; then
@@ -49,7 +49,7 @@ pkg_postinst_ontarget_${PN}-delayed-a () {
# Depends on delayed-a, delays until first boot, verifies that the delayed-a file was
# written. This verifies the ordering between delayed postinsts.
-pkg_postinst_ontarget_${PN}-delayed-b () {
+pkg_postinst_ontarget:${PN}-delayed-b () {
set -e
if [ ! -e ${TESTDIR}/delayed-a ]; then
@@ -62,7 +62,7 @@ pkg_postinst_ontarget_${PN}-delayed-b () {
# This scriptlet intentionally includes a bogus command in the middle to test
# that we catch and report such errors properly.
-pkg_postinst_${PN}-rootfs-failing () {
+pkg_postinst:${PN}-rootfs-failing () {
mkdir -p $D${TESTDIR}
touch $D${TESTDIR}/rootfs-before-failure
run_a_really_broken_command
diff --git a/meta-selftest/recipes-test/pseudo-pyc-test/pseudo-pyc-test.bb b/meta-selftest/recipes-test/pseudo-pyc-test/pseudo-pyc-test.bb
new file mode 100644
index 0000000000..12dc91a8f3
--- /dev/null
+++ b/meta-selftest/recipes-test/pseudo-pyc-test/pseudo-pyc-test.bb
@@ -0,0 +1,15 @@
+SUMMARY = "pseudo env test"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+python do_compile() {
+ import pseudo_pyc_test1
+ print(pseudo_pyc_test1.STRING)
+}
+
+python do_install() {
+ import pseudo_pyc_test2
+ print(pseudo_pyc_test2.STRING)
+}
diff --git a/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-src-globfile b/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-src-globfile
deleted file mode 100644
index 1e20a2b03e..0000000000
--- a/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-src-globfile
+++ /dev/null
@@ -1 +0,0 @@
-A file matched by a glob in SRC_URI
diff --git a/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb b/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb
index 7375c47933..e127b48b15 100644
--- a/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb
+++ b/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb
@@ -10,7 +10,6 @@ SRC_URI = "file://installscript.sh \
file://file1 \
file://add-file.patch \
file://subdir \
- file://selftest-replaceme-src-glob* \
file://selftest-replaceme-inst-globfile \
file://selftest-replaceme-inst-todir-globfile \
file://selftest-replaceme-inst-func"
@@ -27,7 +26,6 @@ do_install() {
install -m 0644 ${WORKDIR}/selftest-replaceme-todir ${D}${datadir}
install -m 0644 ${WORKDIR}/file1 ${D}${datadir}/selftest-replaceme-renamed
install -m 0644 ${WORKDIR}/subdir/fileinsubdir ${D}${datadir}/selftest-replaceme-subdir
- install -m 0644 ${WORKDIR}/selftest-replaceme-src-globfile ${D}${datadir}/selftest-replaceme-src-globfile
cp ${WORKDIR}/selftest-replaceme-inst-glob* ${D}${datadir}/selftest-replaceme-inst-globfile
cp ${WORKDIR}/selftest-replaceme-inst-todir-glob* ${D}${datadir}
install -d ${D}${sysconfdir}
@@ -36,9 +34,9 @@ do_install() {
install_extrafunc
}
-pkg_postinst_${PN} () {
+pkg_postinst:${PN} () {
echo "Test file installed by postinst" > $D${datadir}/selftest-replaceme-postinst
}
-FILES_${PN} += "${datadir}"
+FILES:${PN} += "${datadir}"
diff --git a/meta-selftest/recipes-test/recipeutils/recipeutils-test.inc b/meta-selftest/recipes-test/recipeutils/recipeutils-test.inc
new file mode 100644
index 0000000000..8490b902d7
--- /dev/null
+++ b/meta-selftest/recipes-test/recipeutils/recipeutils-test.inc
@@ -0,0 +1,5 @@
+SRC_URI = "http://xorg.freedesktop.org/releases/individual/lib/libxshmfence-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "66662e76899112c0f99e22f2fc775a7e"
+SRC_URI[sha256sum] = "d21b2d1fd78c1efbe1f2c16dae1cb23f8fd231dcf891465b8debe636a9054b0c"
+
diff --git a/meta-selftest/recipes-test/recipeutils/recipeutils-test/anotherfile b/meta-selftest/recipes-test/recipeutils/recipeutils-test/anotherfile
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta-selftest/recipes-test/recipeutils/recipeutils-test/anotherfile
diff --git a/meta-selftest/recipes-test/recipeutils/recipeutils-test/somefile b/meta-selftest/recipes-test/recipeutils/recipeutils-test/somefile
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta-selftest/recipes-test/recipeutils/recipeutils-test/somefile
diff --git a/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb b/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb
new file mode 100644
index 0000000000..ad9f475d15
--- /dev/null
+++ b/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb
@@ -0,0 +1,13 @@
+SUMMARY = "Test recipe for recipeutils.patch_recipe()"
+
+require recipeutils-test.inc
+
+LICENSE = "HPND"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/somefile;md5=d41d8cd98f00b204e9800998ecf8427e"
+DEPENDS += "zlib"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI += "file://somefile"
+
+SRC_URI:append = " file://anotherfile"
diff --git a/meta-selftest/recipes-test/selftest-chown/selftest-chown.bb b/meta-selftest/recipes-test/selftest-chown/selftest-chown.bb
new file mode 100644
index 0000000000..aa6ce0c2a0
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-chown/selftest-chown.bb
@@ -0,0 +1,30 @@
+SUMMARY = "selftest chown"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+LICENSE = "MIT"
+
+DEPENDS += "coreutils-native"
+
+S = "${WORKDIR}"
+
+inherit useradd allarch
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM:${PN} = "-u 1234 -M test"
+TESTDIR = "${D}${sysconfdir}/selftest-chown"
+
+do_install() {
+ install -d ${TESTDIR}
+ install -d ${TESTDIR}/dir
+ touch ${TESTDIR}/file
+ ln -s ./file ${TESTDIR}/symlink
+ install -d ${TESTDIR}/fifotest
+ mkfifo ${TESTDIR}/fifotest/fifo
+
+ chown test:test ${TESTDIR}/file
+ chown -R test:test ${TESTDIR}/dir
+ chown -h test:test ${TESTDIR}/symlink
+ chown -R test:test ${TESTDIR}/fifotest
+}
+
+FILES:${PN} = "${sysconfdir}/selftest-chown/*"
diff --git a/meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb b/meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb
index 8e0d1cdd8e..1a140a532f 100644
--- a/meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb
+++ b/meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb
@@ -1,11 +1,10 @@
-SUMMARY = "Line-oriented text editor -- selftest GPLv2 version"
+SUMMARY = "Line-oriented text editor -- selftest GPL-2.0-or-later version"
HOMEPAGE = "http://www.gnu.org/software/ed/"
SECTION = "base"
-LICENSE = "GPLv2+"
+LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=6ddd5335ef96fb858a138230af773710 \
file://main.c;beginline=1;endline=17;md5=36d4b85e5ae9028e918d1cc775c2475e"
-PR = "r2"
SRC_URI = "${SAVANNAH_GNU_MIRROR}/ed/ed-${PV}.tar.bz2"
SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632"
@@ -17,6 +16,8 @@ S = "${WORKDIR}/ed-${PV}"
EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'"
-CONFIGUREOPTS_remove = "--disable-dependency-tracking"
-CONFIGUREOPTS_remove = "--disable-silent-rules"
-EXTRA_OECONF_remove = "--disable-static"
+CONFIGUREOPTS:remove = "--disable-dependency-tracking"
+CONFIGUREOPTS:remove = "--disable-silent-rules"
+EXTRA_OECONF:remove = "--disable-static"
+
+BBCLASSEXTEND = "native"
diff --git a/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb b/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb
index 8a2b565ce5..b92740de32 100644
--- a/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb
+++ b/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb
@@ -1,7 +1,7 @@
SUMMARY = "Line-oriented text editor -- selftest variant"
HOMEPAGE = "http://www.gnu.org/software/ed/"
-LICENSE = "GPLv3+"
+LICENSE = "GPL-3.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7 \
file://ed.h;endline=20;md5=4e36b7a40e137f42aee718165590d125 \
file://main.c;endline=17;md5=c5b8f78f115df187af76868a2aead16a"
@@ -34,3 +34,5 @@ do_install() {
rm -f ${D}${infodir}/dir
fi
}
+
+BBCLASSEXTEND = "native"
diff --git a/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb
index 842a9772cb..be346b8a0e 100644
--- a/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb
+++ b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb
@@ -25,6 +25,6 @@ do_install () {
dd if=/dev/zero of=${D}${bindir}/sparsetest bs=1 count=0 seek=1M
}
-RDEPENDS_${PN}-gdb += "gdb"
+RDEPENDS:${PN}-gdb += "gdb"
PACKAGES =+ "${PN}-gdb"
-FILES_${PN}-gdb = "${bindir}/gdb.sh"
+FILES:${PN}-gdb = "${bindir}/gdb.sh"
diff --git a/meta-selftest/recipes-test/selftest-hello/files/helloworld.c b/meta-selftest/recipes-test/selftest-hello/files/helloworld.c
new file mode 100644
index 0000000000..fc7169b7b8
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-hello/files/helloworld.c
@@ -0,0 +1,8 @@
+#include <stdio.h>
+
+int main(void)
+{
+ printf("Hello world!\n");
+
+ return 0;
+}
diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
new file mode 100644
index 0000000000..547587bef4
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "Simple helloworld application -- selftest variant"
+SECTION = "examples"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+SRC_URI = "file://helloworld.c"
+
+S = "${WORKDIR}"
+
+do_compile() {
+ ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 helloworld ${D}${bindir}
+}
+
+BBCLASSEXTEND = "native nativesdk" \ No newline at end of file
diff --git a/meta-selftest/recipes-test/selftest-users/acreategroup.bb b/meta-selftest/recipes-test/selftest-users/acreategroup.bb
new file mode 100644
index 0000000000..66ed5695a2
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-users/acreategroup.bb
@@ -0,0 +1,32 @@
+SUMMARY = "creategroup_a"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+LICENSE = "MIT"
+
+S = "${WORKDIR}"
+
+EXCLUDE_FROM_WORLD="1"
+
+inherit useradd allarch
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM:${PN} = "-u 5560 --gid a_group a_user"
+GROUPADD_PARAM:${PN} = "-r a_group"
+
+TESTDIR = "${D}${sysconfdir}/creategroup"
+
+do_install() {
+ install -d ${TESTDIR}
+ install -d ${TESTDIR}/dir
+ touch ${TESTDIR}/file
+ ln -s ./file ${TESTDIR}/symlink
+ install -d ${TESTDIR}/fifotest
+ mkfifo ${TESTDIR}/fifotest/fifo
+
+ chown a_user:a_group ${TESTDIR}/file
+ chown -R a_user:a_group ${TESTDIR}/dir
+ chown -h a_user:a_group ${TESTDIR}/symlink
+ chown -R a_user:a_group ${TESTDIR}/fifotest
+}
+
+FILES:${PN} = "${sysconfdir}/creategroup/*"
diff --git a/meta-selftest/recipes-test/selftest-users/bcreategroup.bb b/meta-selftest/recipes-test/selftest-users/bcreategroup.bb
new file mode 100644
index 0000000000..c4844dd0da
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-users/bcreategroup.bb
@@ -0,0 +1,37 @@
+SUMMARY = "creategroup_b"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+LICENSE = "MIT"
+
+# This recipe requires a and c. C requires A. Reverse alpha.
+
+USERADD_DEPENDS = "acreategroup ccreategroup"
+
+S = "${WORKDIR}"
+
+EXCLUDE_FROM_WORLD="1"
+
+inherit useradd allarch
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM:${PN} = "-u 5561 -g b_group -G a_group,c_group b_user "
+GROUPADD_PARAM:${PN} = "-r b_group"
+
+TESTDIR = "${D}${sysconfdir}/creategroup"
+
+do_install() {
+ install -d ${TESTDIR}
+ install -d ${TESTDIR}/dir
+ touch ${TESTDIR}/file
+ ln -s ./file ${TESTDIR}/symlink
+ install -d ${TESTDIR}/fifotest
+ mkfifo ${TESTDIR}/fifotest/fifo
+
+ chown a_user:a_group ${TESTDIR}/file
+ chown -R c_user:c_group ${TESTDIR}/dir
+ chown -h a_user:a_group ${TESTDIR}/symlink
+ chown -R b_user:b_group ${TESTDIR}/fifotest
+}
+
+FILES:${PN} = "${sysconfdir}/creategroup/*"
+
diff --git a/meta-selftest/recipes-test/selftest-users/ccreategroup.bb b/meta-selftest/recipes-test/selftest-users/ccreategroup.bb
new file mode 100644
index 0000000000..021b1ebbf7
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-users/ccreategroup.bb
@@ -0,0 +1,34 @@
+SUMMARY = "creategroup_c"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+LICENSE = "MIT"
+
+USERADD_DEPENDS = "acreategroup"
+
+S = "${WORKDIR}"
+
+EXCLUDE_FROM_WORLD="1"
+
+inherit useradd allarch
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM:${PN} = "-u 5563 --gid c_group -G a_group c_user"
+GROUPADD_PARAM:${PN} = "-r c_group"
+
+TESTDIR = "${D}${sysconfdir}/creategroup"
+
+do_install() {
+ install -d ${TESTDIR}
+ install -d ${TESTDIR}/dir
+ touch ${TESTDIR}/file
+ ln -s ./file ${TESTDIR}/symlink
+ install -d ${TESTDIR}/fifotest
+ mkfifo ${TESTDIR}/fifotest/fifo
+
+ chown c_user:c_group ${TESTDIR}/file
+ chown -R c_user:c_group ${TESTDIR}/dir
+ chown -h c_user:c_group ${TESTDIR}/symlink
+ chown -R c_user:c_group ${TESTDIR}/fifotest
+}
+
+FILES:${PN} = "${sysconfdir}/creategroup/*"
diff --git a/meta-selftest/recipes-test/selftest-users/creategroup1.bb b/meta-selftest/recipes-test/selftest-users/creategroup1.bb
new file mode 100644
index 0000000000..afd23ed1ee
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-users/creategroup1.bb
@@ -0,0 +1,30 @@
+SUMMARY = "creategroup pt 1"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+LICENSE = "MIT"
+
+S = "${WORKDIR}"
+
+inherit useradd allarch
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM:${PN} = "-u 5555 --gid grouptest gt1"
+GROUPADD_PARAM:${PN} = "-r grouptest"
+
+TESTDIR = "${D}${sysconfdir}/creategroup"
+
+do_install() {
+ install -d ${TESTDIR}
+ install -d ${TESTDIR}/dir
+ touch ${TESTDIR}/file
+ ln -s ./file ${TESTDIR}/symlink
+ install -d ${TESTDIR}/fifotest
+ mkfifo ${TESTDIR}/fifotest/fifo
+
+ chown gt1:grouptest ${TESTDIR}/file
+ chown -R gt1:grouptest ${TESTDIR}/dir
+ chown -h gt1:grouptest ${TESTDIR}/symlink
+ chown -R gt1:grouptest ${TESTDIR}/fifotest
+}
+
+FILES:${PN} = "${sysconfdir}/creategroup/*"
diff --git a/meta-selftest/recipes-test/selftest-users/creategroup2.bb b/meta-selftest/recipes-test/selftest-users/creategroup2.bb
new file mode 100644
index 0000000000..f776f43aed
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-users/creategroup2.bb
@@ -0,0 +1,32 @@
+SUMMARY = "creategroup pt 2"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+LICENSE = "MIT"
+
+USERADD_DEPENDS = "creategroup1"
+
+S = "${WORKDIR}"
+
+inherit useradd allarch
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM:${PN} = "-u 5556 --gid grouptest gt2"
+
+TESTDIR = "${D}${sysconfdir}/creategroup"
+
+do_install() {
+ install -d ${TESTDIR}
+ install -d ${TESTDIR}/dir
+ touch ${TESTDIR}/file
+ ln -s ./file ${TESTDIR}/symlink
+ install -d ${TESTDIR}/fifotest
+ mkfifo ${TESTDIR}/fifotest/fifo
+
+ chown gt2:grouptest ${TESTDIR}/file
+ chown -R gt2:grouptest ${TESTDIR}/dir
+ chown -h gt2:grouptest ${TESTDIR}/symlink
+ chown -R gt2:grouptest ${TESTDIR}/fifotest
+}
+
+FILES:${PN} = "${sysconfdir}/creategroup/*"
+
diff --git a/meta-selftest/recipes-test/selftest-users/dcreategroup.bb b/meta-selftest/recipes-test/selftest-users/dcreategroup.bb
new file mode 100644
index 0000000000..b96ca92a16
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-users/dcreategroup.bb
@@ -0,0 +1,33 @@
+SUMMARY = "creategroup_d"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+LICENSE = "MIT"
+
+USERADD_DEPENDS = "bcreategroup"
+
+S = "${WORKDIR}"
+
+EXCLUDE_FROM_WORLD="1"
+
+inherit useradd allarch
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM:${PN} = "-u 5564 -g d_group -G b_group d_user "
+GROUPADD_PARAM:${PN} = "-r d_group"
+
+TESTDIR = "${D}${sysconfdir}/creategroup"
+
+do_install() {
+ install -d ${TESTDIR}
+ install -d ${TESTDIR}/dir
+ touch ${TESTDIR}/file
+ ln -s ./file ${TESTDIR}/symlink
+ install -d ${TESTDIR}/fifotest
+ mkfifo ${TESTDIR}/fifotest/fifo
+
+ chown d_user:d_group ${TESTDIR}/file
+ chown -R d_user:b_group ${TESTDIR}/dir
+ chown -h d_user:d_group ${TESTDIR}/symlink
+ chown -R d_user:b_group ${TESTDIR}/fifotest
+}
+
diff --git a/meta-selftest/recipes-test/selftest-users/useraddbadtask.bb b/meta-selftest/recipes-test/selftest-users/useraddbadtask.bb
new file mode 100644
index 0000000000..99e04a80b3
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-users/useraddbadtask.bb
@@ -0,0 +1,20 @@
+SUMMARY = "UserAddBadTask"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+LICENSE = "MIT"
+
+DEPENDS:append = "coreutils-native"
+
+S = "${WORKDIR}"
+
+inherit useradd allarch
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM:${PN} = "-u 5555 --gid groupaddtask useraddtask"
+GROUPADD_PARAM:${PN} = "-r groupaddtask"
+
+do_badthingshappen() {
+ echo "foo"
+}
+
+addtask badthingshappen after do_populate_sysroot before do_package
diff --git a/meta-selftest/recipes-test/sysroot-test/sysroot-la-test_1.0.bb b/meta-selftest/recipes-test/sysroot-test/sysroot-la-test_1.0.bb
new file mode 100644
index 0000000000..21f06782fb
--- /dev/null
+++ b/meta-selftest/recipes-test/sysroot-test/sysroot-la-test_1.0.bb
@@ -0,0 +1,16 @@
+SUMMARY = "Produce a broken la file"
+LICENSE = "CLOSED"
+INHIBIT_DEFAULT_DEPS = "1"
+
+EXCLUDE_FROM_WORLD = "1"
+
+# remove-libtool.bbclass is inherited by default and removes all
+# .la files which for this test we specifically do not want.
+REMOVE_LIBTOOL_LA = "0"
+
+do_install() {
+ install -d ${D}${libdir}/test/
+ echo '${WORKDIR}' > ${D}${libdir}/test/la-test.la
+}
+
+BBCLASSEXTEND += "native"
diff --git a/meta-selftest/recipes-test/sysroot-test/sysroot-pc-test_1.0.bb b/meta-selftest/recipes-test/sysroot-test/sysroot-pc-test_1.0.bb
new file mode 100644
index 0000000000..e748310fc4
--- /dev/null
+++ b/meta-selftest/recipes-test/sysroot-test/sysroot-pc-test_1.0.bb
@@ -0,0 +1,12 @@
+SUMMARY = "Produce a broken pc file"
+LICENSE = "CLOSED"
+INHIBIT_DEFAULT_DEPS = "1"
+
+EXCLUDE_FROM_WORLD = "1"
+
+do_install() {
+ install -d ${D}${libdir}/test/
+ echo '${WORKDIR}' > ${D}${libdir}/test/test.pc
+}
+
+BBCLASSEXTEND += "native"
diff --git a/meta-selftest/recipes-test/sysroot-test/sysroot-shebang-test_1.0.bb b/meta-selftest/recipes-test/sysroot-test/sysroot-shebang-test_1.0.bb
new file mode 100644
index 0000000000..6c834be897
--- /dev/null
+++ b/meta-selftest/recipes-test/sysroot-test/sysroot-shebang-test_1.0.bb
@@ -0,0 +1,12 @@
+SUMMARY = "Check that shebang does not exceed 128 characters"
+LICENSE = "CLOSED"
+INHIBIT_DEFAULT_DEPS = "1"
+
+EXCLUDE_FROM_WORLD = "1"
+do_install() {
+ install -d ${D}${bindir}
+ echo '#!BiM3cnVd1Amtv6PG+FynrQiVMbZnX5ELgF21q3EkuB+44JEGWtq8TvBJ7EGidfVs3eR3wVOUbLnjYDlKUWcm7YC/ute7f+KDHbwxziRUSUBZAUqgjiQdfQ0HnxajI0ozbM863E9JV9k13yZKYfh9/zR77Y6Dl4Dd3zOWS75LSpkAXV' > ${D}${bindir}/max-shebang
+ chmod 755 ${D}${bindir}/max-shebang
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta-selftest/recipes-test/sysroot-test/sysroot-test-arch1_1.0.bb b/meta-selftest/recipes-test/sysroot-test/sysroot-test-arch1_1.0.bb
new file mode 100644
index 0000000000..36a682c53d
--- /dev/null
+++ b/meta-selftest/recipes-test/sysroot-test/sysroot-test-arch1_1.0.bb
@@ -0,0 +1,14 @@
+LICENSE = "CLOSED"
+
+PROVIDES = "virtual/sysroot-test"
+INHIBIT_DEFAULT_DEPS = "1"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+TESTSTRING ?= "1"
+
+do_install() {
+ install -d ${D}${includedir}
+ echo "# test ${TESTSTRING}" > ${D}${includedir}/sysroot-test.h
+}
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/sysroot-test/sysroot-test-arch2_1.0.bb b/meta-selftest/recipes-test/sysroot-test/sysroot-test-arch2_1.0.bb
new file mode 100644
index 0000000000..67172f3cab
--- /dev/null
+++ b/meta-selftest/recipes-test/sysroot-test/sysroot-test-arch2_1.0.bb
@@ -0,0 +1,14 @@
+LICENSE = "CLOSED"
+
+PROVIDES = "virtual/sysroot-test"
+INHIBIT_DEFAULT_DEPS = "1"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+TESTSTRING ?= "2"
+
+do_install() {
+ install -d ${D}${includedir}
+ echo "# test ${TESTSTRING}" > ${D}${includedir}/sysroot-test.h
+}
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/sysroot-test/sysroot-test_1.0.bb b/meta-selftest/recipes-test/sysroot-test/sysroot-test_1.0.bb
new file mode 100644
index 0000000000..560487c159
--- /dev/null
+++ b/meta-selftest/recipes-test/sysroot-test/sysroot-test_1.0.bb
@@ -0,0 +1,6 @@
+SUMMARY = "Virtual provider sysroot test"
+LICENSE = "CLOSED"
+INHIBIT_DEFAULT_DEPS = "1"
+DEPENDS = "virtual/sysroot-test"
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/systemd-machine-units/systemd-machine-units_%.bbappend b/meta-selftest/recipes-test/systemd-machine-units/systemd-machine-units_%.bbappend
new file mode 100644
index 0000000000..205720982c
--- /dev/null
+++ b/meta-selftest/recipes-test/systemd-machine-units/systemd-machine-units_%.bbappend
@@ -0,0 +1,2 @@
+# This bbappend is used to alter the recipe using the test_recipe.inc file created by tests.
+include test_recipe.inc
diff --git a/meta-selftest/recipes-test/testrpm/files/testfile.txt b/meta-selftest/recipes-test/testrpm/files/testfile.txt
new file mode 100644
index 0000000000..c4d7630c1e
--- /dev/null
+++ b/meta-selftest/recipes-test/testrpm/files/testfile.txt
@@ -0,0 +1 @@
+== This file serves the purposes of SRC_URI only
diff --git a/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb b/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb
new file mode 100644
index 0000000000..5e8761ab55
--- /dev/null
+++ b/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Test recipe for testing rpm generated by oe-core"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+LICENSE = "MIT"
+
+SRC_URI = "file://testfile.txt"
+INHIBIT_DEFAULT_DEPS = "1"
+
+do_compile(){
+ echo "testdata" > ${B}/"file with [brackets].txt"
+ echo "testdata" > ${B}/"file with (parentheses).txt"
+}
+
+do_install(){
+ install ${B}/* ${D}/
+}
+
+FILES:${PN} = "*"
diff --git a/meta-selftest/recipes-test/wrapper/cmdline-shebang-wrapper-test.bb b/meta-selftest/recipes-test/wrapper/cmdline-shebang-wrapper-test.bb
new file mode 100644
index 0000000000..c3d3548d4a
--- /dev/null
+++ b/meta-selftest/recipes-test/wrapper/cmdline-shebang-wrapper-test.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Check that create_cmdline_shebang works"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+INHIBIT_DEFAULT_DEPS = "1"
+
+SRC_URI += "file://test.awk"
+
+EXCLUDE_FROM_WORLD = "1"
+do_install() {
+ install -d ${D}${bindir}
+ # was not able to make ownership preservation check
+ install -m 0400 ${WORKDIR}/test.awk ${D}${bindir}/test
+
+ perm_old="$(stat --format='%a' ${D}${bindir}/test)"
+ sed -i -e 's|@AWK_BIN@|${bindir}/awk|g' ${D}${bindir}/test
+ create_cmdline_shebang_wrapper ${D}${bindir}/test
+ if [ $(${D}${bindir}/test) != "Don't Panic!" ]; then
+ bbfatal "Wrapper is broken"
+ else
+ bbnote "Wrapper is good"
+ fi
+
+ perm_new="$(stat --format='%a' ${D}${bindir}/test.real)"
+
+ if [ "$perm_new" != "$perm_old" ]; then
+ bbfatal "Wrapper permissions for ${D}${bindir}/test.real not preserved. Found $perm_new but expected $perm_old"
+ fi
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta-selftest/recipes-test/wrapper/files/test.awk b/meta-selftest/recipes-test/wrapper/files/test.awk
new file mode 100644
index 0000000000..91429197b1
--- /dev/null
+++ b/meta-selftest/recipes-test/wrapper/files/test.awk
@@ -0,0 +1,2 @@
+#! @AWK_BIN@ -f
+BEGIN { print "Don't Panic!" }
diff --git a/meta-selftest/wic/overlayfs_etc.wks.in b/meta-selftest/wic/overlayfs_etc.wks.in
new file mode 100644
index 0000000000..1e1e5836e7
--- /dev/null
+++ b/meta-selftest/wic/overlayfs_etc.wks.in
@@ -0,0 +1,4 @@
+part /boot --active --source bootimg-biosplusefi --ondisk sda --sourceparams="loader=grub-efi" --align 1024
+part / --source rootfs --ondisk sda --fstype=ext4 --use-uuid --align 1024
+part --ondisk sda --fstype=ext4 --size=5 --align 1024
+bootloader --ptable gpt --timeout=1 --append="rootfstype=ext4 console=ttyS0,115200 console=tty0 ${OVERLAYFS_INIT_OPTION}"
diff --git a/meta-selftest/wic/test_biosplusefi_plugin.wks b/meta-selftest/wic/test_biosplusefi_plugin.wks
new file mode 100644
index 0000000000..5a56c84518
--- /dev/null
+++ b/meta-selftest/wic/test_biosplusefi_plugin.wks
@@ -0,0 +1,6 @@
+# short-description: This file is used in oe-selftest wic module to test biosplusefi plugin
+
+part /boot --source bootimg-biosplusefi --sourceparams="loader=grub-efi" --active --align 1024 --use-uuid
+part / --source rootfs --fstype=ext4 --align 1024 --use-uuid
+
+bootloader --timeout=0 --append="console=ttyS0,115200n8"
diff --git a/meta-selftest/wic/test_efi_plugin.wks b/meta-selftest/wic/test_efi_plugin.wks
new file mode 100644
index 0000000000..1603d6c4bb
--- /dev/null
+++ b/meta-selftest/wic/test_efi_plugin.wks
@@ -0,0 +1,6 @@
+# short-description: This file is used in oe-selftest wic module to test efi plugin
+
+part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,create-unified-kernel-image=true,initrd=${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES}" --active --align 1024 --use-uuid
+part / --source rootfs --fstype=ext4 --align 1024 --use-uuid
+
+bootloader --timeout=0 --append="console=ttyS0,115200n8"
diff --git a/meta-selftest/wic/test_empty_plugin.wks b/meta-selftest/wic/test_empty_plugin.wks
new file mode 100644
index 0000000000..4e91e04e19
--- /dev/null
+++ b/meta-selftest/wic/test_empty_plugin.wks
@@ -0,0 +1,4 @@
+# short-description: image for checking empty partition creation
+
+part / --source rootfs --fstype=ext4 --align 1024 --use-uuid
+part empty --source empty --ondisk sda --size 1024 --align 1024
diff --git a/meta-selftest/wic/test_gpt_partition_name.wks b/meta-selftest/wic/test_gpt_partition_name.wks
new file mode 100644
index 0000000000..7db6da9aee
--- /dev/null
+++ b/meta-selftest/wic/test_gpt_partition_name.wks
@@ -0,0 +1,7 @@
+# short-description: image to test part-name in GPT partitions
+
+part --fstype=ext4 --part-name boot-A --label boot --size 1M --align 1024
+part / --source rootfs --fstype=ext4 --part-name root-A --align 1024
+part --fstype=ext4 --label ext-space --size 1M --align 1024
+
+bootloader --ptable gpt
diff --git a/meta-selftest/wic/test_rawcopy_plugin.wks.in b/meta-selftest/wic/test_rawcopy_plugin.wks.in
index 83be4be914..a865dd1d32 100644
--- a/meta-selftest/wic/test_rawcopy_plugin.wks.in
+++ b/meta-selftest/wic/test_rawcopy_plugin.wks.in
@@ -1,6 +1,6 @@
# short-description: This file is used in oe-selftest wic module to test rawcopy plugin
part /boot --active --source bootimg-pcbios
-part / --source rawcopy --sourceparams="file=core-image-minimal-${MACHINE}.ext4" --use-uuid
+part / --source rawcopy --sourceparams="file=${IMAGE_LINK_NAME_CORE_IMAGE_MINIMAL}.ext4" --use-uuid
bootloader --timeout=0 --append="console=ttyS0,115200n8"
diff --git a/meta-selftest/wic/test_uefikernel.wks b/meta-selftest/wic/test_uefikernel.wks
new file mode 100644
index 0000000000..bede2288f6
--- /dev/null
+++ b/meta-selftest/wic/test_uefikernel.wks
@@ -0,0 +1,5 @@
+# short-description: This file is used in oe-selftest wic module to test uefi-kernel loader
+
+part /boot --source bootimg-efi --sourceparams="loader=uefi-kernel"
+part / --source rootfs --fstype=ext4 --align 1024 --use-uuid
+