summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/bblayers/makesetup.py9
-rw-r--r--meta/lib/bblayers/setupwriters/oe-setup-layers.py5
-rw-r--r--meta/lib/oe/copy_buildsystem.py10
-rw-r--r--meta/lib/oe/package.py26
-rw-r--r--meta/lib/oe/package_manager/__init__.py9
-rw-r--r--meta/lib/oe/package_manager/common_deb_ipk.py97
-rw-r--r--meta/lib/oe/package_manager/deb/__init__.py85
-rw-r--r--meta/lib/oe/package_manager/ipk/__init__.py89
-rw-r--r--meta/lib/oe/recipeutils.py2
-rw-r--r--meta/lib/oe/reproducible.py19
-rw-r--r--meta/lib/oe/sstatesig.py34
-rw-r--r--meta/lib/oeqa/core/tests/common.py1
-rw-r--r--meta/lib/oeqa/manual/crops.json294
-rw-r--r--meta/lib/oeqa/manual/eclipse-plugin.json322
-rw-r--r--meta/lib/oeqa/runtime/cases/ltp.py2
-rw-r--r--meta/lib/oeqa/runtime/cases/systemd.py6
-rw-r--r--meta/lib/oeqa/sdk/cases/autotools.py (renamed from meta/lib/oeqa/sdk/cases/buildcpio.py)3
-rw-r--r--meta/lib/oeqa/sdk/cases/cmake.py (renamed from meta/lib/oeqa/sdk/cases/assimp.py)12
-rw-r--r--meta/lib/oeqa/sdk/cases/gtk3.py (renamed from meta/lib/oeqa/sdk/cases/buildgalculator.py)2
-rw-r--r--meta/lib/oeqa/sdk/cases/makefile.py (renamed from meta/lib/oeqa/sdk/cases/buildlzip.py)4
-rw-r--r--meta/lib/oeqa/sdk/cases/maturin.py1
-rw-r--r--meta/lib/oeqa/sdk/cases/meson.py (renamed from meta/lib/oeqa/sdk/cases/buildepoxy.py)4
-rw-r--r--meta/lib/oeqa/sdk/cases/python.py2
-rw-r--r--meta/lib/oeqa/sdk/cases/rust.py1
-rw-r--r--meta/lib/oeqa/sdkext/cases/devtool.py7
-rw-r--r--meta/lib/oeqa/selftest/cases/debuginfod.py14
-rw-r--r--meta/lib/oeqa/selftest/cases/devtool.py65
-rw-r--r--meta/lib/oeqa/selftest/cases/layerappend.py2
-rw-r--r--meta/lib/oeqa/selftest/cases/minidebuginfo.py16
-rw-r--r--meta/lib/oeqa/selftest/cases/oescripts.py2
-rw-r--r--meta/lib/oeqa/selftest/cases/recipetool.py34
-rw-r--r--meta/lib/oeqa/selftest/cases/recipeutils.py4
-rw-r--r--meta/lib/oeqa/selftest/cases/reproducible.py2
-rw-r--r--meta/lib/oeqa/selftest/cases/runtime_test.py2
-rw-r--r--meta/lib/oeqa/selftest/cases/rust.py5
-rw-r--r--meta/lib/oeqa/selftest/cases/sstatetests.py31
-rw-r--r--meta/lib/oeqa/utils/commands.py18
-rw-r--r--meta/lib/patchtest/repo.py88
-rw-r--r--meta/lib/patchtest/requirements.txt1
-rw-r--r--meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.fail57
-rw-r--r--meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.pass56
-rw-r--r--meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.fail56
-rw-r--r--meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.pass56
-rw-r--r--meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.fail78
-rw-r--r--meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.pass78
-rw-r--r--meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.fail68
-rw-r--r--meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.pass72
-rw-r--r--meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.1.fail36
-rw-r--r--meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.2.fail35
-rw-r--r--meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.fail66
-rw-r--r--meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.pass79
-rw-r--r--meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.1.skip2
-rw-r--r--meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.fail53
-rw-r--r--meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.pass53
-rw-r--r--meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.fail53
-rw-r--r--meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.pass53
-rw-r--r--meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.1.fail60
-rw-r--r--meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.2.fail62
-rw-r--r--meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.pass60
-rw-r--r--meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.fail25
-rw-r--r--meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.pass26
-rw-r--r--meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail23
-rw-r--r--meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass25
-rw-r--r--meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.fail65
-rw-r--r--meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.pass65
-rw-r--r--meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.fail23
-rw-r--r--meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.pass25
-rw-r--r--meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.fail64
-rw-r--r--meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.pass68
-rw-r--r--meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.fail57
-rw-r--r--meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.pass53
-rw-r--r--meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.fail60
-rw-r--r--meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.pass60
-rw-r--r--meta/lib/patchtest/utils.py129
74 files changed, 1296 insertions, 1935 deletions
diff --git a/meta/lib/bblayers/makesetup.py b/meta/lib/bblayers/makesetup.py
index 99d5973760..4199b5f069 100644
--- a/meta/lib/bblayers/makesetup.py
+++ b/meta/lib/bblayers/makesetup.py
@@ -48,8 +48,9 @@ class MakeSetupPlugin(LayerPlugin):
if l_name == 'workspace':
continue
if l_ismodified:
- logger.error("Layer {name} in {path} has uncommitted modifications or is not in a git repository.".format(name=l_name,path=l_path))
- return
+ e = "Layer {name} in {path} has uncommitted modifications or is not in a git repository.".format(name=l_name,path=l_path)
+ logger.error(e)
+ raise Exception(e)
repo_path = oe.buildcfg.get_metadata_git_toplevel(l_path)
if self._is_submodule(repo_path):
@@ -62,9 +63,6 @@ class MakeSetupPlugin(LayerPlugin):
'describe':oe.buildcfg.get_metadata_git_describe(repo_path)}}
if repo_path == destdir_repo:
repos[repo_path]['contains_this_file'] = True
- if not repos[repo_path]['git-remote']['remotes'] and not repos[repo_path]['contains_this_file']:
- logger.error("Layer repository in {path} does not have any remotes configured. Please add at least one with 'git remote add'.".format(path=repo_path))
- return
top_path = os.path.commonpath([os.path.dirname(r) for r in repos.keys()])
@@ -74,6 +72,7 @@ class MakeSetupPlugin(LayerPlugin):
repos_nopaths[r_nopath] = repos[r]
r_relpath = os.path.relpath(r, top_path)
repos_nopaths[r_nopath]['path'] = r_relpath
+ repos_nopaths[r_nopath]['originpath'] = r
return repos_nopaths
def do_make_setup(self, args):
diff --git a/meta/lib/bblayers/setupwriters/oe-setup-layers.py b/meta/lib/bblayers/setupwriters/oe-setup-layers.py
index 59ca968ff3..8faeabfabc 100644
--- a/meta/lib/bblayers/setupwriters/oe-setup-layers.py
+++ b/meta/lib/bblayers/setupwriters/oe-setup-layers.py
@@ -85,6 +85,11 @@ class OeSetupLayersWriter():
if not os.path.exists(args.destdir):
os.makedirs(args.destdir)
repos = parent.make_repo_config(args.destdir)
+ for r in repos.values():
+ if not r['git-remote']['remotes'] and not r.get('contains_this_file', False):
+ e = "Layer repository in {path} does not have any remotes configured. Please add at least one with 'git remote add'.".format(path=r['originpath'])
+ raise Exception(e)
+ del r['originpath']
json = {"version":"1.0","sources":repos}
if not repos:
err = "Could not determine layer sources"
diff --git a/meta/lib/oe/copy_buildsystem.py b/meta/lib/oe/copy_buildsystem.py
index 81abfbf9e2..ced751b835 100644
--- a/meta/lib/oe/copy_buildsystem.py
+++ b/meta/lib/oe/copy_buildsystem.py
@@ -193,13 +193,17 @@ def prune_lockedsigs(excluded_tasks, excluded_targets, lockedsigs, onlynative, p
else:
f.write(line)
invalue = False
- elif line.startswith('SIGGEN_LOCKEDSIGS'):
+ elif line.startswith('SIGGEN_LOCKEDSIGS_t'):
invalue = True
f.write(line)
+ else:
+ invalue = False
+ f.write(line)
def merge_lockedsigs(copy_tasks, lockedsigs_main, lockedsigs_extra, merged_output, copy_output=None):
merged = {}
arch_order = []
+ otherdata = []
with open(lockedsigs_main, 'r') as f:
invalue = None
for line in f:
@@ -212,6 +216,9 @@ def merge_lockedsigs(copy_tasks, lockedsigs_main, lockedsigs_extra, merged_outpu
invalue = line[18:].split('=', 1)[0].rstrip()
merged[invalue] = []
arch_order.append(invalue)
+ else:
+ invalue = None
+ otherdata.append(line)
with open(lockedsigs_extra, 'r') as f:
invalue = None
@@ -246,6 +253,7 @@ def merge_lockedsigs(copy_tasks, lockedsigs_main, lockedsigs_extra, merged_outpu
f.write(' "\n')
fulltypes.append(typename)
f.write('SIGGEN_LOCKEDSIGS_TYPES = "%s"\n' % ' '.join(fulltypes))
+ f.write('\n' + ''.join(otherdata))
if copy_output:
write_sigs_file(copy_output, list(tocopy.keys()), tocopy)
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index 1511ba47c4..d1303f32bf 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -195,14 +195,28 @@ def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, max_process, qa_alre
oe.utils.multiprocess_launch_mp(runstrip, sfiles, max_process)
+TRANSLATE = (
+ ("@", "@at@"),
+ (" ", "@space@"),
+ ("\t", "@tab@"),
+ ("[", "@openbrace@"),
+ ("]", "@closebrace@"),
+ ("_", "@underscore@"),
+ (":", "@colon@"),
+)
def file_translate(file):
- ft = file.replace("@", "@at@")
- ft = ft.replace(" ", "@space@")
- ft = ft.replace("\t", "@tab@")
- ft = ft.replace("[", "@openbrace@")
- ft = ft.replace("]", "@closebrace@")
- ft = ft.replace("_", "@underscore@")
+ ft = file
+ for s, replace in TRANSLATE:
+ ft = ft.replace(s, replace)
+
+ return ft
+
+def file_reverse_translate(file):
+ ft = file
+ for s, replace in reversed(TRANSLATE):
+ ft = ft.replace(replace, s)
+
return ft
def filedeprunner(arg):
diff --git a/meta/lib/oe/package_manager/__init__.py b/meta/lib/oe/package_manager/__init__.py
index 6774cdb794..d3b2317894 100644
--- a/meta/lib/oe/package_manager/__init__.py
+++ b/meta/lib/oe/package_manager/__init__.py
@@ -449,7 +449,7 @@ class PackageManager(object, metaclass=ABCMeta):
return res
return _append(uris, base_paths)
-def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencies):
+def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencies, include_self=False):
"""
Go through our do_package_write_X dependencies and hardlink the packages we depend
upon into the repo directory. This prevents us seeing other packages that may
@@ -486,14 +486,17 @@ def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencie
bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?")
pkgdeps = set()
start = [start]
- seen = set(start)
+ if include_self:
+ seen = set()
+ else:
+ seen = set(start)
# Support direct dependencies (do_rootfs -> do_package_write_X)
# or indirect dependencies within PN (do_populate_sdk_ext -> do_rootfs -> do_package_write_X)
while start:
next = []
for dep2 in start:
for dep in taskdepdata[dep2][3]:
- if taskdepdata[dep][0] != pn:
+ if include_self or taskdepdata[dep][0] != pn:
if "do_" + taskname in dep:
pkgdeps.add(dep)
elif dep not in seen:
diff --git a/meta/lib/oe/package_manager/common_deb_ipk.py b/meta/lib/oe/package_manager/common_deb_ipk.py
new file mode 100644
index 0000000000..6a1e28ee6f
--- /dev/null
+++ b/meta/lib/oe/package_manager/common_deb_ipk.py
@@ -0,0 +1,97 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import glob
+import os
+import subprocess
+import tempfile
+
+import bb
+
+from oe.package_manager import opkg_query, PackageManager
+
+class OpkgDpkgPM(PackageManager):
+ def __init__(self, d, target_rootfs):
+ """
+ This is an abstract class. Do not instantiate this directly.
+ """
+ super(OpkgDpkgPM, self).__init__(d, target_rootfs)
+
+ def package_info(self, pkg):
+ """
+ Returns a dictionary with the package info.
+ """
+ raise NotImplementedError
+
+ def _common_package_info(self, cmd):
+ """
+ "Returns a dictionary with the package info.
+
+ This method extracts the common parts for Opkg and Dpkg
+ """
+
+ proc = subprocess.run(cmd, capture_output=True, encoding="utf-8", shell=True)
+ if proc.returncode:
+ bb.fatal("Unable to list available packages. Command '%s' "
+ "returned %d:\n%s" % (cmd, proc.returncode, proc.stderr))
+ elif proc.stderr:
+ bb.note("Command '%s' returned stderr: %s" % (cmd, proc.stderr))
+
+ return opkg_query(proc.stdout)
+
+ def extract(self, pkg):
+ """
+ Returns the path to a tmpdir where resides the contents of a package.
+
+ Deleting the tmpdir is responsability of the caller.
+ """
+ pkg_info = self.package_info(pkg)
+ if not pkg_info:
+ bb.fatal("Unable to get information for package '%s' while "
+ "trying to extract the package." % pkg)
+
+ ar_cmd = bb.utils.which(os.getenv("PATH"), "ar")
+ tar_cmd = bb.utils.which(os.getenv("PATH"), "tar")
+ pkg_path = pkg_info[pkg]["filepath"]
+
+ if not os.path.isfile(pkg_path):
+ bb.fatal("Unable to extract package for '%s'."
+ "File %s doesn't exists" % (pkg, pkg_path))
+
+ tmp_dir = tempfile.mkdtemp()
+ current_dir = os.getcwd()
+ os.chdir(tmp_dir)
+
+ try:
+ cmd = [ar_cmd, 'x', pkg_path]
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+ data_tar = glob.glob("data.tar.*")
+ if len(data_tar) != 1:
+ bb.fatal("Unable to extract %s package. Failed to identify "
+ "data tarball (found tarballs '%s').",
+ pkg_path, data_tar)
+ data_tar = data_tar[0]
+ cmd = [tar_cmd, 'xf', data_tar]
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError as e:
+ bb.utils.remove(tmp_dir, recurse=True)
+ bb.fatal("Unable to extract %s package. Command '%s' "
+ "returned %d:\n%s" % (pkg_path, ' '.join(cmd), e.returncode, e.output.decode("utf-8")))
+ except OSError as e:
+ bb.utils.remove(tmp_dir, recurse=True)
+ bb.fatal("Unable to extract %s package. Command '%s' "
+ "returned %d:\n%s at %s" % (pkg_path, ' '.join(cmd), e.errno, e.strerror, e.filename))
+
+ bb.note("Extracted %s to %s" % (pkg_path, tmp_dir))
+ bb.utils.remove(os.path.join(tmp_dir, "debian-binary"))
+ bb.utils.remove(os.path.join(tmp_dir, "control.tar.gz"))
+ bb.utils.remove(os.path.join(tmp_dir, data_tar))
+ os.chdir(current_dir)
+
+ return tmp_dir
+
+ def _handle_intercept_failure(self, registered_pkgs):
+ self.mark_packages("unpacked", registered_pkgs.split())
diff --git a/meta/lib/oe/package_manager/deb/__init__.py b/meta/lib/oe/package_manager/deb/__init__.py
index 0c23c884c1..e09e81e490 100644
--- a/meta/lib/oe/package_manager/deb/__init__.py
+++ b/meta/lib/oe/package_manager/deb/__init__.py
@@ -7,6 +7,7 @@
import re
import subprocess
from oe.package_manager import *
+from oe.package_manager.common_deb_ipk import OpkgDpkgPM
class DpkgIndexer(Indexer):
def _create_configs(self):
@@ -111,72 +112,6 @@ class PMPkgsList(PkgsList):
return opkg_query(cmd_output)
-class OpkgDpkgPM(PackageManager):
- def __init__(self, d, target_rootfs):
- """
- This is an abstract class. Do not instantiate this directly.
- """
- super(OpkgDpkgPM, self).__init__(d, target_rootfs)
-
- def package_info(self, pkg, cmd):
- """
- Returns a dictionary with the package info.
-
- This method extracts the common parts for Opkg and Dpkg
- """
-
- try:
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
- except subprocess.CalledProcessError as e:
- bb.fatal("Unable to list available packages. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
- return opkg_query(output)
-
- def extract(self, pkg, pkg_info):
- """
- Returns the path to a tmpdir where resides the contents of a package.
-
- Deleting the tmpdir is responsability of the caller.
-
- This method extracts the common parts for Opkg and Dpkg
- """
-
- ar_cmd = bb.utils.which(os.getenv("PATH"), "ar")
- tar_cmd = bb.utils.which(os.getenv("PATH"), "tar")
- pkg_path = pkg_info[pkg]["filepath"]
-
- if not os.path.isfile(pkg_path):
- bb.fatal("Unable to extract package for '%s'."
- "File %s doesn't exists" % (pkg, pkg_path))
-
- tmp_dir = tempfile.mkdtemp()
- current_dir = os.getcwd()
- os.chdir(tmp_dir)
- data_tar = 'data.tar.xz'
-
- try:
- cmd = [ar_cmd, 'x', pkg_path]
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
- cmd = [tar_cmd, 'xf', data_tar]
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
- except subprocess.CalledProcessError as e:
- bb.utils.remove(tmp_dir, recurse=True)
- bb.fatal("Unable to extract %s package. Command '%s' "
- "returned %d:\n%s" % (pkg_path, ' '.join(cmd), e.returncode, e.output.decode("utf-8")))
- except OSError as e:
- bb.utils.remove(tmp_dir, recurse=True)
- bb.fatal("Unable to extract %s package. Command '%s' "
- "returned %d:\n%s at %s" % (pkg_path, ' '.join(cmd), e.errno, e.strerror, e.filename))
-
- bb.note("Extracted %s to %s" % (pkg_path, tmp_dir))
- bb.utils.remove(os.path.join(tmp_dir, "debian-binary"))
- bb.utils.remove(os.path.join(tmp_dir, "control.tar.gz"))
- os.chdir(current_dir)
-
- return tmp_dir
-
- def _handle_intercept_failure(self, registered_pkgs):
- self.mark_packages("unpacked", registered_pkgs.split())
class DpkgPM(OpkgDpkgPM):
def __init__(self, d, target_rootfs, archs, base_archs, apt_conf_dir=None, deb_repo_workdir="oe-rootfs-repo", filterbydependencies=True):
@@ -496,7 +431,7 @@ class DpkgPM(OpkgDpkgPM):
Returns a dictionary with the package info.
"""
cmd = "%s show %s" % (self.apt_cache_cmd, pkg)
- pkg_info = super(DpkgPM, self).package_info(pkg, cmd)
+ pkg_info = self._common_package_info(cmd)
pkg_arch = pkg_info[pkg]["pkgarch"]
pkg_filename = pkg_info[pkg]["filename"]
@@ -504,19 +439,3 @@ class DpkgPM(OpkgDpkgPM):
os.path.join(self.deploy_dir, pkg_arch, pkg_filename)
return pkg_info
-
- def extract(self, pkg):
- """
- Returns the path to a tmpdir where resides the contents of a package.
-
- Deleting the tmpdir is responsability of the caller.
- """
- pkg_info = self.package_info(pkg)
- if not pkg_info:
- bb.fatal("Unable to get information for package '%s' while "
- "trying to extract the package." % pkg)
-
- tmp_dir = super(DpkgPM, self).extract(pkg, pkg_info)
- bb.utils.remove(os.path.join(tmp_dir, "data.tar.xz"))
-
- return tmp_dir
diff --git a/meta/lib/oe/package_manager/ipk/__init__.py b/meta/lib/oe/package_manager/ipk/__init__.py
index 8cc9953a02..3d998e52ff 100644
--- a/meta/lib/oe/package_manager/ipk/__init__.py
+++ b/meta/lib/oe/package_manager/ipk/__init__.py
@@ -8,6 +8,7 @@ import re
import shutil
import subprocess
from oe.package_manager import *
+from oe.package_manager.common_deb_ipk import OpkgDpkgPM
class OpkgIndexer(Indexer):
def write_index(self):
@@ -90,76 +91,6 @@ class PMPkgsList(PkgsList):
return opkg_query(cmd_output)
-
-class OpkgDpkgPM(PackageManager):
- def __init__(self, d, target_rootfs):
- """
- This is an abstract class. Do not instantiate this directly.
- """
- super(OpkgDpkgPM, self).__init__(d, target_rootfs)
-
- def package_info(self, pkg, cmd):
- """
- Returns a dictionary with the package info.
-
- This method extracts the common parts for Opkg and Dpkg
- """
-
- proc = subprocess.run(cmd, capture_output=True, encoding="utf-8", shell=True)
- if proc.returncode:
- bb.fatal("Unable to list available packages. Command '%s' "
- "returned %d:\n%s" % (cmd, proc.returncode, proc.stderr))
- elif proc.stderr:
- bb.note("Command '%s' returned stderr: %s" % (cmd, proc.stderr))
-
- return opkg_query(proc.stdout)
-
- def extract(self, pkg, pkg_info):
- """
- Returns the path to a tmpdir where resides the contents of a package.
-
- Deleting the tmpdir is responsability of the caller.
-
- This method extracts the common parts for Opkg and Dpkg
- """
-
- ar_cmd = bb.utils.which(os.getenv("PATH"), "ar")
- tar_cmd = bb.utils.which(os.getenv("PATH"), "tar")
- pkg_path = pkg_info[pkg]["filepath"]
-
- if not os.path.isfile(pkg_path):
- bb.fatal("Unable to extract package for '%s'."
- "File %s doesn't exists" % (pkg, pkg_path))
-
- tmp_dir = tempfile.mkdtemp()
- current_dir = os.getcwd()
- os.chdir(tmp_dir)
- data_tar = 'data.tar.zst'
-
- try:
- cmd = [ar_cmd, 'x', pkg_path]
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
- cmd = [tar_cmd, 'xf', data_tar]
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
- except subprocess.CalledProcessError as e:
- bb.utils.remove(tmp_dir, recurse=True)
- bb.fatal("Unable to extract %s package. Command '%s' "
- "returned %d:\n%s" % (pkg_path, ' '.join(cmd), e.returncode, e.output.decode("utf-8")))
- except OSError as e:
- bb.utils.remove(tmp_dir, recurse=True)
- bb.fatal("Unable to extract %s package. Command '%s' "
- "returned %d:\n%s at %s" % (pkg_path, ' '.join(cmd), e.errno, e.strerror, e.filename))
-
- bb.note("Extracted %s to %s" % (pkg_path, tmp_dir))
- bb.utils.remove(os.path.join(tmp_dir, "debian-binary"))
- bb.utils.remove(os.path.join(tmp_dir, "control.tar.gz"))
- os.chdir(current_dir)
-
- return tmp_dir
-
- def _handle_intercept_failure(self, registered_pkgs):
- self.mark_packages("unpacked", registered_pkgs.split())
-
class OpkgPM(OpkgDpkgPM):
def __init__(self, d, target_rootfs, config_file, archs, task_name='target', ipk_repo_workdir="oe-rootfs-repo", filterbydependencies=True, prepare_index=True):
super(OpkgPM, self).__init__(d, target_rootfs)
@@ -485,7 +416,7 @@ class OpkgPM(OpkgDpkgPM):
Returns a dictionary with the package info.
"""
cmd = "%s %s info %s" % (self.opkg_cmd, self.opkg_args, pkg)
- pkg_info = super(OpkgPM, self).package_info(pkg, cmd)
+ pkg_info = self._common_package_info(cmd)
pkg_arch = pkg_info[pkg]["arch"]
pkg_filename = pkg_info[pkg]["filename"]
@@ -493,19 +424,3 @@ class OpkgPM(OpkgDpkgPM):
os.path.join(self.deploy_dir, pkg_arch, pkg_filename)
return pkg_info
-
- def extract(self, pkg):
- """
- Returns the path to a tmpdir where resides the contents of a package.
-
- Deleting the tmpdir is responsability of the caller.
- """
- pkg_info = self.package_info(pkg)
- if not pkg_info:
- bb.fatal("Unable to get information for package '%s' while "
- "trying to extract the package." % pkg)
-
- tmp_dir = super(OpkgPM, self).extract(pkg, pkg_info)
- bb.utils.remove(os.path.join(tmp_dir, "data.tar.zst"))
-
- return tmp_dir
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index de1fbdd3a8..2d69a33113 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -818,7 +818,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
instdirline = 'install -d ${D}%s' % os.path.dirname(instdestpath)
if not instdirline in instfunclines:
instfunclines.append(instdirline)
- instfunclines.append('install -m %s ${WORKDIR}/%s ${D}%s' % (perms, os.path.basename(srcfile), instdestpath))
+ instfunclines.append('install -m %s ${UNPACKDIR}/%s ${D}%s' % (perms, os.path.basename(srcfile), instdestpath))
if instfunclines:
bbappendlines.append(('do_install:append%s()' % appendoverride, '', instfunclines))
diff --git a/meta/lib/oe/reproducible.py b/meta/lib/oe/reproducible.py
index a9f717159e..1957c97434 100644
--- a/meta/lib/oe/reproducible.py
+++ b/meta/lib/oe/reproducible.py
@@ -75,10 +75,10 @@ def get_source_date_epoch_from_known_files(d, sourcedir):
return source_date_epoch
def find_git_folder(d, sourcedir):
- # First guess: WORKDIR/git
+ # First guess: UNPACKDIR/git
# This is the default git fetcher unpack path
- workdir = d.getVar('WORKDIR')
- gitpath = os.path.join(workdir, "git/.git")
+ unpackdir = d.getVar('UNPACKDIR')
+ gitpath = os.path.join(unpackdir, "git/.git")
if os.path.isdir(gitpath):
return gitpath
@@ -88,15 +88,16 @@ def find_git_folder(d, sourcedir):
return gitpath
# Perhaps there was a subpath or destsuffix specified.
- # Go looking in the WORKDIR
- exclude = set(["build", "image", "license-destdir", "patches", "pseudo",
- "recipe-sysroot", "recipe-sysroot-native", "sysroot-destdir", "temp"])
- for root, dirs, files in os.walk(workdir, topdown=True):
- dirs[:] = [d for d in dirs if d not in exclude]
+ # Go looking in the UNPACKDIR
+ for root, dirs, files in os.walk(unpackdir, topdown=True):
if '.git' in dirs:
return os.path.join(root, ".git")
- bb.warn("Failed to find a git repository in WORKDIR: %s" % workdir)
+ for root, dirs, files in os.walk(sourcedir, topdown=True):
+ if '.git' in dirs:
+ return os.path.join(root, ".git")
+
+ bb.warn("Failed to find a git repository in UNPACKDIR: %s" % unpackdir)
return None
def get_source_date_epoch_from_git(d, sourcedir):
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index a46e5502ab..b6f8ab92cb 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -93,6 +93,14 @@ def sstate_lockedsigs(d):
sigs[pn][task] = [h, siggen_lockedsigs_var]
return sigs
+def lockedsigs_unihashmap(d):
+ unihashmap = {}
+ data = (d.getVar("SIGGEN_UNIHASHMAP") or "").split()
+ for entry in data:
+ pn, task, taskhash, unihash = entry.split(":")
+ unihashmap[(pn, task)] = (taskhash, unihash)
+ return unihashmap
+
class SignatureGeneratorOEBasicHashMixIn(object):
supports_multiconfig_datacaches = True
@@ -100,6 +108,7 @@ class SignatureGeneratorOEBasicHashMixIn(object):
self.abisaferecipes = (data.getVar("SIGGEN_EXCLUDERECIPES_ABISAFE") or "").split()
self.saferecipedeps = (data.getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS") or "").split()
self.lockedsigs = sstate_lockedsigs(data)
+ self.unihashmap = lockedsigs_unihashmap(data)
self.lockedhashes = {}
self.lockedpnmap = {}
self.lockedhashfn = {}
@@ -209,6 +218,15 @@ class SignatureGeneratorOEBasicHashMixIn(object):
def get_cached_unihash(self, tid):
if tid in self.lockedhashes and self.lockedhashes[tid] and not self._internal:
return self.lockedhashes[tid]
+
+ (mc, _, task, fn) = bb.runqueue.split_tid_mcfn(tid)
+ recipename = self.lockedpnmap[fn]
+
+ if (recipename, task) in self.unihashmap:
+ taskhash, unihash = self.unihashmap[(recipename, task)]
+ if taskhash == self.taskhash[tid]:
+ return unihash
+
return super().get_cached_unihash(tid)
def dump_sigtask(self, fn, task, stampbase, runtime):
@@ -219,6 +237,7 @@ class SignatureGeneratorOEBasicHashMixIn(object):
def dump_lockedsigs(self, sigfile, taskfilter=None):
types = {}
+ unihashmap = {}
for tid in self.runtaskdeps:
# Bitbake changed this to a tuple in newer versions
if isinstance(tid, tuple):
@@ -226,13 +245,18 @@ class SignatureGeneratorOEBasicHashMixIn(object):
if taskfilter:
if not tid in taskfilter:
continue
- fn = bb.runqueue.fn_from_tid(tid)
+ (_, _, task, fn) = bb.runqueue.split_tid_mcfn(tid)
t = self.lockedhashfn[fn].split(" ")[1].split(":")[5]
t = 't-' + t.replace('_', '-')
if t not in types:
types[t] = []
types[t].append(tid)
+ taskhash = self.taskhash[tid]
+ unihash = self.get_unihash(tid)
+ if taskhash != unihash:
+ unihashmap[tid] = " " + self.lockedpnmap[fn] + ":" + task + ":" + taskhash + ":" + unihash
+
with open(sigfile, "w") as f:
l = sorted(types)
for t in l:
@@ -245,7 +269,12 @@ class SignatureGeneratorOEBasicHashMixIn(object):
continue
f.write(" " + self.lockedpnmap[fn] + ":" + task + ":" + self.get_unihash(tid) + " \\\n")
f.write(' "\n')
- f.write('SIGGEN_LOCKEDSIGS_TYPES:%s = "%s"' % (self.machine, " ".join(l)))
+ f.write('SIGGEN_LOCKEDSIGS_TYPES:%s = "%s"\n' % (self.machine, " ".join(l)))
+ f.write('SIGGEN_UNIHASHMAP += "\\\n')
+ sortedtid = sorted(unihashmap, key=lambda tid: self.lockedpnmap[bb.runqueue.fn_from_tid(tid)])
+ for tid in sortedtid:
+ f.write(unihashmap[tid] + " \\\n")
+ f.write(' "\n')
def dump_siglist(self, sigfile, path_prefix_strip=None):
def strip_fn(fn):
@@ -327,7 +356,6 @@ class SignatureGeneratorOEEquivHash(SignatureGeneratorOEBasicHashMixIn, bb.sigge
self.method = data.getVar('SSTATE_HASHEQUIV_METHOD')
if not self.method:
bb.fatal("OEEquivHash requires SSTATE_HASHEQUIV_METHOD to be set")
- self.max_parallel = int(data.getVar('BB_HASHSERVE_MAX_PARALLEL') or 1)
self.username = data.getVar("BB_HASHSERVE_USERNAME")
self.password = data.getVar("BB_HASHSERVE_PASSWORD")
if not self.username or not self.password:
diff --git a/meta/lib/oeqa/core/tests/common.py b/meta/lib/oeqa/core/tests/common.py
index 88cc758ad3..bcc4fde632 100644
--- a/meta/lib/oeqa/core/tests/common.py
+++ b/meta/lib/oeqa/core/tests/common.py
@@ -9,7 +9,6 @@ import os
import unittest
import logging
-import os
logger = logging.getLogger("oeqa")
logger.setLevel(logging.INFO)
diff --git a/meta/lib/oeqa/manual/crops.json b/meta/lib/oeqa/manual/crops.json
deleted file mode 100644
index 5cfa653843..0000000000
--- a/meta/lib/oeqa/manual/crops.json
+++ /dev/null
@@ -1,294 +0,0 @@
-[
- {
- "test": {
- "@alias": "crops-default.crops-default.sdkext_eSDK_devtool_build_make",
- "author": [
- {
- "email": "francisco.j.pedraza.gonzalez@intel.com",
- "name": "francisco.j.pedraza.gonzalez@intel.com"
- }
- ],
- "execution": {
- "1": {
- "action": "IMPORTANT NOTE: The firsts 5 steps refer to configuration of the environment to run the rest of the steps. These only apply for CROPS-eSDK. \n\n\n\n",
- "expected_results": ""
- },
- "2": {
- "action": " Initiate your Crops-esdk environment as it says in wiki https://github.com/crops/docker-win-mac-docs/wiki \n\n",
- "expected_results": ""
- },
- "3": {
- "action": "Create the following tree of files <crops-esdk-workdir-workspace>/sdkext/files/myapp <crops-esdk-workdir-workspace>/sdkext/files/myapp_cmake \n\n\n",
- "expected_results": ""
- },
- "4": {
- "action": " Create the following files withing the myapp directory myapp.c and the Makefile. Write the following inside of each file: \n---------------------------------------- \nMakefile should contain \n\nall: myapp \n\nmyapp: myapp.o \n\t$(CC) $(LDFLAGS) $< -o $@ \n\nmyapp.o: myapp.c \n\t$(CC) $(CFLAGS) -c $< -o $@ \n\nclean: \n\trm -rf myapp.o myapp \n\n----------------------------- \nmyapp.c shold contain \n\n\n#include <stdio.h> \n\nint \nmain(int argc, char *argv[]) \n{ \n\tprintf(\"Hello world\\n\"); \n \n\treturn 0; \n} \n------------------------------------ \n\n",
- "expected_results": "be sure that the indentations on the makefile are tabs not spaces. \n\n"
- },
- "5": {
- "action": " Create the following files within the myapp_cmake directory CMakeLists.txt and myapp.c. Write the following inside each file: \n\n------------------------------------ \nCMakeLists.txt should contain: \n\ncmake_minimum_required (VERSION 2.6) \nproject (myapp) \n# The version number. \nset (myapp_VERSION_MAJOR 1) \nset (myapp_VERSION_MINOR 0) \n\n# add the executable \nadd_executable (myapp myapp.c) \n\ninstall(TARGETS myapp \nRUNTIME DESTINATION bin) \n\n------------------------------------------ \nmyapp.c should contain: \n\n#include <stdio.h> \n\nint \nmain(int argc, char *argv[]) \n{ \n\tprintf(\"Hello world\\n\"); \n\n\treturn 0; \n} \n------------------------------------------------- \n\n",
- "expected_results": "Be sure that the indentations on CMakeLists.txt is tabs not spaces."
- },
- "6": {
- "action": " source environment-setup-i586-poky-linux \n\n",
- "expected_results": "This should output a message that says SDK environment now set up; additionally you may now run devtool to perform development tasks etc etc ... \n\n"
- },
- "7": {
- "action": " run command which devtool \n\n",
- "expected_results": "this should output the directory of the devtool script and it should be within the sdk workdir you are working in. \n\n "
- },
- "8": {
- "action": "devtool add myapp <directory>(this is myapp dir) \n\n\n",
- "expected_results": "The directory you should input is the myapp directory. This should automatically create the recipe myapp.bb under <crops-esdk-workdir-workspace>/recipes/myapp/myapp.bb"
- },
- "9": {
- "action": " devtool build myapp \n\n",
- "expected_results": "This should compile an image"
- },
- "10": {
- "action": " devtool reset myapp ",
- "expected_results": "This cleans sysroot of the myapp recipe, but it leaves the source tree intact. meaning it does not erase."
- }
- },
- "summary": "sdkext_eSDK_devtool_build_make"
- }
- },
- {
- "test": {
- "@alias": "crops-default.crops-default.sdkext_devtool_build_esdk_package",
- "author": [
- {
- "email": "francisco.j.pedraza.gonzalez@intel.com",
- "name": "francisco.j.pedraza.gonzalez@intel.com"
- }
- ],
- "execution": {
- "1": {
- "action": "IMPORTANT NOTE: The firsts 5 steps refer to configuration of the environment to run the rest of the steps. These only apply for CROPS-eSDK. \n\n\n\n",
- "expected_results": ""
- },
- "2": {
- "action": " Initiate your Crops-esdk environment as it says in wiki https://github.com/crops/docker-win-mac-docs/wiki \n\n",
- "expected_results": ""
- },
- "3": {
- "action": " Create the following tree of files <crops-esdk-workdir-workspace>/sdkext/files/myapp/ \n <crops-esdk-workdir-workspace>/sdkext/files/myapp_cmake \n\n",
- "expected_results": ""
- },
- "4": {
- "action": " Create the following files withing the myapp directory myapp.c and the Makefile. Write the following inside of each file: \n---------------------------------------- \nMakefile should contain \n\nall: myapp \n\nmyapp: myapp.o \n\t$(CC) $(LDFLAGS) $< -o $@ \n\nmyapp.o: myapp.c \n\t$(CC) $(CFLAGS) -c $< -o $@ \n\nclean: \n\trm -rf myapp.o myapp \n\n----------------------------- \nmyapp.c shold contain \n\n#include <stdio.h> \n\nint \nmain(int argc, char *argv[]) \n{ \n\tprintf(\"Hello world\\n\"); \n \n\treturn 0; \n} \n------------------------------------ \n\n",
- "expected_results": "be sure that the indentations on the makefile are tabs not spaces. \n\n"
- },
- "5": {
- "action": " Create the following files within the myapp_cmake directory CMakeLists.txt and myapp.c. Write the following inside each file: \n\n------------------------------------ \nCMakeLists.txt should contain: \n\ncmake_minimum_required (VERSION 2.6) \nproject (myapp) \n# The version number. \nset (myapp_VERSION_MAJOR 1) \nset (myapp_VERSION_MINOR 0) \n\n# add the executable \nadd_executable (myapp myapp.c) \n\ninstall(TARGETS myapp \nRUNTIME DESTINATION bin) \n\n------------------------------------------ \nmyapp.c should contain: \n\n#include<stdio.h> \n\nint \nmain(int argc, char *argv[]) \n{ \n\tprintf(\"Hello world\\n\"); \n\n\treturn 0; \n} \n------------------------------------------------- \n\n",
- "expected_results": "Be sure that the indentations on CMakeLists.txt is tabs not spaces. \n\n"
- },
- "6": {
- "action": " source environment-setup-i586-poky-linux \n\n",
- "expected_results": "This should output a message that says SDK environment now set up; additionally you may now run devtool to perform development tasks etc etc ... \n\n"
- },
- "7": {
- "action": " run command which devtool \n\n",
- "expected_results": " this should output the directory of the devtool script and it should be within the sdk workdir you are working in. \n\n"
- },
- "8": {
- "action": " devtool add myapp <directory> (this is myapp dir) \n\n",
- "expected_results": " The directory you should input is the myapp directory. This should automatically create the recipe myapp.bb under <crops-esdk-workdir-workspace>/recipes/myapp/myapp.bb \n\n"
- },
- "9": {
- "action": " devtool package myapp \n\n",
- "expected_results": " you should expect a package creation of myapp and it should be under the /tmp/deploy/ \n\n"
- },
- "10": {
- "action": " devtool reset myapp ",
- "expected_results": "This cleans sysroot of the myapp recipe, but it leaves the source tree intact. meaning it does not erase.\n</package_format>"
- }
- },
- "summary": "sdkext_devtool_build_esdk_package"
- }
- },
- {
- "test": {
- "@alias": "crops-default.crops-default.sdkext_devtool_build_cmake",
- "author": [
- {
- "email": "francisco.j.pedraza.gonzalez@intel.com",
- "name": "francisco.j.pedraza.gonzalez@intel.com"
- }
- ],
- "execution": {
- "1": {
- "action": "IMPORTANT NOTE: The firsts 5 steps refer to configuration of the environment to run the rest of the steps. These only apply for CROPS-eSDK. \n\n\n\n",
- "expected_results": ""
- },
- "2": {
- "action": " Initiate your Crops-esdk environment as it says in wiki https://github.com/crops/docker-win-mac-docs/wiki \n\n",
- "expected_results": ""
- },
- "3": {
- "action": " Create the following tree of files <crops-esdk-workdir-workspace>/sdkext/files/myapp \n <crops-esdk-workdir-workspace>/sdkext/files/myapp_cmake \n\n",
- "expected_results": ""
- },
- "4": {
- "action": " Create the following files withing the myapp directory myapp.c and the Makefile. Write the following inside of each file: \n---------------------------------------- \nMakefile should contain \n\nall: myapp \n\nmyapp: myapp.o \n\t$(CC) $(LDFLAGS) $< -o $@ \n\nmyapp.o: myapp.c \n\t$(CC) $(CFLAGS) -c $< -o $@ \n\nclean: \n\trm -rf myapp.o myapp \n\n----------------------------- \nmyapp.c shold contain \n\n#include <stdio.h> \n\nint \nmain(int argc, char *argv[]) \n{ \n\tprintf(\"Hello world\\n\"); \n \n\treturn 0; \n} \n------------------------------------ \n\n",
- "expected_results": "be sure that the indentations on the makefile are tabs not spaces. \n\n"
- },
- "5": {
- "action": " Create the following files within the myapp_cmake directory CMakeLists.txt and myapp.c. Write the following inside each file: \n\n------------------------------------ \nCMakeLists.txt should contain: \n\ncmake_minimum_required (VERSION 2.6) \nproject (myapp) \n# The version number. \nset (myapp_VERSION_MAJOR 1) \nset (myapp_VERSION_MINOR 0) \n\n# add the executable \nadd_executable (myapp myapp.c) \n\ninstall(TARGETS myapp \nRUNTIME DESTINATION bin) \n\n------------------------------------------ \nmyapp.c should contain: \n\n#include \n\nint \nmain(int argc, char *argv[]) \n{ \n\tprintf(\"Hello world\\n\"); \n\n\treturn 0; \n} \n------------------------------------------------- \n\n",
- "expected_results": "Be sure that the indentations on CMakeLists.txt is tabs not spaces. \n\n"
- },
- "6": {
- "action": " source environment-setup-i586-poky-linux \n\n",
- "expected_results": "This should output a message that says SDK environment now set up; additionally you may now run devtool to perform development tasks etc etc ... \n\n"
- },
- "7": {
- "action": " run command which devtool \n\n",
- "expected_results": "this should output the directory of the devtool script and it should be within the sdk workdir you are working in. \n\n"
- },
- "8": {
- "action": " devtool add myapp <directory> (this is myapp_cmake dir) \n\n",
- "expected_results": "The directory you should input is the myapp_cmake directory. This should automatically create the recipe myapp.bb under <crops-esdk-workdir-workspace>/recipes/myapp/myapp.bb \n\n"
- },
- "9": {
- "action": " devtool build myapp \n\n",
- "expected_results": "This should compile an image \n\n"
- },
- "10": {
- "action": " devtool reset myapp ",
- "expected_results": "This cleans sysroot of the myapp recipe, but it leaves the source tree intact. meaning it does not erase. "
- }
- },
- "summary": "sdkext_devtool_build_cmake"
- }
- },
- {
- "test": {
- "@alias": "crops-default.crops-default.sdkext_extend_autotools_recipe_creation",
- "author": [
- {
- "email": "francisco.j.pedraza.gonzalez@intel.com",
- "name": "francisco.j.pedraza.gonzalez@intel.com"
- }
- ],
- "execution": {
- "1": {
- "action": "IMPORTANT NOTE: The firsts 2 steps refer to configuration of the environment to run the rest of the steps. These only apply for CROPS-eSDK. \n\n\n\n",
- "expected_results": ""
- },
- "2": {
- "action": "Initiate your Crops-esdk environment as it says in wiki https://github.com/crops/docker-win-mac-docs/wiki \n\n",
- "expected_results": ""
- },
- "3": {
- "action": " source environment-setup-i586-poky-linux \n\n",
- "expected_results": " This should output a message that says SDK environment now set up; additionally you may now run devtool to perform development tasks etc etc ... \n\n"
- },
- "4": {
- "action": "run command which devtool \n\n",
- "expected_results": "this should output the directory of the devtool script and it should be within the sdk workdir you are working in. \n\n"
- },
- "5": {
- "action": "devtool sdk-install -s libxml2 \n\n",
- "expected_results": "this should install libxml2 \n\n"
- },
- "6": {
- "action": "devtool add librdfa https://github.com/rdfa/librdfa \n\n",
- "expected_results": "This should automatically create the recipe librdfa.bb under /recipes/librdfa/librdfa.bb \n\n"
- },
- "7": {
- "action": "devtool build librdfa \n\n",
- "expected_results": "This should compile \n\n"
- },
- "8": {
- "action": "devtool reset librdfa ",
- "expected_results": "This cleans sysroot of the librdfa recipe, but it leaves the source tree intact. meaning it does not erase."
- }
- },
- "summary": "sdkext_extend_autotools_recipe_creation"
- }
- },
- {
- "test": {
- "@alias": "crops-default.crops-default.sdkext_devtool_kernelmodule",
- "author": [
- {
- "email": "francisco.j.pedraza.gonzalez@intel.com",
- "name": "francisco.j.pedraza.gonzalez@intel.com"
- }
- ],
- "execution": {
- "1": {
- "action": "IMPORTANT NOTE: The firsts 2 steps refer to configuration of the environment to run the rest of the steps. These only apply for CROPS-eSDK. \n\n\n",
- "expected_results": ""
- },
- "2": {
- "action": " Initiate your Crops-esdk environment as it says in wiki https://github.com/crops/docker-win-mac-docs/wiki \n\n",
- "expected_results": ""
- },
- "3": {
- "action": "source environment-setup-i586-poky-linux \n\n",
- "expected_results": "This should output a message that says SDK environment now set up; additionally you may now run devtool to perform development tasks etc etc ... \n \n"
- },
- "4": {
- "action": "run command which devtool \n\n",
- "expected_results": "this should output the directory of the devtool script and it should be within the sdk workdir you are working in. \n\n"
- },
- "5": {
- "action": "devtool add kernel-module-hello-world https://git.yoctoproject.org/git/kernel-module-hello-world \n\n",
- "expected_results": "This should automatically create the recipe kernel-module-hello-world.bb under <crops-esdk-workdir-workspace>/recipes/kernel-module-hello-world/kernel-module-hello-world.bb "
- },
- "6": {
- "action": "devtool build kernel-module-hello-world \n\n",
- "expected_results": "This should compile an image \n\n"
- },
- "7": {
- "action": "devtool reset kernel-module-hello-world ",
- "expected_results": "This cleans sysroot of the kernel-module-hello-world recipe, but it leaves the source tree intact. meaning it does not erase."
- }
- },
- "summary": "sdkext_devtool_kernelmodule"
- }
- },
- {
- "test": {
- "@alias": "crops-default.crops-default.sdkext_recipes_for_nodejs",
- "author": [
- {
- "email": "francisco.j.pedraza.gonzalez@intel.com",
- "name": "francisco.j.pedraza.gonzalez@intel.com"
- }
- ],
- "execution": {
- "1": {
- "action": "IMPORTANT NOTE: The firsts 2 steps refer to configuration of the environment to run the rest of the steps. These only apply for CROPS-eSDK. \n\n\nlets say variable npm = npm://registry.npmjs.org;name=winston;version=2.2.0 \n\n",
- "expected_results": ""
- },
- "2": {
- "action": "Initiate your Crops-esdk environment as it says in wiki https://github.com/crops/docker-win-mac-docs/wiki \n\n",
- "expected_results": ""
- },
- "3": {
- "action": "source environment-setup-i586-poky-linux \n\n",
- "expected_results": "This should output a message that says SDK environment now set up; additionally you may now run devtool to perform development tasks etc etc ... \n\n"
- },
- "4": {
- "action": "run command which devtool \n\n",
- "expected_results": "this should output the directory of the devtool script and it should be within the sdk workdir you are working in. \n\n"
- },
- "5": {
- "action": " 4a) git clone git://git.openembedded.org/meta-openembedded in layers/build directory \n \n4b) Add meta-openembedded/meta-oe in bblayer.conf as mentioned below: ${SDKBASEMETAPATH}/layers/build/meta-openembedded/meta-oe \\ \n\n4c) devtool add \"npm://registry.npmjs.org;name=npm;version=2.2.0\" \n\n",
- "expected_results": " This should automatically create the recipe npm.bb under /recipes/npm/npm.bb \n\n"
- },
- "6": {
- "action": "devtool build npm \n\n",
- "expected_results": "This should compile an image \n\n"
- },
- "7": {
- "action": " devtool reset npm",
- "expected_results": "This cleans sysroot of the npm recipe, but it leaves the source tree intact. meaning it does not erase."
- }
- },
- "summary": "sdkext_recipes_for_nodejs"
- }
- }
-]
diff --git a/meta/lib/oeqa/manual/eclipse-plugin.json b/meta/lib/oeqa/manual/eclipse-plugin.json
deleted file mode 100644
index 6c110d0656..0000000000
--- a/meta/lib/oeqa/manual/eclipse-plugin.json
+++ /dev/null
@@ -1,322 +0,0 @@
-[
- {
- "test": {
- "@alias": "eclipse-plugin.eclipse-plugin.support_SSH_connection_to_Target",
- "author": [
- {
- "email": "ee.peng.yeoh@intel.com",
- "name": "ee.peng.yeoh@intel.com"
- }
- ],
- "execution": {
- "1": {
- "action": "In Eclipse, swich to Remote System Explorer to create a connention baseed on SSH, input the remote target IP address as the Host name, make sure disable the proxy in Window->Preferences->General->Network Connection, set Direct as Active Provider field. ",
- "expected_results": "the connection based on SSH could be set up."
- },
- "2": {
- "action": "Configure connection from Eclipse: Run->Run Configurations->C/C++ Remote Application\\ ->New Connection->General->SSH Only ",
- "expected_results": ""
- },
- "3": {
- "action": "Then right click to connect, input the user ID and password. ",
- "expected_results": ""
- },
- "4": {
- "action": "expand the connection, it will show the Sftp Files etc. \nNOTE. Might need to change dropbear to openssh and add the packagegroup-core-eclipse-debug recipe",
- "expected_results": ""
- }
- },
- "summary": "support_SSH_connection_to_Target"
- }
- },
- {
- "test": {
- "@alias": "eclipse-plugin.eclipse-plugin.Launch_QEMU_from_Eclipse",
- "author": [
- {
- "email": "ee.peng.yeoh@intel.com",
- "name": "ee.peng.yeoh@intel.com"
- }
- ],
- "execution": {
- "1": {
- "action": "Set the Yocto ADT's toolchain root location, sysroot location and kernel, in the menu Window -> Preferences -> Yocto ADT. \n \n",
- "expected_results": ""
- },
- "2": {
- "action": "wget https://downloads.yoctoproject.org/releases/yocto/yocto-$VERSION/machines/qemu/qemux86/ (ex:core-image-sato-sdk-qemux86-date-rootfs-tar-bz2) \nsource /opt/poky/version/environment-setup-i585-poky-linux \n\nExtract qemu with runqemu-extract-sdk /home/user/file(ex.core-image-sato-sdk-qemux86.bz2) \n/home/user/qemux86-sato-sdk \n\n",
- "expected_results": " Qemu can be lauched normally."
- },
- "3": {
- "action": "(a)Point to the Toolchain: \n \nIf you are using a stand-alone pre-built toolchain, you should be pointing to the /opt/poky/{test-version} directory as Toolchain Root Location. This is the default location for toolchains installed by the ADT Installer or by hand. If ADT is installed in other location, use that location as Toolchain location.\nIf you are using a system-derived toolchain, the path you provide for the Toolchain Root Location field is the Yocto Project's build directory. \n \n E.g:/home/user/yocto/poky/build \n",
- "expected_results": ""
- },
- "4": {
- "action": "(b)Specify the Sysroot Location: \nSysroot Location is the location where the root filesystem for the target hardware is created on the development system by the ADT Installer (SYSROOT in step 2 of the case ADT installer Installation). \n \n Local : e.g: /home/user/qemux86-sato-sdk \nUsing ADT : e.g :/home/user/test-yocto/qemux86 \n\n",
- "expected_results": ""
- },
- "5": {
- "action": "(c)Select the Target Architecture: \n \nThe target architecture is the type of hardware you are going to use or emulate. Use the pull-down Target Architecture menu to make your selection. \n \n\n",
- "expected_results": ""
- },
- "6": {
- "action": "(d) QEMU: \nSelect this option if you will be using the QEMU emulator. Specify the Kernel matching the QEMU architecture you are using. \n wget https://downloads.yoctoproject.org/releases/yocto/yocto-$VERSION/machines/qemu/qemux86/bzImage-qemux86.bin \n e.g: /home/$USER/yocto/adt-installer/download_image/bzImage-qemux86.bin \n\n",
- "expected_results": ""
- },
- "7": {
- "action": "(e) select OK to save the settings. \n\n\n1: In the Eclipse toolbar, expose the Run -> External Tools menu. Your image should appear as a selectable menu item. \n2: Select your image in the navigation pane to launch the emulator in a new window. \n3: If needed, enter your host root password in the shell window at the prompt. This sets up a Tap 0 connection needed for running in user-space NFS mode. \n",
- "expected_results": ""
- }
- },
- "summary": "Launch_QEMU_from_Eclipse"
- }
- },
- {
- "test": {
- "@alias": "eclipse-plugin.eclipse-plugin.Relocatable_SDK_-_C_-_Build_Hello_World_ANSI_C_Autotools_Project",
- "author": [
- {
- "email": "ee.peng.yeoh@intel.com",
- "name": "ee.peng.yeoh@intel.com"
- }
- ],
- "execution": {
- "1": {
- "action": "Launch a QEMU of target environment.(Reference to case \"ADT - Launch qemu by eclipse\") ",
- "expected_results": ""
- },
- "2": {
- "action": "Select File -> New -> Project.",
- "expected_results": ""
- },
- "3": {
- "action": "Double click C/C++.",
- "expected_results": ""
- },
- "4": {
- "action": "Click C or C++ Project to create the project.",
- "expected_results": ""
- },
- "5": {
- "action": "Expand Yocto ADT Project.",
- "expected_results": ""
- },
- "6": {
- "action": "Select Hello World ANSI C Autotools Project.",
- "expected_results": ""
- },
- "7": {
- "action": "Put a name in the Project name. Do not use hyphens as part of the name. \n \n",
- "expected_results": ""
- },
- "8": {
- "action": "Click Next.",
- "expected_results": ""
- },
- "9": {
- "action": "Add information in the Author and Copyright notice fields. \n1",
- "expected_results": ""
- },
- "10": {
- "action": "Click Finish. \n1",
- "expected_results": ""
- },
- "11": {
- "action": "If the \"open perspective\" prompt appears, click \"Yes\" so that you open the C/C++ perspective. \n1",
- "expected_results": ""
- },
- "12": {
- "action": "In the Project Explorer window, right click the project -> Reconfigure project. \n1",
- "expected_results": ""
- },
- "13": {
- "action": "In the Project Explorer window, right click the project -> Build project. \n1",
- "expected_results": "Under the Project files, a new folder appears called Binaries. This indicates that the compilation have been successful and the project binary have been created. \n"
- },
- "14": {
- "action": "Right click it again and Run as -> Run Configurations. \n\t\t\tUnder Run Configurations expand \"C/C++ Remote Application\". A configuration for the current project should appear. Clicking it will display the configuration settings. \n\t\t\tin \"C/C++ Application\" field input Remote Absolute File path for C/C++ Application. e.g.: /home/root/myapplication \n\t\t\tIn \"Connection\" drop-down list make sure a TCF connection is set up for your target. If not, create a new one by clicking the New button. \n1",
- "expected_results": "step 14 to step 16 -> Build succeed and the console outputs Hello world, you can also check the output on target."
- },
- "15": {
- "action": "After all settings are done, select the Run button on the bottom right corner \n\n1",
- "expected_results": ""
- },
- "16": {
- "action": "Repeat the steps 14-15, but instead of using Run Configurations use Debug Configurations: \nRight click it again and Debug as -> Debug Configurations \nUnder Debug Configurations expand \"C/C++ Remote Application\". A configuration for the current project should appear. Clicking it will display the configuration settings. \nin \"C/C++ Application\" field input Remote Absolute File path for C/C++ Application.\ne.g.: /home/root/myapplication \nIn \"Connection\" drop-down list make sure a TCF connection is set up for your target. If not, create a new one by clicking the New button \n1",
- "expected_results": ""
- },
- "17": {
- "action": "After all settings are done, select the Debug button on the bottom right corner",
- "expected_results": ""
- }
- },
- "summary": "Relocatable_SDK_-_C_-_Build_Hello_World_ANSI_C_Autotools_Project"
- }
- },
- {
- "test": {
- "@alias": "eclipse-plugin.eclipse-plugin.Relocatable_SDK_-_C++_-_Build_Hello_World_C++_Autotools_project",
- "author": [
- {
- "email": "ee.peng.yeoh@intel.com",
- "name": "ee.peng.yeoh@intel.com"
- }
- ],
- "execution": {
- "1": {
- "action": "Launch a QEMU of target environment.(Reference to case \"ADT - Launch qemu by eclipse\") ",
- "expected_results": ""
- },
- "2": {
- "action": "Select File -> New -> Project. ",
- "expected_results": ""
- },
- "3": {
- "action": "Double click C/C++. ",
- "expected_results": ""
- },
- "4": {
- "action": "Click C or C++ Project to create the project. ",
- "expected_results": ""
- },
- "5": {
- "action": "Expand Yocto ADT Project. ",
- "expected_results": ""
- },
- "6": {
- "action": "Select Hello World ANSI C++ Autotools Project. ",
- "expected_results": ""
- },
- "7": {
- "action": "Put a name in the Project name. Do not use hyphens as part of the name. \n \n",
- "expected_results": ""
- },
- "8": {
- "action": "Click Next.",
- "expected_results": ""
- },
- "9": {
- "action": "Add information in the Author and Copyright notice fields.",
- "expected_results": ""
- },
- "10": {
- "action": "Click Finish. \n1",
- "expected_results": ""
- },
- "11": {
- "action": "If the \"open perspective\" prompt appears, click \"Yes\" so that you open the C/C++ perspective. \n1",
- "expected_results": ""
- },
- "12": {
- "action": "In the Project Explorer window, right click the project -> Reconfigure project. \n1",
- "expected_results": ""
- },
- "13": {
- "action": "In the Project Explorer window, right click the project -> Build project. \n\n1",
- "expected_results": "under the Project files, a new folder appears called Binaries. This indicates that the compilation have been successful and the project binary have been created. \n"
- },
- "14": {
- "action": "Right click it again and Run as -> Run Configurations. \n\t\t\tUnder Run Configurations expand \"C/C++ Remote Application\". A configuration for the current project should appear. Clicking it will display the configuration settings. \n\t\t\tin \"C/C++ Application\" field input Remote Absolute File path for C/C++ Application. e.g.: /home/root/myapplication \n\t\t\tIn \"Connection\" drop-down list make sure a TCF connection is set up for your target. If not, create a new one by clicking the New button. \n1",
- "expected_results": "step 14 to step 16 -> Build succeed and the console outputs Hello world, you can also check the output on target."
- },
- "15": {
- "action": "After all settings are done, select the Run button on the bottom right corner \n\n1",
- "expected_results": ""
- },
- "16": {
- "action": "Repeat the steps 14-15, but instead of using Run Configurations use Debug Configurations: \n\t\tRight click it again and Debug as -> Debug Configurations \n\t\tUnder Debug Configurations expand \"C/C++ Remote Application\". A configuration for the current project should appear. Clicking it will display the configuration settings. \n\t\tin \"C/C++ Application\" field input Remote Absolute File path for C/C++ Application. \n\t\te.g.: /home/root/myapplication \n\t\tIn \"Connection\" drop-down list make sure a TCF connection is set up for your target. If not, create a new one by clicking the New button \n1",
- "expected_results": ""
- },
- "17": {
- "action": "After all settings are done, select the Debug button on the bottom right corner",
- "expected_results": ""
- }
- },
- "summary": "Relocatable_SDK_-_C++_-_Build_Hello_World_C++_Autotools_project"
- }
- },
- {
- "test": {
- "@alias": "eclipse-plugin.eclipse-plugin.Build_Eclipse_Plugin_from_source",
- "author": [
- {
- "email": "laurentiu.serban@intel.com",
- "name": "laurentiu.serban@intel.com"
- }
- ],
- "execution": {
- "1": {
- "action": "Clone eclipse-poky source. \n \n - git clone git://git.yoctoproject.org/eclipse-poky \n\n",
- "expected_results": "Eclipse plugin is successfully installed \n\nDocumentation is there. For example if you have release yocto-2.0.1 you will found on https://downloads.yoctoproject.org/releases/yocto/yocto-2.0.1/eclipse-plugin/mars/ archive with documentation like org.yocto.doc-development-$date.zip \n \n"
- },
- "2": {
- "action": "Checkout correct tag. \n\n - git checkout <eclipse-version>/<yocto-version> \n\n",
- "expected_results": "After plugin is build you must have 4 archive in foder scripts from eclipse-poky: \n - org.yocto.bc - mars-master-$date.zip \n - org.yocto.doc - mars-master-$date.zip --> documentation \n - org.yocto.sdk - mars-master-$date.zip \n - org.yocto.sdk - mars-master-$date.-archive.zip --> plugin "
- },
- "3": {
- "action": "Move to scripts/ folder. \n\n",
- "expected_results": ""
- },
- "4": {
- "action": "Run ./setup.sh \n\n",
- "expected_results": ""
- },
- "5": {
- "action": "When the script finishes, it prompts a command to issue to build the plugin. It should look similar to the following: \n\n$ ECLIPSE_HOME=/eclipse-poky/scripts/eclipse ./build.sh /&1 | tee -a build.log \n\nHere, the three arguments to the build script are tag name, branch for documentation and release name. \n\n",
- "expected_results": ""
- },
- "6": {
- "action": "On an eclipse without the Yocto Plugin, select \"Install New Software\" from Help pull-down menu \n\n",
- "expected_results": ""
- },
- "7": {
- "action": "Select Add and from the dialog choose Archive... Look for the *archive.zip file that was built previously with the build.sh script. Click OK. \n\n",
- "expected_results": ""
- },
- "8": {
- "action": "Select all components and proceed with Installation of plugin. Restarting eclipse might be required.\n",
- "expected_results": ""
- }
- },
- "summary": "Build_Eclipse_Plugin_from_source"
- }
- },
- {
- "test": {
- "@alias": "eclipse-plugin.eclipse-plugin.Eclipse_Poky_installation_and_setup",
- "author": [
- {
- "email": "ee.peng.yeoh@intel.com",
- "name": "ee.peng.yeoh@intel.com"
- }
- ],
- "execution": {
- "1": {
- "action": "Install SDK \n\ta)Download https://autobuilder.yocto.io/pub/releases//toolchain/x86_64/poky-glibc-x86_64-core-\timage-sato-i586-toolchain-.sh \n\tb)Run the SDK installer and accept the default installation directory ",
- "expected_results": ""
- },
- "2": {
- "action": "Install \"Eclipse IDE for C/C++ Developers\" Oxygen release (4.7.0) \n\ta) Go to https://www.eclipse.org/downloads/packages/all, click \"Oxygen R\" \n\tb) Click to download the build for your OS \n\tc) Click \"Download\" button to download from a mirror \n\td) Run \"tar xf\" to extract the downloaded archive ",
- "expected_result": ""
- },
- "3": {
- "action": "Install \"Eclipse IDE for C/C++ Developers\" Oxygen release (4.7.0) (Continue) \n\te) Run \"eclipse/eclipse\" to start Eclipse \n\tf) Optional step for host machine within Intel network: In Eclipse workbench window, go to \"Window\" menu -> \"Preferences...\". \n\tg) In \"Preferences\" dialog, go to \"General\" -> \"Network Connections\", set \"Active Provider\" to \"Manual\". In \"Proxy \tentries\" table, select HTTP and click \"Edit\" and enter host \"proxy-chain.intel.com\" port 911, click OK. Repeat for HTTPS with port 912 \nClick OK to close \"Preferences\" dialog. \n\th) Go to \"File\" menu -> \"Restart\" to restart Eclipse for proxy settings to take effect. ",
- "expected_result": ""
- },
- "4": {
- "action": "Install Eclipse Poky plugins \n\ta) Download https://autobuilder.yocto.io/pub/releases/<yocto-version>/eclipse-plugin/<eclipse-version>/org.yocto.sdk-development-<date>-archive.zip \n\tb) In Eclipse workbench window, go to \"Help\" menu -> \"Install New Software...\" \n\tc) In \"Install\" dialog, click \"Add...\" button \n\td) In \"Add Repository\" dialog, enter \"Eclipse Poky\" for (repository) Name, click \"Archive...\" ",
- "expected_results": ""
- },
- "5": {
- "action": "Install Eclipse Poky plugins (continue) \n\te) In \"Repository archive\" browse dialog, select the downloaded Eclipse Poky repository archive \n\tf) Back in \"Add Repository\" dialog, click \"OK\" \n\tg) Back in \"Install\" dialog, make sure \"Work with:\" is set to \"Eclipse Poky\" repository, tick \"Yocto Project \tDocumentation Plug-in\" and \"Yocto Project SDK Plug-in\", click \"Next >\" and verify plugins/features name/version, \tclick \"Next >\" and accept license agreement, click \"Finish\" \n\th) If \"Security Warning\" dialog appears, click \"OK\" to install unsigned content. \n\ti) In \"Software Updates\" dialog, click \"Yes\" to restart Eclipse to complete Eclipse Poky plugins installation. ",
- "expected_results": ""
- },
- "6": {
- "action": "Setup Eclipse Poky to use SDK \n\ta) In Eclipse workbench window, go to \"Window\" menu -> \"Preferences\". \n\tb) In \"Preferences\" window, go to \"Yocto Project SDK\", in \"Cross Compiler Options\" frame, select \"Standalone pre-\tbuilt toolchain\". ",
- "expected_results": "Eclipse Poky plugins installed and running successfully, e.g. observe that \"Yocto Project Tools\" menu is available on Eclipse workbench window."
- }
- },
- "summary": "Eclipse_Poky_installation_and_setup"
- }
- }
-]
diff --git a/meta/lib/oeqa/runtime/cases/ltp.py b/meta/lib/oeqa/runtime/cases/ltp.py
index f588a93200..e81360670c 100644
--- a/meta/lib/oeqa/runtime/cases/ltp.py
+++ b/meta/lib/oeqa/runtime/cases/ltp.py
@@ -57,7 +57,7 @@ class LtpTestBase(OERuntimeTestCase):
class LtpTest(LtpTestBase):
- ltp_groups = ["math", "syscalls", "dio", "io", "mm", "ipc", "sched", "nptl", "pty", "containers", "controllers", "filecaps", "cap_bounds", "fcntl-locktests", "commands", "net.ipv6_lib", "input","fs_perms_simple", "cve", "crypto", "ima", "net.nfs", "net_stress.ipsec_icmp", "net.ipv6", "numa", "uevent", "ltp-aiodio.part1", "ltp-aiodio.part2", "ltp-aiodio.part3", "ltp-aiodio.part4"]
+ ltp_groups = ["math", "syscalls", "dio", "mm", "ipc", "sched", "nptl", "pty", "containers", "controllers", "fcntl-locktests", "commands", "net.ipv6_lib", "input","fs_perms_simple", "cve", "crypto", "ima", "net.nfs", "net_stress.ipsec_icmp", "net.ipv6", "numa", "uevent", "ltp-aiodio.part1", "ltp-aiodio.part2", "ltp-aiodio.part3", "ltp-aiodio.part4"]
ltp_fs = ["fs", "fs_bind"]
# skip kernel cpuhotplug
diff --git a/meta/lib/oeqa/runtime/cases/systemd.py b/meta/lib/oeqa/runtime/cases/systemd.py
index 5481e1d840..80fdae240a 100644
--- a/meta/lib/oeqa/runtime/cases/systemd.py
+++ b/meta/lib/oeqa/runtime/cases/systemd.py
@@ -145,7 +145,8 @@ class SystemdServiceTests(SystemdTest):
Verify that call-stacks generated by systemd-coredump contain symbolicated call-stacks,
extracted from the minidebuginfo metadata (.gnu_debugdata elf section).
"""
- t_thread = threading.Thread(target=self.target.run, args=("ulimit -c unlimited && sleep 1000",))
+ # use "env sleep" instead of "sleep" to avoid calling the shell builtin function
+ t_thread = threading.Thread(target=self.target.run, args=("ulimit -c unlimited && env sleep 1000",))
t_thread.start()
time.sleep(1)
@@ -156,7 +157,8 @@ class SystemdServiceTests(SystemdTest):
(status, output) = self.target.run('coredumpctl info')
self.assertEqual(status, 0, msg='MiniDebugInfo Test failed: %s' % output)
- self.assertEqual('sleep_for_duration (busybox.nosuid' in output, True, msg='Call stack is missing minidebuginfo symbols (functions shown as "n/a"): %s' % output)
+ self.assertEqual('sleep_for_duration (busybox.nosuid' in output or 'xnanosleep (sleep.coreutils' in output,
+ True, msg='Call stack is missing minidebuginfo symbols (functions shown as "n/a"): %s' % output)
class SystemdJournalTests(SystemdTest):
diff --git a/meta/lib/oeqa/sdk/cases/buildcpio.py b/meta/lib/oeqa/sdk/cases/autotools.py
index 51003b19cd..848e9392ec 100644
--- a/meta/lib/oeqa/sdk/cases/buildcpio.py
+++ b/meta/lib/oeqa/sdk/cases/autotools.py
@@ -7,13 +7,12 @@
import os
import tempfile
import subprocess
-import unittest
from oeqa.sdk.case import OESDKTestCase
from oeqa.utils.subprocesstweak import errors_have_output
errors_have_output()
-class BuildCpioTest(OESDKTestCase):
+class AutotoolsTest(OESDKTestCase):
"""
Check that autotools will cross-compile correctly.
"""
diff --git a/meta/lib/oeqa/sdk/cases/assimp.py b/meta/lib/oeqa/sdk/cases/cmake.py
index e986838aea..db7d826a38 100644
--- a/meta/lib/oeqa/sdk/cases/assimp.py
+++ b/meta/lib/oeqa/sdk/cases/cmake.py
@@ -13,7 +13,7 @@ from oeqa.sdk.case import OESDKTestCase
from oeqa.utils.subprocesstweak import errors_have_output
errors_have_output()
-class BuildAssimp(OESDKTestCase):
+class CMakeTest(OESDKTestCase):
"""
Test case to build a project using cmake.
"""
@@ -21,14 +21,14 @@ class BuildAssimp(OESDKTestCase):
def setUp(self):
if not (self.tc.hasHostPackage("nativesdk-cmake") or
self.tc.hasHostPackage("cmake-native")):
- raise unittest.SkipTest("Needs cmake")
+ raise unittest.SkipTest("CMakeTest: needs cmake")
def test_assimp(self):
with tempfile.TemporaryDirectory(prefix="assimp", dir=self.tc.sdk_dir) as testdir:
- tarball = self.fetch(testdir, self.td["DL_DIR"], "https://github.com/assimp/assimp/archive/v5.3.1.tar.gz")
+ tarball = self.fetch(testdir, self.td["DL_DIR"], "https://github.com/assimp/assimp/archive/v5.4.1.tar.gz")
dirs = {}
- dirs["source"] = os.path.join(testdir, "assimp-5.3.1")
+ dirs["source"] = os.path.join(testdir, "assimp-5.4.1")
dirs["build"] = os.path.join(testdir, "build")
dirs["install"] = os.path.join(testdir, "install")
@@ -39,7 +39,7 @@ class BuildAssimp(OESDKTestCase):
self._run("sed -i '/# ifdef _FILE_OFFSET_BITS/I,+2 d' {source}/contrib/zlib/gzguts.h".format(**dirs))
os.makedirs(dirs["build"])
- self._run("cd {build} && cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DASSIMP_BUILD_ZLIB=ON {source}".format(**dirs))
+ self._run("cd {build} && cmake -DASSIMP_WARNINGS_AS_ERRORS=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DASSIMP_BUILD_ZLIB=ON {source}".format(**dirs))
self._run("cmake --build {build} -- -j".format(**dirs))
self._run("cmake --build {build} --target install -- DESTDIR={install}".format(**dirs))
- self.check_elf(os.path.join(dirs["install"], "usr", "local", "lib", "libassimp.so.5.3.0"))
+ self.check_elf(os.path.join(dirs["install"], "usr", "local", "lib", "libassimp.so.5.4.1"))
diff --git a/meta/lib/oeqa/sdk/cases/buildgalculator.py b/meta/lib/oeqa/sdk/cases/gtk3.py
index 178f07472d..c329c4bb86 100644
--- a/meta/lib/oeqa/sdk/cases/buildgalculator.py
+++ b/meta/lib/oeqa/sdk/cases/gtk3.py
@@ -13,7 +13,7 @@ from oeqa.sdk.case import OESDKTestCase
from oeqa.utils.subprocesstweak import errors_have_output
errors_have_output()
-class GalculatorTest(OESDKTestCase):
+class GTK3Test(OESDKTestCase):
"""
Test that autotools and GTK+ 3 compiles correctly.
"""
diff --git a/meta/lib/oeqa/sdk/cases/buildlzip.py b/meta/lib/oeqa/sdk/cases/makefile.py
index b4b7d85b88..2ff54ce25f 100644
--- a/meta/lib/oeqa/sdk/cases/buildlzip.py
+++ b/meta/lib/oeqa/sdk/cases/makefile.py
@@ -4,12 +4,12 @@
# SPDX-License-Identifier: MIT
#
-import os, tempfile, subprocess, unittest
+import os, tempfile, subprocess
from oeqa.sdk.case import OESDKTestCase
from oeqa.utils.subprocesstweak import errors_have_output
errors_have_output()
-class BuildLzipTest(OESDKTestCase):
+class MakefileTest(OESDKTestCase):
"""
Test that "plain" compilation works, using just $CC $CFLAGS etc.
"""
diff --git a/meta/lib/oeqa/sdk/cases/maturin.py b/meta/lib/oeqa/sdk/cases/maturin.py
index ea10f568b2..20f6b553d0 100644
--- a/meta/lib/oeqa/sdk/cases/maturin.py
+++ b/meta/lib/oeqa/sdk/cases/maturin.py
@@ -8,7 +8,6 @@ import os
import shutil
import unittest
-from oeqa.core.utils.path import remove_safe
from oeqa.sdk.case import OESDKTestCase
from oeqa.utils.subprocesstweak import errors_have_output
diff --git a/meta/lib/oeqa/sdk/cases/buildepoxy.py b/meta/lib/oeqa/sdk/cases/meson.py
index 147ee3e0ee..be53df204a 100644
--- a/meta/lib/oeqa/sdk/cases/buildepoxy.py
+++ b/meta/lib/oeqa/sdk/cases/meson.py
@@ -13,14 +13,14 @@ from oeqa.sdk.case import OESDKTestCase
from oeqa.utils.subprocesstweak import errors_have_output
errors_have_output()
-class EpoxyTest(OESDKTestCase):
+class MesonTest(OESDKTestCase):
"""
Test that Meson builds correctly.
"""
def setUp(self):
if not (self.tc.hasHostPackage("nativesdk-meson") or
self.tc.hasHostPackage("meson-native")):
- raise unittest.SkipTest("EpoxyTest class: SDK doesn't contain Meson")
+ raise unittest.SkipTest("MesonTest: needs meson")
def test_epoxy(self):
with tempfile.TemporaryDirectory(prefix="epoxy", dir=self.tc.sdk_dir) as testdir:
diff --git a/meta/lib/oeqa/sdk/cases/python.py b/meta/lib/oeqa/sdk/cases/python.py
index 5ea992b9f3..51284949f5 100644
--- a/meta/lib/oeqa/sdk/cases/python.py
+++ b/meta/lib/oeqa/sdk/cases/python.py
@@ -4,7 +4,7 @@
# SPDX-License-Identifier: MIT
#
-import subprocess, unittest
+import unittest
from oeqa.sdk.case import OESDKTestCase
from oeqa.utils.subprocesstweak import errors_have_output
diff --git a/meta/lib/oeqa/sdk/cases/rust.py b/meta/lib/oeqa/sdk/cases/rust.py
index f5d437bb19..a54245851b 100644
--- a/meta/lib/oeqa/sdk/cases/rust.py
+++ b/meta/lib/oeqa/sdk/cases/rust.py
@@ -8,7 +8,6 @@ import os
import shutil
import unittest
-from oeqa.core.utils.path import remove_safe
from oeqa.sdk.case import OESDKTestCase
from oeqa.utils.subprocesstweak import errors_have_output
diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py b/meta/lib/oeqa/sdkext/cases/devtool.py
index 5ffb732556..d0746e68eb 100644
--- a/meta/lib/oeqa/sdkext/cases/devtool.py
+++ b/meta/lib/oeqa/sdkext/cases/devtool.py
@@ -69,10 +69,9 @@ class DevtoolTest(OESDKExtTestCase):
self._test_devtool_build(self.myapp_cmake_dst)
def test_extend_autotools_recipe_creation(self):
- req = 'https://github.com/rdfa/librdfa'
- recipe = "librdfa"
- self._run('devtool sdk-install libxml2')
- self._run('devtool add %s %s' % (recipe, req) )
+ recipe = "test-dbus-wait"
+ self._run('devtool sdk-install dbus')
+ self._run('devtool add %s https://git.yoctoproject.org/git/dbus-wait' % (recipe) )
try:
self._run('devtool build %s' % recipe)
finally:
diff --git a/meta/lib/oeqa/selftest/cases/debuginfod.py b/meta/lib/oeqa/selftest/cases/debuginfod.py
index 505b4be837..46c0cd87bb 100644
--- a/meta/lib/oeqa/selftest/cases/debuginfod.py
+++ b/meta/lib/oeqa/selftest/cases/debuginfod.py
@@ -62,7 +62,7 @@ class Debuginfod(OESelftestTestCase):
raise TimeoutError("Cannot connect debuginfod, still %d scan jobs running" % latest)
- def start_debuginfod(self):
+ def start_debuginfod(self, feed_dir):
# We assume that the caller has already bitbake'd elfutils-native:do_addto_recipe_sysroot
# Save some useful paths for later
@@ -82,7 +82,7 @@ class Debuginfod(OESelftestTestCase):
# Disable rescanning, this is a one-shot test
"--rescan-time=0",
"--groom-time=0",
- get_bb_var("DEPLOY_DIR"),
+ feed_dir,
]
format = get_bb_var("PACKAGE_CLASSES").split()[0]
@@ -114,11 +114,12 @@ class Debuginfod(OESelftestTestCase):
self.write_config("""
TMPDIR = "${TOPDIR}/tmp-debuginfod"
DISTRO_FEATURES:append = " debuginfod"
+INHERIT += "localpkgfeed"
""")
- bitbake("elfutils-native:do_addto_recipe_sysroot xz xz:do_package")
+ bitbake("elfutils-native:do_addto_recipe_sysroot xz xz:do_package xz:do_localpkgfeed")
try:
- self.start_debuginfod()
+ self.start_debuginfod(get_bb_var("LOCALPKGFEED_DIR", "xz"))
env = os.environ.copy()
env["DEBUGINFOD_URLS"] = "http://localhost:%d/" % self.port
@@ -141,12 +142,13 @@ DISTRO_FEATURES:append = " debuginfod"
self.write_config("""
TMPDIR = "${TOPDIR}/tmp-debuginfod"
DISTRO_FEATURES:append = " debuginfod"
+INHERIT += "localpkgfeed"
CORE_IMAGE_EXTRA_INSTALL += "elfutils xz"
""")
- bitbake("core-image-minimal elfutils-native:do_addto_recipe_sysroot")
+ bitbake("core-image-minimal elfutils-native:do_addto_recipe_sysroot xz:do_localpkgfeed")
try:
- self.start_debuginfod()
+ self.start_debuginfod(get_bb_var("LOCALPKGFEED_DIR", "xz"))
with runqemu("core-image-minimal", runqemuparams="nographic") as qemu:
cmd = "DEBUGINFOD_URLS=http://%s:%d/ debuginfod-find debuginfo /usr/bin/xz" % (qemu.server_ip, self.port)
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index c8f9534e41..1cafb922ea 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -753,6 +753,25 @@ class DevtoolModifyTests(DevtoolBase):
result = runCmd('devtool status')
self.assertNotIn('mdadm', result.output)
+ def test_devtool_modify_go(self):
+ import oe.path
+ from tempfile import TemporaryDirectory
+ with TemporaryDirectory(prefix='devtoolqa') as tempdir:
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake -c clean go-helloworld')
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool modify go-helloworld -x %s' % tempdir)
+ self.assertExists(
+ oe.path.join(tempdir, 'src', 'golang.org', 'x', 'example', 'go.mod'),
+ 'Extracted source could not be found'
+ )
+ self.assertExists(
+ oe.path.join(self.workspacedir, 'conf', 'layer.conf'),
+ 'Workspace directory not created'
+ )
+ matches = glob.glob(oe.path.join(self.workspacedir, 'appends', 'go-helloworld_*.bbappend'))
+ self.assertTrue(matches, 'bbappend not created %s' % result.output)
+
def test_devtool_buildclean(self):
def assertFile(path, *paths):
f = os.path.join(path, *paths)
@@ -879,13 +898,8 @@ class DevtoolModifyTests(DevtoolBase):
self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe)
self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
- srcfile = os.path.join(tempdir, 'oe-local-files/share/dot.bashrc')
- srclink = os.path.join(tempdir, 'share/dot.bashrc')
+ srcfile = os.path.join(tempdir, 'share/dot.bashrc')
self.assertExists(srcfile, 'Extracted source could not be found')
- if os.path.islink(srclink) and os.path.exists(srclink) and os.path.samefile(srcfile, srclink):
- correct_symlink = True
- self.assertTrue(correct_symlink, 'Source symlink to oe-local-files is broken')
-
matches = glob.glob(os.path.join(self.workspacedir, 'appends', '%s_*.bbappend' % testrecipe))
self.assertTrue(matches, 'bbappend not created')
# Test devtool status
@@ -956,9 +970,9 @@ class DevtoolModifyTests(DevtoolBase):
# others git:// in SRC_URI
# cointains a patch
testrecipe = 'hello-rs'
- bb_vars = get_bb_vars(['SRC_URI', 'FILE', 'WORKDIR', 'CARGO_HOME'], testrecipe)
+ bb_vars = get_bb_vars(['SRC_URI', 'FILE', 'UNPACKDIR', 'CARGO_HOME'], testrecipe)
recipefile = bb_vars['FILE']
- workdir = bb_vars['WORKDIR']
+ unpackdir = bb_vars['UNPACKDIR']
cargo_home = bb_vars['CARGO_HOME']
src_uri = bb_vars['SRC_URI'].split()
self.assertTrue(src_uri[0].startswith('git://'),
@@ -1029,7 +1043,7 @@ class DevtoolModifyTests(DevtoolBase):
self.assertEqual(parms['type'], 'git-dependency', 'git dependencies uri should have "type=git-dependency"')
raw_url = raw_url.replace("git://", '%s://' % parms['protocol'])
patch_line = '[patch."%s"]' % raw_url
- path_patched = os.path.join(workdir, parms['destsuffix'])
+ path_patched = os.path.join(unpackdir, parms['destsuffix'])
path_override_line = '%s = { path = "%s" }' % (parms['name'], path_patched)
# Would have been better to use tomllib to read this file :/
self.assertIn(patch_line, cargo_config_contents)
@@ -1278,7 +1292,7 @@ class DevtoolUpdateTests(DevtoolBase):
with open(bbappendfile, 'r') as f:
self.assertEqual(expectedlines, f.readlines())
# Drop new commit and check patch gets deleted
- result = runCmd('git reset HEAD^', cwd=tempsrcdir)
+ result = runCmd('git reset HEAD^ --hard', cwd=tempsrcdir)
result = runCmd('devtool update-recipe %s -a %s' % (testrecipe, templayerdir))
self.assertNotExists(patchfile, 'Patch file not deleted')
expectedlines2 = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n',
@@ -1287,6 +1301,7 @@ class DevtoolUpdateTests(DevtoolBase):
self.assertEqual(expectedlines2, f.readlines())
# Put commit back and check we can run it if layer isn't in bblayers.conf
os.remove(bbappendfile)
+ result = runCmd("sed 's!\\(#define VERSION\\W*\"[^\"]*\\)\"!\\1-custom\"!' -i ReadMe.c", cwd=tempsrcdir)
result = runCmd('git commit -a -m "Add our custom version"', cwd=tempsrcdir)
result = runCmd('bitbake-layers remove-layer %s' % templayerdir, cwd=self.builddir)
result = runCmd('devtool update-recipe %s -a %s' % (testrecipe, templayerdir))
@@ -1361,7 +1376,7 @@ class DevtoolUpdateTests(DevtoolBase):
with open(bbappendfile, 'r') as f:
self.assertEqual(expectedlines, set(f.readlines()))
# Drop new commit and check SRCREV changes
- result = runCmd('git reset HEAD^', cwd=tempsrcdir)
+ result = runCmd('git reset HEAD^ --hard', cwd=tempsrcdir)
result = runCmd('devtool update-recipe -m srcrev %s -a %s' % (testrecipe, templayerdir))
self.assertNotExists(os.path.join(appenddir, testrecipe), 'Patch directory should not be created')
result = runCmd('git rev-parse HEAD', cwd=tempsrcdir)
@@ -1373,6 +1388,7 @@ class DevtoolUpdateTests(DevtoolBase):
self.assertEqual(expectedlines, set(f.readlines()))
# Put commit back and check we can run it if layer isn't in bblayers.conf
os.remove(bbappendfile)
+ result = runCmd('echo "# Additional line" >> Makefile.am', cwd=tempsrcdir)
result = runCmd('git commit -a -m "Change the Makefile"', cwd=tempsrcdir)
result = runCmd('bitbake-layers remove-layer %s' % templayerdir, cwd=self.builddir)
result = runCmd('devtool update-recipe -m srcrev %s -a %s' % (testrecipe, templayerdir))
@@ -1404,11 +1420,12 @@ class DevtoolUpdateTests(DevtoolBase):
# Try building just to ensure we haven't broken that
bitbake("%s" % testrecipe)
# Edit / commit local source
- runCmd('echo "/* Foobar */" >> oe-local-files/makedevs.c', cwd=tempdir)
- runCmd('echo "Foo" > oe-local-files/new-local', cwd=tempdir)
+ runCmd('echo "/* Foobar */" >> makedevs.c', cwd=tempdir)
+ runCmd('echo "Foo" > new-local', cwd=tempdir)
runCmd('echo "Bar" > new-file', cwd=tempdir)
runCmd('git add new-file', cwd=tempdir)
runCmd('git commit -m "Add new file"', cwd=tempdir)
+ runCmd('git add new-local', cwd=tempdir)
runCmd('devtool update-recipe %s' % testrecipe)
expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)),
(' M', '.*/makedevs/makedevs.c$'),
@@ -1434,8 +1451,8 @@ class DevtoolUpdateTests(DevtoolBase):
self.assertExists(local_file, 'File makedevs.c not created')
self.assertExists(patchfile, 'File new_local not created')
- def test_devtool_update_recipe_local_files_2(self):
- """Check local source files support when oe-local-files is in Git"""
+ def _test_devtool_update_recipe_local_files_2(self):
+ """Check local source files support when editing local files in Git"""
testrecipe = 'devtool-test-local'
recipefile = get_bb_var('FILE', testrecipe)
recipedir = os.path.dirname(recipefile)
@@ -1450,17 +1467,13 @@ class DevtoolUpdateTests(DevtoolBase):
result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
# Check git repo
self._check_src_repo(tempdir)
- # Add oe-local-files to Git
- runCmd('rm oe-local-files/.gitignore', cwd=tempdir)
- runCmd('git add oe-local-files', cwd=tempdir)
- runCmd('git commit -m "Add local sources"', cwd=tempdir)
# Edit / commit local sources
- runCmd('echo "# Foobar" >> oe-local-files/file1', cwd=tempdir)
+ runCmd('echo "# Foobar" >> file1', cwd=tempdir)
runCmd('git commit -am "Edit existing file"', cwd=tempdir)
- runCmd('git rm oe-local-files/file2', cwd=tempdir)
+ runCmd('git rm file2', cwd=tempdir)
runCmd('git commit -m"Remove file"', cwd=tempdir)
- runCmd('echo "Foo" > oe-local-files/new-local', cwd=tempdir)
- runCmd('git add oe-local-files/new-local', cwd=tempdir)
+ runCmd('echo "Foo" > new-local', cwd=tempdir)
+ runCmd('git add new-local', cwd=tempdir)
runCmd('git commit -m "Add new local file"', cwd=tempdir)
runCmd('echo "Gar" > new-file', cwd=tempdir)
runCmd('git add new-file', cwd=tempdir)
@@ -1469,7 +1482,7 @@ class DevtoolUpdateTests(DevtoolBase):
os.path.dirname(recipefile))
# Checkout unmodified file to working copy -> devtool should still pick
# the modified version from HEAD
- runCmd('git checkout HEAD^ -- oe-local-files/file1', cwd=tempdir)
+ runCmd('git checkout HEAD^ -- file1', cwd=tempdir)
runCmd('devtool update-recipe %s' % testrecipe)
expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)),
(' M', '.*/file1$'),
@@ -1544,7 +1557,7 @@ class DevtoolUpdateTests(DevtoolBase):
# (don't bother with cleaning the recipe on teardown, we won't be building it)
result = runCmd('devtool modify %s' % testrecipe)
# Modify one file
- runCmd('echo "Another line" >> file2', cwd=os.path.join(self.workspacedir, 'sources', testrecipe, 'oe-local-files'))
+ runCmd('echo "Another line" >> file2', cwd=os.path.join(self.workspacedir, 'sources', testrecipe))
self.add_command_to_tearDown('cd %s; rm %s/*; git checkout %s %s' % (os.path.dirname(recipefile), testrecipe, testrecipe, os.path.basename(recipefile)))
result = runCmd('devtool update-recipe %s' % testrecipe)
expected_status = [(' M', '.*/%s/file2$' % testrecipe)]
@@ -1773,6 +1786,8 @@ class DevtoolExtractTests(DevtoolBase):
# Definitions
testrecipe = 'mdadm'
testfile = '/sbin/mdadm'
+ if "usrmerge" in get_bb_var('DISTRO_FEATURES'):
+ testfile = '/usr/sbin/mdadm'
testimage = 'oe-selftest-image'
testcommand = '/sbin/mdadm --help'
# Build an image to run
diff --git a/meta/lib/oeqa/selftest/cases/layerappend.py b/meta/lib/oeqa/selftest/cases/layerappend.py
index 379ed589ad..64b17117cc 100644
--- a/meta/lib/oeqa/selftest/cases/layerappend.py
+++ b/meta/lib/oeqa/selftest/cases/layerappend.py
@@ -37,7 +37,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI:append = " file://appendtest.txt"
sysroot_stage_all:append() {
- install -m 644 ${WORKDIR}/appendtest.txt ${SYSROOT_DESTDIR}/
+ install -m 644 ${UNPACKDIR}/appendtest.txt ${SYSROOT_DESTDIR}/
}
"""
diff --git a/meta/lib/oeqa/selftest/cases/minidebuginfo.py b/meta/lib/oeqa/selftest/cases/minidebuginfo.py
index 2919f07939..a8923460f9 100644
--- a/meta/lib/oeqa/selftest/cases/minidebuginfo.py
+++ b/meta/lib/oeqa/selftest/cases/minidebuginfo.py
@@ -8,6 +8,7 @@ import subprocess
import tempfile
import shutil
+from oeqa.core.decorator import OETestTag
from oeqa.selftest.case import OESelftestTestCase
from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars, runCmd
@@ -42,3 +43,18 @@ IMAGE_FSTYPES = "tar.bz2"
native_sysroot = native_sysroot, target_sys = target_sys)
self.assertIn(".gnu_debugdata", r.output)
+ @OETestTag("runqemu")
+ def test_minidebuginfo_qemu(self):
+ """
+ Test minidebuginfo inside a qemu.
+ This runs test_systemd_coredump_minidebuginfo and other minidebuginfo runtime tests which may be added in the future.
+ """
+
+ self.write_config("""
+DISTRO_FEATURES:append = " minidebuginfo"
+INIT_MANAGER = "systemd"
+IMAGE_CLASSES += "testimage"
+TEST_SUITES = "ping ssh systemd"
+ """)
+ bitbake('core-image-minimal')
+ bitbake('-c testimage core-image-minimal')
diff --git a/meta/lib/oeqa/selftest/cases/oescripts.py b/meta/lib/oeqa/selftest/cases/oescripts.py
index f69efccfee..fcfe54af74 100644
--- a/meta/lib/oeqa/selftest/cases/oescripts.py
+++ b/meta/lib/oeqa/selftest/cases/oescripts.py
@@ -175,7 +175,7 @@ class OEListPackageconfigTests(OESelftestTestCase):
def test_packageconfig_flags_option_all(self):
results = runCmd('%s/contrib/list-packageconfig-flags.py -a' % self.scripts_dir)
expected_endlines = []
- expected_endlines.append("pinentry-1.2.1")
+ expected_endlines.append("pinentry-1.3.0")
expected_endlines.append("PACKAGECONFIG ncurses")
expected_endlines.append("PACKAGECONFIG[qt] --enable-pinentry-qt, --disable-pinentry-qt, qtbase-native qtbase")
expected_endlines.append("PACKAGECONFIG[gtk2] --enable-pinentry-gtk2, --disable-pinentry-gtk2, gtk+ glib-2.0")
diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py
index aebea42502..42202b7831 100644
--- a/meta/lib/oeqa/selftest/cases/recipetool.py
+++ b/meta/lib/oeqa/selftest/cases/recipetool.py
@@ -120,9 +120,15 @@ class RecipetoolAppendTests(RecipetoolBase):
self._try_recipetool_appendfile_fail('/dev/console', self.testfile, ['ERROR: /dev/console cannot be handled by this tool'])
def test_recipetool_appendfile_alternatives(self):
+ lspath = '/bin/ls'
+ dirname = "base_bindir"
+ if "usrmerge" in get_bb_var('DISTRO_FEATURES'):
+ lspath = '/usr/bin/ls'
+ dirname = "bindir"
+
# Now try with a file we know should be an alternative
# (this is very much a fake example, but one we know is reliably an alternative)
- self._try_recipetool_appendfile_fail('/bin/ls', self.testfile, ['ERROR: File /bin/ls is an alternative possibly provided by the following recipes:', 'coreutils', 'busybox'])
+ self._try_recipetool_appendfile_fail(lspath, self.testfile, ['ERROR: File %s is an alternative possibly provided by the following recipes:' % lspath, 'coreutils', 'busybox'])
# Need a test file - should be executable
testfile2 = os.path.join(self.corebase, 'oe-init-build-env')
testfile2name = os.path.basename(testfile2)
@@ -131,12 +137,12 @@ class RecipetoolAppendTests(RecipetoolBase):
'SRC_URI += "file://%s"\n' % testfile2name,
'\n',
'do_install:append() {\n',
- ' install -d ${D}${base_bindir}\n',
- ' install -m 0755 ${WORKDIR}/%s ${D}${base_bindir}/ls\n' % testfile2name,
+ ' install -d ${D}${%s}\n' % dirname,
+ ' install -m 0755 ${UNPACKDIR}/%s ${D}${%s}/ls\n' % (testfile2name, dirname),
'}\n']
- self._try_recipetool_appendfile('coreutils', '/bin/ls', testfile2, '-r coreutils', expectedlines, [testfile2name])
+ self._try_recipetool_appendfile('coreutils', lspath, testfile2, '-r coreutils', expectedlines, [testfile2name])
# Now try bbappending the same file again, contents should not change
- bbappendfile, _ = self._try_recipetool_appendfile('coreutils', '/bin/ls', self.testfile, '-r coreutils', expectedlines, [testfile2name])
+ bbappendfile, _ = self._try_recipetool_appendfile('coreutils', lspath, self.testfile, '-r coreutils', expectedlines, [testfile2name])
# But file should have
copiedfile = os.path.join(os.path.dirname(bbappendfile), 'coreutils', testfile2name)
result = runCmd('diff -q %s %s' % (testfile2, copiedfile), ignore_status=True)
@@ -158,7 +164,7 @@ class RecipetoolAppendTests(RecipetoolBase):
'\n',
'do_install:append() {\n',
' install -d ${D}${datadir}\n',
- ' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/something\n',
+ ' install -m 0644 ${UNPACKDIR}/testfile ${D}${datadir}/something\n',
'}\n']
self._try_recipetool_appendfile('netbase', '/usr/share/something', self.testfile, '-r netbase', expectedlines, ['testfile'])
# Try adding another file, this time where the source file is executable
@@ -173,8 +179,8 @@ class RecipetoolAppendTests(RecipetoolBase):
'\n',
'do_install:append() {\n',
' install -d ${D}${datadir}\n',
- ' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/something\n',
- ' install -m 0755 ${WORKDIR}/%s ${D}${datadir}/scriptname\n' % testfile2name,
+ ' install -m 0644 ${UNPACKDIR}/testfile ${D}${datadir}/something\n',
+ ' install -m 0755 ${UNPACKDIR}/%s ${D}${datadir}/scriptname\n' % testfile2name,
'}\n']
self._try_recipetool_appendfile('netbase', '/usr/share/scriptname', testfile2, '-r netbase', expectedlines, ['testfile', testfile2name])
@@ -186,7 +192,7 @@ class RecipetoolAppendTests(RecipetoolBase):
'\n',
'do_install:append() {\n',
' install -d ${D}${bindir}\n',
- ' install -m 0755 ${WORKDIR}/testfile ${D}${bindir}/selftest-recipetool-testbin\n',
+ ' install -m 0755 ${UNPACKDIR}/testfile ${D}${bindir}/selftest-recipetool-testbin\n',
'}\n']
_, output = self._try_recipetool_appendfile('netbase', '/usr/bin/selftest-recipetool-testbin', self.testfile, '-r netbase', expectedlines, ['testfile'])
self.assertNotIn('WARNING: ', output)
@@ -201,7 +207,7 @@ class RecipetoolAppendTests(RecipetoolBase):
'\n',
'do_install:append:mymachine() {\n',
' install -d ${D}${datadir}\n',
- ' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/something\n',
+ ' install -m 0644 ${UNPACKDIR}/testfile ${D}${datadir}/something\n',
'}\n']
_, output = self._try_recipetool_appendfile('netbase', '/usr/share/something', self.testfile, '-r netbase -m mymachine', expectedlines, ['mymachine/testfile'])
self.assertNotIn('WARNING: ', output)
@@ -235,7 +241,7 @@ class RecipetoolAppendTests(RecipetoolBase):
'\n',
'do_install:append() {\n',
' install -d ${D}${datadir}\n',
- ' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/selftest-replaceme-subdir\n',
+ ' install -m 0644 ${UNPACKDIR}/testfile ${D}${datadir}/selftest-replaceme-subdir\n',
'}\n']
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-subdir', self.testfile, '', expectedlines, ['testfile'])
self.assertNotIn('WARNING: ', output)
@@ -262,7 +268,7 @@ class RecipetoolAppendTests(RecipetoolBase):
'\n',
'do_install:append() {\n',
' install -d ${D}${sysconfdir}\n',
- ' install -m 0644 ${WORKDIR}/testfile ${D}${sysconfdir}/selftest-replaceme-patched\n',
+ ' install -m 0644 ${UNPACKDIR}/testfile ${D}${sysconfdir}/selftest-replaceme-patched\n',
'}\n']
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/etc/selftest-replaceme-patched', self.testfile, '', expectedlines, ['testfile'])
for line in output.splitlines():
@@ -280,7 +286,7 @@ class RecipetoolAppendTests(RecipetoolBase):
'\n',
'do_install:append() {\n',
' install -d ${D}${datadir}\n',
- ' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/selftest-replaceme-scripted\n',
+ ' install -m 0644 ${UNPACKDIR}/testfile ${D}${datadir}/selftest-replaceme-scripted\n',
'}\n']
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-scripted', self.testfile, '', expectedlines, ['testfile'])
self.assertNotIn('WARNING: ', output)
@@ -303,7 +309,7 @@ class RecipetoolAppendTests(RecipetoolBase):
'\n',
'do_install:append() {\n',
' install -d ${D}${datadir}\n',
- ' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/selftest-replaceme-postinst\n',
+ ' install -m 0644 ${UNPACKDIR}/testfile ${D}${datadir}/selftest-replaceme-postinst\n',
'}\n']
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-postinst', self.testfile, '-r selftest-recipetool-appendfile', expectedlines, ['testfile'])
diff --git a/meta/lib/oeqa/selftest/cases/recipeutils.py b/meta/lib/oeqa/selftest/cases/recipeutils.py
index 2cb4445f81..9949737172 100644
--- a/meta/lib/oeqa/selftest/cases/recipeutils.py
+++ b/meta/lib/oeqa/selftest/cases/recipeutils.py
@@ -72,7 +72,7 @@ class RecipeUtilsTests(OESelftestTestCase):
expected_patch = """
--- a/recipes-test/recipeutils/recipeutils-test_1.2.bb
+++ b/recipes-test/recipeutils/recipeutils-test_1.2.bb
-@@ -8,6 +8,4 @@
+@@ -11,6 +11,4 @@
BBCLASSEXTEND = "native nativesdk"
@@ -97,7 +97,7 @@ class RecipeUtilsTests(OESelftestTestCase):
expected_patch = """
--- a/recipes-test/recipeutils/recipeutils-test_1.2.bb
+++ b/recipes-test/recipeutils/recipeutils-test_1.2.bb
-@@ -8,6 +8,3 @@
+@@ -11,6 +11,3 @@
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py
index 80e830136f..97a9c3da90 100644
--- a/meta/lib/oeqa/selftest/cases/reproducible.py
+++ b/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -16,6 +16,8 @@ import os
import datetime
exclude_packages = [
+ 'rust-rustdoc',
+ 'rust-dbg'
]
def is_excluded(package):
diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
index 12000aac16..13aa5f16c9 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -273,7 +273,7 @@ TEST_RUNQEMUPARAMS += " slirp"
import subprocess, os
distro = oe.lsb.distro_identifier()
- if distro and (distro in ['debian-9', 'debian-10', 'centos-7', 'centos-8', 'ubuntu-16.04', 'ubuntu-18.04'] or
+ if distro and (distro in ['debian-9', 'debian-10', 'centos-7', 'centos-8', 'centos-9', 'ubuntu-16.04', 'ubuntu-18.04'] or
distro.startswith('almalinux') or distro.startswith('rocky')):
self.skipTest('virgl headless cannot be tested with %s' %(distro))
diff --git a/meta/lib/oeqa/selftest/cases/rust.py b/meta/lib/oeqa/selftest/cases/rust.py
index ad14189c6d..4ccbe9867b 100644
--- a/meta/lib/oeqa/selftest/cases/rust.py
+++ b/meta/lib/oeqa/selftest/cases/rust.py
@@ -210,9 +210,8 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
tmpdir = get_bb_var("TMPDIR", "rust")
# Set path for target-poky-linux-gcc, RUST_TARGET_PATH and hosttools.
- cmd = " export PATH=%s/recipe-sysroot-native/usr/bin:$PATH;" % rustlibpath
- cmd = cmd + " export TARGET_VENDOR=\"-poky\";"
- cmd = cmd + " export PATH=%s/recipe-sysroot-native/usr/bin/%s:%s/hosttools:$PATH;" % (rustlibpath, tcpath, tmpdir)
+ cmd = "export TARGET_VENDOR=\"-poky\";"
+ cmd = cmd + " export PATH=%s/recipe-sysroot-native/usr/bin/python3-native:%s/recipe-sysroot-native/usr/bin:%s/recipe-sysroot-native/usr/bin/%s:%s/hosttools:$PATH;" % (rustlibpath, rustlibpath, rustlibpath, tcpath, tmpdir)
cmd = cmd + " export RUST_TARGET_PATH=%s/rust-targets;" % rustlibpath
# Trigger testing.
cmd = cmd + " export TEST_DEVICE_ADDR=\"%s:12345\";" % qemu.ip
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py
index 86d6cd7464..94ad6e38b6 100644
--- a/meta/lib/oeqa/selftest/cases/sstatetests.py
+++ b/meta/lib/oeqa/selftest/cases/sstatetests.py
@@ -917,15 +917,25 @@ INHERIT += "base-do-configure-modified"
""",
expected_sametmp_output, expected_difftmp_output)
-@OETestTag("yocto-mirrors")
-class SStateMirrors(SStateBase):
- def check_bb_output(self, output, exceptions, check_cdn):
+class SStateCheckObjectPresence(SStateBase):
+ def check_bb_output(self, output, targets, exceptions, check_cdn):
def is_exception(object, exceptions):
for e in exceptions:
if re.search(e, object):
return True
return False
+ # sstate is checked for existence of these, but they never get written out to begin with
+ exceptions += ["{}.*image_qa".format(t) for t in targets.split()]
+ exceptions += ["{}.*deploy_source_date_epoch".format(t) for t in targets.split()]
+ exceptions += ["{}.*image_complete".format(t) for t in targets.split()]
+ exceptions += ["linux-yocto.*shared_workdir"]
+ # these get influnced by IMAGE_FSTYPES tweaks in yocto-autobuilder-helper's config.json (on x86-64)
+ # additionally, they depend on noexec (thus, absent stamps) package, install, etc. image tasks,
+ # which makes tracing other changes difficult
+ exceptions += ["{}.*create_spdx".format(t) for t in targets.split()]
+ exceptions += ["{}.*create_runtime_spdx".format(t) for t in targets.split()]
+
output_l = output.splitlines()
for l in output_l:
if l.startswith("Sstate summary"):
@@ -960,18 +970,9 @@ class SStateMirrors(SStateBase):
self.assertEqual(len(failed_urls), missing_objects, "Amount of reported missing objects does not match failed URLs: {}\nFailed URLs:\n{}\nFetcher diagnostics:\n{}".format(missing_objects, "\n".join(failed_urls), "\n".join(failed_urls_extrainfo)))
self.assertEqual(len(failed_urls), 0, "Missing objects in the cache:\n{}\nFetcher diagnostics:\n{}".format("\n".join(failed_urls), "\n".join(failed_urls_extrainfo)))
+@OETestTag("yocto-mirrors")
+class SStateMirrors(SStateCheckObjectPresence):
def run_test(self, machine, targets, exceptions, check_cdn = True, ignore_errors = False):
- # sstate is checked for existence of these, but they never get written out to begin with
- exceptions += ["{}.*image_qa".format(t) for t in targets.split()]
- exceptions += ["{}.*deploy_source_date_epoch".format(t) for t in targets.split()]
- exceptions += ["{}.*image_complete".format(t) for t in targets.split()]
- exceptions += ["linux-yocto.*shared_workdir"]
- # these get influnced by IMAGE_FSTYPES tweaks in yocto-autobuilder-helper's config.json (on x86-64)
- # additionally, they depend on noexec (thus, absent stamps) package, install, etc. image tasks,
- # which makes tracing other changes difficult
- exceptions += ["{}.*create_spdx".format(t) for t in targets.split()]
- exceptions += ["{}.*create_runtime_spdx".format(t) for t in targets.split()]
-
if check_cdn:
self.config_sstate(True)
self.append_config("""
@@ -987,7 +988,7 @@ MACHINE = "{}"
bitbake("-S none {}".format(targets))
if ignore_errors:
return
- self.check_bb_output(result.output, exceptions, check_cdn)
+ self.check_bb_output(result.output, targets, exceptions, check_cdn)
def test_cdn_mirror_qemux86_64(self):
exceptions = []
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index 575e380017..bf2f49d0c0 100644
--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -314,7 +314,23 @@ def create_temp_layer(templayerdir, templayername, priority=999, recipepathspec=
@contextlib.contextmanager
def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, qemuparams=None, overrides={}, discard_writes=True):
"""
- launch_cmd means directly run the command, don't need set rootfs or env vars.
+ Starts a context manager for a 'oeqa.targetcontrol.QemuTarget' resource.
+ The underlying Qemu will be booted into a shell when the generator yields
+ and stopped when the 'with' block exits.
+
+ Usage:
+
+ with runqemu('core-image-minimal') as qemu:
+ qemu.run_serial('cat /proc/cpuinfo')
+
+ Args:
+ pn (str): (image) recipe to run on
+ ssh (boolean): whether or not to enable SSH (network access)
+ runqemuparams (str): space-separated list of params to pass to 'runqemu' script (like 'nographics', 'ovmf', etc.)
+ image_fstype (str): IMAGE_FSTYPE to use
+ launch_cmd (str): directly run this command and bypass automatic runqemu parameter generation
+ overrides (dict): dict of "'<bitbake-variable>': value" pairs that allows overriding bitbake variables
+ discard_writes (boolean): enables qemu -snapshot feature to prevent modifying original image
"""
import bb.tinfoil
diff --git a/meta/lib/patchtest/repo.py b/meta/lib/patchtest/repo.py
index d3788f466d..5f361ac500 100644
--- a/meta/lib/patchtest/repo.py
+++ b/meta/lib/patchtest/repo.py
@@ -11,6 +11,7 @@
import os
import utils
import logging
+import git
from patch import PatchTestPatch
logger = logging.getLogger('patchtest')
@@ -21,15 +22,17 @@ class PatchTestRepo(object):
# prefixes used for temporal branches/stashes
prefix = 'patchtest'
+
def __init__(self, patch, repodir, commit=None, branch=None):
self._repodir = repodir
+ self._repo = git.Repo.init(repodir)
self._patch = PatchTestPatch(patch)
- self._current_branch = self._get_current_branch()
+ self._current_branch = self._repo.active_branch.name
# targeted branch defined on the patch may be invalid, so make sure there
# is a corresponding remote branch
valid_patch_branch = None
- if self._patch.branch in self.upstream_branches():
+ if self._patch.branch in self._repo.branches:
valid_patch_branch = self._patch.branch
# Target Branch
@@ -52,22 +55,19 @@ class PatchTestRepo(object):
self._workingbranch = "%s_%s" % (PatchTestRepo.prefix, os.getpid())
- # create working branch
- self._exec({'cmd': ['git', 'checkout', '-b', self._workingbranch, self._commit]})
+ # create working branch. Use the '-B' flag so that we just
+ # check out the existing one if it's there
+ self._repo.git.execute(['git', 'checkout', '-B', self._workingbranch, self._commit])
self._patchmerged = False
# Check if patch can be merged using git-am
self._patchcanbemerged = True
try:
- self._exec({'cmd': ['git', 'am', '--keep-cr'], 'input': self._patch.contents})
- except utils.CmdException as ce:
- self._exec({'cmd': ['git', 'am', '--abort']})
+ # Make sure to get the absolute path of the file
+ self._repo.git.execute(['git', 'apply', '--check', os.path.abspath(self._patch.path)], with_exceptions=True)
+ except git.exc.GitCommandError as ce:
self._patchcanbemerged = False
- finally:
- # if patch was applied, remove it
- if self._patchcanbemerged:
- self._exec({'cmd':['git', 'reset', '--hard', self._commit]})
# for debugging purposes, print all repo parameters
logger.debug("Parameters")
@@ -97,78 +97,24 @@ class PatchTestRepo(object):
def canbemerged(self):
return self._patchcanbemerged
- def _exec(self, cmds):
- _cmds = []
- if isinstance(cmds, dict):
- _cmds.append(cmds)
- elif isinstance(cmds, list):
- _cmds = cmds
- else:
- raise utils.CmdException({'cmd':str(cmds)})
-
- results = []
- cmdfailure = False
- try:
- results = utils.exec_cmds(_cmds, self._repodir)
- except utils.CmdException as ce:
- cmdfailure = True
- raise ce
- finally:
- if cmdfailure:
- for cmd in _cmds:
- logger.debug("CMD: %s" % ' '.join(cmd['cmd']))
- else:
- for result in results:
- cmd, rc, stdout, stderr = ' '.join(result['cmd']), result['returncode'], result['stdout'], result['stderr']
- logger.debug("CMD: %s RCODE: %s STDOUT: %s STDERR: %s" % (cmd, rc, stdout, stderr))
-
- return results
-
- def _get_current_branch(self, commit='HEAD'):
- cmd = {'cmd':['git', 'rev-parse', '--abbrev-ref', commit]}
- cb = self._exec(cmd)[0]['stdout']
- if cb == commit:
- logger.warning('You may be detached so patchtest will checkout to master after execution')
- cb = 'master'
- return cb
-
def _get_commitid(self, commit):
if not commit:
return None
try:
- cmd = {'cmd':['git', 'rev-parse', '--short', commit]}
- return self._exec(cmd)[0]['stdout']
- except utils.CmdException as ce:
- # try getting the commit under any remotes
- cmd = {'cmd':['git', 'remote']}
- remotes = self._exec(cmd)[0]['stdout']
- for remote in remotes.splitlines():
- cmd = {'cmd':['git', 'rev-parse', '--short', '%s/%s' % (remote, commit)]}
- try:
- return self._exec(cmd)[0]['stdout']
- except utils.CmdException:
- pass
+ return self._repo.rev_parse(commit).hexsha
+ except Exception as e:
+ print(f"Couldn't find commit {commit} in repo")
return None
- def upstream_branches(self):
- cmd = {'cmd':['git', 'branch', '--remotes']}
- remote_branches = self._exec(cmd)[0]['stdout']
-
- # just get the names, without the remote name
- branches = set(branch.split('/')[-1] for branch in remote_branches.splitlines())
- return branches
-
def merge(self):
if self._patchcanbemerged:
- self._exec({'cmd': ['git', 'am', '--keep-cr'],
- 'input': self._patch.contents,
- 'updateenv': {'PTRESOURCE':self._patch.path}})
+ self._repo.git.execute(['git', 'am', '--keep-cr', os.path.abspath(self._patch.path)])
self._patchmerged = True
def clean(self):
- self._exec({'cmd':['git', 'checkout', '%s' % self._current_branch]})
- self._exec({'cmd':['git', 'branch', '-D', self._workingbranch]})
+ self._repo.git.execute(['git', 'checkout', self._current_branch])
+ self._repo.git.execute(['git', 'branch', '-D', self._workingbranch])
self._patchmerged = False
diff --git a/meta/lib/patchtest/requirements.txt b/meta/lib/patchtest/requirements.txt
index ba55ff905e..4247b91f09 100644
--- a/meta/lib/patchtest/requirements.txt
+++ b/meta/lib/patchtest/requirements.txt
@@ -1,5 +1,6 @@
boto3
git-pw>=2.5.0
+GitPython
jinja2
pylint
pyparsing>=3.0.9
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.fail
index 0c40cdc1b6..30c1bc4624 100644
--- a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.fail
+++ b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.fail
@@ -1,32 +1,43 @@
-From 1fbb446d1849b1208012cbdae5d85d228cdbe4a6 Mon Sep 17 00:00:00 2001
+From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001
From: First Last <first.last@example.com>
-Date: Tue, 29 Aug 2023 13:32:24 -0400
-Subject: [PATCH] selftest-hello: add a summary
+Date: Fri, 31 May 2024 11:03:47 -0400
+Subject: [PATCH] selftest-hello: add selftest-hello-extra
-This patch should fail the selftests because the author address is from the
-invalid "example.com".
+This should fail the test_author_valid test.
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ .../selftest-hello-extra_1.0.bb | 21 +++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
-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
-index 547587bef4..491f0a3df7 100644
---- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-@@ -1,3 +1,4 @@
-+SUMMARY = "A cool sample"
- DESCRIPTION = "Simple helloworld application -- selftest variant"
- SECTION = "examples"
- LICENSE = "MIT"
-@@ -16,4 +17,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
-
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+new file mode 100644
+index 00000000000..f3dec1b220c
+--- /dev/null
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+@@ -0,0 +1,21 @@
++SUMMARY = "This is an example summary"
++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}/sources"
++UNPACKDIR = "${S}"
++
++do_compile() {
++ ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld
++}
++
++do_install() {
++ install -d ${D}${bindir}
++ install -m 0755 helloworld ${D}${bindir}
++}
++
+BBCLASSEXTEND = "native nativesdk"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.pass
index cbb8ef2cef..6e82b08bc6 100644
--- a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.pass
+++ b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.pass
@@ -1,31 +1,43 @@
-From 1fbb446d1849b1208012cbdae5d85d228cdbe4a6 Mon Sep 17 00:00:00 2001
+From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001
From: First Last <first.last@address.com>
-Date: Tue, 29 Aug 2023 13:32:24 -0400
-Subject: [PATCH] selftest-hello: add a summary
+Date: Fri, 31 May 2024 11:03:47 -0400
+Subject: [PATCH] selftest-hello: add selftest-hello-extra
-This patch should pass the selftests because the author address is in a valid format.
+This should pass the test_author_valid test.
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ .../selftest-hello-extra_1.0.bb | 21 +++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
-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
-index 547587bef4..491f0a3df7 100644
---- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-@@ -1,3 +1,4 @@
-+SUMMARY = "A cool sample"
- DESCRIPTION = "Simple helloworld application -- selftest variant"
- SECTION = "examples"
- LICENSE = "MIT"
-@@ -16,4 +17,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
-
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+new file mode 100644
+index 00000000000..f3dec1b220c
+--- /dev/null
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+@@ -0,0 +1,21 @@
++SUMMARY = "This is an example summary"
++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}/sources"
++UNPACKDIR = "${S}"
++
++do_compile() {
++ ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld
++}
++
++do_install() {
++ install -d ${D}${bindir}
++ install -m 0755 helloworld ${D}${bindir}
++}
++
+BBCLASSEXTEND = "native nativesdk"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.fail
index 3e2b81bca1..745a8f45d9 100644
--- a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.fail
+++ b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.fail
@@ -1,31 +1,43 @@
-From 1fbb446d1849b1208012cbdae5d85d228cdbe4a6 Mon Sep 17 00:00:00 2001
+From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001
From: Upgrade Helper <auh@auh.yoctoproject.org>
-Date: Tue, 29 Aug 2023 13:32:24 -0400
-Subject: [PATCH] selftest-hello: add a summary
+Date: Fri, 31 May 2024 11:03:47 -0400
+Subject: [PATCH] selftest-hello: add selftest-hello-extra
-This patch should fail the selftests because AUH is an invalid sender.
+This should fail the test_author_valid test.
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ .../selftest-hello-extra_1.0.bb | 21 +++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
-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
-index 547587bef4..491f0a3df7 100644
---- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-@@ -1,3 +1,4 @@
-+SUMMARY = "A cool sample"
- DESCRIPTION = "Simple helloworld application -- selftest variant"
- SECTION = "examples"
- LICENSE = "MIT"
-@@ -16,4 +17,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
-
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+new file mode 100644
+index 00000000000..f3dec1b220c
+--- /dev/null
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+@@ -0,0 +1,21 @@
++SUMMARY = "This is an example summary"
++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}/sources"
++UNPACKDIR = "${S}"
++
++do_compile() {
++ ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld
++}
++
++do_install() {
++ install -d ${D}${bindir}
++ install -m 0755 helloworld ${D}${bindir}
++}
++
+BBCLASSEXTEND = "native nativesdk"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.pass
index f84e1265a7..56cb77fa69 100644
--- a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.pass
+++ b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.pass
@@ -1,31 +1,43 @@
-From 1fbb446d1849b1208012cbdae5d85d228cdbe4a6 Mon Sep 17 00:00:00 2001
+From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001
From: First Last <averylongemailaddressthatishardtoread.from@address.com>
-Date: Tue, 29 Aug 2023 13:32:24 -0400
-Subject: [PATCH] selftest-hello: add a summary
+Date: Fri, 31 May 2024 11:03:47 -0400
+Subject: [PATCH] selftest-hello: add selftest-hello-extra
-This patch should pass the selftests because the author address is in a valid format.
+This should pass the test_author_valid test.
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ .../selftest-hello-extra_1.0.bb | 21 +++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
-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
-index 547587bef4..491f0a3df7 100644
---- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-@@ -1,3 +1,4 @@
-+SUMMARY = "A cool sample"
- DESCRIPTION = "Simple helloworld application -- selftest variant"
- SECTION = "examples"
- LICENSE = "MIT"
-@@ -16,4 +17,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
-
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+new file mode 100644
+index 00000000000..f3dec1b220c
+--- /dev/null
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+@@ -0,0 +1,21 @@
++SUMMARY = "This is an example summary"
++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}/sources"
++UNPACKDIR = "${S}"
++
++do_compile() {
++ ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld
++}
++
++do_install() {
++ install -d ${D}${bindir}
++ install -m 0755 helloworld ${D}${bindir}
++}
++
+BBCLASSEXTEND = "native nativesdk"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.fail
index 80f409e952..6facb8c756 100644
--- a/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.fail
+++ b/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.fail
@@ -1,25 +1,67 @@
-From fdfd605e565d874502522c4b70b786c8c5aa0bad Mon Sep 17 00:00:00 2001
-From: name@somedomain.com <email@address.com>
-Date: Fri, 17 Feb 2017 16:29:21 -0600
-Subject: [PATCH] README: adds 'foo' to the header
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Fri, 31 May 2024 09:54:50 -0400
+Subject: [PATCH] selftest-hello: fix CVE-1234-56789
-This test patch adds 'foo' to the header
+This should fail the test_bugzilla_entry_format test.
[YOCTO 1234]
+CVE: CVE-1234-56789
-Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com>
+Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- README | 1 +
- 1 file changed, 1 insertion(+)
+ .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb | 4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-diff --git a/README b/README
-index 521916cd4f..cdf29dcea3 100644
---- a/README
-+++ b/README
-@@ -1,3 +1,4 @@
-+**** FOO ****
- OpenEmbedded-Core
- =================
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+new file mode 100644
+index 00000000000..8a4f9329303
+--- /dev/null
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,26 @@
++From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
++From: Trevor Gamblin <tgamblin@baylibre.com>
++Date: Tue, 29 Aug 2023 14:08:20 -0400
++Subject: [PATCH] Fix CVE-NOT-REAL
++
++CVE: CVE-1234-56789
++Upstream-Status: Backport(http://example.com/example)
++
++Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
++---
++ strlen.c | 1 +
++ 1 file changed, 1 insertion(+)
++
++diff --git a/strlen.c b/strlen.c
++index 1788f38..83d7918 100644
++--- a/strlen.c
+++++ b/strlen.c
++
++int main() {
++
++ printf("%d\n", str_len(string1));
++ printf("%d\n", str_len(string2));
++ printf("CVE FIXED!!!\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
+index 2dc352d479e..d937759f157 100644
+--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+@@ -3,7 +3,9 @@ SECTION = "examples"
+ LICENSE = "MIT"
+ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+-SRC_URI = "file://helloworld.c"
++SRC_URI = "file://helloworld.c \
++ file://0001-Fix-CVE-1234-56789.patch \
++ "
+
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
+--
+2.45.1
---
-2.11.0
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.pass
index 2648b03364..2f35458b4f 100644
--- a/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.pass
+++ b/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.pass
@@ -1,25 +1,67 @@
-From fdfd605e565d874502522c4b70b786c8c5aa0bad Mon Sep 17 00:00:00 2001
-From: name@somedomain.com <email@address.com>
-Date: Fri, 17 Feb 2017 16:29:21 -0600
-Subject: [PATCH] README: adds 'foo' to the header
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Fri, 31 May 2024 09:54:50 -0400
+Subject: [PATCH] selftest-hello: fix CVE-1234-56789
-This test patch adds 'foo' to the header
+This should pass the test_bugzilla_entry_format test.
[YOCTO #1234]
+CVE: CVE-1234-56789
-Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com>
+Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- README | 1 +
- 1 file changed, 1 insertion(+)
+ .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb | 4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-diff --git a/README b/README
-index 521916cd4f..cdf29dcea3 100644
---- a/README
-+++ b/README
-@@ -1,3 +1,4 @@
-+**** FOO ****
- OpenEmbedded-Core
- =================
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+new file mode 100644
+index 00000000000..8a4f9329303
+--- /dev/null
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,26 @@
++From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
++From: Trevor Gamblin <tgamblin@baylibre.com>
++Date: Tue, 29 Aug 2023 14:08:20 -0400
++Subject: [PATCH] Fix CVE-NOT-REAL
++
++CVE: CVE-1234-56789
++Upstream-Status: Backport(http://example.com/example)
++
++Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
++---
++ strlen.c | 1 +
++ 1 file changed, 1 insertion(+)
++
++diff --git a/strlen.c b/strlen.c
++index 1788f38..83d7918 100644
++--- a/strlen.c
+++++ b/strlen.c
++
++int main() {
++
++ printf("%d\n", str_len(string1));
++ printf("%d\n", str_len(string2));
++ printf("CVE FIXED!!!\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
+index 2dc352d479e..d937759f157 100644
+--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+@@ -3,7 +3,9 @@ SECTION = "examples"
+ LICENSE = "MIT"
+ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+-SRC_URI = "file://helloworld.c"
++SRC_URI = "file://helloworld.c \
++ file://0001-Fix-CVE-1234-56789.patch \
++ "
+
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
+--
+2.45.1
---
-2.11.0
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.fail
index 93ca0f9119..6f4e61c0da 100644
--- a/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.fail
+++ b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.fail
@@ -1,22 +1,62 @@
-From 0a52a62c9430c05d22cb7f46380488f2280b69bb Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Fri, 1 Sep 2023 08:56:14 -0400
-Subject: [PATCH] README.OE-Core.md: add foo
+Date: Fri, 31 May 2024 09:54:50 -0400
+Subject: [PATCH] selftest-hello: fix CVE-1234-56789
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- README.OE-Core.md | 1 +
- 1 file changed, 1 insertion(+)
+ .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb | 4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-diff --git a/README.OE-Core.md b/README.OE-Core.md
-index 2f2127fb03..48464252c8 100644
---- a/README.OE-Core.md
-+++ b/README.OE-Core.md
-@@ -1,3 +1,4 @@
-+** FOO **
- OpenEmbedded-Core
- =================
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+new file mode 100644
+index 00000000000..8a4f9329303
+--- /dev/null
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,26 @@
++From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
++From: Trevor Gamblin <tgamblin@baylibre.com>
++Date: Tue, 29 Aug 2023 14:08:20 -0400
++Subject: [PATCH] Fix CVE-NOT-REAL
++
++CVE: CVE-1234-56789
++Upstream-Status: Backport(http://example.com/example)
++
++Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
++---
++ strlen.c | 1 +
++ 1 file changed, 1 insertion(+)
++
++diff --git a/strlen.c b/strlen.c
++index 1788f38..83d7918 100644
++--- a/strlen.c
+++++ b/strlen.c
++
++int main() {
++
++ printf("%d\n", str_len(string1));
++ printf("%d\n", str_len(string2));
++ printf("CVE FIXED!!!\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
+index 2dc352d479e..d937759f157 100644
+--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+@@ -3,7 +3,9 @@ SECTION = "examples"
+ LICENSE = "MIT"
+ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+-SRC_URI = "file://helloworld.c"
++SRC_URI = "file://helloworld.c \
++ file://0001-Fix-CVE-1234-56789.patch \
++ "
+
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.pass
index 5e3dcbd58b..3fbc23fd00 100644
--- a/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.pass
+++ b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.pass
@@ -1,24 +1,66 @@
-From 0a52a62c9430c05d22cb7f46380488f2280b69bb Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Fri, 1 Sep 2023 08:56:14 -0400
-Subject: [PATCH] README.OE-Core.md: add foo
+Date: Fri, 31 May 2024 09:54:50 -0400
+Subject: [PATCH] selftest-hello: fix CVE-1234-56789
-This is a commit message
+This should pass the test_commit_message_presence test.
+
+CVE: CVE-1234-56789
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- README.OE-Core.md | 1 +
- 1 file changed, 1 insertion(+)
+ .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb | 4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-diff --git a/README.OE-Core.md b/README.OE-Core.md
-index 2f2127fb03..48464252c8 100644
---- a/README.OE-Core.md
-+++ b/README.OE-Core.md
-@@ -1,3 +1,4 @@
-+** FOO **
- OpenEmbedded-Core
- =================
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+new file mode 100644
+index 00000000000..8a4f9329303
+--- /dev/null
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,26 @@
++From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
++From: Trevor Gamblin <tgamblin@baylibre.com>
++Date: Tue, 29 Aug 2023 14:08:20 -0400
++Subject: [PATCH] Fix CVE-NOT-REAL
++
++CVE: CVE-1234-56789
++Upstream-Status: Backport(http://example.com/example)
++
++Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
++---
++ strlen.c | 1 +
++ 1 file changed, 1 insertion(+)
++
++diff --git a/strlen.c b/strlen.c
++index 1788f38..83d7918 100644
++--- a/strlen.c
+++++ b/strlen.c
++
++int main() {
++
++ printf("%d\n", str_len(string1));
++ printf("%d\n", str_len(string2));
++ printf("CVE FIXED!!!\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
+index 2dc352d479e..d937759f157 100644
+--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+@@ -3,7 +3,9 @@ SECTION = "examples"
+ LICENSE = "MIT"
+ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+-SRC_URI = "file://helloworld.c"
++SRC_URI = "file://helloworld.c \
++ file://0001-Fix-CVE-1234-56789.patch \
++ "
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.1.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.1.fail
deleted file mode 100644
index 9cc4aab38a..0000000000
--- a/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.1.fail
+++ /dev/null
@@ -1,36 +0,0 @@
-From d12db4cfa913b0e7a4b5bd858d3019acc53ce426 Mon Sep 17 00:00:00 2001
-From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Wed, 30 Aug 2023 12:15:00 -0400
-Subject: [PATCH] selftest-hello: upgrade 1.0 -> 1.1
-
-This test should fail the mbox formatting test and the merge on head
-test.
-
-Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
----
- .../{selftest-hello_1.0.bb => selftest-hello_1.1.bb} | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
- rename meta-selftest/recipes-test/selftest-hello/{selftest-hello_1.0.bb => selftest-hello_1.1.bb} (88%)
-
-diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb
-similarity index 88%
-rename from meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-rename to meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb
-index 547587bef4..acc388ec2c 100644
---- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb
-@@ -1,3 +1,4 @@
-%+SUMMARY = "Hello!"
- DESCRIPTION = "Simple helloworld application -- selftest variant"
- SECTION = "examples"
- LICENSE = "MIT"
-@@ -16,4 +17,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
-
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
---
-2.41.0
-
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.2.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.2.fail
deleted file mode 100644
index eca1c60085..0000000000
--- a/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.2.fail
+++ /dev/null
@@ -1,35 +0,0 @@
-From d12db4cfa913b0e7a4b5bd858d3019acc53ce426 Mon Sep 17 00:00:00 2001
-From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Wed, 30 Aug 2023 12:15:00 -0400
-Subject: [PATCH] selftest-hello: upgrade 1.0 -> 1.1
-
-This test should fail the merge-on-head and mbox formatting tests.
-
-Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
----
- .../{selftest-hello_1.0.bb => selftest-hello_1.1.bb} | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
- rename meta-selftest/recipes-test/selftest-hello/{selftest-hello_1.0.bb => selftest-hello_1.1.bb} (88%)
-
-diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb
-similarity index 88%
-rename from meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-rename to meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb
-index 547587bef4..acc388ec2c 100644
---- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb
-@@ -1,3 +1,4 @@
-%+SUMMARY = "Hello!"
- DESCRIPTION = "Simple helloworld application -- selftest variant"
- SECTION = "examples"
- LICENSE = "MIT"
-@@ -16,4 +17,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
-
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
---
-2.41.0
-
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.fail
new file mode 100644
index 0000000000..0dda6802d1
--- /dev/null
+++ b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.fail
@@ -0,0 +1,66 @@
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Fri, 31 May 2024 09:54:50 -0400
+Subject: [PATCH] selftest-hello: fix CVE-1234-56789
+
+This should fail the test_mbox_format test.
+
+CVE: CVE-1234-56789
+
+Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
+---
+ .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb | 4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+new file mode 100644
+index 00000000000..8a4f9329303
+--- /dev/null
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,26 @@
++From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
++From: Trevor Gamblin <tgamblin@baylibre.com>
++Date: Tue, 29 Aug 2023 14:08:20 -0400
++Subject: [PATCH] Fix CVE-NOT-REAL
++
++CVE: CVE-1234-56789
++Upstream-Status: Backport(http://example.com/example)
++
++Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
++---
++ strlen.c | 1 +
++ 1 file changed, 1 insertion(+)
++
++diff --git a/strlen.c b/strlen.c
++index 1788f38..83d7918 100644
++--- a/strlen.c
+++++ b/strlen.c
++
++int main() {
++
++ printf("%d\n", str_len(string1));
++ printf("%d\n", str_len(string2));
++ printf("CVE FIXED!!!\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
+index 2dc352d479e..d937759f157 100644
+--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+@@ -3,7 +3,9 @@ SECTION = "examples"
+ LICENSE = "MIT"
+ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+-SRC_URI = "file://helloworld.c"
++SRC_URI = "file://helloworld.c \
+%+ file://0001-Fix-CVE-1234-56789.patch \
++ "
+
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
+--
+2.45.1
+
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.pass
index 33940adffc..f06ae11d04 100644
--- a/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.pass
+++ b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.pass
@@ -1,33 +1,66 @@
-From d12db4cfa913b0e7a4b5bd858d3019acc53ce426 Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Wed, 30 Aug 2023 12:15:00 -0400
-Subject: [PATCH] selftest-hello: upgrade 1.0 -> 1.1
+Date: Fri, 31 May 2024 09:54:50 -0400
+Subject: [PATCH] selftest-hello: fix CVE-1234-56789
+
+This should pass the test_mbox_format test.
+
+CVE: CVE-1234-56789
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../{selftest-hello_1.0.bb => selftest-hello_1.1.bb} | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
- rename meta-selftest/recipes-test/selftest-hello/{selftest-hello_1.0.bb => selftest-hello_1.1.bb} (88%)
+ .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb | 4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb
-similarity index 88%
-rename from meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-rename to meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb
-index 547587bef4..acc388ec2c 100644
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+new file mode 100644
+index 00000000000..8a4f9329303
+--- /dev/null
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,26 @@
++From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
++From: Trevor Gamblin <tgamblin@baylibre.com>
++Date: Tue, 29 Aug 2023 14:08:20 -0400
++Subject: [PATCH] Fix CVE-NOT-REAL
++
++CVE: CVE-1234-56789
++Upstream-Status: Backport(http://example.com/example)
++
++Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
++---
++ strlen.c | 1 +
++ 1 file changed, 1 insertion(+)
++
++diff --git a/strlen.c b/strlen.c
++index 1788f38..83d7918 100644
++--- a/strlen.c
+++++ b/strlen.c
++
++int main() {
++
++ printf("%d\n", str_len(string1));
++ printf("%d\n", str_len(string2));
++ printf("CVE FIXED!!!\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
+index 2dc352d479e..d937759f157 100644
--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb
-@@ -1,3 +1,4 @@
-+SUMMARY = "Hello!"
- DESCRIPTION = "Simple helloworld application -- selftest variant"
- SECTION = "examples"
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+@@ -3,7 +3,9 @@ SECTION = "examples"
LICENSE = "MIT"
-@@ -16,4 +17,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
+ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+-SRC_URI = "file://helloworld.c"
++SRC_URI = "file://helloworld.c \
++ file://0001-Fix-CVE-1234-56789.patch \
++ "
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.1.skip b/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.1.skip
index 2a72457878..072ccc28c0 100644
--- a/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.1.skip
+++ b/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.1.skip
@@ -3,7 +3,7 @@ From: Trevor Gamblin <tgamblin@baylibre.com>
Date: Wed, 30 Aug 2023 12:15:00 -0400
Subject: [PATCH] selftest-hello: upgrade 1.0 -> 1.1
-This file should pass the test_series_merge_on_head test.
+This file should skip the test_series_merge_on_head test.
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.fail
index cdbbc61b61..c5e4df2549 100644
--- a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.fail
+++ b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.fail
@@ -1,23 +1,25 @@
-From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
+Date: Fri, 31 May 2024 09:54:50 -0400
Subject: [PATCH] selftest-hello% fix CVE-1234-56789
+This should fail the test_shortlog_format test.
+
CVE: CVE-1234-56789
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../files/0001-Fix-CVE-1234-56789.patch | 27 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb | 6 +++--
- 2 files changed, 31 insertions(+), 2 deletions(-)
+ .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb | 4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
new file mode 100644
-index 0000000000..9219b8db62
+index 00000000000..8a4f9329303
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
+@@ -0,0 +1,26 @@
+From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Tue, 29 Aug 2023 14:08:20 -0400
@@ -35,19 +37,17 @@ index 0000000000..9219b8db62
+index 1788f38..83d7918 100644
+--- a/strlen.c
++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+
-+ printf("%d\n", str_len(string1));
-+ printf("%d\n", str_len(string2));
-++ printf("CVE FIXED!!!\n");
-+
-+ return 0;
-+ }
-+--
-+2.41.0
+
++int main() {
++
++ printf("%d\n", str_len(string1));
++ printf("%d\n", str_len(string2));
++ printf("CVE FIXED!!!\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
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
@@ -3,7 +3,9 @@ SECTION = "examples"
@@ -56,18 +56,11 @@ index 547587bef4..76975a6729 100644
-SRC_URI = "file://helloworld.c"
+SRC_URI = "file://helloworld.c \
-+ file://CVE-1234-56789.patch \
-+ "
-
- S = "${WORKDIR}"
-
-@@ -16,4 +18,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
++ file://0001-Fix-CVE-1234-56789.patch \
++ "
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.pass
index ef6017037c..4948e26afc 100644
--- a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.pass
+++ b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.pass
@@ -1,23 +1,25 @@
-From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
+Date: Fri, 31 May 2024 09:54:50 -0400
Subject: [PATCH] selftest-hello: fix CVE-1234-56789
+This should pass the test_shortlog_format test.
+
CVE: CVE-1234-56789
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../files/0001-Fix-CVE-1234-56789.patch | 27 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb | 6 +++--
- 2 files changed, 31 insertions(+), 2 deletions(-)
+ .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb | 4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
new file mode 100644
-index 0000000000..9219b8db62
+index 00000000000..8a4f9329303
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
+@@ -0,0 +1,26 @@
+From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Tue, 29 Aug 2023 14:08:20 -0400
@@ -35,19 +37,17 @@ index 0000000000..9219b8db62
+index 1788f38..83d7918 100644
+--- a/strlen.c
++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+
-+ printf("%d\n", str_len(string1));
-+ printf("%d\n", str_len(string2));
-++ printf("CVE FIXED!!!\n");
-+
-+ return 0;
-+ }
-+--
-+2.41.0
+
++int main() {
++
++ printf("%d\n", str_len(string1));
++ printf("%d\n", str_len(string2));
++ printf("CVE FIXED!!!\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
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
@@ -3,7 +3,9 @@ SECTION = "examples"
@@ -56,18 +56,11 @@ index 547587bef4..76975a6729 100644
-SRC_URI = "file://helloworld.c"
+SRC_URI = "file://helloworld.c \
-+ file://CVE-1234-56789.patch \
-+ "
-
- S = "${WORKDIR}"
-
-@@ -16,4 +18,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
++ file://0001-Fix-CVE-1234-56789.patch \
++ "
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.fail
index 629e78540b..4ed1242821 100644
--- a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.fail
+++ b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.fail
@@ -1,23 +1,25 @@
-From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
-Subject: [PATCH] selftest-hello: this is a very long commit shortlog with way too many words included in it to pass the test
+Date: Fri, 31 May 2024 09:54:50 -0400
+Subject: [PATCH] selftest-hello: fix CVE-1234-56789 this is a very long commit shortlog with way too many words included in it to pass the test
+
+This should fail the test_shortlong_length test.
CVE: CVE-1234-56789
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../files/0001-Fix-CVE-1234-56789.patch | 27 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb | 6 +++--
- 2 files changed, 31 insertions(+), 2 deletions(-)
+ .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb | 4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
new file mode 100644
-index 0000000000..9219b8db62
+index 00000000000..8a4f9329303
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
+@@ -0,0 +1,26 @@
+From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Tue, 29 Aug 2023 14:08:20 -0400
@@ -35,19 +37,17 @@ index 0000000000..9219b8db62
+index 1788f38..83d7918 100644
+--- a/strlen.c
++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+
-+ printf("%d\n", str_len(string1));
-+ printf("%d\n", str_len(string2));
-++ printf("CVE FIXED!!!\n");
-+
-+ return 0;
-+ }
-+--
-+2.41.0
+
++int main() {
++
++ printf("%d\n", str_len(string1));
++ printf("%d\n", str_len(string2));
++ printf("CVE FIXED!!!\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
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
@@ -3,7 +3,9 @@ SECTION = "examples"
@@ -57,17 +57,10 @@ index 547587bef4..76975a6729 100644
-SRC_URI = "file://helloworld.c"
+SRC_URI = "file://helloworld.c \
+ file://0001-Fix-CVE-1234-56789.patch \
-+ "
-
- S = "${WORKDIR}"
-
-@@ -16,4 +18,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
++ "
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.pass
index ef6017037c..ef5066a650 100644
--- a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.pass
+++ b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.pass
@@ -1,23 +1,25 @@
-From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
+Date: Fri, 31 May 2024 09:54:50 -0400
Subject: [PATCH] selftest-hello: fix CVE-1234-56789
+This should pass the test_shortlog_length test.
+
CVE: CVE-1234-56789
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../files/0001-Fix-CVE-1234-56789.patch | 27 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb | 6 +++--
- 2 files changed, 31 insertions(+), 2 deletions(-)
+ .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb | 4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
new file mode 100644
-index 0000000000..9219b8db62
+index 00000000000..8a4f9329303
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
+@@ -0,0 +1,26 @@
+From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Tue, 29 Aug 2023 14:08:20 -0400
@@ -35,19 +37,17 @@ index 0000000000..9219b8db62
+index 1788f38..83d7918 100644
+--- a/strlen.c
++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+
-+ printf("%d\n", str_len(string1));
-+ printf("%d\n", str_len(string2));
-++ printf("CVE FIXED!!!\n");
-+
-+ return 0;
-+ }
-+--
-+2.41.0
+
++int main() {
++
++ printf("%d\n", str_len(string1));
++ printf("%d\n", str_len(string2));
++ printf("CVE FIXED!!!\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
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
@@ -3,7 +3,9 @@ SECTION = "examples"
@@ -56,18 +56,11 @@ index 547587bef4..76975a6729 100644
-SRC_URI = "file://helloworld.c"
+SRC_URI = "file://helloworld.c \
-+ file://CVE-1234-56789.patch \
-+ "
-
- S = "${WORKDIR}"
-
-@@ -16,4 +18,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
++ file://0001-Fix-CVE-1234-56789.patch \
++ "
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.1.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.1.fail
index 35d92aeed7..4ede7271ee 100644
--- a/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.1.fail
+++ b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.1.fail
@@ -1,22 +1,24 @@
-From 14d72f6973270f78455a8628143f2cff90e8f41e Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
+Date: Fri, 31 May 2024 09:54:50 -0400
Subject: [PATCH] selftest-hello: fix CVE-1234-56789
+This should fail the test_signed_off_by_presence test.
+
CVE: CVE-1234-56789
---
- .../selftest-hello/files/CVE-1234-56789.patch | 27 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb | 6 +++--
- 2 files changed, 31 insertions(+), 2 deletions(-)
- create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
+ .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb | 4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-diff --git a/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
new file mode 100644
-index 0000000000..869cfb6fe5
+index 00000000000..8a4f9329303
--- /dev/null
-+++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,26 @@
+From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Tue, 29 Aug 2023 14:08:20 -0400
@@ -34,18 +36,17 @@ index 0000000000..869cfb6fe5
+index 1788f38..83d7918 100644
+--- a/strlen.c
++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+
-+ printf("%d\n", str_len(string1));
-+ printf("%d\n", str_len(string2));
-++ printf("CVE FIXED!!!\n");
-+
-+ return 0;
-+ }
-+--
-+2.41.0
++
++int main() {
++
++ printf("%d\n", str_len(string1));
++ printf("%d\n", str_len(string2));
++ printf("CVE FIXED!!!\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
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
@@ -3,7 +3,9 @@ SECTION = "examples"
@@ -54,18 +55,11 @@ index 547587bef4..76975a6729 100644
-SRC_URI = "file://helloworld.c"
+SRC_URI = "file://helloworld.c \
-+ file://CVE-1234-56789.patch \
-+ "
-
- S = "${WORKDIR}"
-
-@@ -16,4 +18,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
++ file://0001-Fix-CVE-1234-56789.patch \
++ "
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.2.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.2.fail
index 68f38dee06..f7c3f5145a 100644
--- a/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.2.fail
+++ b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.2.fail
@@ -1,23 +1,25 @@
-From 14d72f6973270f78455a8628143f2cff90e8f41e Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
+Date: Fri, 31 May 2024 09:54:50 -0400
Subject: [PATCH] selftest-hello: fix CVE-1234-56789
+This should fail the test_signed_off_by_presence test.
+
CVE: CVE-1234-56789
-Approved: Trevor Gamblin <tgamblin@baylibre.com>
+Approved-of-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../selftest-hello/files/CVE-1234-56789.patch | 27 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb | 6 +++--
- 2 files changed, 31 insertions(+), 2 deletions(-)
- create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
+ .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb | 4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-diff --git a/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
new file mode 100644
-index 0000000000..869cfb6fe5
+index 00000000000..8a4f9329303
--- /dev/null
-+++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,26 @@
+From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Tue, 29 Aug 2023 14:08:20 -0400
@@ -35,18 +37,17 @@ index 0000000000..869cfb6fe5
+index 1788f38..83d7918 100644
+--- a/strlen.c
++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+
-+ printf("%d\n", str_len(string1));
-+ printf("%d\n", str_len(string2));
-++ printf("CVE FIXED!!!\n");
-+
-+ return 0;
-+ }
-+--
-+2.41.0
++
++int main() {
++
++ printf("%d\n", str_len(string1));
++ printf("%d\n", str_len(string2));
++ printf("CVE FIXED!!!\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
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
@@ -3,7 +3,9 @@ SECTION = "examples"
@@ -55,18 +56,11 @@ index 547587bef4..76975a6729 100644
-SRC_URI = "file://helloworld.c"
+SRC_URI = "file://helloworld.c \
-+ file://CVE-1234-56789.patch \
-+ "
-
- S = "${WORKDIR}"
-
-@@ -16,4 +18,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
++ file://0001-Fix-CVE-1234-56789.patch \
++ "
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.pass
index ea34c76f0d..2661c1416f 100644
--- a/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.pass
+++ b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.pass
@@ -1,23 +1,25 @@
-From 14d72f6973270f78455a8628143f2cff90e8f41e Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
+Date: Fri, 31 May 2024 09:54:50 -0400
Subject: [PATCH] selftest-hello: fix CVE-1234-56789
+This should pass the test_signed_off_by_presence test.
+
CVE: CVE-1234-56789
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../selftest-hello/files/CVE-1234-56789.patch | 27 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb | 6 +++--
- 2 files changed, 31 insertions(+), 2 deletions(-)
- create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
+ .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb | 4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-diff --git a/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
new file mode 100644
-index 0000000000..869cfb6fe5
+index 00000000000..8a4f9329303
--- /dev/null
-+++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,26 @@
+From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Tue, 29 Aug 2023 14:08:20 -0400
@@ -35,18 +37,17 @@ index 0000000000..869cfb6fe5
+index 1788f38..83d7918 100644
+--- a/strlen.c
++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+
-+ printf("%d\n", str_len(string1));
-+ printf("%d\n", str_len(string2));
-++ printf("CVE FIXED!!!\n");
-+
-+ return 0;
-+ }
-+--
-+2.41.0
++
++int main() {
++
++ printf("%d\n", str_len(string1));
++ printf("%d\n", str_len(string2));
++ printf("CVE FIXED!!!\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
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
@@ -3,7 +3,9 @@ SECTION = "examples"
@@ -55,18 +56,11 @@ index 547587bef4..76975a6729 100644
-SRC_URI = "file://helloworld.c"
+SRC_URI = "file://helloworld.c \
-+ file://CVE-1234-56789.patch \
-+ "
-
- S = "${WORKDIR}"
-
-@@ -16,4 +18,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
++ file://0001-Fix-CVE-1234-56789.patch \
++ "
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.fail
index 3574463ade..dccafcd9bc 100644
--- a/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.fail
+++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.fail
@@ -1,30 +1,25 @@
-From c4ca86b9cca3643097db0328e2f34dccffbba309 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Simone=20Wei=C3=9F?= <simone.p.weiss@posteo.com>
-Date: Sat, 10 Feb 2024 13:18:44 +0100
+From 60450eefbc2c438a37c5e08759d021b18f0df0a3 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Fri, 31 May 2024 09:18:17 -0400
Subject: [PATCH] selftest-hello: add CVE_CHECK_IGNORE
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
This should fail the test_cve_tag_format selftest.
-Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
+Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 1 +
+ 1 file changed, 1 insertion(+)
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
-index 547587bef4..3ef9b87c34 100644
+index 2dc352d479e..cc103de6e2e 100644
--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-@@ -16,4 +16,5 @@ do_install() {
+@@ -17,4 +17,5 @@ do_install() {
install -m 0755 helloworld ${D}${bindir}
}
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
+CVE_CHECK_IGNORE = "CVE-2024-12345"
-+BBCLASSEXTEND = "native nativesdk"
+ BBCLASSEXTEND = "native nativesdk"
--
-2.39.2
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.pass
index 10f942a6eb..93a6cc91fb 100644
--- a/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.pass
+++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.pass
@@ -1,31 +1,25 @@
-From 7d4d3fee0c7111830ee9b2b049ae3ce265b26030 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Simone=20Wei=C3=9F?= <simone.p.weiss@posteo.com>
-Date: Sat, 10 Feb 2024 13:23:56 +0100
+From f91073242268d2b2c1a1a705e7fd585679f78a59 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Fri, 31 May 2024 09:18:17 -0400
Subject: [PATCH] selftest-hello: add CVE_STATUS
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
This should pass the test_cve_tag_format selftest.
-Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
+Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
+ meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 1 +
+ 1 file changed, 1 insertion(+)
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
-index 547587bef4..9908b3b417 100644
+index 2dc352d479e..88c5c98608f 100644
--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
-@@ -16,4 +16,6 @@ do_install() {
+@@ -17,4 +17,5 @@ do_install() {
install -m 0755 helloworld ${D}${bindir}
}
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
+CVE_STATUS[CVE-2024-12345] = "not-applicable-platform: Issue only applies on Windows"
-+
-+BBCLASSEXTEND = "native nativesdk"
+ BBCLASSEXTEND = "native nativesdk"
--
-2.39.2
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail
index ab6c52c374..61b3784e3c 100644
--- a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail
+++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail
@@ -1,19 +1,17 @@
-From f89919ea86d38404dd621521680a0162367bb965 Mon Sep 17 00:00:00 2001
+From 974c3a143bc67faaff9abcc0a06a3d5e692fc660 Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Wed, 6 Sep 2023 09:09:27 -0400
+Date: Fri, 31 May 2024 11:51:15 -0400
Subject: [PATCH] selftest-hello: update LIC_FILES_CHKSUM
-This test should fail the
-test_metadata_lic_files_chksum.LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned
-test.
+This should fail the test_lic_files_chksum_modified_not_mentioned test.
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
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
-index 547587bef4..65dda40aba 100644
+index 2dc352d479e..356921db1dd 100644
--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
@@ -1,7 +1,7 @@
@@ -25,13 +23,6 @@ index 547587bef4..65dda40aba 100644
SRC_URI = "file://helloworld.c"
-@@ -16,4 +16,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
-
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass
index 99d9f144da..b7be1e8e55 100644
--- a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass
+++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass
@@ -1,21 +1,19 @@
-From f89919ea86d38404dd621521680a0162367bb965 Mon Sep 17 00:00:00 2001
+From 974c3a143bc67faaff9abcc0a06a3d5e692fc660 Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Wed, 6 Sep 2023 09:09:27 -0400
+Date: Fri, 31 May 2024 11:51:15 -0400
Subject: [PATCH] selftest-hello: update LIC_FILES_CHKSUM
-License-Update: Fix checksum
+This should pass the test_lic_files_chksum_modified_not_mentioned test.
-This test should pass the
-test_metadata_lic_files_chksum.LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned
-test.
+License-Update: Stuff happened!
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
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
-index 547587bef4..65dda40aba 100644
+index 2dc352d479e..356921db1dd 100644
--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
@@ -1,7 +1,7 @@
@@ -27,13 +25,6 @@ index 547587bef4..65dda40aba 100644
SRC_URI = "file://helloworld.c"
-@@ -16,4 +16,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
-
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.fail
index e14d644bb2..a7a0b0bacb 100644
--- a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.fail
+++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.fail
@@ -1,53 +1,42 @@
-From 66430e7c6fbd5187b66560909a510e136fed91c0 Mon Sep 17 00:00:00 2001
-From: Daniela Plascencia <daniela.plascencia@linux.intel.com>
-Date: Thu, 23 Feb 2017 10:34:27 -0600
-Subject: [PATCH] meta: adding hello-yocto recipe
+From 74bc209a4fbe4da2f57e153ccfff3d2241dada8d Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Fri, 31 May 2024 11:03:47 -0400
+Subject: [PATCH] selftest-hello: add selftest-hello-extra
-This is a sample recipe
+This should fail the test_lic_files_chksum_presence test.
-Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com>
+Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../hello-world/hello-world/hello_world.c | 5 +++++
- .../hello-world/hello-world_1.0.bb | 18 ++++++++++++++++++
- 2 files changed, 23 insertions(+)
- create mode 100644 meta/recipes-devtools/hello-world/hello-world/hello_world.c
- create mode 100644 meta/recipes-devtools/hello-world/hello-world_1.0.bb
+ .../selftest-hello-extra_1.0.bb | 20 +++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
-diff --git a/meta/recipes-devtools/hello-world/hello-world/hello_world.c b/meta/recipes-devtools/hello-world/hello-world/hello_world.c
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
new file mode 100644
-index 0000000000..0d59f57d4c
+index 00000000000..875bcbef859
--- /dev/null
-+++ b/meta/recipes-devtools/hello-world/hello-world/hello_world.c
-@@ -0,0 +1,5 @@
-+#include <stdio.h>
-+
-+int main(){
-+ printf("Hello World\n");
-+}
-diff --git a/meta/recipes-devtools/hello-world/hello-world_1.0.bb b/meta/recipes-devtools/hello-world/hello-world_1.0.bb
-new file mode 100644
-index 0000000000..3c990c108a
---- /dev/null
-+++ b/meta/recipes-devtools/hello-world/hello-world_1.0.bb
-@@ -0,0 +1,18 @@
-+SUMMARY = "This is a sample summary"
-+DESCRIPTION = "This is a sample description"
-+HOMEPAGE = "https://sample.com/this-is-a-sample"
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+@@ -0,0 +1,20 @@
++SUMMARY = "This is an example summary"
++DESCRIPTION = "Simple helloworld application -- selftest variant"
++SECTION = "examples"
+LICENSE = "MIT"
+
-+SRC_URI += "file://hello_world.c"
++SRC_URI = "file://helloworld.c"
+
-+SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632"
-+SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e"
++S = "${WORKDIR}/sources"
++UNPACKDIR = "${S}"
+
-+do_compile(){
-+ ${CC} -o hello_world ../hello_world.c
++do_compile() {
++ ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld
+}
+
-+do_install(){
-+ install -d ${D}${bindir}
-+ install -m +x hello_world ${D}${bindir}/hello_world
++do_install() {
++ install -d ${D}${bindir}
++ install -m 0755 helloworld ${D}${bindir}
+}
++
++BBCLASSEXTEND = "native nativesdk"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.pass
index b8da16dfe5..8ffa97ec56 100644
--- a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.pass
+++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.pass
@@ -1,54 +1,43 @@
-From 5144d2ba1aa763312c047dd5f8901368cff79da6 Mon Sep 17 00:00:00 2001
-From: Daniela Plascencia <daniela.plascencia@linux.intel.com>
-Date: Thu, 23 Feb 2017 10:34:27 -0600
-Subject: [PATCH] meta: adding hello-yocto recipe
+From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Fri, 31 May 2024 11:03:47 -0400
+Subject: [PATCH] selftest-hello: add selftest-hello-extra
-This is a sample recipe
+This should pass the test_lic_files_chksum_presence test.
-Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com>
+Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../hello-world/hello-world/hello_world.c | 5 +++++
- .../hello-world/hello-world_1.0.bb | 19 +++++++++++++++++++
- 2 files changed, 24 insertions(+)
- create mode 100644 meta/recipes-devtools/hello-world/hello-world/hello_world.c
- create mode 100644 meta/recipes-devtools/hello-world/hello-world_1.0.bb
+ .../selftest-hello-extra_1.0.bb | 21 +++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
-diff --git a/meta/recipes-devtools/hello-world/hello-world/hello_world.c b/meta/recipes-devtools/hello-world/hello-world/hello_world.c
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
new file mode 100644
-index 0000000000..0d59f57d4c
+index 00000000000..f3dec1b220c
--- /dev/null
-+++ b/meta/recipes-devtools/hello-world/hello-world/hello_world.c
-@@ -0,0 +1,5 @@
-+#include <stdio.h>
-+
-+int main(){
-+ printf("Hello World\n");
-+}
-diff --git a/meta/recipes-devtools/hello-world/hello-world_1.0.bb b/meta/recipes-devtools/hello-world/hello-world_1.0.bb
-new file mode 100644
-index 0000000000..44d888c82a
---- /dev/null
-+++ b/meta/recipes-devtools/hello-world/hello-world_1.0.bb
-@@ -0,0 +1,19 @@
-+SUMMARY = "This is a sample summary"
-+DESCRIPTION = "This is a sample description"
-+HOMEPAGE = "https://sample.com/this-is-a-sample"
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+@@ -0,0 +1,21 @@
++SUMMARY = "This is an example summary"
++DESCRIPTION = "Simple helloworld application -- selftest variant"
++SECTION = "examples"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
-+SRC_URI += "file://hello_world.c"
++SRC_URI = "file://helloworld.c"
+
-+SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632"
-+SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e"
++S = "${WORKDIR}/sources"
++UNPACKDIR = "${S}"
+
-+do_compile(){
-+ ${CC} -o hello_world ../hello_world.c
++do_compile() {
++ ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld
+}
+
-+do_install(){
-+ install -d ${D}${bindir}
-+ install -m +x hello_world ${D}${bindir}/hello_world
++do_install() {
++ install -d ${D}${bindir}
++ install -m 0755 helloworld ${D}${bindir}
+}
++
++BBCLASSEXTEND = "native nativesdk"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.fail
index 983b6e0c2b..0a402d0a3e 100644
--- a/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.fail
+++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.fail
@@ -1,17 +1,17 @@
-From 4ab06b5f81455249cd5e89d2cce9863803b5ecb5 Mon Sep 17 00:00:00 2001
+From f2f7b6bcb831289bc3ba2343ad7dc5bee6d6e0cd Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Fri, 8 Sep 2023 14:41:00 -0400
+Date: Fri, 31 May 2024 08:45:41 -0400
Subject: [PATCH] selftest-hello: remove helloworld.c
This should fail the test_src_uri_left_files selftest.
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
+ meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 2 --
+ 1 file changed, 2 deletions(-)
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
-index 547587bef4..f6817f05bc 100644
+index 2dc352d479e..e95270adaeb 100644
--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
@@ -3,8 +3,6 @@ SECTION = "examples"
@@ -20,16 +20,9 @@ index 547587bef4..f6817f05bc 100644
-SRC_URI = "file://helloworld.c"
-
- S = "${WORKDIR}"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
- do_compile() {
-@@ -16,4 +14,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
-
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.pass
index 1f1a77e581..a675c028d0 100644
--- a/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.pass
+++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.pass
@@ -1,6 +1,6 @@
-From 6c7ac367a873bf827c19b81085c943eace917a99 Mon Sep 17 00:00:00 2001
+From e79933e2fc68570066eca66f0b599d259b7a1731 Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Fri, 8 Sep 2023 14:41:00 -0400
+Date: Fri, 31 May 2024 08:18:48 -0400
Subject: [PATCH] selftest-hello: remove helloworld.c
This should pass the test_src_uri_left_files selftest.
@@ -8,13 +8,13 @@ This should pass the test_src_uri_left_files selftest.
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
.../recipes-test/selftest-hello/files/helloworld.c | 8 --------
- .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 4 +---
- 2 files changed, 1 insertion(+), 11 deletions(-)
+ .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 2 --
+ 2 files changed, 10 deletions(-)
delete mode 100644 meta-selftest/recipes-test/selftest-hello/files/helloworld.c
diff --git a/meta-selftest/recipes-test/selftest-hello/files/helloworld.c b/meta-selftest/recipes-test/selftest-hello/files/helloworld.c
deleted file mode 100644
-index fc7169b7b8..0000000000
+index fc7169b7b83..00000000000
--- a/meta-selftest/recipes-test/selftest-hello/files/helloworld.c
+++ /dev/null
@@ -1,8 +0,0 @@
@@ -27,7 +27,7 @@ index fc7169b7b8..0000000000
- 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
-index 547587bef4..f6817f05bc 100644
+index 2dc352d479e..e95270adaeb 100644
--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
@@ -3,8 +3,6 @@ SECTION = "examples"
@@ -36,16 +36,9 @@ index 547587bef4..f6817f05bc 100644
-SRC_URI = "file://helloworld.c"
-
- S = "${WORKDIR}"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
- do_compile() {
-@@ -16,4 +14,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
-
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.fail
index 2d2b4e683d..1087843619 100644
--- a/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.fail
+++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.fail
@@ -1,46 +1,42 @@
-From e29da5faa74409be394caa09d9f3b7b60f8592b9 Mon Sep 17 00:00:00 2001
-From: Daniela Plascencia <daniela.plascencia@linux.intel.com>
-Date: Thu, 23 Feb 2017 10:34:27 -0600
-Subject: [PATCH] meta: adding hello-yocto recipe
+From f4b72cc24f5e2a290a8637775c4d41c16d5d83aa Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Fri, 31 May 2024 11:03:47 -0400
+Subject: [PATCH] selftest-hello: add selftest-hello-extra
-This is a sample recipe
+This should fail the test_summary_presence test.
-Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com>
+Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- meta/recipes-devtools/hello-world/hello-world/hello_world.c | 5 +++++
- meta/recipes-devtools/hello-world/hello-world_1.0.bb | 12 ++++++++++++
- 2 files changed, 17 insertions(+)
- create mode 100644 meta/recipes-devtools/hello-world/hello-world/hello_world.c
- create mode 100644 meta/recipes-devtools/hello-world/hello-world_1.0.bb
+ .../selftest-hello-extra_1.0.bb | 20 +++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
-diff --git a/meta/recipes-devtools/hello-world/hello-world/hello_world.c b/meta/recipes-devtools/hello-world/hello-world/hello_world.c
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
new file mode 100644
-index 0000000000..0d59f57d4c
+index 00000000000..2dc352d479e
--- /dev/null
-+++ b/meta/recipes-devtools/hello-world/hello-world/hello_world.c
-@@ -0,0 +1,5 @@
-+#include <stdio.h>
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+@@ -0,0 +1,20 @@
++DESCRIPTION = "Simple helloworld application -- selftest variant"
++SECTION = "examples"
++LICENSE = "MIT"
++LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
-+int main(){
-+ printf("Hello World\n");
-+}
-diff --git a/meta/recipes-devtools/hello-world/hello-world_1.0.bb b/meta/recipes-devtools/hello-world/hello-world_1.0.bb
-new file mode 100644
-index 0000000000..c4e1359217
---- /dev/null
-+++ b/meta/recipes-devtools/hello-world/hello-world_1.0.bb
-@@ -0,0 +1,12 @@
-+LICENSE = "CLOSED"
++SRC_URI = "file://helloworld.c"
+
-+SRC_URI += "file://hello_world.c"
++S = "${WORKDIR}/sources"
++UNPACKDIR = "${S}"
+
-+do_compile(){
-+ ${CC} -o hello_world ../hello_world.c
++do_compile() {
++ ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld
+}
+
-+do_install(){
-+ install -d ${D}${bindir}
-+ install -m +x hello_world ${D}${bindir}/hello_world
++do_install() {
++ install -d ${D}${bindir}
++ install -m 0755 helloworld ${D}${bindir}
+}
---
-2.11.0
++
++BBCLASSEXTEND = "native nativesdk"
+--
+2.45.1
+
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.pass
index 55f0309b3f..3d35a8d8fb 100644
--- a/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.pass
+++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.pass
@@ -1,49 +1,43 @@
-From 0cd2fed12ce4b7b071edde12aec4481ad7a6f107 Mon Sep 17 00:00:00 2001
-From: Daniela Plascencia <daniela.plascencia@linux.intel.com>
-Date: Thu, 23 Feb 2017 10:34:27 -0600
-Subject: [PATCH] meta: adding hello-yocto recipe
+From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Fri, 31 May 2024 11:03:47 -0400
+Subject: [PATCH] selftest-hello: add selftest-hello-extra
-This is a sample recipe
+This should pass the test_summary_presence test.
-Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com>
+Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../hello-world/hello-world/hello_world.c | 5 +++++
- meta/recipes-devtools/hello-world/hello-world_1.0.bb | 15 +++++++++++++++
- 2 files changed, 20 insertions(+)
- create mode 100644 meta/recipes-devtools/hello-world/hello-world/hello_world.c
- create mode 100644 meta/recipes-devtools/hello-world/hello-world_1.0.bb
+ .../selftest-hello-extra_1.0.bb | 21 +++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
-diff --git a/meta/recipes-devtools/hello-world/hello-world/hello_world.c b/meta/recipes-devtools/hello-world/hello-world/hello_world.c
+diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
new file mode 100644
-index 0000000000..0d59f57d4c
+index 00000000000..f3dec1b220c
--- /dev/null
-+++ b/meta/recipes-devtools/hello-world/hello-world/hello_world.c
-@@ -0,0 +1,5 @@
-+#include <stdio.h>
++++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb
+@@ -0,0 +1,21 @@
++SUMMARY = "This is an example summary"
++DESCRIPTION = "Simple helloworld application -- selftest variant"
++SECTION = "examples"
++LICENSE = "MIT"
++LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
-+int main(){
-+ printf("Hello World\n");
-+}
-diff --git a/meta/recipes-devtools/hello-world/hello-world_1.0.bb b/meta/recipes-devtools/hello-world/hello-world_1.0.bb
-new file mode 100644
-index 0000000000..c54283eece
---- /dev/null
-+++ b/meta/recipes-devtools/hello-world/hello-world_1.0.bb
-@@ -0,0 +1,15 @@
-+SUMMARY = "This is a sample summary"
-+DESCRIPTION = "This is a sample description"
-+HOMEPAGE = "https://sample.com/this-is-a-sample"
-+LICENSE = "CLOSED"
++SRC_URI = "file://helloworld.c"
+
-+SRC_URI += "file://hello_world.c"
++S = "${WORKDIR}/sources"
++UNPACKDIR = "${S}"
+
-+do_compile(){
-+ ${CC} -o hello_world ../hello_world.c
++do_compile() {
++ ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld
+}
+
-+do_install(){
-+ install -d ${D}${bindir}
-+ install -m +x hello_world ${D}${bindir}/hello_world
++do_install() {
++ install -d ${D}${bindir}
++ install -m 0755 helloworld ${D}${bindir}
+}
---
-2.11.0
++
++BBCLASSEXTEND = "native nativesdk"
+--
+2.45.1
+
diff --git a/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.fail b/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.fail
index c763a7506e..f64f2a40b0 100644
--- a/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.fail
+++ b/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.fail
@@ -1,29 +1,31 @@
-From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
+Date: Fri, 31 May 2024 09:54:50 -0400
Subject: [PATCH] selftest-hello: fix CVE-1234-56789
-CVE: CVE-BAD-FORMAT
+This should fail the test_cve_tag_format test.
+
+CVE: CVE-1234-56789
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../files/0001-Fix-CVE-1234-56789.patch | 27 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb | 6 +++--
- 2 files changed, 31 insertions(+), 2 deletions(-)
+ .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb | 4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
new file mode 100644
-index 0000000000..9219b8db62
+index 00000000000..8a4f9329303
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
+@@ -0,0 +1,26 @@
+From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Tue, 29 Aug 2023 14:08:20 -0400
+Subject: [PATCH] Fix CVE-NOT-REAL
+
-+CVE: CVE-BAD-FORMAT
++CVE: CVE-BAD_FORMAT
+Upstream-Status: Backport(http://example.com/example)
+
+Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
@@ -35,19 +37,17 @@ index 0000000000..9219b8db62
+index 1788f38..83d7918 100644
+--- a/strlen.c
++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+
-+ printf("%d\n", str_len(string1));
-+ printf("%d\n", str_len(string2));
-++ printf("CVE FIXED!!!\n");
-+
-+ return 0;
-+ }
-+--
-+2.41.0
+
++int main() {
++
++ printf("%d\n", str_len(string1));
++ printf("%d\n", str_len(string2));
++ printf("CVE FIXED!!!\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
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
@@ -3,7 +3,9 @@ SECTION = "examples"
@@ -56,18 +56,11 @@ index 547587bef4..76975a6729 100644
-SRC_URI = "file://helloworld.c"
+SRC_URI = "file://helloworld.c \
-+ file://CVE-1234-56789.patch \
-+ "
-
- S = "${WORKDIR}"
-
-@@ -16,4 +18,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
++ file://0001-Fix-CVE-1234-56789.patch \
++ "
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.pass b/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.pass
index ef6017037c..3819487041 100644
--- a/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.pass
+++ b/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.pass
@@ -1,23 +1,25 @@
-From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
+Date: Fri, 31 May 2024 09:54:50 -0400
Subject: [PATCH] selftest-hello: fix CVE-1234-56789
+This should pass the test_cve_tag format test.
+
CVE: CVE-1234-56789
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../files/0001-Fix-CVE-1234-56789.patch | 27 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb | 6 +++--
- 2 files changed, 31 insertions(+), 2 deletions(-)
+ .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb | 4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
new file mode 100644
-index 0000000000..9219b8db62
+index 00000000000..8a4f9329303
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
+@@ -0,0 +1,26 @@
+From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Tue, 29 Aug 2023 14:08:20 -0400
@@ -35,19 +37,17 @@ index 0000000000..9219b8db62
+index 1788f38..83d7918 100644
+--- a/strlen.c
++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+
-+ printf("%d\n", str_len(string1));
-+ printf("%d\n", str_len(string2));
-++ printf("CVE FIXED!!!\n");
-+
-+ return 0;
-+ }
-+--
-+2.41.0
+
++int main() {
++
++ printf("%d\n", str_len(string1));
++ printf("%d\n", str_len(string2));
++ printf("CVE FIXED!!!\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
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
@@ -3,7 +3,9 @@ SECTION = "examples"
@@ -56,18 +56,11 @@ index 547587bef4..76975a6729 100644
-SRC_URI = "file://helloworld.c"
+SRC_URI = "file://helloworld.c \
-+ file://CVE-1234-56789.patch \
-+ "
-
- S = "${WORKDIR}"
-
-@@ -16,4 +18,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
++ file://0001-Fix-CVE-1234-56789.patch \
++ "
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.fail b/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.fail
index ce8bf7b7d1..b2d0fab9e3 100644
--- a/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.fail
+++ b/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.fail
@@ -1,23 +1,25 @@
-From 5a2d0ac780a0f4c046fb1a3c3463d3e726f191cb Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
+Date: Fri, 31 May 2024 09:54:50 -0400
Subject: [PATCH] selftest-hello: fix CVE-1234-56789
+This should fail the test_signed_off_by_presence test.
+
CVE: CVE-1234-56789
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../selftest-hello/files/CVE-1234-56789.patch | 26 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb | 6 +++--
- 2 files changed, 30 insertions(+), 2 deletions(-)
- create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
+ .../files/0001-Fix-CVE-1234-56789.patch | 25 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb | 4 ++-
+ 2 files changed, 28 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-diff --git a/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
new file mode 100644
-index 0000000000..92a5b65a53
+index 00000000000..8a4f9329303
--- /dev/null
-+++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
-@@ -0,0 +1,26 @@
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,25 @@
+From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Tue, 29 Aug 2023 14:08:20 -0400
@@ -34,18 +36,17 @@ index 0000000000..92a5b65a53
+index 1788f38..83d7918 100644
+--- a/strlen.c
++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+
-+ printf("%d\n", str_len(string1));
-+ printf("%d\n", str_len(string2));
-++ printf("CVE FIXED!!!\n");
-+
-+ return 0;
-+ }
-+--
-+2.41.0
++
++int main() {
++
++ printf("%d\n", str_len(string1));
++ printf("%d\n", str_len(string2));
++ printf("CVE FIXED!!!\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
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
@@ -3,7 +3,9 @@ SECTION = "examples"
@@ -54,18 +55,11 @@ index 547587bef4..76975a6729 100644
-SRC_URI = "file://helloworld.c"
+SRC_URI = "file://helloworld.c \
-+ file://CVE-1234-56789.patch \
-+ "
-
- S = "${WORKDIR}"
-
-@@ -16,4 +18,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
++ file://0001-Fix-CVE-1234-56789.patch \
++ "
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.pass b/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.pass
index ea34c76f0d..2661c1416f 100644
--- a/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.pass
+++ b/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.pass
@@ -1,23 +1,25 @@
-From 14d72f6973270f78455a8628143f2cff90e8f41e Mon Sep 17 00:00:00 2001
+From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <tgamblin@baylibre.com>
-Date: Tue, 29 Aug 2023 14:12:27 -0400
+Date: Fri, 31 May 2024 09:54:50 -0400
Subject: [PATCH] selftest-hello: fix CVE-1234-56789
+This should pass the test_signed_off_by_presence test.
+
CVE: CVE-1234-56789
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
- .../selftest-hello/files/CVE-1234-56789.patch | 27 +++++++++++++++++++
- .../selftest-hello/selftest-hello_1.0.bb | 6 +++--
- 2 files changed, 31 insertions(+), 2 deletions(-)
- create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
+ .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++
+ .../selftest-hello/selftest-hello_1.0.bb | 4 ++-
+ 2 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
-diff --git a/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
+diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
new file mode 100644
-index 0000000000..869cfb6fe5
+index 00000000000..8a4f9329303
--- /dev/null
-+++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
++++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch
+@@ -0,0 +1,26 @@
+From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+Date: Tue, 29 Aug 2023 14:08:20 -0400
@@ -35,18 +37,17 @@ index 0000000000..869cfb6fe5
+index 1788f38..83d7918 100644
+--- a/strlen.c
++++ b/strlen.c
-+@@ -8,6 +8,7 @@ int main() {
-+
-+ printf("%d\n", str_len(string1));
-+ printf("%d\n", str_len(string2));
-++ printf("CVE FIXED!!!\n");
-+
-+ return 0;
-+ }
-+--
-+2.41.0
++
++int main() {
++
++ printf("%d\n", str_len(string1));
++ printf("%d\n", str_len(string2));
++ printf("CVE FIXED!!!\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
-index 547587bef4..76975a6729 100644
+index 2dc352d479e..d937759f157 100644
--- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
@@ -3,7 +3,9 @@ SECTION = "examples"
@@ -55,18 +56,11 @@ index 547587bef4..76975a6729 100644
-SRC_URI = "file://helloworld.c"
+SRC_URI = "file://helloworld.c \
-+ file://CVE-1234-56789.patch \
-+ "
-
- S = "${WORKDIR}"
-
-@@ -16,4 +18,4 @@ do_install() {
- install -m 0755 helloworld ${D}${bindir}
- }
++ file://0001-Fix-CVE-1234-56789.patch \
++ "
--BBCLASSEXTEND = "native nativesdk"
-\ No newline at end of file
-+BBCLASSEXTEND = "native nativesdk"
+ S = "${WORKDIR}/sources"
+ UNPACKDIR = "${S}"
--
-2.41.0
+2.45.1
diff --git a/meta/lib/patchtest/utils.py b/meta/lib/patchtest/utils.py
index dd0abc22d9..8eddf3e85f 100644
--- a/meta/lib/patchtest/utils.py
+++ b/meta/lib/patchtest/utils.py
@@ -14,109 +14,6 @@ import logging
import re
import mailbox
-class CmdException(Exception):
- """ Simple exception class where its attributes are the ones passed when instantiated """
- def __init__(self, cmd):
- self._cmd = cmd
- def __getattr__(self, name):
- value = None
- if self._cmd.has_key(name):
- value = self._cmd[name]
- return value
-
-def exec_cmd(cmd, cwd, ignore_error=False, input=None, strip=True, updateenv={}):
- """
- Input:
-
- cmd: dict containing the following keys:
-
- cmd : the command itself as an array of strings
- ignore_error: if False, no exception is raised
- strip: indicates if strip is done on the output (stdout and stderr)
- input: input data to the command (stdin)
- updateenv: environment variables to be appended to the current
- process environment variables
-
- NOTE: keys 'ignore_error' and 'input' are optional; if not included,
- the defaults are the ones specify in the arguments
- cwd: directory where commands are executed
- ignore_error: raise CmdException if command fails to execute and
- this value is False
- input: input data (stdin) for the command
-
- Output: dict containing the following keys:
-
- cmd: the same as input
- ignore_error: the same as input
- strip: the same as input
- input: the same as input
- stdout: Standard output after command's execution
- stderr: Standard error after command's execution
- returncode: Return code after command's execution
-
- """
- cmddefaults = {
- 'cmd':'',
- 'ignore_error':ignore_error,
- 'strip':strip,
- 'input':input,
- 'updateenv':updateenv,
- }
-
- # update input values if necessary
- cmddefaults.update(cmd)
-
- _cmd = cmddefaults
-
- if not _cmd['cmd']:
- raise CmdException({'cmd':None, 'stderr':'no command given'})
-
- # update the environment
- env = os.environ
- env.update(_cmd['updateenv'])
-
- _command = [e for e in _cmd['cmd']]
- p = subprocess.Popen(_command,
- stdin=subprocess.PIPE,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- universal_newlines=True,
- cwd=cwd,
- env=env)
-
- # execute the command and strip output
- (_stdout, _stderr) = p.communicate(_cmd['input'])
- if _cmd['strip']:
- _stdout, _stderr = map(str.strip, [_stdout, _stderr])
-
- # generate the result
- result = _cmd
- result.update({'cmd':_command,'stdout':_stdout,'stderr':_stderr,'returncode':p.returncode})
-
- # launch exception if necessary
- if not _cmd['ignore_error'] and p.returncode:
- raise CmdException(result)
-
- return result
-
-def exec_cmds(cmds, cwd):
- """ Executes commands
-
- Input:
- cmds: Array of commands
- cwd: directory where commands are executed
-
- Output: Array of output commands
- """
- results = []
- _cmds = cmds
-
- for cmd in _cmds:
- result = exec_cmd(cmd, cwd)
- results.append(result)
-
- return results
-
def logger_create(name):
logger = logging.getLogger(name)
loggerhandler = logging.StreamHandler()
@@ -125,20 +22,6 @@ def logger_create(name):
logger.setLevel(logging.INFO)
return logger
-def get_subject_prefix(path):
- prefix = ""
- mbox = mailbox.mbox(path)
-
- if len(mbox):
- subject = mbox[0]['subject']
- if subject:
- pattern = re.compile(r"(\[.*\])", re.DOTALL)
- match = pattern.search(subject)
- if match:
- prefix = match.group(1)
-
- return prefix
-
def valid_branch(branch):
""" Check if branch is valid name """
lbranch = branch.lower()
@@ -153,7 +36,17 @@ def valid_branch(branch):
def get_branch(path):
""" Get the branch name from mbox """
- fullprefix = get_subject_prefix(path)
+ fullprefix = ""
+ mbox = mailbox.mbox(path)
+
+ if len(mbox):
+ subject = mbox[0]['subject']
+ if subject:
+ pattern = re.compile(r"(\[.*\])", re.DOTALL)
+ match = pattern.search(subject)
+ if match:
+ fullprefix = match.group(1)
+
branch, branches, valid_branches = None, [], []
if fullprefix: