Re: Patchtest results for [OE-core][PATCH] patchtest: selftest: fix patch files

2024-05-31 Thread Trevor Gamblin


On 2024-05-31 1:48 p.m., patcht...@automation.yoctoproject.org wrote:

Thank you for your submission. Patchtest identified one
or more issues with the patch. Please see the log below for
more information:

---
Testing patch 
/home/patchtest/share/mboxes/patchtest-selftest-fix-patch-files.patch

FAIL: test non-AUH upgrade: Invalid author a...@auh.yoctoproject.org. Resend 
the series with a valid patch author (test_mbox.TestMbox.test_non_auh_upgrade)
This one can be ignored - the use of the AUH author there is needed for 
the selftest (to ensure it's not AUH on submitted patches :) )


PASS: test Signed-off-by presence 
(test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence 
(test_mbox.TestMbox.test_commit_message_presence)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)

SKIP: pretest pylint: No python related patches, skipping test 
(test_python_pylint.PyLint.pretest_pylint)
SKIP: pretest src uri left files: No modified recipes, skipping pretest 
(test_metadata.TestMetadata.pretest_src_uri_left_files)
SKIP: test CVE check ignore: No modified recipes or older target branch, 
skipping test (test_metadata.TestMetadata.test_cve_check_ignore)
SKIP: test CVE tag format: No new CVE patches introduced 
(test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced 
(test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced 
(test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found 
(test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum modified not mentioned: No modified recipes, 
skipping test 
(test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
SKIP: test lic files chksum presence: No added recipes, skipping test 
(test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test 
(test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test 
(test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now 
(test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test src uri left files: No modified recipes, skipping pretest 
(test_metadata.TestMetadata.test_src_uri_left_files)
SKIP: test summary presence: No added recipes, skipping test 
(test_metadata.TestMetadata.test_summary_presence)
SKIP: test target mailing list: Series merged, no reason to check other mailing 
lists (test_mbox.TestMbox.test_target_mailing_list)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this
email with an explanation of why the patch should be accepted. If you
believe these results are due to an error in patchtest, please submit a
bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category
under 'Yocto Project Subprojects'). For more information on specific
failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank
you!

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#200082): 
https://lists.openembedded.org/g/openembedded-core/message/200082
Mute This Topic: https://lists.openembedded.org/mt/106413197/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] patchtest: selftest: fix patch files

2024-05-31 Thread Trevor Gamblin
From: Trevor Gamblin 

Recent changes to the selftest-hello recipe caused the patchtest
selftest patches to not apply cleanly, which in turn meant several tests
weren't being fully executed or were reporting unexpected PASS/SKIP.

Update all of the test patch files to use a newer baseline and apply
cleanly again.

Signed-off-by: Trevor Gamblin 
---
 .../files/TestMbox.test_author_valid.1.fail   | 57 +++--
 .../files/TestMbox.test_author_valid.1.pass   | 56 +++--
 .../files/TestMbox.test_author_valid.2.fail   | 56 +++--
 .../files/TestMbox.test_author_valid.2.pass   | 56 +++--
 .../TestMbox.test_bugzilla_entry_format.fail  | 73 +
 .../TestMbox.test_bugzilla_entry_format.pass  | 78 +-
 ...TestMbox.test_commit_message_presence.fail | 68 
 ...TestMbox.test_commit_message_presence.pass | 72 +
 .../files/TestMbox.test_mbox_format.1.fail| 36 -
 .../files/TestMbox.test_mbox_format.2.fail| 35 
 .../files/TestMbox.test_mbox_format.fail  | 66 
 .../files/TestMbox.test_mbox_format.pass  | 79 +--
 .../TestMbox.test_series_merge_on_head.1.skip |  2 +-
 .../files/TestMbox.test_shortlog_format.fail  | 53 ++---
 .../files/TestMbox.test_shortlog_format.pass  | 53 ++---
 .../files/TestMbox.test_shortlog_length.fail  | 53 ++---
 .../files/TestMbox.test_shortlog_length.pass  | 53 ++---
 ...estMbox.test_signed_off_by_presence.1.fail | 60 +++---
 ...estMbox.test_signed_off_by_presence.2.fail | 62 +++
 .../TestMbox.test_signed_off_by_presence.pass | 60 +++---
 .../TestMetadata.test_cve_check_ignore.fail   | 25 +++---
 .../TestMetadata.test_cve_check_ignore.pass   | 26 +++---
 ...c_files_chksum_modified_not_mentioned.fail | 23 ++
 ...c_files_chksum_modified_not_mentioned.pass | 25 ++
 ...tadata.test_lic_files_chksum_presence.fail | 65 +++
 ...tadata.test_lic_files_chksum_presence.pass | 65 +++
 .../TestMetadata.test_src_uri_left_files.fail | 23 ++
 .../TestMetadata.test_src_uri_left_files.pass | 25 +++---
 .../TestMetadata.test_summary_presence.fail   | 64 +++
 .../TestMetadata.test_summary_presence.pass   | 68 
 .../files/TestPatch.test_cve_tag_format.fail  | 57 ++---
 .../files/TestPatch.test_cve_tag_format.pass  | 53 ++---
 ...TestPatch.test_signed_off_by_presence.fail | 60 +++---
 ...TestPatch.test_signed_off_by_presence.pass | 60 +++---
 34 files changed, 930 insertions(+), 837 deletions(-)
 delete mode 100644 
meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.1.fail
 delete mode 100644 
meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.2.fail
 create mode 100644 
meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.fail

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 0c40cdc1b6b..30c1bc4624b 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 
-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 
 ---
- .../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 

[OE-core][PATCH 03/10] python3-pytest: upgrade 8.2.0 -> 8.2.1

2024-05-21 Thread Trevor Gamblin
Changelog: 
https://docs.pytest.org/en/stable/changelog.html#pytest-8-2-1-2024-05-19

- Improvements
#12334: Support for Python 3.13 (beta1 at the time of writing).
- Bug Fixes
#12120: Fix PermissionError crashes arising from directories which are not
selected on the command-line.
#12191: Keyboard interrupts and system exits are now properly handled during
the test collection.
#12300: Fixed handling of ‘Function not implemented’ error under 
squashfuse_ll,
which is a different way to say that the mountpoint is read-only.
#12308: Fix a regression in pytest 8.2.0 where the permissions of
automatically-created .pytest_cache directories became rwx-- 
instead
of the expected rwxr-xr-x.
- Trivial/Internal Changes
#12333: pytest releases are now attested using the recent Artifact 
Attestation

<https://github.blog/2024-05-02-introducing-artifact-attestations-now-in-public-beta/>
support from GitHub, allowing users to verify the provenance of 
pytest’s
sdist and wheel artifacts.

Signed-off-by: Trevor Gamblin 
---
 .../python/{python3-pytest_8.2.0.bb => python3-pytest_8.2.1.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-devtools/python/{python3-pytest_8.2.0.bb => 
python3-pytest_8.2.1.bb} (92%)

diff --git a/meta/recipes-devtools/python/python3-pytest_8.2.0.bb 
b/meta/recipes-devtools/python/python3-pytest_8.2.1.bb
similarity index 92%
rename from meta/recipes-devtools/python/python3-pytest_8.2.0.bb
rename to meta/recipes-devtools/python/python3-pytest_8.2.1.bb
index 1e6674079ff..28dbe786f80 100644
--- a/meta/recipes-devtools/python/python3-pytest_8.2.0.bb
+++ b/meta/recipes-devtools/python/python3-pytest_8.2.1.bb
@@ -5,7 +5,7 @@ DESCRIPTION = "The pytest framework makes it easy to write 
small tests, yet scal
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=bd27e41b6550fe0fc45356d1d81ee37c"
 
-SRC_URI[sha256sum] = 
"d507d4482197eac0ba2bae2e9babf0672eb333017bcedaa5fb1a3d42c1174b3f"
+SRC_URI[sha256sum] = 
"5046e5b46d8e4cac199c373041f26be56fdb81eb4e67dc11d4e10811fc3408fd"
 
 DEPENDS += "python3-setuptools-scm-native"
 
-- 
2.45.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#199659): 
https://lists.openembedded.org/g/openembedded-core/message/199659
Mute This Topic: https://lists.openembedded.org/mt/106227239/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 10/10] maintainers.inc: transfer some python recipes to tgamblin

2024-05-21 Thread Trevor Gamblin
Change maintainer for the following recipes to tgamblin:

python3-hypothesis
python3-pygments
python3-pytest
python3-referencing
python3-pyproject-metadata
python3-setuptools-scm
python3-sphinx

Signed-off-by: Trevor Gamblin 
---
 meta/conf/distro/include/maintainers.inc | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/meta/conf/distro/include/maintainers.inc 
b/meta/conf/distro/include/maintainers.inc
index aab53c22eb8..2124f3e7ec6 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -627,7 +627,7 @@ RECIPE_MAINTAINER:pn-python3-dtschema-wrapper = "Bruce 
Ashfield 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#199666): 
https://lists.openembedded.org/g/openembedded-core/message/199666
Mute This Topic: https://lists.openembedded.org/mt/106227247/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 09/10] python3-trove-classifiers: upgrade 2024.4.10 -> 2024.5.17

2024-05-21 Thread Trevor Gamblin
PYPI_PACKAGE is added since the upstream now uses an underscore in the
package name.

Changelog (https://github.com/pypa/trove-classifiers/releases):

- Add Trove classifier for Python 3.14 (#178)

Signed-off-by: Trevor Gamblin 
---
 ...rs_2024.4.10.bb => python3-trove-classifiers_2024.5.17.bb} | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
 rename meta/recipes-devtools/python/{python3-trove-classifiers_2024.4.10.bb => 
python3-trove-classifiers_2024.5.17.bb} (82%)

diff --git 
a/meta/recipes-devtools/python/python3-trove-classifiers_2024.4.10.bb 
b/meta/recipes-devtools/python/python3-trove-classifiers_2024.5.17.bb
similarity index 82%
rename from meta/recipes-devtools/python/python3-trove-classifiers_2024.4.10.bb
rename to meta/recipes-devtools/python/python3-trove-classifiers_2024.5.17.bb
index 357b4289832..94c48ed102a 100644
--- a/meta/recipes-devtools/python/python3-trove-classifiers_2024.4.10.bb
+++ b/meta/recipes-devtools/python/python3-trove-classifiers_2024.5.17.bb
@@ -3,7 +3,9 @@ HOMEPAGE = "https://github.com/pypa/trove-classifiers;
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
 
-SRC_URI[sha256sum] = 
"49f40bb6a746b72a1cba4f8d55ee8252169cda0f70802e3fd24f04b7fb25a492"
+SRC_URI[sha256sum] = 
"d47a6f1c48803091c3fc81f535fecfeef65b558f2b9e4e83df7a79d17bce8bbf"
+
+PYPI_PACKAGE = "trove_classifiers"
 
 inherit pypi python_setuptools_build_meta ptest
 
-- 
2.45.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#199665): 
https://lists.openembedded.org/g/openembedded-core/message/199665
Mute This Topic: https://lists.openembedded.org/mt/106227246/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 08/10] python3-sphinx: upgrade 7.2.6 -> 7.3.7

2024-05-21 Thread Trevor Gamblin
License-Update: Update copyright year, add .rst extension

There are many changes brought in by this uprev, in particular with the
major release 7.3.0, which contains many bugfixes and new features. Changelog:
https://www.sphinx-doc.org/en/master/changes.html#release-7-3-7-released-apr-19-2024

Signed-off-by: Trevor Gamblin 
---
 .../{python3-sphinx_7.2.6.bb => python3-sphinx_7.3.7.bb}  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-devtools/python/{python3-sphinx_7.2.6.bb => 
python3-sphinx_7.3.7.bb} (84%)

diff --git a/meta/recipes-devtools/python/python3-sphinx_7.2.6.bb 
b/meta/recipes-devtools/python/python3-sphinx_7.3.7.bb
similarity index 84%
rename from meta/recipes-devtools/python/python3-sphinx_7.2.6.bb
rename to meta/recipes-devtools/python/python3-sphinx_7.3.7.bb
index f4ed0720ff6..a1cae2abc00 100644
--- a/meta/recipes-devtools/python/python3-sphinx_7.2.6.bb
+++ b/meta/recipes-devtools/python/python3-sphinx_7.3.7.bb
@@ -2,9 +2,9 @@ SUMMARY = "Python documentation generator"
 HOMEPAGE = "http://sphinx-doc.org/;
 SECTION = "devel/python"
 LICENSE = "BSD-2-Clause & MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=5eb6ac1b115a1ed24a12d9f15b633993"
+LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=b6c681698874edd2eb9eaff7cc9de642"
 
-SRC_URI[sha256sum] = 
"9a5160e1ea90688d5963ba09a2dcd8bdd526620edbb65c328728f1b2228d5ab5"
+SRC_URI[sha256sum] = 
"a4a7db75ed37531c05002d56ed6948d4c42f473a36f46e1382b0bd76ca9627bc"
 
 inherit python_flit_core pypi
 UPSTREAM_CHECK_REGEX = "/Sphinx/(?P(\d+[\.\-_]*)+)/"
-- 
2.45.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#199664): 
https://lists.openembedded.org/g/openembedded-core/message/199664
Mute This Topic: https://lists.openembedded.org/mt/106227245/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 06/10] python3-pyproject-metadata: upgrade 0.7.1 -> 0.8.0

2024-05-21 Thread Trevor Gamblin
PYPI_PACKAGE is updated since the upstream now uses an underscore in the
package name.

Changelog (https://pep621.readthedocs.io/en/stable/changelog.html#id1):

  - Support specifying the metadata_version as 2.1, 2.2, or 2.3
  - Always normalize extras following PEP 685
  - Preserve the user-specified name style in the metadata. .canonical_name 
added to get the normalized name
  - Require “version” in the dynamic table if unset (following PEP 621)
  - Support extras using markers containing “or”
  - Support empty extras
  - Using .as_rfc822() no longer modifies the metadata object
  - Fix email-author listing for names containing commas
  - Separate core metadata keywords with commas, following the (modified) spec
  - An error message reported project.license instead of project.readme
  - Produce slightly cleaner tracebacks Fix a typo in an exception message
  - Subclasses now type check correctly
  - The build backend is now flit-core

Signed-off-by: Trevor Gamblin 
---
 ...-metadata_0.7.1.bb => python3-pyproject-metadata_0.8.0.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-devtools/python/{python3-pyproject-metadata_0.7.1.bb => 
python3-pyproject-metadata_0.8.0.bb} (85%)

diff --git a/meta/recipes-devtools/python/python3-pyproject-metadata_0.7.1.bb 
b/meta/recipes-devtools/python/python3-pyproject-metadata_0.8.0.bb
similarity index 85%
rename from meta/recipes-devtools/python/python3-pyproject-metadata_0.7.1.bb
rename to meta/recipes-devtools/python/python3-pyproject-metadata_0.8.0.bb
index 8b9549f3d07..8d00826f86c 100644
--- a/meta/recipes-devtools/python/python3-pyproject-metadata_0.7.1.bb
+++ b/meta/recipes-devtools/python/python3-pyproject-metadata_0.8.0.bb
@@ -12,11 +12,11 @@ HOMEPAGE = 
"https://github.com/FFY00/python-pyproject-metadata;
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=310439af287b0fb4780b2ad6907c256c"
 
-PYPI_PACKAGE = "pyproject-metadata"
+PYPI_PACKAGE = "pyproject_metadata"
 
 inherit pypi python_setuptools_build_meta
 
-SRC_URI[sha256sum] = 
"0a94f18b108b9b21f3a26a3d541f056c34edcb17dc872a144a15618fed7aef67"
+SRC_URI[sha256sum] = 
"376d5a00764ac29440a54579f88e66b7d9cb7e629d35c35a1c7248bfebc9b455"
 
 RDEPENDS:${PN} += " \
 python3-logging \
-- 
2.45.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#199662): 
https://lists.openembedded.org/g/openembedded-core/message/199662
Mute This Topic: https://lists.openembedded.org/mt/106227243/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 07/10] python3-setuptools-scm: upgrade 8.0.4 -> 8.1.0

2024-05-21 Thread Trevor Gamblin
PYPI_PACKAGE is updated since the upstream now uses an underscore in the
package name.

Changelog: https://github.com/pypa/setuptools_scm/releases/tag/v8.1.0

Signed-off-by: Trevor Gamblin 
---
 ...etuptools-scm_8.0.4.bb => python3-setuptools-scm_8.1.0.bb} | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
 rename meta/recipes-devtools/python/{python3-setuptools-scm_8.0.4.bb => 
python3-setuptools-scm_8.1.0.bb} (87%)

diff --git a/meta/recipes-devtools/python/python3-setuptools-scm_8.0.4.bb 
b/meta/recipes-devtools/python/python3-setuptools-scm_8.1.0.bb
similarity index 87%
rename from meta/recipes-devtools/python/python3-setuptools-scm_8.0.4.bb
rename to meta/recipes-devtools/python/python3-setuptools-scm_8.1.0.bb
index 64b5050c3b3..ea65b476fcd 100644
--- a/meta/recipes-devtools/python/python3-setuptools-scm_8.0.4.bb
+++ b/meta/recipes-devtools/python/python3-setuptools-scm_8.1.0.bb
@@ -6,7 +6,9 @@ argument or in a SCM managed file."
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=838c366f69b72c5df05c96dff79b35f2"
 
-SRC_URI[sha256sum] = 
"b5f43ff6800669595193fd09891564ee9d1d7dcb196cab4b2506d53a2e1c95c7"
+SRC_URI[sha256sum] = 
"42dea1b65771cba93b7a515d65a65d8246e560768a66b9106a592c8e7f26c8a7"
+
+PYPI_PACKAGE = "setuptools_scm"
 
 inherit pypi python_setuptools_build_meta
 
-- 
2.45.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#199663): 
https://lists.openembedded.org/g/openembedded-core/message/199663
Mute This Topic: https://lists.openembedded.org/mt/106227244/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 05/10] python3-requests: upgrade 2.31.0 -> 2.32.1

2024-05-21 Thread Trevor Gamblin
Also transition to using python_setuptools_build_meta.

Changelog: 
https://requests.readthedocs.io/en/latest/community/updates/#release-history

Signed-off-by: Trevor Gamblin 
---
 ...{python3-requests_2.31.0.bb => python3-requests_2.32.1.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-devtools/python/{python3-requests_2.31.0.bb => 
python3-requests_2.32.1.bb} (79%)

diff --git a/meta/recipes-devtools/python/python3-requests_2.31.0.bb 
b/meta/recipes-devtools/python/python3-requests_2.32.1.bb
similarity index 79%
rename from meta/recipes-devtools/python/python3-requests_2.31.0.bb
rename to meta/recipes-devtools/python/python3-requests_2.32.1.bb
index df48cd54c3d..e0295313ee6 100644
--- a/meta/recipes-devtools/python/python3-requests_2.31.0.bb
+++ b/meta/recipes-devtools/python/python3-requests_2.32.1.bb
@@ -3,9 +3,9 @@ HOMEPAGE = "http://python-requests.org;
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658"
 
-SRC_URI[sha256sum] = 
"942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"
+SRC_URI[sha256sum] = 
"eb97e87e64c79e64e5b8ac75cee9dd1f97f49e289b083ee6be96268930725685"
 
-inherit pypi setuptools3
+inherit pypi python_setuptools_build_meta
 
 RDEPENDS:${PN} += " \
 python3-email \
-- 
2.45.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#199661): 
https://lists.openembedded.org/g/openembedded-core/message/199661
Mute This Topic: https://lists.openembedded.org/mt/106227242/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 01/10] python3-hypothesis: upgrade 6.100.1 -> 6.102.4

2024-05-21 Thread Trevor Gamblin
Changelog: https://hypothesis.readthedocs.io/en/latest/changes.html

Signed-off-by: Trevor Gamblin 
---
 ...hon3-hypothesis_6.100.1.bb => python3-hypothesis_6.102.4.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-devtools/python/{python3-hypothesis_6.100.1.bb => 
python3-hypothesis_6.102.4.bb} (91%)

diff --git a/meta/recipes-devtools/python/python3-hypothesis_6.100.1.bb 
b/meta/recipes-devtools/python/python3-hypothesis_6.102.4.bb
similarity index 91%
rename from meta/recipes-devtools/python/python3-hypothesis_6.100.1.bb
rename to meta/recipes-devtools/python/python3-hypothesis_6.102.4.bb
index a689be9a1aa..ec43514d41a 100644
--- a/meta/recipes-devtools/python/python3-hypothesis_6.100.1.bb
+++ b/meta/recipes-devtools/python/python3-hypothesis_6.102.4.bb
@@ -13,7 +13,7 @@ SRC_URI += " \
 file://test_rle.py \
 "
 
-SRC_URI[sha256sum] = 
"ebff09d7fa4f1fb6a855a812baf17e578b4481b7b70ec6d96496210d1a4c6c35"
+SRC_URI[sha256sum] = 
"59b4d144346d5cffb482cc1bafbd21b13ff31608e8c4b3e4630339aee3e87763"
 
 RDEPENDS:${PN} += " \
 python3-attrs \
-- 
2.45.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#199657): 
https://lists.openembedded.org/g/openembedded-core/message/199657
Mute This Topic: https://lists.openembedded.org/mt/106227237/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 02/10] python3-pygments: upgrade 2.17.2 -> 2.18.0

2024-05-21 Thread Trevor Gamblin
2.18.0 offers new/updated lexers and various other improvements.
Changelog:

https://pygments.org/docs/changelog/

Signed-off-by: Trevor Gamblin 
---
 .../{python3-pygments_2.17.2.bb => python3-pygments_2.18.0.bb}  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-devtools/python/{python3-pygments_2.17.2.bb => 
python3-pygments_2.18.0.bb} (81%)

diff --git a/meta/recipes-devtools/python/python3-pygments_2.17.2.bb 
b/meta/recipes-devtools/python/python3-pygments_2.18.0.bb
similarity index 81%
rename from meta/recipes-devtools/python/python3-pygments_2.17.2.bb
rename to meta/recipes-devtools/python/python3-pygments_2.18.0.bb
index 8b98064b784..fd373656810 100644
--- a/meta/recipes-devtools/python/python3-pygments_2.17.2.bb
+++ b/meta/recipes-devtools/python/python3-pygments_2.18.0.bb
@@ -5,7 +5,7 @@ LICENSE = "BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=36a13c90514e2899f1eba7f41c3ee592"
 
 inherit python_hatchling
-SRC_URI[sha256sum] = 
"da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367"
+SRC_URI[sha256sum] = 
"786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"
 
 UPSTREAM_CHECK_PYPI_PACKAGE = "Pygments"
 inherit pypi
-- 
2.45.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#199658): 
https://lists.openembedded.org/g/openembedded-core/message/199658
Mute This Topic: https://lists.openembedded.org/mt/106227238/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 04/10] python3-referencing: upgrade 0.34.0 -> 0.35.1

2024-05-21 Thread Trevor Gamblin
Changelog: https://referencing.readthedocs.io/en/stable/changes/#v0-35-1

- Ensure that Registry.contents() also raises NoSuchResource exceptions
  for nonexistent resources, not KeyError (which is an implementation
  detail).

Signed-off-by: Trevor Gamblin 
---
 ...hon3-referencing_0.34.0.bb => python3-referencing_0.35.1.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-devtools/python/{python3-referencing_0.34.0.bb => 
python3-referencing_0.35.1.bb} (81%)

diff --git a/meta/recipes-devtools/python/python3-referencing_0.34.0.bb 
b/meta/recipes-devtools/python/python3-referencing_0.35.1.bb
similarity index 81%
rename from meta/recipes-devtools/python/python3-referencing_0.34.0.bb
rename to meta/recipes-devtools/python/python3-referencing_0.35.1.bb
index 6fbd10d9cf8..3e2a3806071 100644
--- a/meta/recipes-devtools/python/python3-referencing_0.34.0.bb
+++ b/meta/recipes-devtools/python/python3-referencing_0.35.1.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/python-jsonschema/referencing;
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=93eb9740964b59e9ba30281255b044e2"
 
-SRC_URI[sha256sum] = 
"5773bd84ef41799a5a8ca72dc34590c041eb01bf9aa02632b4a973fb0181a844"
+SRC_URI[sha256sum] = 
"25b42124a6c8b632a425174f24087783efb348a6f1e0008e63cd4466fedf703c"
 
 inherit pypi python_hatchling
 
-- 
2.45.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#199660): 
https://lists.openembedded.org/g/openembedded-core/message/199660
Mute This Topic: https://lists.openembedded.org/mt/106227240/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] python3: skip test_concurrent_futures/test_shutdown

2024-05-08 Thread Trevor Gamblin
These tests are causing hangs on the Autobuilder, so disable them for
now.

Signed-off-by: Trevor Gamblin 
---
 ...-test_shutdown-skip-problematic-test.patch | 46 +++
 .../recipes-devtools/python/python3_3.12.3.bb |  1 +
 2 files changed, 47 insertions(+)
 create mode 100644 
meta/recipes-devtools/python/python3/0001-test_shutdown-skip-problematic-test.patch

diff --git 
a/meta/recipes-devtools/python/python3/0001-test_shutdown-skip-problematic-test.patch
 
b/meta/recipes-devtools/python/python3/0001-test_shutdown-skip-problematic-test.patch
new file mode 100644
index 000..1d4cda18b16
--- /dev/null
+++ 
b/meta/recipes-devtools/python/python3/0001-test_shutdown-skip-problematic-test.patch
@@ -0,0 +1,46 @@
+From 9d4cdbde100798ba9fa1cf3f82dbaf18fd10a543 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin 
+Date: Wed, 8 May 2024 11:58:09 -0400
+Subject: [PATCH] test_shutdown: skip problematic test
+
+This test hangs frequently when run on the Autobuilder. Disable it in
+testing until the cause can be determined.
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Trevor Gamblin 
+---
+ Lib/test/test_concurrent_futures/test_shutdown.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/Lib/test/test_concurrent_futures/test_shutdown.py 
b/Lib/test/test_concurrent_futures/test_shutdown.py
+index 7a4065afd4..6b878a48bf 100644
+--- a/Lib/test/test_concurrent_futures/test_shutdown.py
 b/Lib/test/test_concurrent_futures/test_shutdown.py
+@@ -20,6 +20,7 @@ def sleep_and_print(t, msg):
+ sys.stdout.flush()
+ 
+ 
++@unittest.skip("skipping problematic test")
+ class ExecutorShutdownTest:
+ def test_run_after_shutdown(self):
+ self.executor.shutdown()
+@@ -156,6 +157,7 @@ def timeout(_signum, _frame):
+ signal.signal(signal.SIGALRM, old_handler)
+ 
+ 
++@unittest.skip("skipping problematic test")
+ class ThreadPoolShutdownTest(ThreadPoolMixin, ExecutorShutdownTest, 
BaseTestCase):
+ def test_threads_terminate(self):
+ def acquire_lock(lock):
+@@ -252,6 +254,7 @@ def test_cancel_futures_wait_false(self):
+ self.assertIn(out.strip(), [b"apple", b""])
+ 
+ 
++@unittest.skip("skipping problematic test")
+ class ProcessPoolShutdownTest(ExecutorShutdownTest):
+ def test_processes_terminate(self):
+ def acquire_lock(lock):
+-- 
+2.45.0
+
diff --git a/meta/recipes-devtools/python/python3_3.12.3.bb 
b/meta/recipes-devtools/python/python3_3.12.3.bb
index 04558a64634..93709b207ce 100644
--- a/meta/recipes-devtools/python/python3_3.12.3.bb
+++ b/meta/recipes-devtools/python/python3_3.12.3.bb
@@ -30,6 +30,7 @@ SRC_URI = 
"http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \

file://0001-skip-no_stdout_fileno-test-due-to-load-variability.patch \
file://0001-test_storlines-skip-due-to-load-variability.patch \

file://0001-gh-114492-Initialize-struct-termios-before-calling-t.patch \
+   file://0001-test_shutdown-skip-problematic-test.patch \
"
 
 SRC_URI:append:class-native = " \
-- 
2.45.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#199129): 
https://lists.openembedded.org/g/openembedded-core/message/199129
Mute This Topic: https://lists.openembedded.org/mt/105985483/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 3/4] patchtest: tests: update bugzilla_entry_format.fail testfile

2024-05-03 Thread Trevor Gamblin
Update the test file to target a more stable README file.

Signed-off-by: Trevor Gamblin 
---
 .../TestMbox.test_bugzilla_entry_format.fail  | 25 ++-
 1 file changed, 13 insertions(+), 12 deletions(-)

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 80f409e952b..854d7eb8c7d 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,26 @@
-From fdfd605e565d874502522c4b70b786c8c5aa0bad Mon Sep 17 00:00:00 2001
+From f06e14633723c1e78bc7a4b0fd0d3b79d09f0c68 Mon Sep 17 00:00:00 2001
 From: n...@somedomain.com 
-Date: Fri, 17 Feb 2017 16:29:21 -0600
-Subject: [PATCH] README: adds 'foo' to the header
+Date: Thu, 2 May 2024 10:21:45 -0400
+Subject: [PATCH] README.OE-Core.md: Add foo to header
 
-This test patch adds 'foo' to the header
+This test patch adds 'foo' to the header of README.OE-Core.md
 
 [YOCTO 1234]
 
-Signed-off-by: Daniela Plascencia 
+Signed-off-by: Trevor Gamblin 
 ---
- README | 1 +
+ README.OE-Core.md | 1 +
  1 file changed, 1 insertion(+)
 
-diff --git a/README b/README
-index 521916cd4f..cdf29dcea3 100644
 a/README
-+++ b/README
+diff --git a/README.OE-Core.md b/README.OE-Core.md
+index 687c58e410c..9d863891134 100644
+--- a/README.OE-Core.md
 b/README.OE-Core.md
 @@ -1,3 +1,4 @@
 + FOO 
  OpenEmbedded-Core
  =
+ 
+-- 
+2.44.0
 
---
-2.11.0
-- 
2.44.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198988): 
https://lists.openembedded.org/g/openembedded-core/message/198988
Mute This Topic: https://lists.openembedded.org/mt/105887451/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 4/4] patchtest: utils: remove unused functions

2024-05-03 Thread Trevor Gamblin
Specifically, remove four things:

- get_subject_prefix(): This function is only being used once (in the next
function found in the module), so remove it for easier
comprehension/maintenance.
- exec_cmd: the backend for executing a custom command
- exec_cmds: for running multiple calls to exec_cmd
- CmdException: A custom exception class specifically for exec_cmd

These are only used to execute git commands, but GitPython can be used
to handle all of that more efficiently, so remove them.

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/utils.py | 129 +++-
 1 file changed, 11 insertions(+), 118 deletions(-)

diff --git a/meta/lib/patchtest/utils.py b/meta/lib/patchtest/utils.py
index dd0abc22d9b..8eddf3e85fb 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 val

[OE-core][PATCH 1/4] patchtest: requirements.txt: add GitPython

2024-05-03 Thread Trevor Gamblin
GitPython provides some simple utilities for retrieving repo
configurations that can replace the manual work that patchtest currently
does. Add it to the requirements so that the source can make use of it.

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/requirements.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/lib/patchtest/requirements.txt 
b/meta/lib/patchtest/requirements.txt
index ba55ff905e2..4247b91f094 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
-- 
2.44.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198986): 
https://lists.openembedded.org/g/openembedded-core/message/198986
Mute This Topic: https://lists.openembedded.org/mt/105887449/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 0/4] patchtest: refactor and simplify, part 1

2024-05-03 Thread Trevor Gamblin
This series is the preliminary step in what is intended to be a larger
refactor of the patchtest codebase. It consists mainly of the removal of
a custom _exec() function and underlying supports in favor of the
GitPython module's built-in capabilities and .execute() method for
interacting with a git repo. This functionality is critical for
patchtest to match patches to correct branches and setup temporary ones
for testing; the changes here allow it to rely on a purpose-built set of
utilities in GitPython while reducing the amount of patchtest-specific
code to maintain. There are also a couple of other minor changes to
remove unused/minimally-used code and to modify one test case to test
against a different file for stability (README-OE-Core.md instead of
README).

Selftest results:

XFAIL: TestMbox.test_bugzilla_entry_format (file: 
TestMbox.test_bugzilla_entry_format.fail)
XPASS: TestMetadata.test_summary_presence (file: 
TestMetadata.test_summary_presence.pass)
XFAIL: TestMbox.test_mbox_format (file: TestMbox.test_mbox_format.1.fail)
XFAIL: TestMetadata.test_src_uri_left_files (file: 
TestMetadata.test_src_uri_left_files.fail)
XSKIP: TestMbox.test_series_merge_on_head (file: 
TestMbox.test_series_merge_on_head.2.skip)
XPASS: TestMbox.test_commit_message_presence (file: 
TestMbox.test_commit_message_presence.pass)
XFAIL: TestMbox.test_commit_message_presence (file: 
TestMbox.test_commit_message_presence.fail)
XPASS: TestMbox.test_signed_off_by_presence (file: 
TestMbox.test_signed_off_by_presence.pass)
XFAIL: TestMetadata.test_cve_check_ignore (file: 
TestMetadata.test_cve_check_ignore.fail)
XFAIL: TestPatch.test_cve_tag_format (file: TestPatch.test_cve_tag_format.fail)
XFAIL: TestMbox.test_author_valid (file: TestMbox.test_author_valid.1.fail)
XFAIL: TestMbox.test_shortlog_length (file: TestMbox.test_shortlog_length.fail)
XPASS: TestMbox.test_mbox_format (file: TestMbox.test_mbox_format.pass)
XFAIL: TestPatch.test_signed_off_by_presence (file: 
TestPatch.test_signed_off_by_presence.fail)
XFAIL: TestMbox.test_shortlog_format (file: TestMbox.test_shortlog_format.fail)
XFAIL: TestMbox.test_mbox_format (file: TestMbox.test_mbox_format.2.fail)
XPASS: TestPatch.test_cve_tag_format (file: TestPatch.test_cve_tag_format.pass)
XSKIP: TestMbox.test_series_merge_on_head (file: 
TestMbox.test_series_merge_on_head.1.skip)
XPASS: TestMbox.test_author_valid (file: TestMbox.test_author_valid.2.pass)
XPASS: TestMetadata.test_lic_files_chksum_modified_not_mentioned (file: 
TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass)
XPASS: TestMbox.test_bugzilla_entry_format (file: 
TestMbox.test_bugzilla_entry_format.pass)
XPASS: TestMetadata.test_src_uri_left_files (file: 
TestMetadata.test_src_uri_left_files.pass)
XPASS: TestMetadata.test_lic_files_chksum_presence (file: 
TestMetadata.test_lic_files_chksum_presence.pass)
XFAIL: TestMbox.test_signed_off_by_presence (file: 
TestMbox.test_signed_off_by_presence.2.fail)
XFAIL: TestMbox.test_author_valid (file: TestMbox.test_author_valid.2.fail)
XFAIL: TestMetadata.test_lic_files_chksum_presence (file: 
TestMetadata.test_lic_files_chksum_presence.fail)
XPASS: TestMbox.test_shortlog_format (file: TestMbox.test_shortlog_format.pass)
XPASS: TestMbox.test_author_valid (file: TestMbox.test_author_valid.1.pass)
XPASS: TestPatch.test_signed_off_by_presence (file: 
TestPatch.test_signed_off_by_presence.pass)
XFAIL: TestMetadata.test_lic_files_chksum_modified_not_mentioned (file: 
TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail)
XPASS: TestMbox.test_shortlog_length (file: TestMbox.test_shortlog_length.pass)
XPASS: TestMetadata.test_cve_check_ignore (file: 
TestMetadata.test_cve_check_ignore.pass)
XFAIL: TestMbox.test_signed_off_by_presence (file: 
TestMbox.test_signed_off_by_presence.1.fail)
XFAIL: TestMetadata.test_summary_presence (file: 
TestMetadata.test_summary_presence.fail)

Testsuite summary for patchtest

# TOTAL: 34
# XPASS: 15
# XFAIL: 17
# XSKIP: 2
# PASS: 0
# FAIL: 0
# SKIP: 0
# ERROR: 0


Trevor Gamblin (4):
  patchtest: requirements.txt: add GitPython
  patchtest: repo: refactor to use GitPython
  patchtest: tests: update bugzilla_entry_format.fail testfile
  patchtest: utils: remove unused functions

 meta/lib/patchtest/repo.py|  88 +++-
 meta/lib/patchtest/requirements.txt   |   1 +
 .../TestMbox.test_bugzilla_entry_format.fail  |  25 ++--
 meta/lib/patchtest/utils.py   | 129 ++
 4 files changed, 42 insertions(+), 201 deletions(-)

-- 
2.44.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198985): 
https://lists.openembedded.org/g/openembedded-core/message/198985
Mute This Topic: https

[OE-core][PATCH 2/4] patchtest: repo: refactor to use GitPython

2024-05-03 Thread Trevor Gamblin
The repo module currently uses a custom _exec() function in order to run
various git commands as part of the patchtest setup/test process. These
can more efficiently be done with the GitPython module, so use that
instead and reduce the amount of custom code to be maintained for
patchtest in the process. Some specifics replaced using GitPython:

- get branch list
- use repo.active_branch to determine current branch
- use execute() for checkout, merge check, abort, rev-parse, reset

The _exec() function is removed entirely with this change.

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/repo.py | 88 --
 1 file changed, 17 insertions(+), 71 deletions(-)

diff --git a/meta/lib/patchtest/repo.py b/meta/lib/patchtest/repo.py
index d3788f466d3..5f361ac5005 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'

[OE-core][PATCH] python3-pytest: upgrade 8.1.1 -> 8.2.0

2024-04-29 Thread Trevor Gamblin
Changelog: https://docs.pytest.org/en/8.2.x/changelog.html

pytest 8.2.0 (2024-04-27)
Deprecations
- #12069: A deprecation warning is now raised when implementations of one 
of the following hooks request a deprecated py.path.local parameter instead of 
the pathlib.Path parameter which replaced it:
- pytest_ignore_collect - the path parameter - use collection_path 
instead.
- pytest_collect_file - the path parameter - use file_path instead.
- pytest_pycollect_makemodule - the path parameter - use module_path 
instead.
- pytest_report_header - the startdir parameter - use start_path 
instead.
- pytest_report_collectionfinish - the startdir parameter - use 
start_path instead.
  The replacement parameters are available since pytest 7.0.0. The old 
parameters will be removed in pytest 9.0.0.
  See py.path.local arguments for hooks replaced with pathlib.Path for more 
details.

Features
- #11871: Added support for reading command line arguments from a file 
using the prefix character @, like e.g.: pytest @tests.txt. The file must have 
one argument per line.
  See Read arguments from file for details.

Improvements
- #11523: pytest.importorskip() will now issue a warning if the module 
could be found, but raised ImportError instead of ModuleNotFoundError.
  The warning can be suppressed by passing exc_type=ImportError to 
pytest.importorskip().
  See pytest.importorskip default behavior regarding ImportError for 
details.
- #11728: For unittest-based tests, exceptions during class cleanup (as 
raised by functions registered with TestCase.addClassCleanup) are now reported 
instead of silently failing.
- #11777: Text is no longer truncated in the short test summary info 
section when -vv is given.
- #12112: Improved namespace packages detection when 
consider_namespace_packages is enabled, covering more situations (like editable 
installs).
- #9502: Added PYTEST_VERSION environment variable which is defined at the 
start of the pytest session and undefined afterwards. It contains the value of 
pytest.__version__, and among other things can be used to easily check if code 
is running from within a pytest run.

Bug Fixes
- #12065: Fixed a regression in pytest 8.0.0 where test classes containing 
setup_method and tests using @staticmethod or @classmethod would crash with 
AttributeError: 'NoneType' object has no attribute 'setup_method'.
  Now the request.instance attribute of tests using @staticmethod and 
@classmethod is no longer None, but a fresh instance of the class, like in 
non-static methods. Previously it was None, and all fixtures of such tests 
would share a single self.
- #12135: Fixed issue where fixtures adding their finalizer multiple times 
to fixtures they request would cause unreliable and non-intuitive teardown 
ordering in some instances.
- #12194: Fixed a bug with --importmode=importlib and --doctest-modules 
where child modules did not appear as attributes in parent modules.
- #1489: Fixed some instances where teardown of higher-scoped fixtures was 
not happening in the reverse order they were initialized in.

Trivial/Internal Changes
- #12069: pluggy>=1.5.0 is now required.
- #12167: cache: create supporting files (CACHEDIR.TAG, .gitignore, etc.) 
in a temporary directory to provide atomic semantics.

pytest 8.1.2 (2024-04-26)
Bug Fixes
- #12114: Fixed error in pytest.approx() when used with numpy arrays and 
comparing with other types.

Signed-off-by: Trevor Gamblin 
---
 .../python/{python3-pytest_8.1.1.bb => python3-pytest_8.2.0.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-devtools/python/{python3-pytest_8.1.1.bb => 
python3-pytest_8.2.0.bb} (92%)

diff --git a/meta/recipes-devtools/python/python3-pytest_8.1.1.bb 
b/meta/recipes-devtools/python/python3-pytest_8.2.0.bb
similarity index 92%
rename from meta/recipes-devtools/python/python3-pytest_8.1.1.bb
rename to meta/recipes-devtools/python/python3-pytest_8.2.0.bb
index b1cf23fbc4e..1e6674079ff 100644
--- a/meta/recipes-devtools/python/python3-pytest_8.1.1.bb
+++ b/meta/recipes-devtools/python/python3-pytest_8.2.0.bb
@@ -5,7 +5,7 @@ DESCRIPTION = "The pytest framework makes it easy to write 
small tests, yet scal
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=bd27e41b6550fe0fc45356d1d81ee37c"
 
-SRC_URI[sha256sum] = 
"ac978141a75948948817d360297b7aae0fcb9d6ff6bc9ec6d514b85d5a65c044"
+SRC_URI[sha256sum] = 
"d507d4482197eac0ba2bae2e9babf0672eb333017bcedaa5fb1a3d42c1174b3f"
 
 DEPENDS += "python3-setuptools-scm-native"
 
-- 
2.44.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198743): 
https://lists.openembedded.org/g/openembedded-core/message/198743
Mute This Topic: https://lists.openembedded.org/mt/105800203/21656
Group Owner: o

[OE-core][PATCH] python3: upgrade 3.12.2 -> 3.12.3

2024-04-11 Thread Trevor Gamblin
Remove the following patch:

0001-gh-115133-Fix-tests-for-XMLPullParser-with-Expat-2.6.patch

Which a different fix was submitted for in:

c4fa79b924 [3.12] gh-115133: Fix tests for XMLPullParser with Expat 2.6.0 
(GH-115164) (GH-115288)
See: https://github.com/python/cpython/pull/115288

Changelog: https://docs.python.org/3/whatsnew/changelog.html#python-3-12-3-final

Signed-off-by: Trevor Gamblin 
---
 ...y-Fix-for-Expat-2.6.0-with-reparse-d.patch | 55 ---
 .../{python3_3.12.2.bb => python3_3.12.3.bb}  |  3 +-
 2 files changed, 1 insertion(+), 57 deletions(-)
 delete mode 100644 
meta/recipes-devtools/python/python3/0001-test_xml_etree.py-Fix-for-Expat-2.6.0-with-reparse-d.patch
 rename meta/recipes-devtools/python/{python3_3.12.2.bb => python3_3.12.3.bb} 
(99%)

diff --git 
a/meta/recipes-devtools/python/python3/0001-test_xml_etree.py-Fix-for-Expat-2.6.0-with-reparse-d.patch
 
b/meta/recipes-devtools/python/python3/0001-test_xml_etree.py-Fix-for-Expat-2.6.0-with-reparse-d.patch
deleted file mode 100644
index 598ef08cc4f..000
--- 
a/meta/recipes-devtools/python/python3/0001-test_xml_etree.py-Fix-for-Expat-2.6.0-with-reparse-d.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From d07ca7fbd874e230dec4d4c6d650a66ea2a9008e Mon Sep 17 00:00:00 2001
-From: Sebastian Pipping 
-Date: Wed, 7 Feb 2024 15:32:45 +0100
-Subject: [PATCH] test_xml_etree.py: Fix for Expat >=2.6.0 with reparse
- deferral
-
-Upstream-Status: Submitted [https://github.com/python/cpython/pull/115138]
-Signed-off-by: Khem Raj 

- Lib/test/test_xml_etree.py | 10 ++
- .../2024-02-07-15-49-37.gh-issue-115133.WBajNr.rst |  1 +
- 2 files changed, 7 insertions(+), 4 deletions(-)
- create mode 100644 
Misc/NEWS.d/next/Tests/2024-02-07-15-49-37.gh-issue-115133.WBajNr.rst
-
-diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
-index b50898f..4578367 100644
 a/Lib/test/test_xml_etree.py
-+++ b/Lib/test/test_xml_etree.py
-@@ -1403,6 +1403,7 @@ class XMLPullParserTest(unittest.TestCase):
- def test_simple_xml(self):
- for chunk_size in (None, 1, 5):
- with self.subTest(chunk_size=chunk_size):
-+expected_events = []
- parser = ET.XMLPullParser()
- self.assert_event_tags(parser, [])
- self._feed(parser, "\n", chunk_size)
-@@ -1412,16 +1413,17 @@ class XMLPullParserTest(unittest.TestCase):
-chunk_size)
- self.assert_event_tags(parser, [])
- self._feed(parser, ">\n", chunk_size)
--self.assert_event_tags(parser, [('end', 'element')])
-+expected_events += [('end', 'element')]
- self._feed(parser, "texttail\n", 
chunk_size)
- self._feed(parser, "\n", chunk_size)
--self.assert_event_tags(parser, [
-+expected_events += [
- ('end', 'element'),
- ('end', 'empty-element'),
--])
-+]
- self._feed(parser, "\n", chunk_size)
--self.assert_event_tags(parser, [('end', 'root')])
-+expected_events += [('end', 'root')]
- self.assertIsNone(parser.close())
-+self.assert_event_tags(parser, expected_events)
- 
- def test_feed_while_iterating(self):
- parser = ET.XMLPullParser()
-diff --git 
a/Misc/NEWS.d/next/Tests/2024-02-07-15-49-37.gh-issue-115133.WBajNr.rst 
b/Misc/NEWS.d/next/Tests/2024-02-07-15-49-37.gh-issue-115133.WBajNr.rst
-new file mode 100644
-index 000..4dc9c13
 /dev/null
-+++ b/Misc/NEWS.d/next/Tests/2024-02-07-15-49-37.gh-issue-115133.WBajNr.rst
-@@ -0,0 +1 @@
-+Fix etree XMLPullParser tests for Expat >=2.6.0 with reparse deferral
diff --git a/meta/recipes-devtools/python/python3_3.12.2.bb 
b/meta/recipes-devtools/python/python3_3.12.3.bb
similarity index 99%
rename from meta/recipes-devtools/python/python3_3.12.2.bb
rename to meta/recipes-devtools/python/python3_3.12.3.bb
index f837f05af4d..b49a58a1013 100644
--- a/meta/recipes-devtools/python/python3_3.12.2.bb
+++ b/meta/recipes-devtools/python/python3_3.12.3.bb
@@ -30,14 +30,13 @@ SRC_URI = 
"http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \

file://0001-skip-no_stdout_fileno-test-due-to-load-variability.patch \
file://0001-test_storlines-skip-due-to-load-variability.patch \

file://0001-gh-114492-Initialize-struct-termios-before-calling-t.patch \
-   
file://0001-test_xml_etree.py-Fix-for-Expat-2.6.0-with-reparse-d.patch \
"
 
 SRC_URI:append:class-native = " \

file://0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch \
"
 
-SRC_URI[sha256sum] = 
"be28112dac813d2053545c14bf13a16401a21877f1a69eb6ea5d84c4a0f3d870"
+SRC_UR

Re: [OE-core] [PATCH 28/33] python3-pycparser: upgrade 2.21 -> 2.22

2024-04-09 Thread Trevor Gamblin


On 2024-04-09 11:29, Alexander Kanavin wrote:

On Tue, 9 Apr 2024 at 09:11, wangmy via lists.openembedded.org
 wrote:

  LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=2c28cdeabcb88f5843d934381b4b4fea"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=9761c3ffee7ba99c60dca0408fd3262b"

License checksum change should be explained.

Thanks for pointing that out. Odd that patchtest didn't get it this time.


Alex




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198064): 
https://lists.openembedded.org/g/openembedded-core/message/198064
Mute This Topic: https://lists.openembedded.org/mt/105417654/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] patchtest: test_metadata: fix invalid escape sequences

2024-04-09 Thread Trevor Gamblin
Clear up the following warnings seen during patchtest runs:

|/workspace/yocto/poky/meta/lib/patchtest/tests/test_metadata.py:21: 
SyntaxWarning: invalid escape sequence '\+'
|  add_mark = pyparsing.Regex('\+ ')
|/workspace/yocto/poky/meta/lib/patchtest/tests/test_metadata.py:26: 
SyntaxWarning: invalid escape sequence '\:'
|  git_regex = pyparsing.Regex('^git\:\/\/.*')

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/tests/test_metadata.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/patchtest/tests/test_metadata.py 
b/meta/lib/patchtest/tests/test_metadata.py
index be609dbd048..f5dbcf01ed6 100644
--- a/meta/lib/patchtest/tests/test_metadata.py
+++ b/meta/lib/patchtest/tests/test_metadata.py
@@ -18,12 +18,12 @@ class TestMetadata(base.Metadata):
 lictag_re  = pyparsing.AtLineStart("License-Update:")
 lic_chksum_added = pyparsing.AtLineStart("+" + metadata_chksum)
 lic_chksum_removed = pyparsing.AtLineStart("-" + metadata_chksum)
-add_mark = pyparsing.Regex('\+ ')
+add_mark = pyparsing.Regex('\\+ ')
 max_length = 200
 metadata_src_uri  = 'SRC_URI'
 md5sum= 'md5sum'
 sha256sum = 'sha256sum'
-git_regex = pyparsing.Regex('^git\:\/\/.*')
+git_regex = pyparsing.Regex('^git\\:\\/\\/.*')
 metadata_summary = 'SUMMARY'
 cve_check_ignore_var = 'CVE_CHECK_IGNORE'
 cve_status_var = 'CVE_STATUS'
-- 
2.44.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198063): 
https://lists.openembedded.org/g/openembedded-core/message/198063
Mute This Topic: https://lists.openembedded.org/mt/105420046/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] Patchtest results for [PATCH 2/7] openssh-config: initial checkin

2024-03-12 Thread Trevor Gamblin


On 2024-03-11 14:12, Enrico Scholz via lists.openembedded.org wrote:

patcht...@automation.yoctoproject.org writes:


FAIL: test lic files chksum modified not mentioned: LIC_FILES_CHKSUM changed without 
"License-Update:" tag and description in commit message 
(test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)

This failure seems to be bogus; patch creates a new recipe with a new
LIC_FILES_CHKSUM.  It does not change/update an existing tag.

Noted. We'll have to tweak the test...



Enrico




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#196980): 
https://lists.openembedded.org/g/openembedded-core/message/196980
Mute This Topic: https://lists.openembedded.org/mt/104868543/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] python3-git: upgrade 3.1.41 -> 3.1.42

2024-02-27 Thread Trevor Gamblin
This release contains bugfixes, documentation updates, and changes to
metadata for build and CI.

Changelog: https://github.com/gitpython-developers/GitPython/releases/tag/3.1.42

Signed-off-by: Trevor Gamblin 
---
 .../python/{python3-git_3.1.41.bb => python3-git_3.1.42.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-devtools/python/{python3-git_3.1.41.bb => 
python3-git_3.1.42.bb} (92%)

diff --git a/meta/recipes-devtools/python/python3-git_3.1.41.bb 
b/meta/recipes-devtools/python/python3-git_3.1.42.bb
similarity index 92%
rename from meta/recipes-devtools/python/python3-git_3.1.41.bb
rename to meta/recipes-devtools/python/python3-git_3.1.42.bb
index dd0440fe59e..19885a58c74 100644
--- a/meta/recipes-devtools/python/python3-git_3.1.41.bb
+++ b/meta/recipes-devtools/python/python3-git_3.1.42.bb
@@ -12,7 +12,7 @@ PYPI_PACKAGE = "GitPython"
 
 inherit pypi python_setuptools_build_meta
 
-SRC_URI[sha256sum] = 
"ed66e624884f76df22c8e16066d567aaa5a37d5b5fa19db2c6df6f7156db9048"
+SRC_URI[sha256sum] = 
"2d99869e0fef71a73cbd242528105af1d6c1b108c60dfabd994bf292f76c3ceb"
 
 DEPENDS += " python3-gitdb"
 
-- 
2.43.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#196289): 
https://lists.openembedded.org/g/openembedded-core/message/196289
Mute This Topic: https://lists.openembedded.org/mt/104608758/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: Patchtest results for [OE-core][PATCH] rpm: upgrade 4.19.1 -> 4.19.1.1

2024-02-26 Thread Trevor Gamblin


On 2024-02-26 16:05, patcht...@automation.yoctoproject.org wrote:

Thank you for your submission. Patchtest identified one
or more issues with the patch. Please see the log below for
more information:

---
Testing patch /home/patchtest/share/mboxes/rpm-upgrade-4.19.1---4.19.1.1.patch

FAIL: test src uri left files: Patches not removed from tree. Remove them and 
amend the submitted mbox (test_metadata.TestMetadata.test_src_uri_left_files)
This is correct, but it looks like (in some cases) Patchtest emails 
still aren't threading after all...


PASS: pretest src uri left files 
(test_metadata.TestMetadata.pretest_src_uri_left_files)
PASS: test CVE check ignore (test_metadata.TestMetadata.test_cve_check_ignore)
PASS: test Signed-off-by presence 
(test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence 
(test_mbox.TestMbox.test_commit_message_presence)
PASS: test lic files chksum modified not mentioned 
(test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)

SKIP: pretest pylint: No python related patches, skipping test 
(test_python_pylint.PyLint.pretest_pylint)
SKIP: test CVE tag format: No new CVE patches introduced 
(test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced 
(test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced 
(test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found 
(test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test 
(test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test 
(test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test 
(test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now 
(test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test summary presence: No added recipes, skipping test 
(test_metadata.TestMetadata.test_summary_presence)
SKIP: test target mailing list: Series merged, no reason to check other mailing 
lists (test_mbox.TestMbox.test_target_mailing_list)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this
email with an explanation of why the patch should be accepted. If you
believe these results are due to an error in patchtest, please submit a
bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category
under 'Yocto Project Subprojects'). For more information on specific
failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank
you!

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#196223): 
https://lists.openembedded.org/g/openembedded-core/message/196223
Mute This Topic: https://lists.openembedded.org/mt/104591017/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH v2] rpm: upgrade 4.19.1 -> 4.19.1.1

2024-02-26 Thread Trevor Gamblin
Changelog (see also http://rpm.org/wiki/Releases/4.19.1.1):
- Packaging: Don’t warn about missing user/group on skipped files Regression 
(#2814)
- Packaging: Make user/group lookup caching thread-safe Regression (#2843)
- Lua interface: Fix regression in Lua scriptlet runaway child detection 
Regression (#2818)
- Build: CMakeLists.txt: restore readline support as an explicit option 
Regression (#2852)
- Build: Fix unconditional uses of Linux-specific extensions Regression (#2812)
- Build: Add missing include for check_symbol_exists (#2831)
- Build: Don’t use _nl_msg_cat_cntr if it’s not available (#2856)

The following patches were removed as they're included in the release:

- 0002-docs-CMakeLists.txt-do-not-install-non-existent-docs.patch
- 0001-Fix-unconditional-dependency-on-non-POSIX-GLOB_ONLYD.patch
- 0001-CMakeLists.txt-restore-readline-support-as-an-explic.patch

The following patch was adjusted to apply on 4.19.1.1:
- 0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch

The new version introduces a buildpath QA issue:

WARNING: rpm-1_4.19.1.1-r0 do_package_qa: QA Issue: File
/usr/lib/cmake/rpm/rpm-targets.cmake in package rpm-dev contains
reference to TMPDIR [buildpaths]

This has been dealt with by adding a new sed call in do_install:append.

Signed-off-by: Trevor Gamblin 
---
v2 actually removes the files for patches that were applied upstream,
whereas v1 only removed them from the recipe.

 ...estore-readline-support-as-an-explic.patch | 42 --
 ...lib-rpm-as-the-installation-path-for.patch | 14 +++--
 ...l-dependency-on-non-POSIX-GLOB_ONLYD.patch | 56 ---
 ...txt-do-not-install-non-existent-docs.patch | 26 -
 .../rpm/{rpm_4.19.1.bb => rpm_4.19.1.1.bb}|  7 +--
 5 files changed, 13 insertions(+), 132 deletions(-)
 delete mode 100644 
meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-restore-readline-support-as-an-explic.patch
 delete mode 100644 
meta/recipes-devtools/rpm/files/0001-Fix-unconditional-dependency-on-non-POSIX-GLOB_ONLYD.patch
 delete mode 100644 
meta/recipes-devtools/rpm/files/0002-docs-CMakeLists.txt-do-not-install-non-existent-docs.patch
 rename meta/recipes-devtools/rpm/{rpm_4.19.1.bb => rpm_4.19.1.1.bb} (96%)

diff --git 
a/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-restore-readline-support-as-an-explic.patch
 
b/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-restore-readline-support-as-an-explic.patch
deleted file mode 100644
index db83b176b41..000
--- 
a/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-restore-readline-support-as-an-explic.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 3c2e529c6cc1bae4bc94cbed7358c6e0cdd2de02 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin 
-Date: Tue, 16 Jan 2024 13:43:36 +0100
-Subject: [PATCH] CMakeLists.txt: restore readline support as an explicit
- option
-
-This was lost in autotools -> cmake transition. The particular
-reason to make it explicit is that readline is gpl version 3
-licensed, and in some builds components under that license
-need to be excluded.
-
-Upstream-Status: Submitted 
[https://github.com/rpm-software-management/rpm/pull/2852]
-Signed-off-by: Alexander Kanavin 

- CMakeLists.txt | 7 ++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 0a474106e..89e27417f 100644
 a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -31,6 +31,7 @@ option(WITH_AUDIT "Build with audit support" ON)
- option(WITH_FSVERITY "Build with fsverity support" OFF)
- option(WITH_IMAEVM "Build with IMA support" OFF)
- option(WITH_FAPOLICYD "Build with fapolicyd support" ON)
-+option(WITH_READLINE "Build with readline support" ON)
- 
- set(RPM_CONFIGDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/rpm" CACHE 
PATH "rpm home")
- set(RPM_VENDOR "vendor" CACHE STRING "rpm vendor string")
-@@ -193,7 +194,11 @@ find_package(BZip2)
- find_package(Iconv)
- 
- pkg_check_modules(POPT REQUIRED IMPORTED_TARGET popt)
--pkg_check_modules(READLINE IMPORTED_TARGET readline)
-+
-+if (WITH_READLINE)
-+pkg_check_modules(READLINE REQUIRED IMPORTED_TARGET readline)
-+endif()
-+
- pkg_check_modules(ZSTD IMPORTED_TARGET libzstd>=1.3.8)
- pkg_check_modules(LIBELF IMPORTED_TARGET libelf)
- pkg_check_modules(LIBDW IMPORTED_TARGET libdw)
diff --git 
a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
 
b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
index b056d19741a..fc7e9501b90 100644
--- 
a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
+++ 
b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
@@ -1,4 +1,4 @@
-From 7948f21e08bc7552b281ed0098a9c8099d2370cb Mon Sep 17 00:00:00 2001
+From 5661e6a0a9c0576fc259d4859a14928dbc514b8d Mon Sep 

Re: [OE-core] [AUH] rpm: upgrading to 4.19.1.1 FAILED

2024-02-26 Thread Trevor Gamblin


On 2024-02-26 13:55, Alexander Kanavin wrote:

On Mon, 26 Feb 2024 at 19:27, Trevor Gamblin  wrote:

I've got an upgrade ready for this, but it seems to be introducing a
buildpaths QA issue:

WARNING: rpm-1_4.19.1.1-r0 do_package_qa: QA Issue: File
/usr/lib/cmake/rpm/rpm-targets.cmake in package rpm-dev contains
reference to TMPDIR [buildpaths]

I've traced it to this part of
tmp/work/core2-64-poky-linux/rpm/4.19.1.1/image/usr/lib/cmake/rpm/rpm-targets.cmake,
but I'm not sure how to fix it (my CMake-fu is weak):

set_target_properties(rpm::librpm PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES
"/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/rpm/4.19.1.1/recipe-sysroot/usr/include"

INTERFACE_LINK_LIBRARIES "rpm::librpmio"
)


Anyone know how to fix that?

This sort of thing is usually fixed with sed after the fact in
do_install:append. Examples everywhere in oe-core, even rpm recipe
itself.
Thanks, wasn't sure if there might be something more elegant. I've gone 
ahead and done that and submitted a patch.


Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#196220): 
https://lists.openembedded.org/g/openembedded-core/message/196220
Mute This Topic: https://lists.openembedded.org/mt/104377506/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] rpm: upgrade 4.19.1 -> 4.19.1.1

2024-02-26 Thread Trevor Gamblin
Changelog (see also http://rpm.org/wiki/Releases/4.19.1.1):
- Packaging: Don’t warn about missing user/group on skipped files Regression 
(#2814)
- Packaging: Make user/group lookup caching thread-safe Regression (#2843)
- Lua interface: Fix regression in Lua scriptlet runaway child detection 
Regression (#2818)
- Build: CMakeLists.txt: restore readline support as an explicit option 
Regression (#2852)
- Build: Fix unconditional uses of Linux-specific extensions Regression (#2812)
- Build: Add missing include for check_symbol_exists (#2831)
- Build: Don’t use _nl_msg_cat_cntr if it’s not available (#2856)

The following patches were removed as they're included in the release:

- 0002-docs-CMakeLists.txt-do-not-install-non-existent-docs.patch
- 0001-Fix-unconditional-dependency-on-non-POSIX-GLOB_ONLYD.patch
- 0001-CMakeLists.txt-restore-readline-support-as-an-explic.patch

The following patch was adjusted to apply on 4.19.1.1:
- 0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch

The new version introduces a buildpath QA issue:

WARNING: rpm-1_4.19.1.1-r0 do_package_qa: QA Issue: File
/usr/lib/cmake/rpm/rpm-targets.cmake in package rpm-dev contains
reference to TMPDIR [buildpaths]

This has been dealt with by adding a new sed call in do_install:append.

Signed-off-by: Trevor Gamblin 
---
 ...code-lib-rpm-as-the-installation-path-for.patch | 14 ++
 .../rpm/{rpm_4.19.1.bb => rpm_4.19.1.1.bb} |  7 +++
 2 files changed, 13 insertions(+), 8 deletions(-)
 rename meta/recipes-devtools/rpm/{rpm_4.19.1.bb => rpm_4.19.1.1.bb} (96%)

diff --git 
a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
 
b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
index b056d19741a..fc7e9501b90 100644
--- 
a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
+++ 
b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
@@ -1,4 +1,4 @@
-From 7948f21e08bc7552b281ed0098a9c8099d2370cb Mon Sep 17 00:00:00 2001
+From 5661e6a0a9c0576fc259d4859a14928dbc514b8d Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin 
 Date: Mon, 27 Feb 2017 09:43:30 +0200
 Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for
@@ -7,18 +7,21 @@ Subject: [PATCH] Do not hardcode "lib/rpm" as the 
installation path for
 Upstream-Status: Denied 
[https://github.com/rpm-software-management/rpm/pull/263]
 Signed-off-by: Alexander Kanavin 
 
+Update patch to apply on top of 4.19.1.1.
+
+Signed-off-by: Trevor Gamblin 
 ---
  CMakeLists.txt | 2 +-
  macros.in  | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 2767915fb..7f0630453 100644
+index 7808115c1..4a383ceba 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -32,7 +32,7 @@ option(WITH_FSVERITY "Build with fsverity support" OFF)
- option(WITH_IMAEVM "Build with IMA support" OFF)
+@@ -33,7 +33,7 @@ option(WITH_IMAEVM "Build with IMA support" OFF)
  option(WITH_FAPOLICYD "Build with fapolicyd support" ON)
+ option(WITH_READLINE "Build with readline support" ON)
  
 -set(RPM_CONFIGDIR "${CMAKE_INSTALL_PREFIX}/lib/rpm" CACHE PATH "rpm home")
 +set(RPM_CONFIGDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/rpm" CACHE 
PATH "rpm home")
@@ -38,3 +41,6 @@ index b49ffaad4..3acbe78f6 100644
  %_includedir  %{_prefix}/include
  %_infodir %{_datadir}/info
  %_mandir  %{_datadir}/man
+-- 
+2.43.2
+
diff --git a/meta/recipes-devtools/rpm/rpm_4.19.1.bb 
b/meta/recipes-devtools/rpm/rpm_4.19.1.1.bb
similarity index 96%
rename from meta/recipes-devtools/rpm/rpm_4.19.1.bb
rename to meta/recipes-devtools/rpm/rpm_4.19.1.1.bb
index 1f8611a29cb..b017cf6fe23 100644
--- a/meta/recipes-devtools/rpm/rpm_4.19.1.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.19.1.1.bb
@@ -37,14 +37,11 @@ SRC_URI = 
"git://github.com/rpm-software-management/rpm;branch=rpm-4.19.x;protoc

file://0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch \

file://0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch \

file://0001-CMakeLists.txt-look-for-lua-with-pkg-config-rather-t.patch \
-   
file://0002-docs-CMakeLists.txt-do-not-install-non-existent-docs.patch \

file://0002-rpmio-rpmglob.c-avoid-using-GLOB_BRACE-if-undefined-.patch \
-   
file://0001-Fix-unconditional-dependency-on-non-POSIX-GLOB_ONLYD.patch \
-   
file://0001-CMakeLists.txt-restore-readline-support-as-an-explic.patch \
"
 
 PE = "1"
-SRCREV = "98b301ebb44fb5cabb56fc24bc3aaa437c47c038"
+SRCREV = "13b4521341781293c41ac898aa9c2d2f6bc1f21d"
 
 S = "${WORKDIR}/git"
 
@@ -136,6 +133,8 @@ do_install:append () {

Re: [OE-core] [AUH] rpm: upgrading to 4.19.1.1 FAILED

2024-02-26 Thread Trevor Gamblin


On 2024-02-15 12:32, Auto Upgrade Helper wrote:

Hello,

this email is a notification from the Auto Upgrade Helper
that the automatic attempt to upgrade the recipe *rpm* to *4.19.1.1* has Failed 
(devtool error).

Detailed error information:

Running 'devtool upgrade' for recipe rpm failed.
NOTE: Reconnecting to bitbake server...
Loading cache...done.
Loaded 1857 entries from dependency cache.
Removing 1 recipes from the x86_64 sysroot...done.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION   = "2.7.2"
BUILD_SYS= "x86_64-linux"
NATIVELSBSTRING  = "universal"
TARGET_SYS   = "x86_64-poky-linux"
MACHINE  = "qemux86-64"
DISTRO   = "poky"
DISTRO_VERSION   = "4.3+snapshot-8b3825b16a5ea263dd8fd0ee1de903f09ea83409"
TUNE_FEATURES= "m64 core2"
TARGET_FPU   = ""
meta
meta-poky
meta-yocto-bsp
workspace= 
"tmp-auh-upgrades:8b3825b16a5ea263dd8fd0ee1de903f09ea83409"

Initialising tasks...NOTE: The /proc/pressure files can't be read. Continuing 
build without monitoring pressure
Sstate summary: Wanted 10 Local 10 Mirrors 0 Missed 0 Current 20 (100% match, 
100% complete)
done.
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 103 tasks of which 100 didn't need to be rerun 
and all succeeded.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 1 seconds
INFO: Extracting current version source...
INFO: Extracting upgraded version source...
INFO: Rebasing devtool onto 13b4521341781293c41ac898aa9c2d2f6bc1f21d
WARNING: Command 'git rebase 13b4521341781293c41ac898aa9c2d2f6bc1f21d' failed:
Auto-merging docs/CMakeLists.txt
CONFLICT (content): Merge conflict in docs/CMakeLists.txt

You will need to resolve conflicts in order to complete the upgrade.
INFO: Upgraded source extracted to 
/home/pokybuild/yocto-worker/auh/build/build/workspace/sources/rpm
INFO: New recipe is 
/home/pokybuild/yocto-worker/auh/build/build/workspace/recipes/rpm/rpm_4.19.1.1.bb


I've got an upgrade ready for this, but it seems to be introducing a 
buildpaths QA issue:


WARNING: rpm-1_4.19.1.1-r0 do_package_qa: QA Issue: File 
/usr/lib/cmake/rpm/rpm-targets.cmake in package rpm-dev contains 
reference to TMPDIR [buildpaths]


I've traced it to this part of 
tmp/work/core2-64-poky-linux/rpm/4.19.1.1/image/usr/lib/cmake/rpm/rpm-targets.cmake, 
but I'm not sure how to fix it (my CMake-fu is weak):


set_target_properties(rpm::librpm PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES 
"/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/rpm/4.19.1.1/recipe-sysroot/usr/include" 


  INTERFACE_LINK_LIBRARIES "rpm::librpmio"
)


Anyone know how to fix that?





Please review the attached files for further information and build/update 
failures.
Any problem please file a bug at 
https://bugzilla.yoctoproject.org/enter_bug.cgi?product=Automated%20Update%20Handler

Regards,
The Upgrade Helper




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#196215): 
https://lists.openembedded.org/g/openembedded-core/message/196215
Mute This Topic: https://lists.openembedded.org/mt/104377506/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] patchtest: provide further guidance for failed testcases

2024-02-23 Thread Trevor Gamblin


On 2024-02-23 15:17, Simone Weiß wrote:

From: Simone Weiß 

Cross-reference the wiki page on patchtest now that it is updated and contains
more information how to address failed testcases. Adding it in patchtest only
is enough as patchtest-send-result already points to the wikipage for failures.

Signed-off-by: Simone Weiß 
---
v2: Instead of prodvidng the infos in the log point to the now updated wiki to
avoid issues with autobuilder when adding more lines.
  scripts/patchtest | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/patchtest b/scripts/patchtest
index 3163420220..42e70fd4b7 100755
--- a/scripts/patchtest
+++ b/scripts/patchtest
@@ -164,9 +164,9 @@ def run(patch, logfile=None):
  if premerge_result == 2 and postmerge_result == 2:
  logger.error('patchtest: No test cases found - did you specify the 
correct suite directory?')
  if premerge_result == 1 or postmerge_result == 1:
-logger.error('WARNING: patchtest: At least one patchtest caused a 
failure or an error - please check')
+   logger.error('WARNING: patchtest: At least one patchtest caused 
a failure or an error - please check 
https://wiki.yoctoproject.org/wiki/Patchtest for further guidance for further 
guidance')


Hi,

The idea here is good, but it looks like there's a typo here...


  else:
-logger.error('OK: patchtest: All patchtests passed')
+logger.info('OK: patchtest: All patchtests passed')
  
print('--\n')
  return premerge_result or postmerge_result
  





-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#196108): 
https://lists.openembedded.org/g/openembedded-core/message/196108
Mute This Topic: https://lists.openembedded.org/mt/104535997/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH 3/4] python3-numpy: inherit python_mesonpy

2024-02-20 Thread Trevor Gamblin


On 2024-02-20 06:33, Richard Purdie wrote:

On Mon, 2024-02-19 at 09:30 -0800, Tim Orling wrote:

Replace the deprecated setuptools3 bbclass with python_mesonpy.

The build-backend has been defined as "mesonpy" since:
https://github.com/numpy/numpy/commit/942fb8caf33a65e449fbf198ecf1cd39be953248

The vendored meson-python was dropped in:
https://github.com/numpy/numpy/commit/6544e33ac7a3a600c2fb565401c811a17ecdb3d5

While we are at it:
* Drop ${PYTHON_PN} and use python3 instead
* Sort RDEPENDS alphabetically

The ptests run, but we still have issues with sufficient memory and
free disk space (the reason python3-numpy is in PTEST_PROBLEMS).

Signed-off-by: Tim Orling 

This looks to introduce a reproducibility issue:

https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/4399


Hi,

I've filed a bug for this: 
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15406


Let's stick with the existing backend for now and I'll fix it ASAP.

Trevor



Cheers,

Richard




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#195922): 
https://lists.openembedded.org/g/openembedded-core/message/195922
Mute This Topic: https://lists.openembedded.org/mt/104451074/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] patchtest: Add further information for failed testcases

2024-02-16 Thread Trevor Gamblin


On 2024-02-16 11:19, Simone Weiß wrote:

On Thu, 2024-02-15 at 22:10 +, Richard Purdie wrote:

On Thu, 2024-02-15 at 21:39 +, Simone Weiß wrote:

From: Simone Weiß 

Add more information to log messages when a test case fails.
Still keep it short and mostly reference the documentation. Reasson is
that
documentation should already contain the needed information, do not
duplicate
it here, so we also do not need to update here should the doc/policy
change.

Signed-off-by: Simone Weiß 

This does get a little tricky since the responses from patchtest on our
test infrastructure has a character limit for security reasons.

I have wondered if we do need to change it to some kind of code
response which can then be translated back into real text.


What could be easily done is also to remove some kind of information that
is kinda duplicated from the logs: e.g.

FAIL: test commit message presence: Please include a commit message on
your patch explaining the change
(test_mbox.TestMbox.test_commit_message_presence)

basically duplicates test_commit_message_presence (with and w/o _), that
is not really needed IMO.

Also the reference links could be given instead - if any testcases failed
- in  a bundled fashion by adopting the suggestions in patchtest-send-
result and for local runs in patchtest's run function


We could reference the wiki page: 
https://wiki.yoctoproject.org/wiki/Patchtest


We'll need to update it too, though. I put it together to have 
*something* when patchtest was brought back online, but there's 
definitely room for improvement.


I think a combination of both suggestions, i.e. a much shorter "FAIL: 
test commit message presence (code: 1234)" sort of approach along with a 
link to the wiki page is the best here.


What are your thoughts?



Cheers,
Simone

The reason for the character limit is to stop abuse of the VMs that run
the tests, you can't mine bitcoin and pass them out as the failure
message for example.

Cheers,

Richard








-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#195786): 
https://lists.openembedded.org/g/openembedded-core/message/195786
Mute This Topic: https://lists.openembedded.org/mt/104382125/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] Patchtest results for [PATCH 2/5] meta/lib/bblayers/buildconf.py: add support for configuration summaries

2024-02-16 Thread Trevor Gamblin


On 2024-02-16 08:57, Patchtest wrote:

Thank you for your submission. Patchtest identified one
or more issues with the patch. Please see the log below for
more information:
Alright, so it's still not working properly. Short of changing the 
subject line, I'm not sure what else can be done on our end, unless 
there's a problem with the mailer itself - but that should show up in 
the headers if that's the case.


---
Testing patch 
/home/patchtest/share/mboxes/2-5-meta-lib-bblayers-buildconf.py-add-support-for-configuration-summaries.patch

FAIL: test commit message presence: Please include a commit message on your 
patch explaining the change (test_mbox.TestMbox.test_commit_message_presence)

PASS: pretest pylint (test_python_pylint.PyLint.pretest_pylint)
PASS: test Signed-off-by presence 
(test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test pylint (test_python_pylint.PyLint.test_pylint)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)

SKIP: pretest src uri left files: No modified recipes, skipping pretest 
(test_metadata.TestMetadata.pretest_src_uri_left_files)
SKIP: test CVE check ignore: No modified recipes, skipping test 
(test_metadata.TestMetadata.test_cve_check_ignore)
SKIP: test CVE tag format: No new CVE patches introduced 
(test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced 
(test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced 
(test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found 
(test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum modified not mentioned: No modified recipes, 
skipping test 
(test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
SKIP: test lic files chksum presence: No added recipes, skipping test 
(test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test 
(test_metadata.TestMetadata.test_license_presence)
SKIP: test series merge on head: Merge test is disabled for now 
(test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test src uri left files: No modified recipes, skipping pretest 
(test_metadata.TestMetadata.test_src_uri_left_files)
SKIP: test summary presence: No added recipes, skipping test 
(test_metadata.TestMetadata.test_summary_presence)
SKIP: test target mailing list: Series merged, no reason to check other mailing 
lists (test_mbox.TestMbox.test_target_mailing_list)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this
email with an explanation of why the patch should be accepted. If you
believe these results are due to an error in patchtest, please submit a
bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category
under 'Yocto Project Subprojects'). For more information on specific
failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank
you!




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#195774): 
https://lists.openembedded.org/g/openembedded-core/message/195774
Mute This Topic: https://lists.openembedded.org/mt/104392578/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH] patchtest-send-results: use Message-ID directly

2024-02-16 Thread Trevor Gamblin


On 2024-02-16 04:35, Alexander Kanavin wrote:

Just wanted to note that sadly patchtest replies still aren't
threaded. What are regular mail clients doing that patchtest does not?


Patchwork's docs say 
(https://patchwork.readthedocs.io/en/latest/usage/overview/#comments):


|Comments are replies to a submission - either a patch or a cover 
letter. Unlike a Mail User Agent (MUA) like Gmail, Patchwork does not 
thread comments. Instead, every comment is associated with either a 
patch or a cover letter, and organized by date.|


I'm wondering if maybe it's as simple as the subject line being too 
different - instead of "Patchtest results for [OE-core][PATCH 1/2] 
patchtest: Fix grammar in log output", maybe it just needs to reply with 
the exact subject line like anyone else.


That being said, I haven't seen the Patchtest service send a result 
since that change was merged...




Alex

On Thu, 15 Feb 2024 at 22:37, Trevor Gamblin  wrote:

There's no need to use regex for extracting the Message-ID field from
the patch email and mangle it by removing the angle brackets in the
process. Pull it directly from the mbox so that Patchtest's replies have
even fewer differences when compared to other replies. Also add a TODO
so that it's clear this needs adjustment when full series support is
added.

Signed-off-by: Trevor Gamblin
---
  scripts/patchtest-send-results | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results
index 8190fe86c32..8a3dadbd111 100755
--- a/scripts/patchtest-send-results
+++ b/scripts/patchtest-send-results
@@ -65,7 +65,9 @@ subject_line = f"Patchtest results for {mbox_subject}"
  reply_address = mbox[0]['from']

  # extract the message ID and use that as the in-reply-to address
-in_reply_to = re.findall("<(.*)>", mbox[0]['Message-ID'])[0]
+# TODO: This will need to change again when patchtest can handle a whole
+# series at once
+in_reply_to = mbox[0]['Message-ID']

  # the address the results email is sent from
  from_address ="patcht...@automation.yoctoproject.org"
--
2.43.0





-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#195763): 
https://lists.openembedded.org/g/openembedded-core/message/195763
Mute This Topic: https://lists.openembedded.org/mt/104382040/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] patchtest-send-results: use Message-ID directly

2024-02-15 Thread Trevor Gamblin
There's no need to use regex for extracting the Message-ID field from
the patch email and mangle it by removing the angle brackets in the
process. Pull it directly from the mbox so that Patchtest's replies have
even fewer differences when compared to other replies. Also add a TODO
so that it's clear this needs adjustment when full series support is
added.

Signed-off-by: Trevor Gamblin 
---
 scripts/patchtest-send-results | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results
index 8190fe86c32..8a3dadbd111 100755
--- a/scripts/patchtest-send-results
+++ b/scripts/patchtest-send-results
@@ -65,7 +65,9 @@ subject_line = f"Patchtest results for {mbox_subject}"
 reply_address = mbox[0]['from']
 
 # extract the message ID and use that as the in-reply-to address
-in_reply_to = re.findall("<(.*)>", mbox[0]['Message-ID'])[0]
+# TODO: This will need to change again when patchtest can handle a whole
+# series at once
+in_reply_to = mbox[0]['Message-ID']
 
 # the address the results email is sent from
 from_address = "patcht...@automation.yoctoproject.org"
-- 
2.43.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#195705): 
https://lists.openembedded.org/g/openembedded-core/message/195705
Mute This Topic: https://lists.openembedded.org/mt/104382040/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 2/2] patchtest-send-results: add --debug option

2024-02-15 Thread Trevor Gamblin
Add a -d/--debug option to patchtest-send-results so that the contents
of the constructed raw email can be checked without actually sending
anything to the list or patch author.

Signed-off-by: Trevor Gamblin 
---
 scripts/patchtest-send-results | 17 +++--
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results
index 9fd24c9b959..8190fe86c32 100755
--- a/scripts/patchtest-send-results
+++ b/scripts/patchtest-send-results
@@ -38,6 +38,7 @@ def has_a_failed_test(raw_results):
 
 parser = argparse.ArgumentParser(description="Send patchtest results to a 
submitter for a given patch")
 parser.add_argument("-p", "--patch", dest="patch", required=True, help="The 
patch file to summarize")
+parser.add_argument("-d", "--debug", dest="debug", required=False, 
action='store_true', help="Print raw email headers and content, but don't 
actually send it")
 args = parser.parse_args()
 
 if not os.path.exists(args.patch):
@@ -92,12 +93,16 @@ if has_a_failed_test(testresult):
 '\nMIME-Version: 1.0" + \
 "\nContent-type: 
Multipart/Mixed;boundary="NextPart"\n\n--NextPart\nContent-Type: 
text/plain\n\n' + \
 reply_contents + '\n\n--NextPart'
-response = ses_client.send_raw_email(
-Source="patcht...@automation.yoctoproject.org",
-RawMessage={
-"Data": raw_data,
-},
-)
+
+if args.debug:
+print(f"RawMessage: \n\n{raw_data}")
+else:
+response = ses_client.send_raw_email(
+Source="patcht...@automation.yoctoproject.org",
+RawMessage={
+"Data": raw_data,
+},
+)
 
 else:
 print(f"No failures identified for {args.patch}.")
-- 
2.43.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#195698): 
https://lists.openembedded.org/g/openembedded-core/message/195698
Mute This Topic: https://lists.openembedded.org/mt/104381294/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 1/2] patchtest: Fix grammar in log output

2024-02-15 Thread Trevor Gamblin
Signed-off-by: Trevor Gamblin 
---
 scripts/patchtest | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/patchtest b/scripts/patchtest
index 8c9a73e1dba..d0dc6e8fac5 100755
--- a/scripts/patchtest
+++ b/scripts/patchtest
@@ -162,7 +162,7 @@ def run(patch, logfile=None):
 
 
print('--\n')
 if premerge_result == 2 and postmerge_result == 2:
-logger.error('patchtest: Not any test cases found - did you specify 
the correct suite directory?')
+logger.error('patchtest: No test cases found - did you specify the 
correct suite directory?')
 if premerge_result == 1 or postmerge_result == 1:
 logger.error('patchtest: At least one patchtest caused a failure or an 
error - please check')
 else:
-- 
2.43.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#195697): 
https://lists.openembedded.org/g/openembedded-core/message/195697
Mute This Topic: https://lists.openembedded.org/mt/104381293/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] Patchtest results for [PATCH v2 7/9] oeqa/selftest/recipetool: Move create_go test to a proper class

2024-01-16 Thread Trevor Gamblin


On 2024-01-16 05:05, Vyacheslav Yurkov wrote:
I also have the same opinion. What else am I supposed to write in the 
body if it were merely a refactoring (function moved, renamed, etc), 
and it's already described in the hearer?


It shouldn't be considered a strict requirement, as it's going to be 
difficult for Patchtest to correctly identify which pages do and don't 
need more explanation.


If you want to completely avoid that feedback, then the solution for now 
is to re-state the shortlog as a one-line commit description.



Slava

On 16.01.2024 10:32, Alexander Kanavin wrote:

Because making it strict would only result in useless noise in the
commit logs. It's entirely valid to have changes that can fully be
described with a commit header. I see it as a notice to consider if
the commit message should be added, at the discretion of both
submitter and committer.

Alex

On Tue, 16 Jan 2024 at 10:28, Alexandre Belloni
 wrote:

On 16/01/2024 10:08:50+0100, Alexander Kanavin wrote:

No.

Why not?







-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#193870): 
https://lists.openembedded.org/g/openembedded-core/message/193870
Mute This Topic: https://lists.openembedded.org/mt/103758512/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH v2] scripts/runqemu: fix regex escape sequences

2024-01-02 Thread Trevor Gamblin
When invoking runqemu with Python 3.12, the following warning is
encountered:

|SyntaxWarning: invalid escape sequence '\.'

This is because the interpreter scans the string before it is processed
by the regex module, and it interprets the backslash as part of an
escape sequence, but not a standard one. This will be registered as an
error rather than a warning in future Python versions. To avoid it,
simply add an extra backslash so that Python doesn't misinterpret the
string, while the regex parser still sees an escaped '.' character.

Signed-off-by: Trevor Gamblin 
---
v2 fixes a typo in the patch description. 

 scripts/runqemu | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 6a5a6451daf..f4d04201092 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -371,7 +371,7 @@ class BaseConfig(object):
 if p.endswith('.qemuboot.conf'):
 self.qemuboot = p
 self.qbconfload = True
-elif re.search('\.bin$', p) or re.search('bzImage', p) or \
+elif re.search('\\.bin$', p) or re.search('bzImage', p) or \
  re.search('zImage', p) or re.search('vmlinux', p) or \
  re.search('fitImage', p) or re.search('uImage', p):
 self.kernel =  p
@@ -385,19 +385,19 @@ class BaseConfig(object):
 fst = t
 break
 if not fst:
-m = re.search('.*\.(.*)$', self.rootfs)
+m = re.search('.*\\.(.*)$', self.rootfs)
 if m:
 fst =  m.group(1)
 if fst:
 self.check_arg_fstype(fst)
-qb = re.sub('\.' + fst + "$", '.qemuboot.conf', self.rootfs)
+qb = re.sub('\\.' + fst + "$", '.qemuboot.conf', self.rootfs)
 if os.path.exists(qb):
 self.qemuboot = qb
 self.qbconfload = True
 else:
 logger.warning("%s doesn't exist, will try to remove 
'.rootfs' from filename" % qb)
 # They to remove .rootfs (IMAGE_NAME_SUFFIX) as well
-qb = re.sub('\.rootfs.qemuboot.conf$', '.qemuboot.conf', 
qb)
+qb = re.sub('\\.rootfs.qemuboot.conf$', '.qemuboot.conf', 
qb)
 if os.path.exists(qb):
 self.qemuboot = qb
 self.qbconfload = True
-- 
2.43.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#193249): 
https://lists.openembedded.org/g/openembedded-core/message/193249
Mute This Topic: https://lists.openembedded.org/mt/103485072/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] scripts/runqemu: fix regex escape sequences

2024-01-02 Thread Trevor Gamblin
When invoking runqemu with Python 3.12, the following warning is
encountered:

|SyntaxWarning: invalid escape sequence '\.'

This is because the interpreter scans the string before it is processed
by the regex module, and it interprets the backslash as part of an
escape sequence, but not a standard one. This will be registered as an
error rather than a warning in future Python versions. To avoid the it,
simply add an extra backslash so that Python doesn't misinterpret the
string, while the regex parser still sees an escaped '.' character.

Signed-off-by: Trevor Gamblin 
---
 scripts/runqemu | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 6a5a6451daf..f4d04201092 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -371,7 +371,7 @@ class BaseConfig(object):
 if p.endswith('.qemuboot.conf'):
 self.qemuboot = p
 self.qbconfload = True
-elif re.search('\.bin$', p) or re.search('bzImage', p) or \
+elif re.search('\\.bin$', p) or re.search('bzImage', p) or \
  re.search('zImage', p) or re.search('vmlinux', p) or \
  re.search('fitImage', p) or re.search('uImage', p):
 self.kernel =  p
@@ -385,19 +385,19 @@ class BaseConfig(object):
 fst = t
 break
 if not fst:
-m = re.search('.*\.(.*)$', self.rootfs)
+m = re.search('.*\\.(.*)$', self.rootfs)
 if m:
 fst =  m.group(1)
 if fst:
 self.check_arg_fstype(fst)
-qb = re.sub('\.' + fst + "$", '.qemuboot.conf', self.rootfs)
+qb = re.sub('\\.' + fst + "$", '.qemuboot.conf', self.rootfs)
 if os.path.exists(qb):
 self.qemuboot = qb
 self.qbconfload = True
 else:
 logger.warning("%s doesn't exist, will try to remove 
'.rootfs' from filename" % qb)
 # They to remove .rootfs (IMAGE_NAME_SUFFIX) as well
-qb = re.sub('\.rootfs.qemuboot.conf$', '.qemuboot.conf', 
qb)
+qb = re.sub('\\.rootfs.qemuboot.conf$', '.qemuboot.conf', 
qb)
 if os.path.exists(qb):
 self.qemuboot = qb
 self.qbconfload = True
-- 
2.43.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#193247): 
https://lists.openembedded.org/g/openembedded-core/message/193247
Mute This Topic: https://lists.openembedded.org/mt/103484990/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] patchtest: Add test for deprecated CVE_CHECK_IGNORE

2023-12-13 Thread Trevor Gamblin


On 2023-12-13 06:27, Ross Burton wrote:

On 11 Dec 2023, at 16:45, simone.p.weiss via lists.openembedded.org 
 wrote:

From: Simone Weiß 

If a recipes was modified recommand the use of `CVE_STATUS` instead if
`CVE_CHECK_IGNORE` is used. This is a depreacted variable and will
result in a warning from the cve-check.class and should hence not be
used anymore. [YOCTO #15311]

It feels like this shouldn’t be CVE_CHECK_IGNORE-specific but a general 
deprecated variable check.  Can you rename so we can easily add more variables 
later?

Relatedly, BB_RENAMED_VARIABLES is a map of variables which got deprecated but 
the solution is a simple rename, the same check should look for those too.


I agree,  this would be a good change to make for long-term 
maintainability. LGTM otherwise.


- Trevor



Ross




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#192297): 
https://lists.openembedded.org/g/openembedded-core/message/192297
Mute This Topic: https://lists.openembedded.org/mt/103112424/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] Patchtest results for [PATCH] tiff: Backport fixes for CVE-2023-6277

2023-12-05 Thread Trevor Gamblin


On 2023-12-04 04:57, Alexander Kanavin wrote:

Is this a different patchtest issue to the one that was fixed?


Looks like there are still excessive line length issues with the 
patchtest report that I need to fix.


This is what it reported:

FAIL: test Signed-off-by presence: A patch file has been added without a 
Signed-off-by tag. Sign off the added patch file 
(meta/recipes-multimedia/libtiff/tiff/545.patch) 
(test_patch.TestPatch.test_signed_off_by_presence)
FAIL: test Upstream-Status presence: Added patch file is missing Upstream-Status: 
 in the commit message 
(test_patch.TestPatch.test_upstream_status_presence_format)
FAIL: test commit message presence: Please include a commit message on your 
patch explaining the change (test_mbox.TestMbox.test_commit_message_presence)



Alex

On Sun, 3 Dec 2023 at 17:33, Patchtest
  wrote:

Thank you for your submission. Patchtest identified one
or more issues with the patch. Please see the log below for
more information:

---
Tests failed for the patch, but the results log could not be processed due to 
excessive result line length.
---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this
email with an explanation of why the patch should be accepted. If you
believe these results are due to an error in patchtest, please submit a
bug athttps://bugzilla.yoctoproject.org/  (use the 'Patchtest' category
under 'Yocto Project Subprojects'). For more information on specific
failures, see:https://wiki.yoctoproject.org/wiki/Patchtest. Thank
you!




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#191841): 
https://lists.openembedded.org/g/openembedded-core/message/191841
Mute This Topic: https://lists.openembedded.org/mt/102954001/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] patchtest: shorten patch signed-off-by test output

2023-11-29 Thread Trevor Gamblin
The patch Signed-off-by test's output line is excessively long, and can
trigger a failsafe in the patchtest automated service's email content
generation. Shorten the output by reducing redundant phrasing and using
os.path.basename to get only the failing patch's name, not the entire
path, as the submitter should have a good idea of where it is located
regardless.

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/tests/test_patch.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/lib/patchtest/tests/test_patch.py 
b/meta/lib/patchtest/tests/test_patch.py
index 65d0f930b05..d7187a0cb1b 100644
--- a/meta/lib/patchtest/tests/test_patch.py
+++ b/meta/lib/patchtest/tests/test_patch.py
@@ -6,6 +6,7 @@
 #
 
 import base
+import os
 import parse_signed_off_by
 import parse_upstream_status
 import pyparsing
@@ -87,7 +88,7 @@ class TestPatch(base.Base):
 if TestPatch.prog.search_string(payload):
 break
 else:
-self.fail('A patch file has been added without a Signed-off-by 
tag. Sign off the added patch file (%s)' % newpatch.path)
+self.fail('A patch file has been added without a Signed-off-by 
tag: \'%s\'' % os.path.basename(newpatch.path))
 
 def test_cve_tag_format(self):
 for commit in TestPatch.commits:
-- 
2.43.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#191453): 
https://lists.openembedded.org/g/openembedded-core/message/191453
Mute This Topic: https://lists.openembedded.org/mt/102872555/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] Patchtest results for [PATCH v2] systemd-boot: fix build issues on armv7a-linux

2023-11-28 Thread Trevor Gamblin


On 2023-11-28 06:05, Alexander Kanavin wrote:

But what was the excessive line that caused patchtest to not say
anything useful? Can patchtest trim it or otherwise do better?


Looks like the usual warning line about not having a S-o-B became too 
long because it included the full path for the patch:


FAIL: test Signed-off-by presence: A patch file has been added without a 
Signed-off-by tag. Sign off the added patch file 
(meta/recipes-core/systemd/systemd/0001-meson-Pass-all-static-pie-args-to-linker.patch)
 (test_patch.TestPatch.test_signed_off_by_presence)

I thought I had caught all of these, but I'll have to tweak it so that 
it only uses the actual patch name.




Alex

On Tue, 28 Nov 2023 at 11:48, Viswanath Kraleti
  wrote:

I figured it by running patchtest. S-o-B trailer missing in .patch. I am
updating it.

On 11/28/2023 4:15 PM, Dmitry Baryshkov wrote:

not know, which tests have failed, there
is no way to fix the issue.




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#191374): 
https://lists.openembedded.org/g/openembedded-core/message/191374
Mute This Topic: https://lists.openembedded.org/mt/102828551/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][RESEND][PATCH] python3-ptest: skip test_storlines

2023-11-23 Thread Trevor Gamblin
[YOCTO #14933]

test_storlines is yet another Python ptest that fails intermittently on
the Yocto AB, so disable it during ptests for now.

Signed-off-by: Trevor Gamblin 
---
 ...orlines-skip-due-to-load-variability.patch | 32 +++
 .../recipes-devtools/python/python3_3.11.5.bb |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 
meta/recipes-devtools/python/python3/0001-test_storlines-skip-due-to-load-variability.patch

diff --git 
a/meta/recipes-devtools/python/python3/0001-test_storlines-skip-due-to-load-variability.patch
 
b/meta/recipes-devtools/python/python3/0001-test_storlines-skip-due-to-load-variability.patch
new file mode 100644
index 000..199031d42aa
--- /dev/null
+++ 
b/meta/recipes-devtools/python/python3/0001-test_storlines-skip-due-to-load-variability.patch
@@ -0,0 +1,32 @@
+From 013ff01fdf2aa6ca69a7c80a2a2996630877e4ea Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin 
+Date: Fri, 6 Oct 2023 10:59:44 -0400
+Subject: [PATCH] test_storlines: skip due to load variability
+
+This is yet another test that intermittently fails on the Yocto AB when
+a worker is under heavy load, so skip it during testing.
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+[YOCTO #14933]
+
+Signed-off-by: Trevor Gamblin 
+---
+ Lib/test/test_ftplib.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py
+index 082a90d46b..508814d56a 100644
+--- a/Lib/test/test_ftplib.py
 b/Lib/test/test_ftplib.py
+@@ -629,6 +629,7 @@ def test_storbinary_rest(self):
+ self.client.storbinary('stor', f, rest=r)
+ self.assertEqual(self.server.handler_instance.rest, str(r))
+ 
++@unittest.skip('timing related test, dependent on load')
+ def test_storlines(self):
+ data = RETR_DATA.replace('\r\n', '\n').encode(self.client.encoding)
+ f = io.BytesIO(data)
+-- 
+2.41.0
+
diff --git a/meta/recipes-devtools/python/python3_3.11.5.bb 
b/meta/recipes-devtools/python/python3_3.11.5.bb
index 8e023c7dfb8..d375de4b19c 100644
--- a/meta/recipes-devtools/python/python3_3.11.5.bb
+++ b/meta/recipes-devtools/python/python3_3.11.5.bb
@@ -33,6 +33,7 @@ SRC_URI = 
"http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
file://0001-Avoid-shebang-overflow-on-python-config.py.patch \
file://0001-Update-test_sysconfig-for-posix_user-purelib.patch \

file://0001-skip-no_stdout_fileno-test-due-to-load-variability.patch \
+   file://0001-test_storlines-skip-due-to-load-variability.patch \
"
 
 SRC_URI:append:class-native = " \
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#191174): 
https://lists.openembedded.org/g/openembedded-core/message/191174
Mute This Topic: https://lists.openembedded.org/mt/102771224/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH v2] python3-cython: upgrade 0.29.36 -> 3.0.5

2023-11-20 Thread Trevor Gamblin
License-Update: Update license link to use https

cython 3.0.x attempts to remain compatible with 0.29.x but still makes
some major changes (in addition to fixing old issues). For a complete
overview it's best to view the CHANGES.rst doc rather than including
them here: https://github.com/cython/cython/blob/master/CHANGES.rst.

Note that more source files were added to cython_fix_sources to avoid
the following:

|WARNING: python3-cython-3.0.5-r0 do_package_qa: QA Issue: File 
/usr/src/debug/python3-cython/3.0.5-r0/Cython/Utils.c in package 
python3-cython-src contains reference to TMPDIR
|File /usr/src/debug/python3-cython/3.0.5-r0/Cython/StringIOTree.c in package 
python3-cython-src contains reference to TMPDIR
|File /usr/src/debug/python3-cython/3.0.5-r0/Cython/Compiler/Parsing.c in 
package python3-cython-src contains reference to TMPDIR
|File /usr/src/debug/python3-cython/3.0.5-r0/Cython/Compiler/Code.c in package 
python3-cython-src contains reference to TMPDIR
|File /usr/src/debug/python3-cython/3.0.5-r0/Cython/Plex/Machines.c in package 
python3-cython-src contains reference to TMPDIR
|File /usr/src/debug/python3-cython/3.0.5-r0/Cython/Plex/DFA.c in package 
python3-cython-src contains reference to TMPDIR
|File /usr/src/debug/python3-cython/3.0.5-r0/Cython/Plex/Transitions.c in 
package python3-cython-src contains reference to TMPDIR [buildpaths]

Signed-off-by: Trevor Gamblin 
---
v2 rebases the patch to apply on latest master. There was a previous
improvement made to the python3-cython recipe that was merged first.

 meta/recipes-devtools/python/python-cython.inc   | 4 ++--
 ...python3-cython_0.29.36.bb => python3-cython_3.0.5.bb} | 9 -
 2 files changed, 10 insertions(+), 3 deletions(-)
 rename meta/recipes-devtools/python/{python3-cython_0.29.36.bb => 
python3-cython_3.0.5.bb} (72%)

diff --git a/meta/recipes-devtools/python/python-cython.inc 
b/meta/recipes-devtools/python/python-cython.inc
index 6aec6b012f1..e757e3f7c87 100644
--- a/meta/recipes-devtools/python/python-cython.inc
+++ b/meta/recipes-devtools/python/python-cython.inc
@@ -5,11 +5,11 @@ It's designed to bridge the gap between the nice, high-level, 
easy-to-use world
 and the messy, low-level world of C."
 SECTION = "devel/python"
 LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e23fadd6ceef8c618fc1c65191d846fa"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=61c3ee8961575861fa86c7e62bc9f69c"
 PYPI_PACKAGE = "Cython"
 BBCLASSEXTEND = "native nativesdk"
 
-SRC_URI[sha256sum] = 
"41c0cfd2d754e383c9eeb95effc9aa4ab847d0c9747077ddd7c0dcb68c3bc01f"
+SRC_URI[sha256sum] = 
"39318348db488a2f24e7c84e08bdc82f2624853c0fea8b475ea0b70b27176492"
 UPSTREAM_CHECK_REGEX = "Cython-(?P.*)\.tar"
 
 inherit pypi
diff --git a/meta/recipes-devtools/python/python3-cython_0.29.36.bb 
b/meta/recipes-devtools/python/python3-cython_3.0.5.bb
similarity index 72%
rename from meta/recipes-devtools/python/python3-cython_0.29.36.bb
rename to meta/recipes-devtools/python/python3-cython_3.0.5.bb
index 07638d7ad78..342c0f8f3fe 100644
--- a/meta/recipes-devtools/python/python3-cython_0.29.36.bb
+++ b/meta/recipes-devtools/python/python3-cython_3.0.5.bb
@@ -20,14 +20,21 @@ do_install:append() {
 PACKAGESPLITFUNCS =+ "cython_fix_sources"
 
 cython_fix_sources () {
-   for f in ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Compiler/FlowControl.c \
+   for f in ${PKGD}${TARGET_DBSRC_DIR}/Cython/Compiler/Code.c \
+   ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Compiler/FlowControl.c \
${PKGD}${TARGET_DBGSRC_DIR}/Cython/Compiler/FusedNode.c \
+   ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Compiler/Parsing.c \
${PKGD}${TARGET_DBGSRC_DIR}/Cython/Compiler/Scanning.c \
${PKGD}${TARGET_DBGSRC_DIR}/Cython/Compiler/Visitor.c \
${PKGD}${TARGET_DBGSRC_DIR}/Cython/Plex/Actions.c \
+   ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Plex/DFA.c \
+   ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Plex/Machines.c \
${PKGD}${TARGET_DBGSRC_DIR}/Cython/Plex/Scanners.c \
+   ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Plex/Transitions.c \
${PKGD}${TARGET_DBGSRC_DIR}/Cython/Runtime/refnanny.c \
${PKGD}${TARGET_DBGSRC_DIR}/Cython/Tempita/_tempita.c \
+   ${PKGD}${TARGET_DBGSRC_DIR}/Cython/StringIOTree.c \
+   ${PKGD}${TARGET_DBGSRC_DIR}/Cython/Utils.c \

${PKGD}${libdir}/${PYTHON_DIR}/site-packages/Cython*/SOURCES.txt; do
if [ -e $f ]; then
sed -i -e 
's#${WORKDIR}/Cython-${PV}#${TARGET_DBGSRC_DIR}#g' $f
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#190937): 
https://lists.openembedded.org/g/openembedded-core/message/190937
Mute This Topic: https://lists.openembedded.org/mt/102716940/21656
Group O

Re: [OE-core][PATCH 4/4] python3-cython: upgrade 0.29.36 -> 3.0.5

2023-11-20 Thread Trevor Gamblin


On 2023-11-20 16:11, Alexandre Belloni wrote:

Hello Trevor,

Do you mind rebasing, this cnflicts with changes that are now on master?

Sure. Working on a new revision now.


On 17/11/2023 14:49:05-0500, Trevor Gamblin wrote:

License-Update: Update license link to use https

cython 3.0.x attempts to remain compatible with 0.29.x but still makes
some major changes (in addition to fixing old issues). For a complete
overview it's best to view the CHANGES.rst doc rather than including
them here: https://github.com/cython/cython/blob/master/CHANGES.rst.

Note that more source files were added to cython_fix_sources to avoid
the following:

|WARNING: python3-cython-3.0.5-r0 do_package_qa: QA Issue: File 
/usr/src/debug/python3-cython/3.0.5-r0/Cython/Utils.c in package 
python3-cython-src contains reference to TMPDIR
|File /usr/src/debug/python3-cython/3.0.5-r0/Cython/StringIOTree.c in package 
python3-cython-src contains reference to TMPDIR
|File /usr/src/debug/python3-cython/3.0.5-r0/Cython/Compiler/Parsing.c in 
package python3-cython-src contains reference to TMPDIR
|File /usr/src/debug/python3-cython/3.0.5-r0/Cython/Compiler/Code.c in package 
python3-cython-src contains reference to TMPDIR
|File /usr/src/debug/python3-cython/3.0.5-r0/Cython/Plex/Machines.c in package 
python3-cython-src contains reference to TMPDIR
|File /usr/src/debug/python3-cython/3.0.5-r0/Cython/Plex/DFA.c in package 
python3-cython-src contains reference to TMPDIR
|File /usr/src/debug/python3-cython/3.0.5-r0/Cython/Plex/Transitions.c in 
package python3-cython-src contains reference to TMPDIR [buildpaths]

Signed-off-by: Trevor Gamblin 
---
  meta/recipes-devtools/python/python-cython.inc | 4 ++--
  .../{python3-cython_0.29.36.bb => python3-cython_3.0.5.bb} | 7 +++
  2 files changed, 9 insertions(+), 2 deletions(-)
  rename meta/recipes-devtools/python/{python3-cython_0.29.36.bb => 
python3-cython_3.0.5.bb} (73%)

diff --git a/meta/recipes-devtools/python/python-cython.inc 
b/meta/recipes-devtools/python/python-cython.inc
index 6aec6b012f1..e757e3f7c87 100644
--- a/meta/recipes-devtools/python/python-cython.inc
+++ b/meta/recipes-devtools/python/python-cython.inc
@@ -5,11 +5,11 @@ It's designed to bridge the gap between the nice, high-level, 
easy-to-use world
  and the messy, low-level world of C."
  SECTION = "devel/python"
  LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e23fadd6ceef8c618fc1c65191d846fa"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=61c3ee8961575861fa86c7e62bc9f69c"
  PYPI_PACKAGE = "Cython"
  BBCLASSEXTEND = "native nativesdk"
  
-SRC_URI[sha256sum] = "41c0cfd2d754e383c9eeb95effc9aa4ab847d0c9747077ddd7c0dcb68c3bc01f"

+SRC_URI[sha256sum] = 
"39318348db488a2f24e7c84e08bdc82f2624853c0fea8b475ea0b70b27176492"
  UPSTREAM_CHECK_REGEX = "Cython-(?P.*)\.tar"
  
  inherit pypi

diff --git a/meta/recipes-devtools/python/python3-cython_0.29.36.bb 
b/meta/recipes-devtools/python/python3-cython_3.0.5.bb
similarity index 73%
rename from meta/recipes-devtools/python/python3-cython_0.29.36.bb
rename to meta/recipes-devtools/python/python3-cython_3.0.5.bb
index 78be2b94edb..94074aaf811 100644
--- a/meta/recipes-devtools/python/python3-cython_0.29.36.bb
+++ b/meta/recipes-devtools/python/python3-cython_3.0.5.bb
@@ -24,10 +24,17 @@ cython_fix_sources () {

${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Compiler/FusedNode.c \

${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Compiler/Scanning.c \

${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Compiler/Visitor.c \
+   
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Compiler/Parsing.c \
+   
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Compiler/Code.c \

${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Plex/Actions.c \

${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Plex/Scanners.c \
+   
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Plex/Machines.c \
+   
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Plex/DFA.c \
+   
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Plex/Transitions.c \

${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Runtime/refnanny.c \

${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Tempita/_tempita.c \
+   
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/StringIOTree.c \
+   
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Utils.c \

${PKGD}${libdir}/${PYTHON_DIR}/site-packages/Cython*/SOURCES.txt; do
if [ -e $f ]; then
sed -i -e 
's#${WORKDIR}/Cython-${PV}#/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}#g' $f
--
2.42.0






-=-=-=-=-=

[OE-core][PATCH 1/4] python3-mako: upgrade 1.2.4 -> 1.3.0

2023-11-17 Thread Trevor Gamblin
License-Update: Updated copyright year

Changelog: https://docs.makotemplates.org/en/latest/changelog.html#change-1.3.0

Signed-off-by: Trevor Gamblin 
---
 .../python/{python3-mako_1.2.4.bb => python3-mako_1.3.0.bb}   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-devtools/python/{python3-mako_1.2.4.bb => 
python3-mako_1.3.0.bb} (73%)

diff --git a/meta/recipes-devtools/python/python3-mako_1.2.4.bb 
b/meta/recipes-devtools/python/python3-mako_1.3.0.bb
similarity index 73%
rename from meta/recipes-devtools/python/python3-mako_1.2.4.bb
rename to meta/recipes-devtools/python/python3-mako_1.3.0.bb
index 9860058723c..d180e05ceac 100644
--- a/meta/recipes-devtools/python/python3-mako_1.2.4.bb
+++ b/meta/recipes-devtools/python/python3-mako_1.3.0.bb
@@ -2,13 +2,13 @@ SUMMARY = "Templating library for Python"
 HOMEPAGE = "http://www.makotemplates.org/;
 SECTION = "devel/python"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=ad08dd28df88e64b35bcac27c822ee34"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=fcc01df649aee6c59dcb254c894ea0d4"
 
 PYPI_PACKAGE = "Mako"
 
 inherit pypi python_setuptools_build_meta
 
-SRC_URI[sha256sum] = 
"d60a3903dc3bb01a18ad6a89cdbe2e4eadc69c0bc8ef1e3773ba53d44c3f7a34"
+SRC_URI[sha256sum] = 
"e3a9d388fd00e87043edbe8792f45880ac0114e9c4adc69f6e9bfb2c55e3b11b"
 
 RDEPENDS:${PN} = "${PYTHON_PN}-html \
   ${PYTHON_PN}-markupsafe \
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#190857): 
https://lists.openembedded.org/g/openembedded-core/message/190857
Mute This Topic: https://lists.openembedded.org/mt/102654594/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 2/4] python3-trove-classifiers: upgrade 2023.10.18 -> 2023.11.14

2023-11-17 Thread Trevor Gamblin
Changelog:
0b8493f Add `Programming Language :: Go` (#159)
68d983d Update release.yml (#162)
bd86b09 Update release.yml (#160)
44d951c Added PySimpleGUI versions 4 and 5 as a Framework (#157)
29ca293 Add Odoo 17 trove classifier (#156)

Signed-off-by: Trevor Gamblin 
---
 ...rs_2023.10.18.bb => python3-trove-classifiers_2023.11.14.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-devtools/python/{python3-trove-classifiers_2023.10.18.bb 
=> python3-trove-classifiers_2023.11.14.bb} (87%)

diff --git 
a/meta/recipes-devtools/python/python3-trove-classifiers_2023.10.18.bb 
b/meta/recipes-devtools/python/python3-trove-classifiers_2023.11.14.bb
similarity index 87%
rename from meta/recipes-devtools/python/python3-trove-classifiers_2023.10.18.bb
rename to meta/recipes-devtools/python/python3-trove-classifiers_2023.11.14.bb
index b0c1b84cc5a..a6c7e95c515 100644
--- a/meta/recipes-devtools/python/python3-trove-classifiers_2023.10.18.bb
+++ b/meta/recipes-devtools/python/python3-trove-classifiers_2023.11.14.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/pypa/trove-classifiers;
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
 
-SRC_URI[sha256sum] = 
"2cdfcc7f31f7ffdd57666a9957296089ac72daad4d11ab5005060e5cd7e29939"
+SRC_URI[sha256sum] = 
"64b5e78305a5de347f2cd7ec8c12d704a3ef0cb85cc10c0ca5f73488d1c201f8"
 
 inherit pypi python_setuptools_build_meta ptest
 
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#190858): 
https://lists.openembedded.org/g/openembedded-core/message/190858
Mute This Topic: https://lists.openembedded.org/mt/102654595/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 4/4] python3-cython: upgrade 0.29.36 -> 3.0.5

2023-11-17 Thread Trevor Gamblin
License-Update: Update license link to use https

cython 3.0.x attempts to remain compatible with 0.29.x but still makes
some major changes (in addition to fixing old issues). For a complete
overview it's best to view the CHANGES.rst doc rather than including
them here: https://github.com/cython/cython/blob/master/CHANGES.rst.

Note that more source files were added to cython_fix_sources to avoid
the following:

|WARNING: python3-cython-3.0.5-r0 do_package_qa: QA Issue: File 
/usr/src/debug/python3-cython/3.0.5-r0/Cython/Utils.c in package 
python3-cython-src contains reference to TMPDIR
|File /usr/src/debug/python3-cython/3.0.5-r0/Cython/StringIOTree.c in package 
python3-cython-src contains reference to TMPDIR
|File /usr/src/debug/python3-cython/3.0.5-r0/Cython/Compiler/Parsing.c in 
package python3-cython-src contains reference to TMPDIR
|File /usr/src/debug/python3-cython/3.0.5-r0/Cython/Compiler/Code.c in package 
python3-cython-src contains reference to TMPDIR
|File /usr/src/debug/python3-cython/3.0.5-r0/Cython/Plex/Machines.c in package 
python3-cython-src contains reference to TMPDIR
|File /usr/src/debug/python3-cython/3.0.5-r0/Cython/Plex/DFA.c in package 
python3-cython-src contains reference to TMPDIR
|File /usr/src/debug/python3-cython/3.0.5-r0/Cython/Plex/Transitions.c in 
package python3-cython-src contains reference to TMPDIR [buildpaths]

Signed-off-by: Trevor Gamblin 
---
 meta/recipes-devtools/python/python-cython.inc | 4 ++--
 .../{python3-cython_0.29.36.bb => python3-cython_3.0.5.bb} | 7 +++
 2 files changed, 9 insertions(+), 2 deletions(-)
 rename meta/recipes-devtools/python/{python3-cython_0.29.36.bb => 
python3-cython_3.0.5.bb} (73%)

diff --git a/meta/recipes-devtools/python/python-cython.inc 
b/meta/recipes-devtools/python/python-cython.inc
index 6aec6b012f1..e757e3f7c87 100644
--- a/meta/recipes-devtools/python/python-cython.inc
+++ b/meta/recipes-devtools/python/python-cython.inc
@@ -5,11 +5,11 @@ It's designed to bridge the gap between the nice, high-level, 
easy-to-use world
 and the messy, low-level world of C."
 SECTION = "devel/python"
 LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e23fadd6ceef8c618fc1c65191d846fa"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=61c3ee8961575861fa86c7e62bc9f69c"
 PYPI_PACKAGE = "Cython"
 BBCLASSEXTEND = "native nativesdk"
 
-SRC_URI[sha256sum] = 
"41c0cfd2d754e383c9eeb95effc9aa4ab847d0c9747077ddd7c0dcb68c3bc01f"
+SRC_URI[sha256sum] = 
"39318348db488a2f24e7c84e08bdc82f2624853c0fea8b475ea0b70b27176492"
 UPSTREAM_CHECK_REGEX = "Cython-(?P.*)\.tar"
 
 inherit pypi
diff --git a/meta/recipes-devtools/python/python3-cython_0.29.36.bb 
b/meta/recipes-devtools/python/python3-cython_3.0.5.bb
similarity index 73%
rename from meta/recipes-devtools/python/python3-cython_0.29.36.bb
rename to meta/recipes-devtools/python/python3-cython_3.0.5.bb
index 78be2b94edb..94074aaf811 100644
--- a/meta/recipes-devtools/python/python3-cython_0.29.36.bb
+++ b/meta/recipes-devtools/python/python3-cython_3.0.5.bb
@@ -24,10 +24,17 @@ cython_fix_sources () {

${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Compiler/FusedNode.c \

${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Compiler/Scanning.c \

${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Compiler/Visitor.c \
+   
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Compiler/Parsing.c \
+   
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Compiler/Code.c \

${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Plex/Actions.c \

${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Plex/Scanners.c \
+   
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Plex/Machines.c \
+   
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Plex/DFA.c \
+   
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Plex/Transitions.c \

${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Runtime/refnanny.c \

${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Tempita/_tempita.c \
+   
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/StringIOTree.c \
+   
${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython/Utils.c \

${PKGD}${libdir}/${PYTHON_DIR}/site-packages/Cython*/SOURCES.txt; do
if [ -e $f ]; then
sed -i -e 
's#${WORKDIR}/Cython-${PV}#/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}#g' $f
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#190860): 
https://lists.openembedded.org/g/openembedded-core/message/190860
Mute This Topic: https://lists.openembedded.org/mt/102654597/21656
Group Owner: open

[OE-core][PATCH 3/4] python3-numpy: upgrade 1.26.0 -> 1.26.2

2023-11-17 Thread Trevor Gamblin
There were 45 pull requests in 1.26.1 and 1.26.2. See changelog:
https://github.com/numpy/numpy/releases

Signed-off-by: Trevor Gamblin 
---
 .../python/{python3-numpy_1.26.0.bb => python3-numpy_1.26.2.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-devtools/python/{python3-numpy_1.26.0.bb => 
python3-numpy_1.26.2.bb} (96%)

diff --git a/meta/recipes-devtools/python/python3-numpy_1.26.0.bb 
b/meta/recipes-devtools/python/python3-numpy_1.26.2.bb
similarity index 96%
rename from meta/recipes-devtools/python/python3-numpy_1.26.0.bb
rename to meta/recipes-devtools/python/python3-numpy_1.26.2.bb
index 3ae40a33fb4..00c09b29954 100644
--- a/meta/recipes-devtools/python/python3-numpy_1.26.0.bb
+++ b/meta/recipes-devtools/python/python3-numpy_1.26.2.bb
@@ -13,7 +13,7 @@ SRC_URI = 
"${GITHUB_BASE_URI}/download/v${PV}/${SRCNAME}-${PV}.tar.gz \
file://fix_reproducibility.patch \
file://run-ptest \
"
-SRC_URI[sha256sum] = 
"f93fc78fe8bf15afe2b8d6b6499f1c73953169fad1e9a8dd086cdff3190e7fdf"
+SRC_URI[sha256sum] = 
"f65738447676ab5777f11e6bbbdb8ce11b785e105f690bc45966574816b6d3ea"
 
 GITHUB_BASE_URI = "https://github.com/numpy/numpy/releases;
 UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P\d+(\.\d+)+)$"
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#190859): 
https://lists.openembedded.org/g/openembedded-core/message/190859
Mute This Topic: https://lists.openembedded.org/mt/102654596/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [AUH] Upgrade status: 2023-11-15

2023-11-17 Thread Trevor Gamblin


On 2023-11-17 08:33, Alexander Kanavin wrote:

On Wed, 15 Nov 2023 at 15:45, Auto Upgrade Helper  wrote:

 python3-cython, 3.0.5, Trevor Gamblin 
 python3-mako, 1.3.0, Trevor Gamblin 
 python3-numpy, 1.26.2, Trevor Gamblin 
 python3-trove-classifiers, 2023.11.14, Trevor Gamblin 

 python3, 3.12.0, Trevor Gamblin 
 Trevor Gamblin 
Hello Trevor,

I'm working on python 3.12.0 update. Can you handle the other four please?

Sure thing. Thanks for doing the 3.12 upgrade.


Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#190849): 
https://lists.openembedded.org/g/openembedded-core/message/190849
Mute This Topic: https://lists.openembedded.org/mt/102606025/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: Patchtest results for [OE-core][mickledore][PATCH] grub: Fix for CVE-2023-4692 and CVE-2023-4693

2023-11-13 Thread Trevor Gamblin


On 2023-11-12 07:33, Patchtest wrote:

Thank you for your submission. Patchtest identified one
or more issues with the patch. Please see the log below for
more information:

---
Tests failed for the patch, but the results log could not be processed due to 
excessive result line length.
---


Hi,

Patchtest failed the signed-off-by test in the CVE-2023-4693 patch 
because the "Signed-off-by" lines don't have the proper email format in 
them:


+Reported-by: Maxim Suhanov 
+Signed-off-by: Maxim Suhanov 
+Reviewed-by: Daniel Kiper 
+Signed-off-by: Xiangyu Chen 

Can you correct this and resubmit?



Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this
email with an explanation of why the patch should be accepted. If you
believe these results are due to an error in patchtest, please submit a
bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category
under 'Yocto Project Subprojects'). For more information on specific
failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank
you!




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#190477): 
https://lists.openembedded.org/g/openembedded-core/message/190477
Mute This Topic: https://lists.openembedded.org/mt/102541228/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] patchtest: rework license checksum tests

2023-11-06 Thread Trevor Gamblin
Remove the pretest_lic_files_chksum_modified_not_mentioned test entirely
and use pyparsing in test_lic_files_chksum_modified_not_mentioned to
scan the patches for lines starting with either "+LIC_FILES_CHKSUM" or
"-LIC_FILES_CHKSUM".  If either is found but no "License-Update" tag is
present in the commit, fail the test.

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/tests/test_metadata.py | 40 +--
 1 file changed, 8 insertions(+), 32 deletions(-)

diff --git a/meta/lib/patchtest/tests/test_metadata.py 
b/meta/lib/patchtest/tests/test_metadata.py
index 3742760b451..b6f4456ad2e 100644
--- a/meta/lib/patchtest/tests/test_metadata.py
+++ b/meta/lib/patchtest/tests/test_metadata.py
@@ -16,6 +16,8 @@ class TestMetadata(base.Metadata):
 license_var  = 'LICENSE'
 closed   = 'CLOSED'
 lictag_re  = pyparsing.AtLineStart("License-Update:")
+lic_chksum_added = pyparsing.AtLineStart("+" + metadata_chksum)
+lic_chksum_removed = pyparsing.AtLineStart("-" + metadata_chksum)
 add_mark = pyparsing.Regex('\+ ')
 max_length = 200
 metadata_src_uri  = 'SRC_URI'
@@ -76,48 +78,22 @@ class TestMetadata(base.Metadata):
 if not lic_files_chksum:
 self.fail('%s is missing in newly added recipe' % 
self.metadata_chksum)
 
-def pretest_lic_files_chksum_modified_not_mentioned(self):
-if not self.modified:
-self.skip('No modified recipes, skipping pretest')
-# get the proper metadata values
-for pn in self.modified:
-rd = self.tinfoil.parse_recipe(pn)
-pathname = rd.getVar('FILE')
-# we are not interested in images
-if '/images/' in pathname:
-continue
-PatchTestDataStore['%s-%s-%s' % 
(self.shortid(),self.metadata_chksum,pn)] = rd.getVar(self.metadata_chksum)
-
 def test_lic_files_chksum_modified_not_mentioned(self):
 if not self.modified:
 self.skip('No modified recipes, skipping test')
 
-# get the proper metadata values
-for pn in self.modified:
-rd = self.tinfoil.parse_recipe(pn)
-pathname = rd.getVar('FILE')
-# we are not interested in images
-if '/images/' in pathname:
+for patch in self.patchset:
+# for the moment, we are just interested in metadata
+if patch.path.endswith('.patch'):
 continue
-PatchTestDataStore['%s-%s-%s' % 
(self.shortid(),self.metadata_chksum,pn)] = rd.getVar(self.metadata_chksum)
-# compare if there were changes between pre-merge and merge
-for pn in self.modified:
-pretest = PatchTestDataStore['pre%s-%s-%s' % 
(self.shortid(),self.metadata_chksum, pn)]
-test= PatchTestDataStore['%s-%s-%s' % 
(self.shortid(),self.metadata_chksum, pn)]
-
-# TODO: this is workaround to avoid false-positives when pretest 
metadata is empty (not reason found yet)
-# For more info, check bug 12284
-if not pretest:
-return
-
-if pretest != test:
+payload = str(patch)
+if (self.lic_chksum_added.search_string(payload) or 
self.lic_chksum_removed.search_string(payload)):
 # if any patch on the series contain reference on the 
metadata, fail
 for commit in self.commits:
 if self.lictag_re.search_string(commit.commit_message):
break
 else:
-self.fail('LIC_FILES_CHKSUM changed without 
"License-Update:" tag and description in commit message',
-  data=[('Current checksum', pretest), ('New 
checksum', test)])
+self.fail('LIC_FILES_CHKSUM changed without 
"License-Update:" tag and description in commit message')
 
 def test_max_line_length(self):
 for patch in self.patchset:
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#190231): 
https://lists.openembedded.org/g/openembedded-core/message/190231
Mute This Topic: https://lists.openembedded.org/mt/102422456/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] Patchtest results for [PATCH] cairo: upgrade 1.16.0 -> 1.18.0

2023-11-06 Thread Trevor Gamblin


On 2023-11-06 07:25, Alexander Kanavin wrote:

On Mon, 6 Nov 2023 at 03:54, Patchtest
 wrote:

Testing patch /home/patchtest/share/mboxes/cairo-upgrade-1.16.0---1.18.0.patch

FAIL: test lic files chksum modified not mentioned: LIC_FILES_CHKSUM changed without 
"License-Update:" tag and description in commit message 
(test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)

This doesn't seem correct, as the patch doesn't touch LIC_FILES_CHKSUM.

You're right. Having a look...


Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#190214): 
https://lists.openembedded.org/g/openembedded-core/message/190214
Mute This Topic: https://lists.openembedded.org/mt/102413470/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] patchtest-send-results: fix sender parsing

2023-11-02 Thread Trevor Gamblin
Not all mbox 'from' fields will contain angle brackets, so the
re.findall invocation used for getting a reply_address may fail. Use a
simpler reference to the field to get the sender's email address.

Signed-off-by: Trevor Gamblin 
---
 scripts/patchtest-send-results | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results
index 1df81f943a1..71b73f0940f 100755
--- a/scripts/patchtest-send-results
+++ b/scripts/patchtest-send-results
@@ -59,7 +59,7 @@ subject_line = f"Patchtest results for {mbox_subject}"
 
 # extract the submitter email address and use it as the reply address
 # for the results
-reply_address = re.findall("<(.*)>", mbox[0]['from'])[0]
+reply_address = mbox[0]['from']
 
 # extract the message ID and use that as the in-reply-to address
 in_reply_to = re.findall("<(.*)>", mbox[0]['Message-ID'])[0]
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#190090): 
https://lists.openembedded.org/g/openembedded-core/message/190090
Mute This Topic: https://lists.openembedded.org/mt/102347705/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] patchtest-send-results: add In-Reply-To

2023-11-01 Thread Trevor Gamblin
Rework the script for sending results to use send_raw_email and specify
the 'In-Reply-To' field so that patchtest replies to the emails, rather
than sending them standalone to the submitter and mailing list.

Signed-off-by: Trevor Gamblin 
---
Note that this patch is a reworded version of a previous submission with
subject '[OE-core][PATCH] patchtest-send-results: fix sender', but with
a more accurate commit message and subject line.

 scripts/patchtest-send-results | 39 ++
 1 file changed, 21 insertions(+), 18 deletions(-)

diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results
index 01b071159be..1df81f943a1 100755
--- a/scripts/patchtest-send-results
+++ b/scripts/patchtest-send-results
@@ -59,7 +59,16 @@ subject_line = f"Patchtest results for {mbox_subject}"
 
 # extract the submitter email address and use it as the reply address
 # for the results
-reply_address = re.findall("<(.*)>", mbox[0]['from'])
+reply_address = re.findall("<(.*)>", mbox[0]['from'])[0]
+
+# extract the message ID and use that as the in-reply-to address
+in_reply_to = re.findall("<(.*)>", mbox[0]['Message-ID'])[0]
+
+# the address the results email is sent from
+from_address = "patcht...@automation.yoctoproject.org"
+
+# mailing list to CC
+cc_address = "openembedded-core@lists.openembedded.org"
 
 if "FAIL" in testresult:
 reply_contents = None
@@ -70,24 +79,18 @@ if "FAIL" in testresult:
 reply_contents = greeting + testresult + suggestions
 
 ses_client = boto3.client('ses', region_name='us-west-2')
-response = ses_client.send_email(
-Source='patcht...@automation.yoctoproject.org',
-Destination={
-'CcAddresses': ['openembedded-core@lists.openembedded.org'],
+raw_data = 'From: ' + from_address + '\nTo: ' + reply_address + \
+'\nCC: ' + cc_address + '\nSubject:' + subject_line + \
+'\nIn-Reply-To:' + in_reply_to + \
+'\nMIME-Version: 1.0" + \
+"\nContent-type: 
Multipart/Mixed;boundary="NextPart"\n\n--NextPart\nContent-Type: 
text/plain\n\n' + \
+reply_contents + '\n\n--NextPart'
+response = ses_client.send_raw_email(
+Source="patcht...@automation.yoctoproject.org",
+RawMessage={
+"Data": raw_data,
 },
-ReplyToAddresses=reply_address,
-Message={
-'Subject': {
-'Data': subject_line,
-'Charset': 'utf-8'
-},
-'Body': {
-'Text': {
-'Data': reply_contents,
-'Charset': 'utf-8'
-}
-}
-}
 )
+
 else:
 print(f"No failures identified for {args.patch}.")
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#190047): 
https://lists.openembedded.org/g/openembedded-core/message/190047
Mute This Topic: https://lists.openembedded.org/mt/102325638/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] patchtest: remove test for CVE tag in mbox

2023-11-01 Thread Trevor Gamblin
After patchtest went live it was determined that testing for a CVE tag
in the mbox commit message is unnecessary, since it will already be in
the shortlog and in any carried patches. Remove the test and the
associated selftest files so that its absence isn't flagged in future
test results.

Signed-off-by: Trevor Gamblin 
---
 ...x.test_cve_presence_in_commit_message.fail | 72 --
 ...x.test_cve_presence_in_commit_message.pass | 74 ---
 meta/lib/patchtest/tests/test_mbox.py | 24 --
 3 files changed, 170 deletions(-)
 delete mode 100644 
meta/lib/patchtest/selftest/files/TestMbox.test_cve_presence_in_commit_message.fail
 delete mode 100644 
meta/lib/patchtest/selftest/files/TestMbox.test_cve_presence_in_commit_message.pass

diff --git 
a/meta/lib/patchtest/selftest/files/TestMbox.test_cve_presence_in_commit_message.fail
 
b/meta/lib/patchtest/selftest/files/TestMbox.test_cve_presence_in_commit_message.fail
deleted file mode 100644
index d40b8a936bf..000
--- 
a/meta/lib/patchtest/selftest/files/TestMbox.test_cve_presence_in_commit_message.fail
+++ /dev/null
@@ -1,72 +0,0 @@
-From 14d72f6973270f78455a8628143f2cff90e8f41e Mon Sep 17 00:00:00 2001
-From: Trevor Gamblin 
-Date: Tue, 29 Aug 2023 14:12:27 -0400
-Subject: [PATCH] selftest-hello: fix CVE-1234-56789
-
-This patch should fail the test for CVE presence in the mbox commit message.
-
-Signed-off-by: Trevor Gamblin 

- .../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
-
-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
-new file mode 100644
-index 00..869cfb6fe5
 /dev/null
-+++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
-+From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
-+From: Trevor Gamblin 
-+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 
-+---
-+ 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
-+@@ -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
-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
 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://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"
--- 
-2.41.0
-
diff --git 
a/meta/lib/patchtest/selftest/files/TestMbox.test_cve_presence_in_commit_message.pass
 
b/meta/lib/patchtest/selftest/files/TestMbox.test_cve_presence_in_commit_message.pass
deleted file mode 100644
index 433c7a450ad..000
--- 
a/meta/lib/patchtest/selftest/files/TestMbox.test_cve_presence_in_commit_message.pass
+++ /dev/null
@@ -1,74 +0,0 @@
-From 14d72f6973270f78455a8628143f2cff90e8f41e Mon Sep 17 00:00:00 2001
-From: Trevor Gamblin 
-Date: Tue, 29 Aug 2023 14:12:27 -0400
-Subject: [PATCH] selftest-hello: fix CVE-1234-56789
-
-This test should pass the mbox cve tag test.
-
-CVE: CVE-1234-56789
-
-Signed-off-by: Trevor Gamblin 

- .../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
-
-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
-new file mode 100644
-index 00..869cfb6fe5
 /dev/null
-+++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch
-@@ -0,0 +1,27 @@
-+From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001
-+From: Trevor Gamblin 
-+Date: 

Re: Patchtest results for [OE-core][PATCH] patchtest: shorten test result outputs

2023-11-01 Thread Trevor Gamblin


On 2023-11-01 09:48, Steve Sakoman wrote:

On Tue, Oct 31, 2023 at 7:31 PM Marta Rybczynska  wrote:




On Wed, 1 Nov 2023, 11:48 Anuj Mittal,  wrote:

On Tue, 2023-10-31 at 19:33 -0700, Tim Orling wrote:


On Tue, Oct 31, 2023 at 7:26 PM Anuj Mittal 
wrote:

On Tue, 2023-10-31 at 14:20 +, Trevor Gamblin wrote:

Thank you for your submission. Patchtest identified one
or more issues with the patch. Please see the log below for
more information:

---
Testing patch /home/patchtest/share/mboxes/patchtest-shorten-
test-
result-outputs.patch

FAIL: test CVE presence in commit message: A CVE tag should be
provided in the commit message with format: "CVE: CVE--"
(test_mbox.TestMbox.test_cve_presence_in_commit_message)

Is this a requirement to have this in commit message in this
format? I
don't think this was being followed until now. A lot of patches
seem to
be failing this test as a result.



This was required when patchtest was running previously. It has been
ignored for a while now, but that does not mean we should not enforce
it. It should be documented as required.

The tags allow for machines to parse the relevant info. Anything else
is purely random and chaos.

The tag is already required to be present in the CVE patch itself which
is/can be parsed by scripts which actually I think is a better way of
detecting whether a CVE is patched rather than looking at commit
messages.

If having it in a specific format in commit message as well helps,
sure. It shouldn't take time to add it but we seem to be adding too
many rules ...


(adding Steve)

I agree with Anuj, and I do not remember seeing a rule to put the
CVE number in the commit message. We already have it in the
patch file name (recommended) and inside the patch file itself.
Those two places are enough in my opinion. In fact, it will likely
be there in the commit message (its title), so repeating it does
not make much logical sense.

In fact, I have an update of the manual with more detailed information
on submitting CVE fixes and looking for a resolution of this question
to submit it :)

Steve, does such additional tag in the commit message make it
easier for you?

No.  In most cases it seems to add no value, since the cve number is
already in the shortlog, the filename of the patch(es), and the CVE
tag in the patch file(s).

I haven't been requiring it, so have no issue with removing that test
in patchtest.
I've got a patch ready to do this, just letting the selftests run to 
ensure nothing's broken before submission.


Steve




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189915): 
https://lists.openembedded.org/g/openembedded-core/message/189915
Mute This Topic: https://lists.openembedded.org/mt/102275009/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] patchtest-send-results: fix sender

2023-11-01 Thread Trevor Gamblin
the reply_address being used was actually the original patch sender's
email address, so when patchtest sent results they would appear to be
from the submitter rather than patcht...@automation.yoctoproject.org.
Use send_raw_email and construct the raw data more explicitly to avoid
this.

Signed-off-by: Trevor Gamblin 
---
 scripts/patchtest-send-results | 39 ++
 1 file changed, 21 insertions(+), 18 deletions(-)

diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results
index 01b071159be..1df81f943a1 100755
--- a/scripts/patchtest-send-results
+++ b/scripts/patchtest-send-results
@@ -59,7 +59,16 @@ subject_line = f"Patchtest results for {mbox_subject}"
 
 # extract the submitter email address and use it as the reply address
 # for the results
-reply_address = re.findall("<(.*)>", mbox[0]['from'])
+reply_address = re.findall("<(.*)>", mbox[0]['from'])[0]
+
+# extract the message ID and use that as the in-reply-to address
+in_reply_to = re.findall("<(.*)>", mbox[0]['Message-ID'])[0]
+
+# the address the results email is sent from
+from_address = "patcht...@automation.yoctoproject.org"
+
+# mailing list to CC
+cc_address = "openembedded-core@lists.openembedded.org"
 
 if "FAIL" in testresult:
 reply_contents = None
@@ -70,24 +79,18 @@ if "FAIL" in testresult:
 reply_contents = greeting + testresult + suggestions
 
 ses_client = boto3.client('ses', region_name='us-west-2')
-response = ses_client.send_email(
-Source='patcht...@automation.yoctoproject.org',
-Destination={
-'CcAddresses': ['openembedded-core@lists.openembedded.org'],
+raw_data = 'From: ' + from_address + '\nTo: ' + reply_address + \
+'\nCC: ' + cc_address + '\nSubject:' + subject_line + \
+'\nIn-Reply-To:' + in_reply_to + \
+'\nMIME-Version: 1.0" + \
+"\nContent-type: 
Multipart/Mixed;boundary="NextPart"\n\n--NextPart\nContent-Type: 
text/plain\n\n' + \
+reply_contents + '\n\n--NextPart'
+response = ses_client.send_raw_email(
+Source="patcht...@automation.yoctoproject.org",
+RawMessage={
+"Data": raw_data,
 },
-ReplyToAddresses=reply_address,
-Message={
-'Subject': {
-'Data': subject_line,
-'Charset': 'utf-8'
-},
-'Body': {
-'Text': {
-'Data': reply_contents,
-'Charset': 'utf-8'
-}
-}
-}
 )
+
 else:
 print(f"No failures identified for {args.patch}.")
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189911): 
https://lists.openembedded.org/g/openembedded-core/message/189911
Mute This Topic: https://lists.openembedded.org/mt/102319298/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] patchtest: make pylint tests compatible with 3.x

2023-10-31 Thread Trevor Gamblin
pylint 3.x has removed epylint, which is now a separate module. To avoid
adding another recipe or using outdated modules, modify the
test_python_pylint tests so that they use the standard pylint API.

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/tests/test_python_pylint.py | 17 -
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/meta/lib/patchtest/tests/test_python_pylint.py 
b/meta/lib/patchtest/tests/test_python_pylint.py
index 304b2d5ee9a..ef315e591ca 100644
--- a/meta/lib/patchtest/tests/test_python_pylint.py
+++ b/meta/lib/patchtest/tests/test_python_pylint.py
@@ -5,8 +5,11 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
 import base
+from io import StringIO
 from data import PatchTestInput
-import pylint.epylint as lint
+from pylint.reporters.text import TextReporter
+import pylint.lint as lint
+
 
 class PyLint(base.Base):
 pythonpatches  = []
@@ -32,8 +35,10 @@ class PyLint(base.Base):
 def pretest_pylint(self):
 for pythonpatch in self.pythonpatches:
 if pythonpatch.is_modified_file:
-(pylint_stdout, pylint_stderr) = lint.py_run(command_options = 
pythonpatch.path + self.pylint_options, return_std=True)
-for line in pylint_stdout.readlines():
+pylint_output = StringIO()
+reporter = TextReporter(pylint_output)
+lint.Run([self.pylint_options, pythonpatch.path], 
reporter=reporter, exit=False)
+for line in pylint_output.readlines():
 if not '*' in line:
 if line.strip():
 self.pylint_pretest[line.strip().split(' ',1)[0]] 
= line.strip().split(' ',1)[1]
@@ -46,8 +51,10 @@ class PyLint(base.Base):
 path = pythonpatch.target_file[2:]
 else:
 path = pythonpatch.path
-(pylint_stdout, pylint_stderr) = lint.py_run(command_options = 
path + self.pylint_options, return_std=True)
-for line in pylint_stdout.readlines():
+pylint_output = StringIO()
+reporter = TextReporter(pylint_output)
+lint.Run([self.pylint_options, pythonpatch.path], 
reporter=reporter, exit=False)
+for line in pylint_output.readlines():
 if not '*' in line:
 if line.strip():
 self.pylint_test[line.strip().split(' ',1)[0]] = 
line.strip().split(' ',1)[1]
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189867): 
https://lists.openembedded.org/g/openembedded-core/message/189867
Mute This Topic: https://lists.openembedded.org/mt/102303546/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: Patchtest results for [OE-core][PATCH] patchtest: shorten test result outputs

2023-10-31 Thread Trevor Gamblin


On 2023-10-31 10:54, Michael Opdenacker wrote:

Hi Trevor,

On 31.10.23 at 15:20, Trevor Gamblin wrote:

Thank you for your submission. Patchtest identified one
or more issues with the patch. Please see the log below for
more information:

---
Testing patch 
/home/patchtest/share/mboxes/patchtest-shorten-test-result-outputs.patch


Thanks for this very useful service!

However, could the replies have an "In-Reply-To" header so that e-mail 
clients can put the reply in the same thread as the patch?


Hi Michael,

There is actually already a bug open: 
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15270


I'm looking at it now, but still figuring out the implementation.

- Trevor



Happy to create an entry in Bugzilla if this helps.
Cheers
Michael.


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189849): 
https://lists.openembedded.org/g/openembedded-core/message/189849
Mute This Topic: https://lists.openembedded.org/mt/102275009/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Patchtest results for [OE-core][PATCH] patchtest: shorten test result outputs

2023-10-31 Thread Trevor Gamblin
Thank you for your submission. Patchtest identified one
or more issues with the patch. Please see the log below for
more information:

---
Testing patch 
/home/patchtest/share/mboxes/patchtest-shorten-test-result-outputs.patch

FAIL: test CVE presence in commit message: A CVE tag should be provided in the 
commit message with format: "CVE: CVE--" 
(test_mbox.TestMbox.test_cve_presence_in_commit_message)

PASS: pretest pylint (test_python_pylint.PyLint.pretest_pylint)
PASS: test Signed-off-by presence 
(test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence 
(test_mbox.TestMbox.test_commit_message_presence)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test pylint (test_python_pylint.PyLint.test_pylint)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)

SKIP: pretest lic files chksum modified not mentioned: No modified recipes, 
skipping pretest 
(test_metadata.TestMetadata.pretest_lic_files_chksum_modified_not_mentioned)
SKIP: pretest src uri left files: No modified recipes, skipping pretest 
(test_metadata.TestMetadata.pretest_src_uri_left_files)
SKIP: test CVE tag format: No new CVE patches introduced 
(test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced 
(test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced 
(test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found 
(test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum modified not mentioned: No modified recipes, 
skipping test 
(test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
SKIP: test lic files chksum presence: No added recipes, skipping test 
(test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test 
(test_metadata.TestMetadata.test_license_presence)
SKIP: test series merge on head: Merge test is disabled for now 
(test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test src uri left files: No modified recipes, skipping pretest 
(test_metadata.TestMetadata.test_src_uri_left_files)
SKIP: test summary presence: No added recipes, skipping test 
(test_metadata.TestMetadata.test_summary_presence)
SKIP: test target mailing list: Series merged, no reason to check other mailing 
lists (test_mbox.TestMbox.test_target_mailing_list)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this
email with an explanation of why the patch should be accepted. If you
believe these results are due to an error in patchtest, please submit a
bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category
under 'Yocto Project Subprojects'). For more information on specific
failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank
you!

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189845): 
https://lists.openembedded.org/g/openembedded-core/message/189845
Mute This Topic: https://lists.openembedded.org/mt/102275009/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto][OE-core] Notification: Patchtest service going live

2023-10-30 Thread Trevor Gamblin

Hello all,

This is to notify the community that the Patchtest service will be going 
live today to provide patch feedback. For now, this is exclusive to 
submissions related to the openembedded-core mailing list, but support 
for other lists is planned in the future. If/when the service detects 
issues with a submission, a reply will be sent to the submitter (CCing 
the openembedded-core list) with a list of failing, passing, and skipped 
tests. If you have feedback or suggestions for patchtest, please submit 
an issue via Bugzilla (https://bugzilla.yoctoproject.org/) under the 
"Yocto Project Subprojects" -> "Patchtest" category.


For more information on patchtest, see the READMEs or the Wiki page:

1. 
https://git.openembedded.org/openembedded-core/tree/scripts/patchtest.README


2. https://git.yoctoproject.org/meta-patchtest/tree/README.md

3. https://wiki.yoctoproject.org/wiki/Patchtest

- Trevor



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189802): 
https://lists.openembedded.org/g/openembedded-core/message/189802
Mute This Topic: https://lists.openembedded.org/mt/102278882/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] patchtest-send-results: send results to submitter

2023-10-30 Thread Trevor Gamblin
Modify patchtest-send-results so that it extracts the submitter's email
address and responds to them with the patch testresults. Also make a
minor adjustment to the suggestions provided with each email and include
a link to the Patchtest wiki page for additional clarification on
specific failures.

Signed-off-by: Trevor Gamblin 
---
 scripts/patchtest-send-results | 19 +--
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results
index 078651ec381..01b071159be 100755
--- a/scripts/patchtest-send-results
+++ b/scripts/patchtest-send-results
@@ -17,6 +17,7 @@ import boto3
 import configparser
 import mailbox
 import os
+import re
 import sys
 
 greeting = """Thank you for your submission. Patchtest identified one
@@ -25,10 +26,12 @@ more information:\n\n---\n"""
 
 suggestions = """\n---\n\nPlease address the issues identified and
 submit a new revision of the patch, or alternatively, reply to this
-email with an explanation of why the patch format should be accepted. If
-you believe these results are due to an error in patchtest, please
-submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest'
-category under 'Yocto Project Subprojects'). Thank you!"""
+email with an explanation of why the patch should be accepted. If you
+believe these results are due to an error in patchtest, please submit a
+bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category
+under 'Yocto Project Subprojects'). For more information on specific
+failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank
+you!"""
 
 parser = argparse.ArgumentParser(description="Send patchtest results to a 
submitter for a given patch")
 parser.add_argument("-p", "--patch", dest="patch", required=True, help="The 
patch file to summarize")
@@ -54,6 +57,10 @@ mbox = mailbox.mbox(args.patch)
 mbox_subject = mbox[0]['subject']
 subject_line = f"Patchtest results for {mbox_subject}"
 
+# extract the submitter email address and use it as the reply address
+# for the results
+reply_address = re.findall("<(.*)>", mbox[0]['from'])
+
 if "FAIL" in testresult:
 reply_contents = None
 if len(max(open(result_file, 'r'), key=len)) > 220:
@@ -66,9 +73,9 @@ if "FAIL" in testresult:
 response = ses_client.send_email(
 Source='patcht...@automation.yoctoproject.org',
 Destination={
-'ToAddresses': ['test-l...@lists.yoctoproject.org'],
+'CcAddresses': ['openembedded-core@lists.openembedded.org'],
 },
-ReplyToAddresses=['test-l...@lists.yoctoproject.org'],
+ReplyToAddresses=reply_address,
 Message={
 'Subject': {
 'Data': subject_line,
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189800): 
https://lists.openembedded.org/g/openembedded-core/message/189800
Mute This Topic: https://lists.openembedded.org/mt/102277940/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Patchtest results for [OE-core][PATCH] patchtest: shorten test result outputs

2023-10-30 Thread Trevor Gamblin
Thank you for your submission. Patchtest identified one
or more issues with the patch. Please see the log below for
more information:

---
Testing patch 
/home/patchtest/share/mboxes/patchtest-shorten-test-result-outputs.patch

FAIL: test lic files chksum modified not mentioned: LIC_FILES_CHKSUM changed 
without "License-Update:" tag and description in commit message 
(test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)

PASS: pretest pylint (test_python_pylint.PyLint.pretest_pylint)
PASS: test Signed-off-by presence 
(test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence 
(test_mbox.TestMbox.test_commit_message_presence)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test pylint (test_python_pylint.PyLint.test_pylint)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)

SKIP: pretest lic files chksum modified not mentioned: No modified recipes, 
skipping pretest 
(test_metadata.TestMetadata.pretest_lic_files_chksum_modified_not_mentioned)
SKIP: pretest src uri left files: No modified recipes, skipping pretest 
(test_metadata.TestMetadata.pretest_src_uri_left_files)
SKIP: test CVE presence in commit message: No new patches introduced 
(test_mbox.TestMbox.test_cve_presence_in_commit_message)
SKIP: test CVE tag format: No new CVE patches introduced 
(test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced 
(test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced 
(test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found 
(test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test 
(test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test 
(test_metadata.TestMetadata.test_license_presence)
SKIP: test series merge on head: Merge test is disabled for now 
(test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test src uri left files: No modified recipes, skipping pretest 
(test_metadata.TestMetadata.test_src_uri_left_files)
SKIP: test summary presence: No added recipes, skipping test 
(test_metadata.TestMetadata.test_summary_presence)
SKIP: test target mailing list: Series merged, no reason to check other mailing 
lists (test_mbox.TestMbox.test_target_mailing_list)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this
email with an explanation of why the patch should be accepted. If you
believe these results are due to an error in patchtest, please submit a
bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category
under 'Yocto Project Subprojects'). For more information on specific
failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank
you!

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189799): 
https://lists.openembedded.org/g/openembedded-core/message/189799
Mute This Topic: https://lists.openembedded.org/mt/102275009/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Patchtest results for [OE-core][PATCH] patchtest: shorten test result outputs

2023-10-30 Thread Trevor Gamblin
Thank you for your submission. Patchtest identified one
or more issues with the patch. Please see the log below for
more information:

---
Testing patch 
/home/patchtest/share/mboxes/patchtest-shorten-test-result-outputs.patch

FAIL: test lic files chksum modified not mentioned: LIC_FILES_CHKSUM changed 
without "License-Update:" tag and description in commit message 
(test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)

PASS: pretest pylint (test_python_pylint.PyLint.pretest_pylint)
PASS: test Signed-off-by presence 
(test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence 
(test_mbox.TestMbox.test_commit_message_presence)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test pylint (test_python_pylint.PyLint.test_pylint)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)

SKIP: pretest lic files chksum modified not mentioned: No modified recipes, 
skipping pretest 
(test_metadata.TestMetadata.pretest_lic_files_chksum_modified_not_mentioned)
SKIP: pretest src uri left files: No modified recipes, skipping pretest 
(test_metadata.TestMetadata.pretest_src_uri_left_files)
SKIP: test CVE presence in commit message: No new patches introduced 
(test_mbox.TestMbox.test_cve_presence_in_commit_message)
SKIP: test CVE tag format: No new CVE patches introduced 
(test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced 
(test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced 
(test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found 
(test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test 
(test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test 
(test_metadata.TestMetadata.test_license_presence)
SKIP: test series merge on head: Merge test is disabled for now 
(test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test src uri left files: No modified recipes, skipping pretest 
(test_metadata.TestMetadata.test_src_uri_left_files)
SKIP: test summary presence: No added recipes, skipping test 
(test_metadata.TestMetadata.test_summary_presence)
SKIP: test target mailing list: Series merged, no reason to check other mailing 
lists (test_mbox.TestMbox.test_target_mailing_list)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this
email with an explanation of why the patch format should be accepted. If
you believe these results are due to an error in patchtest, please
submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest'
category under 'Yocto Project Subprojects'). Thank you!

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189795): 
https://lists.openembedded.org/g/openembedded-core/message/189795
Mute This Topic: https://lists.openembedded.org/mt/102275009/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] patchtest: shorten test result outputs

2023-10-29 Thread Trevor Gamblin
Some test result lines in TestMbox and TestPatch are still too long to
avoid being flagged by the mailer script. Clean them up by removing
redundant information, so that they are all under the length limit of
220 characters.

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/tests/test_mbox.py  | 14 +++---
 meta/lib/patchtest/tests/test_patch.py |  4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/meta/lib/patchtest/tests/test_mbox.py 
b/meta/lib/patchtest/tests/test_mbox.py
index 95002c9e2a6..2449564d0f2 100644
--- a/meta/lib/patchtest/tests/test_mbox.py
+++ b/meta/lib/patchtest/tests/test_mbox.py
@@ -100,7 +100,7 @@ class TestMbox(base.Base):
 self.skip("Skipping merge test since patch is not intended for 
master branch. Target detected is %s" % PatchTestInput.repo.branch)
 if not PatchTestInput.repo.ismerged:
 commithash, author, date, shortlog = headlog()
-self.fail('Series does not apply on top of target branch. Rebase 
your series and ensure the target is correct',
+self.fail('Series does not apply on top of target branch %s' % 
PatchTestInput.repo.branch,
   data=[('Targeted branch', '%s (currently at %s)' % 
(PatchTestInput.repo.branch, commithash))])
 
 def test_target_mailing_list(self):
@@ -114,7 +114,7 @@ class TestMbox(base.Base):
 for commit in TestMbox.commits:
 match = project_regex.search_string(commit.subject)
 if match:
-self.fail('Series sent to the wrong mailing list. Check the 
project\'s README (%s) and send the patch to the indicated list' % 
match.group('project'),
+self.fail('Series sent to the wrong mailing list or some 
patches from the series correspond to different mailing lists',
   commit=commit)
 
 for patch in self.patchset:
@@ -122,7 +122,7 @@ class TestMbox(base.Base):
 base_path = folders[0]
 for project in [self.bitbake, self.doc, self.oe, self.poky]:
 if base_path in  project.paths:
-self.fail('Series sent to the wrong mailing list or some 
patches from the series correspond to different mailing lists. Send the series 
again to the correct mailing list (ML)',
+self.fail('Series sent to the wrong mailing list or some 
patches from the series correspond to different mailing lists',
   data=[('Suggested ML', '%s [%s]' % 
(project.listemail, project.gitrepo)),
 ('Patch\'s path:', patch.path)])
 
@@ -130,18 +130,18 @@ class TestMbox(base.Base):
 if base_path.startswith('scripts'):
 for poky_file in self.poky_scripts:
 if patch.path.startswith(poky_file):
-self.fail('Series sent to the wrong mailing list or 
some patches from the series correspond to different mailing lists. Send the 
series again to the correct mailing list (ML)',
+self.fail('Series sent to the wrong mailing list or 
some patches from the series correspond to different mailing lists',
   data=[('Suggested ML', '%s [%s]' % 
(self.poky.listemail, self.poky.gitrepo)),('Patch\'s path:', patch.path)])
 
 def test_mbox_format(self):
 if self.unidiff_parse_error:
-self.fail('Series cannot be parsed correctly due to malformed diff 
lines. Create the series again using git-format-patch and ensure it can be 
applied using git am',
+self.fail('Series has malformed diff lines. Create the series 
again using git-format-patch and ensure it applies using git am',
   data=[('Diff line',self.unidiff_parse_error)])
 
 def test_commit_message_presence(self):
 for commit in TestMbox.commits:
 if not commit.commit_message.strip():
-self.fail('Mbox is missing a descriptive commit message. 
Please include a commit message on your patch explaining the change', 
commit=commit)
+self.fail('Please include a commit message on your patch 
explaining the change', commit=commit)
 
 def test_cve_presence_in_commit_message(self):
 if self.unidiff_parse_error:
@@ -161,7 +161,7 @@ class TestMbox(base.Base):
 if not self.patch_prog.search_string(commit.payload):
 self.skip("No CVE tag in added patch, so not needed in mbox")
 elif not self.prog.search_string(commit.payload):
-self.fail('Missing or incorrectly formatted CVE tag in mbox. 
Correct or include the CVE tag in the mbox with format: "CVE: CVE--"',
+self.fail('A CVE tag should be provided in the commit message 
with format: "CVE: CVE--"',
   commit=commit)
 
 def test_bugzilla_entry_format(self):
diff --git a/meta/lib/patchtest/tests/t

[OE-core][PATCH] patchtest: reduce checksum test output length

2023-10-27 Thread Trevor Gamblin
The test_lic_files_chksum_modified_not_mentioned test in TestMetadata is
outputting very long lines that fail the maximum length check when
sending email results, preventing the actual errors from being
displayed. Reduce the length of the failure message by rewording and
removing redundant information.

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/tests/test_metadata.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/patchtest/tests/test_metadata.py 
b/meta/lib/patchtest/tests/test_metadata.py
index 34e119174fe..3742760b451 100644
--- a/meta/lib/patchtest/tests/test_metadata.py
+++ b/meta/lib/patchtest/tests/test_metadata.py
@@ -116,7 +116,7 @@ class TestMetadata(base.Metadata):
 if self.lictag_re.search_string(commit.commit_message):
break
 else:
-self.fail('LIC_FILES_CHKSUM changed on target %s but there 
is no "License-Update:" tag in commit message. Include it with a brief 
description' % pn,
+self.fail('LIC_FILES_CHKSUM changed without 
"License-Update:" tag and description in commit message',
   data=[('Current checksum', pretest), ('New 
checksum', test)])
 
 def test_max_line_length(self):
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189750): 
https://lists.openembedded.org/g/openembedded-core/message/189750
Mute This Topic: https://lists.openembedded.org/mt/102224001/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] patchtest: simplify test directory structure

2023-10-26 Thread Trevor Gamblin
: TestMbox.test_shortlog_length (file: TestMbox.test_shortlog_length.fail)
XPASS: TestMbox.test_mbox_format (file: TestMbox.test_mbox_format.pass)
XFAIL: TestPatch.test_signed_off_by_presence (file: 
TestPatch.test_signed_off_by_presence.fail)
XFAIL: TestMbox.test_shortlog_format (file: TestMbox.test_shortlog_format.fail)
XFAIL: TestMbox.test_mbox_format (file: TestMbox.test_mbox_format.2.fail)
XPASS: TestPatch.test_cve_tag_format (file: TestPatch.test_cve_tag_format.pass)
XSKIP: TestMbox.test_series_merge_on_head (file: 
TestMbox.test_series_merge_on_head.1.skip)
XPASS: TestMbox.test_author_valid (file: TestMbox.test_author_valid.2.pass)
XPASS: TestMetadata.test_lic_files_chksum_modified_not_mentioned (file: 
TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass)
XPASS: TestMbox.test_bugzilla_entry_format (file: 
TestMbox.test_bugzilla_entry_format.pass)
XPASS: TestMetadata.test_src_uri_left_files (file: 
TestMetadata.test_src_uri_left_files.pass)
XPASS: TestMetadata.test_lic_files_chksum_presence (file: 
TestMetadata.test_lic_files_chksum_presence.pass)
XPASS: TestMbox.test_cve_presence_in_commit_message (file: 
TestMbox.test_cve_presence_in_commit_message.pass)
XFAIL: TestMbox.test_signed_off_by_presence (file: 
TestMbox.test_signed_off_by_presence.2.fail)
XFAIL: TestMbox.test_author_valid (file: TestMbox.test_author_valid.2.fail)
XFAIL: TestMetadata.test_lic_files_chksum_presence (file: 
TestMetadata.test_lic_files_chksum_presence.fail)
XPASS: TestMbox.test_shortlog_format (file: TestMbox.test_shortlog_format.pass)
XPASS: TestMbox.test_author_valid (file: TestMbox.test_author_valid.1.pass)
XPASS: TestPatch.test_signed_off_by_presence (file: 
TestPatch.test_signed_off_by_presence.pass)
XFAIL: TestMetadata.test_lic_files_chksum_modified_not_mentioned (file: 
TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail)
XPASS: TestMbox.test_shortlog_length (file: TestMbox.test_shortlog_length.pass)
XFAIL: TestMbox.test_signed_off_by_presence (file: 
TestMbox.test_signed_off_by_presence.1.fail)
XFAIL: TestMbox.test_cve_presence_in_commit_message (file: 
TestMbox.test_cve_presence_in_commit_message.fail)
XFAIL: TestMetadata.test_summary_presence (file: 
TestMetadata.test_summary_presence.fail)

Testsuite summary for patchtest


real18m39.749s
user0m41.857s
sys 0m14.708s

Signed-off-by: Trevor Gamblin 
---
 ...fail => TestMbox.test_author_valid.1.fail} |   0
 ...pass => TestMbox.test_author_valid.1.pass} |   0
 ...fail => TestMbox.test_author_valid.2.fail} |   0
 ...pass => TestMbox.test_author_valid.2.pass} |   0
 ... TestMbox.test_bugzilla_entry_format.fail} |   0
 ... TestMbox.test_bugzilla_entry_format.pass} |   0
 ...estMbox.test_commit_message_presence.fail} |   0
 ...estMbox.test_commit_message_presence.pass} |   0
 test_cve_presence_in_commit_message.fail} |   0
 test_cve_presence_in_commit_message.pass} |   0
 fail => TestMbox.test_mbox_format.1.fail} |   0
 fail => TestMbox.test_mbox_format.2.fail} |   0
 ...at.pass => TestMbox.test_mbox_format.pass} |   0
 ...TestMbox.test_series_merge_on_head.1.skip} |   0
 ...TestMbox.test_series_merge_on_head.2.skip} |   0
 ...ail => TestMbox.test_shortlog_format.fail} |   0
 ...ass => TestMbox.test_shortlog_format.pass} |   0
 ...ail => TestMbox.test_shortlog_length.fail} |   2 +-
 ...ass => TestMbox.test_shortlog_length.pass} |   0
 ...stMbox.test_signed_off_by_presence.1.fail} |   0
 ...stMbox.test_signed_off_by_presence.2.fail} |   0
 ...TestMbox.test_signed_off_by_presence.pass} |   0
 ..._files_chksum_modified_not_mentioned.fail} |   0
 ..._files_chksum_modified_not_mentioned.pass} |   0
 ...adata.test_lic_files_chksum_presence.fail} |   0
 ...adata.test_lic_files_chksum_presence.pass} |   0
 ...TestMetadata.test_src_uri_left_files.fail} |   0
 ...TestMetadata.test_src_uri_left_files.pass} |   0
 ...> TestMetadata.test_summary_presence.fail} |   0
 ...> TestMetadata.test_summary_presence.pass} |   0
 ...ail => TestPatch.test_cve_tag_format.fail} |   0
 ...ass => TestPatch.test_cve_tag_format.pass} |   0
 ...estPatch.test_signed_off_by_presence.fail} |   0
 ...estPatch.test_signed_off_by_presence.pass} |   0
 meta/lib/patchtest/tests/test_mbox.py | 183 
 meta/lib/patchtest/tests/test_mbox_author.py  |  29 ---
 .../lib/patchtest/tests/test_mbox_bugzilla.py |  20 --
 meta/lib/patchtest/tests/test_mbox_cve.py |  38 
 .../patchtest/tests/test_mbox_description.py  |  15 --
 meta/lib/patchtest/tests/test_mbox_format.py  |  14 --
 .../patchtest/tests/test_mbox_mailinglist.py  |  62 --
 meta/lib/patchtest/tests/test_mbox_merge.py   |  27 ---
 .../lib/patchtest/tests/test_mbox_shortlog.py |  39 
 .../tests/test_mbox_

[OE-core][PATCH] patchtest/selftest: add XSKIP, update test files

2023-10-25 Thread Trevor Gamblin
Since we are skipping the merge test, two of the selftests now report
SKIP instead of XPASS/XFAIL as expected. Adjust the two files to have
the right endings for XSKIP, and add the category so that it can be used
for more extensive testing in the future.

Signed-off-by: Trevor Gamblin 
---
 ...ad.pass => Merge.test_series_merge_on_head.1.skip} |  0
 ...ad.fail => Merge.test_series_merge_on_head.2.skip} |  0
 meta/lib/patchtest/selftest/selftest  | 11 ---
 3 files changed, 8 insertions(+), 3 deletions(-)
 rename meta/lib/patchtest/selftest/files/{Merge.test_series_merge_on_head.pass 
=> Merge.test_series_merge_on_head.1.skip} (100%)
 rename meta/lib/patchtest/selftest/files/{Merge.test_series_merge_on_head.fail 
=> Merge.test_series_merge_on_head.2.skip} (100%)

diff --git 
a/meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.pass 
b/meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.1.skip
similarity index 100%
rename from 
meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.pass
rename to 
meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.1.skip
diff --git 
a/meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.fail 
b/meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.2.skip
similarity index 100%
rename from 
meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.fail
rename to 
meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.2.skip
diff --git a/meta/lib/patchtest/selftest/selftest 
b/meta/lib/patchtest/selftest/selftest
index 006d1badf83..6fad50ce616 100755
--- a/meta/lib/patchtest/selftest/selftest
+++ b/meta/lib/patchtest/selftest/selftest
@@ -18,14 +18,15 @@ parentdir  = os.path.dirname(topdir)
 # path to the repo root
 repodir = os.path.dirname(os.path.dirname(parentdir))
 
-def print_results(passcount, skipcount, failcount, xpasscount, xfailcount, 
errorcount):
-total = passcount + skipcount + failcount + xpasscount + xfailcount + 
errorcount
+def print_results(passcount, failcount, skipcount, xpasscount, xfailcount, 
xskipcount, errorcount):
+total = passcount + skipcount + failcount + xpasscount + xfailcount + 
xskipcount + errorcount
 
print("")
 print("Testsuite summary for %s" % os.path.basename(topdir))
 
print("")
 print("# TOTAL: %s" % str(total))
 print("# XPASS: %s" % str(xpasscount))
 print("# XFAIL: %s" % str(xfailcount))
+print("# XSKIP: %s" % str(xskipcount))
 print("# PASS: %s" % str(passcount))
 print("# FAIL: %s" % str(failcount))
 print("# SKIP: %s" % str(skipcount))
@@ -48,6 +49,7 @@ if __name__ == '__main__':
 skipcount = 0
 xpasscount = 0
 xfailcount = 0
+xskipcount = 0
 errorcount = 0
 
 results = None
@@ -71,6 +73,9 @@ if __name__ == '__main__':
 elif expected_result.upper() == "PASS" and result.upper() 
== "PASS":
 xpasscount = xpasscount + 1
 print("XPASS: %s (file: %s)" % (testid.strip("."), 
os.path.basename(patch)))
+elif expected_result.upper() == "SKIP" and result.upper() 
== "SKIP":
+xskipcount = xskipcount + 1
+print("XSKIP: %s (file: %s)" % (testid.strip("."), 
os.path.basename(patch)))
 else:
 print("%s: %s (%s)" % (result.upper(), 
testid.strip("."), os.path.basename(patch)))
 if result.upper() == "PASS":
@@ -86,4 +91,4 @@ if __name__ == '__main__':
 else:
 print ("No test for=%s" % patch)
 
-print_results(passcount, skipcount, failcount, xpasscount, xfailcount, 
errorcount)
+print_results(passcount, failcount, skipcount, xpasscount, xfailcount, 
xskipcount, errorcount)
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189692): 
https://lists.openembedded.org/g/openembedded-core/message/189692
Mute This Topic: https://lists.openembedded.org/mt/102182400/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] patchtest-send-results: check max line length, simplify responses

2023-10-25 Thread Trevor Gamblin
Check that the maximum line length of the testresult file is less than
220 characters, to help guard against malicious changes being sent in
email responses. If any line exceeds this length, replace the normal
testresults used in the response with a line stating that tests failed,
but the results could not be processed. Also clean up the respone
substrings slightly to go along with the change.

Signed-off-by: Trevor Gamblin 
---
 scripts/patchtest-send-results | 17 +
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results
index bb4604aeaf1..078651ec381 100755
--- a/scripts/patchtest-send-results
+++ b/scripts/patchtest-send-results
@@ -25,12 +25,8 @@ more information:\n\n---\n"""
 
 suggestions = """\n---\n\nPlease address the issues identified and
 submit a new revision of the patch, or alternatively, reply to this
-email with an explanation of why the patch format should be accepted.
-Note that patchtest may report failures in the merge-on-head test for
-patches that are part of a series if they rely on changes from
-preceeding entries.
-
-If you believe these results are due to an error in patchtest, please
+email with an explanation of why the patch format should be accepted. If
+you believe these results are due to an error in patchtest, please
 submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest'
 category under 'Yocto Project Subprojects'). Thank you!"""
 
@@ -52,8 +48,6 @@ testresult = None
 with open(result_file, "r") as f:
 testresult = f.read()
 
-reply_contents = greeting + testresult + suggestions
-
 # we know these patch files will only contain a single patch, so only
 # worry about the first element for getting the subject
 mbox = mailbox.mbox(args.patch)
@@ -61,6 +55,13 @@ mbox_subject = mbox[0]['subject']
 subject_line = f"Patchtest results for {mbox_subject}"
 
 if "FAIL" in testresult:
+reply_contents = None
+if len(max(open(result_file, 'r'), key=len)) > 220:
+warning = "Tests failed for the patch, but the results log could not 
be processed due to excessive result line length."
+reply_contents = greeting + warning + suggestions
+else:
+reply_contents = greeting + testresult + suggestions
+
 ses_client = boto3.client('ses', region_name='us-west-2')
 response = ses_client.send_email(
 Source='patcht...@automation.yoctoproject.org',
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189680): 
https://lists.openembedded.org/g/openembedded-core/message/189680
Mute This Topic: https://lists.openembedded.org/mt/102179782/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] patchtest: disable merge test

2023-10-24 Thread Trevor Gamblin
Disable the merge-on-head test until patchtest properly handles merging
of series subsets and accounts for patches that are rapidly merged (i.e.
before patchtest is run).

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/tests/test_mbox_merge.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/lib/patchtest/tests/test_mbox_merge.py 
b/meta/lib/patchtest/tests/test_mbox_merge.py
index f69d57c71b1..535026209f7 100644
--- a/meta/lib/patchtest/tests/test_mbox_merge.py
+++ b/meta/lib/patchtest/tests/test_mbox_merge.py
@@ -18,6 +18,7 @@ def headlog():
 
 class Merge(base.Base):
 def test_series_merge_on_head(self):
+self.skip("Merge test is disabled for now")
 if PatchTestInput.repo.branch != "master":
 self.skip("Skipping merge test since patch is not intended for 
master branch. Target detected is %s" % PatchTestInput.repo.branch)
 if not PatchTestInput.repo.ismerged:
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189656): 
https://lists.openembedded.org/g/openembedded-core/message/189656
Mute This Topic: https://lists.openembedded.org/mt/102163783/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] patchtest-send-results: improve subject line

2023-10-24 Thread Trevor Gamblin
Pull the actual email's subject line from the .mbox file and use that in
patchtest's test results response, so that it's clearer which patch it
is replying to.

Signed-off-by: Trevor Gamblin 
---
 scripts/patchtest-send-results | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results
index 15ee5b077fc..bb4604aeaf1 100755
--- a/scripts/patchtest-send-results
+++ b/scripts/patchtest-send-results
@@ -53,7 +53,12 @@ with open(result_file, "r") as f:
 testresult = f.read()
 
 reply_contents = greeting + testresult + suggestions
-subject_line = f"Patchtest results for {result_basename}"
+
+# we know these patch files will only contain a single patch, so only
+# worry about the first element for getting the subject
+mbox = mailbox.mbox(args.patch)
+mbox_subject = mbox[0]['subject']
+subject_line = f"Patchtest results for {mbox_subject}"
 
 if "FAIL" in testresult:
 ses_client = boto3.client('ses', region_name='us-west-2')
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189645): 
https://lists.openembedded.org/g/openembedded-core/message/189645
Mute This Topic: https://lists.openembedded.org/mt/102157318/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] patchtest: fix lic_files_chksum test regex

2023-10-20 Thread Trevor Gamblin
the test_lic_files_chksum_modified_not_mentioned test in patchtest
wasn't picking up on 'License-Update:' tags correctly. Use pyparsing's
AtLineStart class to simplify the regex setup and search.

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py 
b/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py
index cb3e7c9d341..fa4a28c7b22 100644
--- a/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py
+++ b/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py
@@ -12,8 +12,7 @@ class LicFilesChkSum(base.Metadata):
 metadata = 'LIC_FILES_CHKSUM'
 license  = 'LICENSE'
 closed   = 'CLOSED'
-lictag   = 'License-Update'
-lictag_re  = pyparsing.Regex("^%s:" % lictag)
+lictag_re  = pyparsing.AtLineStart("License-Update:")
 
 def test_lic_files_chksum_presence(self):
 if not self.added:
@@ -71,5 +70,5 @@ class LicFilesChkSum(base.Metadata):
 if self.lictag_re.search_string(commit.commit_message):
break
 else:
-self.fail('LIC_FILES_CHKSUM changed on target %s but there 
is no "%s" tag in commit message. Include it with a brief description' % (pn, 
self.lictag),
+self.fail('LIC_FILES_CHKSUM changed on target %s but there 
is no "License-Update:" tag in commit message. Include it with a brief 
description' % pn,
   data=[('Current checksum', pretest), ('New 
checksum', test)])
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189542): 
https://lists.openembedded.org/g/openembedded-core/message/189542
Mute This Topic: https://lists.openembedded.org/mt/102082363/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 1/2 v2] patchtest: skip merge test if not targeting master

2023-10-19 Thread Trevor Gamblin
Avoid testing mergeability of a patch when not targeting master, so that
patches tested via other means (e.g. maintainer branches and AB runs)
don't get unnecessarily reviewed an extra time.

Signed-off-by: Trevor Gamblin 
---
v2 corrects the logic in the new if statement (modified during a test)
and states which branch was detected as a patch target when printing the
message. It also adds a detailed commit message so that it'll pass the
patchtest check.

 meta/lib/patchtest/tests/test_mbox_merge.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/lib/patchtest/tests/test_mbox_merge.py 
b/meta/lib/patchtest/tests/test_mbox_merge.py
index bc55c588b40..f69d57c71b1 100644
--- a/meta/lib/patchtest/tests/test_mbox_merge.py
+++ b/meta/lib/patchtest/tests/test_mbox_merge.py
@@ -18,6 +18,8 @@ def headlog():
 
 class Merge(base.Base):
 def test_series_merge_on_head(self):
+if PatchTestInput.repo.branch != "master":
+self.skip("Skipping merge test since patch is not intended for 
master branch. Target detected is %s" % PatchTestInput.repo.branch)
 if not PatchTestInput.repo.ismerged:
 commithash, author, date, shortlog = headlog()
 self.fail('Series does not apply on top of target branch. Rebase 
your series and ensure the target is correct',
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189486): 
https://lists.openembedded.org/g/openembedded-core/message/189486
Mute This Topic: https://lists.openembedded.org/mt/102069183/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 2/2] patchtest: test regardless of mergeability

2023-10-19 Thread Trevor Gamblin
Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py | 5 -
 meta/lib/patchtest/tests/test_metadata_license.py  | 5 -
 meta/lib/patchtest/tests/test_metadata_summary.py  | 5 -
 meta/lib/patchtest/tests/test_python_pylint.py | 2 --
 4 files changed, 17 deletions(-)

diff --git a/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py 
b/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py
index b2c32507ffe..cb3e7c9d341 100644
--- a/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py
+++ b/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py
@@ -15,11 +15,6 @@ class LicFilesChkSum(base.Metadata):
 lictag   = 'License-Update'
 lictag_re  = pyparsing.Regex("^%s:" % lictag)
 
-def setUp(self):
-# these tests just make sense on patches that can be merged
-if not PatchTestInput.repo.canbemerged:
-self.skip('Patch cannot be merged')
-
 def test_lic_files_chksum_presence(self):
 if not self.added:
 self.skip('No added recipes, skipping test')
diff --git a/meta/lib/patchtest/tests/test_metadata_license.py 
b/meta/lib/patchtest/tests/test_metadata_license.py
index a5bc03b83fe..1a7f09b7470 100644
--- a/meta/lib/patchtest/tests/test_metadata_license.py
+++ b/meta/lib/patchtest/tests/test_metadata_license.py
@@ -12,11 +12,6 @@ class License(base.Metadata):
 metadata = 'LICENSE'
 invalid_license = 'PATCHTESTINVALID'
 
-def setUp(self):
-# these tests just make sense on patches that can be merged
-if not PatchTestInput.repo.canbemerged:
-self.skip('Patch cannot be merged')
-
 def test_license_presence(self):
 if not self.added:
 self.skip('No added recipes, skipping test')
diff --git a/meta/lib/patchtest/tests/test_metadata_summary.py 
b/meta/lib/patchtest/tests/test_metadata_summary.py
index 1502863df02..170e79eb4b7 100644
--- a/meta/lib/patchtest/tests/test_metadata_summary.py
+++ b/meta/lib/patchtest/tests/test_metadata_summary.py
@@ -10,11 +10,6 @@ from data import PatchTestInput
 class Summary(base.Metadata):
 metadata = 'SUMMARY'
 
-def setUp(self):
-# these tests just make sense on patches that can be merged
-if not PatchTestInput.repo.canbemerged:
-self.skip('Patch cannot be merged')
-
 def test_summary_presence(self):
 if not self.added:
 self.skip('No added recipes, skipping test')
diff --git a/meta/lib/patchtest/tests/test_python_pylint.py 
b/meta/lib/patchtest/tests/test_python_pylint.py
index 9cfc491a134..304b2d5ee9a 100644
--- a/meta/lib/patchtest/tests/test_python_pylint.py
+++ b/meta/lib/patchtest/tests/test_python_pylint.py
@@ -26,8 +26,6 @@ class PyLint(base.Base):
 def setUp(self):
 if self.unidiff_parse_error:
 self.skip('Python-unidiff parse error')
-if not PatchTestInput.repo.canbemerged:
-self.skip('Patch cannot be merged, no reason to execute the test 
method')
 if not PyLint.pythonpatches:
 self.skip('No python related patches, skipping test')
 
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189483): 
https://lists.openembedded.org/g/openembedded-core/message/189483
Mute This Topic: https://lists.openembedded.org/mt/102068909/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 1/2] patchtest: skip merge test if not targeting master

2023-10-19 Thread Trevor Gamblin
Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/tests/test_mbox_merge.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/lib/patchtest/tests/test_mbox_merge.py 
b/meta/lib/patchtest/tests/test_mbox_merge.py
index bc55c588b40..013b9e0144d 100644
--- a/meta/lib/patchtest/tests/test_mbox_merge.py
+++ b/meta/lib/patchtest/tests/test_mbox_merge.py
@@ -18,6 +18,8 @@ def headlog():
 
 class Merge(base.Base):
 def test_series_merge_on_head(self):
+if PatchTestInput.repo.branch == "master":
+self.skip("Skipping merge test since patch is not intended for 
master branch")
 if not PatchTestInput.repo.ismerged:
 commithash, author, date, shortlog = headlog()
 self.fail('Series does not apply on top of target branch. Rebase 
your series and ensure the target is correct',
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189482): 
https://lists.openembedded.org/g/openembedded-core/message/189482
Mute This Topic: https://lists.openembedded.org/mt/102068908/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH 1/2] patchtest: sort when reading patches from a directory

2023-10-19 Thread Trevor Gamblin


On 2023-10-19 09:40, Ross Burton wrote:

From: Ross Burton 

When reading patches from a directory it's important to sort the output
of os.listdir(), as that returns the files in an effectively random
order.  We can't test the patches apply if they're applied in the wrong
order, and typically patch filenames are prefixed with a counter to
ensure the order is correct.
Thanks for the patch. I like this as a general improvement and 
preparation for future fixes, but this might not have the results you're 
expecting (right now) - patchtest currently has a known limitation where 
it only tests patches one-at-a-time, so if you have multiple patches 
depending on previous entries in the series, they will not apply them in 
the sequence and you may get erroneous failures for the merge-on-head 
test. That's on the roadmap for upcoming improvements.


Signed-off-by: Ross Burton 
---
  scripts/patchtest | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/patchtest b/scripts/patchtest
index 642486b8c7f..c47b05b7d47 100755
--- a/scripts/patchtest
+++ b/scripts/patchtest
@@ -172,7 +172,7 @@ def main():
  patch_list = None
  
  if os.path.isdir(patch_path):

-patch_list = [os.path.join(patch_path, filename) for filename in 
os.listdir(patch_path)]
+patch_list = [os.path.join(patch_path, filename) for filename in 
sorted(os.listdir(patch_path))]
  else:
  patch_list = [patch_path]
  





-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189465): 
https://lists.openembedded.org/g/openembedded-core/message/189465
Mute This Topic: https://lists.openembedded.org/mt/102060105/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] patchtest: check for untracked changes

2023-10-19 Thread Trevor Gamblin
[YOCTO #15243]

Avoid overwriting local changes when running patchtest by checking for
anything unstaged or uncommitted in the target repo, and logging an
error if something is found. This will provide the user helpful feedback
if (for example) they forgot to commit a change for their patch under
test, and will leave the target repository in a reasonable state (rather
than a temporary branch created by patchtest).

Signed-off-by: Trevor Gamblin 
---
 scripts/patchtest | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/scripts/patchtest b/scripts/patchtest
index 642486b8c7f..be40e4b2a47 100755
--- a/scripts/patchtest
+++ b/scripts/patchtest
@@ -171,6 +171,12 @@ def main():
 log_path = None
 patch_list = None
 
+git_status = os.popen("(cd %s && git status)" % 
PatchTestInput.repodir).read()
+status_matches = ["Changes not staged for commit", "Changes to be 
committed"]
+if any([match in git_status for match in status_matches]):
+logger.error("patchtest: there are uncommitted changes in the target 
repo that would be overwritten. Please commit or restore them before running 
patchtest")
+return 1
+
 if os.path.isdir(patch_path):
 patch_list = [os.path.join(patch_path, filename) for filename in 
os.listdir(patch_path)]
 else:
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189461): 
https://lists.openembedded.org/g/openembedded-core/message/189461
Mute This Topic: https://lists.openembedded.org/mt/102060207/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH 0/4] patchtest: add to oe-core

2023-10-17 Thread Trevor Gamblin


On 2023-10-17 11:45, Michael Opdenacker wrote:

Hi Trevor

On 16.10.23 at 21:44, Trevor Gamblin wrote:

Add the patchtest core tools and supporting scripts to
openembedded-core. This will enable users to validate their changes
locally against the repository before submission to the mailing list,
reducing maintainer overhead and encouraging more consistent use of
important patch tags and information. Note that there are a few elements
of the tooling that are still under development, namely the
patchtest-send-results script, which is currently hard-coded to mail
test results to test-l...@lists.yoctoproject.org (and only that list),
while in the future it may be adjusted to directly reply to user
submissions.

A scripts/patchtest.README file is included for basic instructions on
how to use patchtest, as well as for submitting fixes should any bugs be
identified. The Yocto Project Contributor Guide will receive a single,
corresponding patch to provide similar details on why and how to use
patchtest. Finally, the patchtest layer itself will be reduced to only
those pieces that are required for building the core-image-patchtest
image, which makes special adjustments to kernel configurations and
initscripts that are only suitable for automation, and therefore outside
the scope of most contributors' usage.

Trevor Gamblin (4):
   patchtest/requirements.txt: update
   patchtest: add supporting modules
   patchtest: add scripts to oe-core
   patchtest: set default repo and testdir targets

  meta/lib/patchtest/data.py  | 100 
  meta/lib/patchtest/patch.py |  73 +
  meta/lib/patchtest/repo.py  | 185 ++
  meta/lib/patchtest/requirements.txt |   2 +
  meta/lib/patchtest/utils.py | 179 +
  scripts/patchtest   | 233 
  scripts/patchtest-get-branch    |  92 +++
  scripts/patchtest-get-series    | 125 +++
  scripts/patchtest-send-results  |  93 +++
  scripts/patchtest-setup-sharedir    |  95 
  scripts/patchtest.README    | 156 +++
  11 files changed, 1333 insertions(+)
  create mode 100644 meta/lib/patchtest/data.py
  create mode 100644 meta/lib/patchtest/patch.py
  create mode 100644 meta/lib/patchtest/repo.py
  create mode 100644 meta/lib/patchtest/utils.py
  create mode 100755 scripts/patchtest
  create mode 100755 scripts/patchtest-get-branch
  create mode 100755 scripts/patchtest-get-series
  create mode 100755 scripts/patchtest-send-results
  create mode 100755 scripts/patchtest-setup-sharedir
  create mode 100644 scripts/patchtest.README


Thanks for this!

I tried "patchtest --patch" with the attached patch, which had its 
"Signed-off-by" line intentionally removed.

However, it didn't find the issue (see the attached log).

Did I miss anything in the way I use it?


Hi Michael,

This is a little odd, I can't reproduce what you're seeing even with a 
fresh checkout of poky, so I'm wondering if maybe it's because Python 
modules are missing on the host. However, patchtest is currently only 
designed to work properly with oe-core patches, and trying to point it 
at yocto-docs will cause a failure because it expects the 
yocto-docs/scripts/lib path to exist for use (normally it will look in 
openembedded-core/scripts/lib for a few modules). This is one of the 
things I want to improve now that it's working again. In the meantime, 
This is some important info for the docs I had missed, so I'll send a 
patch with clarification about where patchtest can be used.


- Trevor


Thanks again
Michael.


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189345): 
https://lists.openembedded.org/g/openembedded-core/message/189345
Mute This Topic: https://lists.openembedded.org/mt/102003998/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] patchtest/selftest: fix command arguments

2023-10-17 Thread Trevor Gamblin
Changes to patchtest's command-line arguments to work with oe-core by
default do not match the selftest script's argument list. Explicitly use
the --testdir and --repodir flags in selftest so that it is compatible
them.

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/selftest/selftest | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/patchtest/selftest/selftest 
b/meta/lib/patchtest/selftest/selftest
index 79b12542488..006d1badf83 100755
--- a/meta/lib/patchtest/selftest/selftest
+++ b/meta/lib/patchtest/selftest/selftest
@@ -37,7 +37,7 @@ def test(root, patch):
 res = True
 patchpath = os.path.abspath(os.path.join(root, patch))
 
-cmd = 'patchtest %s %s/tests --patch %s' % (repodir, topdir, patchpath)
+cmd = 'patchtest --repodir %s --testdir %s/tests --patch %s' % 
(repodir, topdir, patchpath)
 results = subprocess.check_output(cmd, stderr=subprocess.STDOUT, 
universal_newlines=True, shell=True)
 
 return results
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189340): 
https://lists.openembedded.org/g/openembedded-core/message/189340
Mute This Topic: https://lists.openembedded.org/mt/102019747/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] patchtest: update SPDX identifiers

2023-10-17 Thread Trevor Gamblin
Replace full license headers with SPDX identifiers and adjust all
patchtest-related code to use GPL-2.0-only.

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/data.py  | 15 +--
 meta/lib/patchtest/patch.py | 13 +
 meta/lib/patchtest/repo.py  | 12 +---
 meta/lib/patchtest/selftest/selftest|  2 +-
 meta/lib/patchtest/tests/base.py|  2 +-
 meta/lib/patchtest/tests/pyparsing/common.py|  2 +-
 .../patchtest/tests/pyparsing/parse_cve_tags.py |  2 +-
 .../patchtest/tests/pyparsing/parse_shortlog.py |  2 +-
 .../tests/pyparsing/parse_signed_off_by.py  |  2 +-
 .../tests/pyparsing/parse_upstream_status.py|  2 +-
 meta/lib/patchtest/tests/test_mbox_author.py|  2 +-
 meta/lib/patchtest/tests/test_mbox_bugzilla.py  |  2 +-
 meta/lib/patchtest/tests/test_mbox_cve.py   | 14 +-
 .../patchtest/tests/test_mbox_description.py|  2 +-
 meta/lib/patchtest/tests/test_mbox_format.py|  2 +-
 .../patchtest/tests/test_mbox_mailinglist.py|  2 +-
 meta/lib/patchtest/tests/test_mbox_merge.py |  2 +-
 meta/lib/patchtest/tests/test_mbox_shortlog.py  |  2 +-
 .../patchtest/tests/test_mbox_signed_off_by.py  |  2 +-
 .../tests/test_metadata_lic_files_chksum.py |  2 +-
 .../patchtest/tests/test_metadata_license.py|  2 +-
 .../patchtest/tests/test_metadata_max_length.py |  2 +-
 .../patchtest/tests/test_metadata_src_uri.py|  2 +-
 .../patchtest/tests/test_metadata_summary.py|  2 +-
 meta/lib/patchtest/tests/test_patch_cve.py  | 14 +-
 .../patchtest/tests/test_patch_signed_off_by.py |  2 +-
 .../tests/test_patch_upstream_status.py |  2 +-
 meta/lib/patchtest/tests/test_python_pylint.py  |  2 +-
 meta/lib/patchtest/utils.py | 12 +---
 scripts/patchtest   | 15 +--
 scripts/patchtest-get-branch| 12 +---
 scripts/patchtest-get-series| 12 +---
 scripts/patchtest-send-results  | 17 ++---
 scripts/patchtest-setup-sharedir| 14 +-
 34 files changed, 35 insertions(+), 161 deletions(-)

diff --git a/meta/lib/patchtest/data.py b/meta/lib/patchtest/data.py
index 12f36aa14d9..25a9a57dfb1 100644
--- a/meta/lib/patchtest/data.py
+++ b/meta/lib/patchtest/data.py
@@ -6,20 +6,7 @@
 #
 # Copyright (C) 2016 Intel Corporation
 #
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Author: Leo Sandoval 
+# SPDX-License-Identifier: GPL-2.0-only
 #
 # NOTE: Strictly speaking, unit test should be isolated from outside,
 #   but patchtest test suites uses command line input data and
diff --git a/meta/lib/patchtest/patch.py b/meta/lib/patchtest/patch.py
index c0e7d579eba..baf62838730 100644
--- a/meta/lib/patchtest/patch.py
+++ b/meta/lib/patchtest/patch.py
@@ -5,18 +5,7 @@
 #
 # Copyright (C) 2016 Intel Corporation
 #
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-only
 #
 
 import logging
diff --git a/meta/lib/patchtest/repo.py b/meta/lib/patchtest/repo.py
index 5c85c65ffb8..8a11af5fd66 100644
--- a/meta/lib/patchtest/repo.py
+++ b/meta/lib/patchtest/repo.py
@@ -5,18 +5,8 @@
 #
 # Copyright (C) 2016 Intel Corporation
 #
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
 #
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU

[OE-core][PATCH 4/4] patchtest: set default repo and testdir targets

2023-10-16 Thread Trevor Gamblin
Since patchtest is in oe-core, the Python os module's methods can be
used to retrieve the repository path and tests directory by default.
This reduces the number of mandatory arguments for invocation of
patchtest unless the user wants to use a custom test suite or test
patches against a different repo. The REPO and TESTDIR arguments are
likewise adjusted so that they are optional. Also, make it more obvious
what the --startdir flag is meant for on the command line by renaming it
to --testdir, and update the scripts/patchtest.README file to be
consistent with the new usage.

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/data.py |  9 +++--
 scripts/patchtest  |  6 +++---
 scripts/patchtest.README   | 10 +++---
 3 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/meta/lib/patchtest/data.py b/meta/lib/patchtest/data.py
index b661dd64796..12f36aa14d9 100644
--- a/meta/lib/patchtest/data.py
+++ b/meta/lib/patchtest/data.py
@@ -35,6 +35,9 @@ import logging
 logger=logging.getLogger('patchtest')
 info=logger.info
 
+default_testdir = os.path.abspath(os.path.dirname(__file__) + "/tests")
+default_repodir = os.path.abspath(os.path.dirname(__file__) + "/../../..")
+
 # Data store commonly used to share values between pre and post-merge tests
 PatchTestDataStore = collections.defaultdict(str)
 
@@ -58,10 +61,12 @@ class PatchTestInput(object):
 target_patch_group.add_argument('--directory', metavar='DIRECTORY', 
dest='patch_path',
 help='The directory containing patches to be 
tested')
 
-parser.add_argument('repodir', metavar='REPO',
+parser.add_argument('--repodir', metavar='REPO',
+default=default_repodir,
 help="Name of the repository where patch is 
merged")
 
-parser.add_argument('startdir', metavar='TESTDIR',
+parser.add_argument('--testdir', metavar='TESTDIR',
+default=default_testdir,
 help="Directory where test cases are located")
 
 parser.add_argument('--top-level-directory', '-t',
diff --git a/scripts/patchtest b/scripts/patchtest
index 9525a2be17d..b25ef183216 100755
--- a/scripts/patchtest
+++ b/scripts/patchtest
@@ -142,7 +142,7 @@ def _runner(resultklass, prefix=None):
 loader.testMethodPrefix = prefix
 
 # create the suite with discovered tests and the corresponding runner
-suite = loader.discover(start_dir=PatchTestInput.startdir, 
pattern=PatchTestInput.pattern, top_level_dir=PatchTestInput.topdir)
+suite = loader.discover(start_dir=PatchTestInput.testdir, 
pattern=PatchTestInput.pattern, top_level_dir=PatchTestInput.topdir)
 ntc = suite.countTestCases()
 
 # if there are no test cases, just quit
@@ -220,9 +220,9 @@ if __name__ == '__main__':
 if PatchTestInput.debug:
 logger.setLevel(logging.DEBUG)
 
-# if topdir not define, default it to startdir
+# if topdir not define, default it to testdir
 if not PatchTestInput.topdir:
-PatchTestInput.topdir = PatchTestInput.startdir
+PatchTestInput.topdir = PatchTestInput.testdir
 
 try:
 ret = main()
diff --git a/scripts/patchtest.README b/scripts/patchtest.README
index 689d513df51..ad46b02ad6e 100644
--- a/scripts/patchtest.README
+++ b/scripts/patchtest.README
@@ -79,15 +79,19 @@ To run patchtest on the host, do the following:
or patchtest-get-series
 3. Run patchtest on a patch file by doing the following:
 
-patchtest --patch /path/to/patch/file /path/to/target/repo 
/path/to/tests/directory 
+patchtest --patch /path/to/patch/file
 
 or, if you have stored the patch files in a directory, do:
 
-patchtest --directory /path/to/patch/directory /path/to/target/repo 
/path/to/tests/directory 
+patchtest --directory /path/to/patch/directory
 
 For example, to test 
`master-gcc-Fix--fstack-protector-issue-on-aarch64.patch` against the oe-core 
test suite:
 
-patchtest --patch 
master-gcc-Fix--fstack-protector-issue-on-aarch64.patch 
/path/to/openembedded-core /path/to/openembedded-core/meta/lib/patchtest/tests 
+patchtest --patch 
master-gcc-Fix--fstack-protector-issue-on-aarch64.patch
+
+If you want to use a different test suite or target repository, you can 
use the --testdir and --repodir flags:
+
+patchtest --patch /path/to/patch/file --repodir /path/to/repo 
--testdir /path/to/test/dir
 
 ### Guest Mode
 
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189312): 
https://lists.openembedded.org/g/openembedded-core/message/189312
Mute This Topic: https://lists.openembedded.org/mt/102004001/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 3/4] patchtest: add scripts to oe-core

2023-10-16 Thread Trevor Gamblin
Add the following from the patchtest repo:

- patchtest: core patch testing tool
- patchtest-get-branch: determine the target branch of a patch
- patchtest-get-series: pull patch series from Patchwork
- patchtest-send-results: send test results to selected mailing list
- patchtest-setup-sharedir: create sharedir for use with patchtest guest
  mode
- patchtest.README: instructions for using patchtest based on the README
  in the original repository

Note that the patchtest script was modified slightly from the repo
version to retain compatibility with the oe-core changes.
patchtest-send-results and patchtest-setup-sharedir are also primarily
intended for automated testing in guest mode, but are added for
consistency.

Signed-off-by: Trevor Gamblin 
---
 scripts/patchtest| 233 +++
 scripts/patchtest-get-branch |  92 
 scripts/patchtest-get-series | 125 +
 scripts/patchtest-send-results   |  93 
 scripts/patchtest-setup-sharedir |  95 +
 scripts/patchtest.README | 152 
 6 files changed, 790 insertions(+)
 create mode 100755 scripts/patchtest
 create mode 100755 scripts/patchtest-get-branch
 create mode 100755 scripts/patchtest-get-series
 create mode 100755 scripts/patchtest-send-results
 create mode 100755 scripts/patchtest-setup-sharedir
 create mode 100644 scripts/patchtest.README

diff --git a/scripts/patchtest b/scripts/patchtest
new file mode 100755
index 000..9525a2be17d
--- /dev/null
+++ b/scripts/patchtest
@@ -0,0 +1,233 @@
+#!/usr/bin/env python3
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# patchtest: execute all unittest test cases discovered for a single patch
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Author: Leo Sandoval 
+#
+
+import sys
+import os
+import unittest
+import fileinput
+import logging
+import traceback
+import json
+
+# Include current path so test cases can see it
+sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))
+
+# Include patchtest library
+sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), 
'../meta/lib/patchtest'))
+
+from data import PatchTestInput
+from repo import PatchTestRepo
+
+import utils
+logger = utils.logger_create('patchtest')
+info = logger.info
+error = logger.error
+
+import repo
+
+def getResult(patch, mergepatch, logfile=None):
+
+class PatchTestResult(unittest.TextTestResult):
+""" Patchtest TextTestResult """
+shouldStop  = True
+longMessage = False
+
+success = 'PASS'
+fail= 'FAIL'
+skip= 'SKIP'
+
+def startTestRun(self):
+# let's create the repo already, it can be used later on
+repoargs = {
+'repodir': PatchTestInput.repodir,
+'commit' : PatchTestInput.basecommit,
+'branch' : PatchTestInput.basebranch,
+'patch'  : patch,
+}
+
+self.repo_error= False
+self.test_error= False
+self.test_failure  = False
+
+try:
+self.repo = PatchTestInput.repo = PatchTestRepo(**repoargs)
+except:
+logger.error(traceback.print_exc())
+self.repo_error = True
+self.stop()
+return
+
+if mergepatch:
+self.repo.merge()
+
+def addError(self, test, err):
+self.test_error = True
+(ty, va, trace) = err
+logger.error(traceback.print_exc())
+
+def addFailure(self, test, err):
+test_description = test.id().split('.')[-1].replace('_', ' 
').replace("cve", "CVE").replace("signed off by",
+"Signed-off-by").replace("upstream status",
+"Upstream-Status").replace("non auh",
+"non-AUH").replace("presence format", "presence")
+self.test_failure = True
+fail_str = '{}: {}: {} ({})'.format(self.fail,
+test_description, json.loads(str(err[1]))["issue"],
+test.id())
+print(fa

[OE-core][PATCH 2/4] patchtest: add supporting modules

2023-10-16 Thread Trevor Gamblin
Add modules that support core patchtest functionality to
meta/lib/patchtest. These include classes and functions for handling
repository and patch objects, parsing the patchtest CLI arguments, and
other utilities.

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/data.py  |  95 ++
 meta/lib/patchtest/patch.py |  73 ++
 meta/lib/patchtest/repo.py  | 185 
 meta/lib/patchtest/utils.py | 179 ++
 4 files changed, 532 insertions(+)
 create mode 100644 meta/lib/patchtest/data.py
 create mode 100644 meta/lib/patchtest/patch.py
 create mode 100644 meta/lib/patchtest/repo.py
 create mode 100644 meta/lib/patchtest/utils.py

diff --git a/meta/lib/patchtest/data.py b/meta/lib/patchtest/data.py
new file mode 100644
index 000..b661dd64796
--- /dev/null
+++ b/meta/lib/patchtest/data.py
@@ -0,0 +1,95 @@
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# patchtestdata: module used to share command line arguments between
+#patchtest & test suite and a data store between test cases
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Author: Leo Sandoval 
+#
+# NOTE: Strictly speaking, unit test should be isolated from outside,
+#   but patchtest test suites uses command line input data and
+#   pretest and test test cases may use the datastore defined
+#   on this module
+
+import os
+import argparse
+import collections
+import tempfile
+import logging
+
+logger=logging.getLogger('patchtest')
+info=logger.info
+
+# Data store commonly used to share values between pre and post-merge tests
+PatchTestDataStore = collections.defaultdict(str)
+
+class PatchTestInput(object):
+"""Abstract the patchtest argument parser"""
+
+@classmethod
+def set_namespace(cls):
+parser = cls.get_parser()
+parser.parse_args(namespace=cls)
+
+@classmethod
+def get_parser(cls):
+parser = argparse.ArgumentParser()
+
+target_patch_group = parser.add_mutually_exclusive_group(required=True)
+
+target_patch_group.add_argument('--patch', metavar='PATCH', 
dest='patch_path',
+help='The patch to be tested')
+
+target_patch_group.add_argument('--directory', metavar='DIRECTORY', 
dest='patch_path',
+help='The directory containing patches to be 
tested')
+
+parser.add_argument('repodir', metavar='REPO',
+help="Name of the repository where patch is 
merged")
+
+parser.add_argument('startdir', metavar='TESTDIR',
+help="Directory where test cases are located")
+
+parser.add_argument('--top-level-directory', '-t',
+dest='topdir',
+default=None,
+help="Top level directory of project (defaults to 
start directory)")
+
+parser.add_argument('--pattern', '-p',
+dest='pattern',
+default='test*.py',
+help="Pattern to match test files")
+
+parser.add_argument('--base-branch', '-b',
+dest='basebranch',
+help="Branch name used by patchtest to branch 
from. By default, it uses the current one.")
+
+parser.add_argument('--base-commit', '-c',
+dest='basecommit',
+help="Commit ID used by patchtest to branch from. 
By default, it uses HEAD.")
+
+parser.add_argument('--debug', '-d',
+action='store_true',
+help='Enable debug output')
+
+parser.add_argument('--log-results', 
+action='store_true', 
+help='Enable logging to a file matching the target 
patch name with ".testresult" appended')
+
+
+return parser
+
diff --git a/meta/lib/patchtest/patch.py b/meta/lib/patchtest/patch.py
new file mode 100644
index 000..c0e7d579eba
--- /dev/null
+++ b/meta/lib/patchtest/patch.py
@@ -0,0 +1,73 @@
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab

[OE-core][PATCH 0/4] patchtest: add to oe-core

2023-10-16 Thread Trevor Gamblin
Add the patchtest core tools and supporting scripts to
openembedded-core. This will enable users to validate their changes
locally against the repository before submission to the mailing list,
reducing maintainer overhead and encouraging more consistent use of
important patch tags and information. Note that there are a few elements
of the tooling that are still under development, namely the
patchtest-send-results script, which is currently hard-coded to mail
test results to test-l...@lists.yoctoproject.org (and only that list),
while in the future it may be adjusted to directly reply to user
submissions.

A scripts/patchtest.README file is included for basic instructions on
how to use patchtest, as well as for submitting fixes should any bugs be
identified. The Yocto Project Contributor Guide will receive a single,
corresponding patch to provide similar details on why and how to use
patchtest. Finally, the patchtest layer itself will be reduced to only
those pieces that are required for building the core-image-patchtest
image, which makes special adjustments to kernel configurations and
initscripts that are only suitable for automation, and therefore outside
the scope of most contributors' usage.

Trevor Gamblin (4):
  patchtest/requirements.txt: update
  patchtest: add supporting modules
  patchtest: add scripts to oe-core
  patchtest: set default repo and testdir targets

 meta/lib/patchtest/data.py  | 100 
 meta/lib/patchtest/patch.py |  73 +
 meta/lib/patchtest/repo.py  | 185 ++
 meta/lib/patchtest/requirements.txt |   2 +
 meta/lib/patchtest/utils.py | 179 +
 scripts/patchtest   | 233 
 scripts/patchtest-get-branch|  92 +++
 scripts/patchtest-get-series| 125 +++
 scripts/patchtest-send-results  |  93 +++
 scripts/patchtest-setup-sharedir|  95 
 scripts/patchtest.README| 156 +++
 11 files changed, 1333 insertions(+)
 create mode 100644 meta/lib/patchtest/data.py
 create mode 100644 meta/lib/patchtest/patch.py
 create mode 100644 meta/lib/patchtest/repo.py
 create mode 100644 meta/lib/patchtest/utils.py
 create mode 100755 scripts/patchtest
 create mode 100755 scripts/patchtest-get-branch
 create mode 100755 scripts/patchtest-get-series
 create mode 100755 scripts/patchtest-send-results
 create mode 100755 scripts/patchtest-setup-sharedir
 create mode 100644 scripts/patchtest.README

-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189309): 
https://lists.openembedded.org/g/openembedded-core/message/189309
Mute This Topic: https://lists.openembedded.org/mt/102003998/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 1/4] patchtest/requirements.txt: update

2023-10-16 Thread Trevor Gamblin
Add git-pw and boto3 to the list of requirements for patchtest.

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/requirements.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/lib/patchtest/requirements.txt 
b/meta/lib/patchtest/requirements.txt
index 785aa469f69..ba55ff905e2 100644
--- a/meta/lib/patchtest/requirements.txt
+++ b/meta/lib/patchtest/requirements.txt
@@ -1,3 +1,5 @@
+boto3
+git-pw>=2.5.0
 jinja2
 pylint
 pyparsing>=3.0.9
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189310): 
https://lists.openembedded.org/g/openembedded-core/message/189310
Mute This Topic: https://lists.openembedded.org/mt/102003999/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 2/2] patchtest: clean up test suite

2023-10-12 Thread Trevor Gamblin
Various tweaks to make the test suite cleaner and more efficient:

- Replace use of "re" module with "pyparsing" in tests (but not base.py)
- Make test_mbox_cve only check for CVE tags in the commit if the added
  patch has them
- Make test_mbox_cve SKIP instead of PASS if there's no CVE tag
- Simplify the bugzilla tag checking test now that pyparsing is used
- Modify the selftest script to correctly parse the new result output

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/selftest/selftest|  2 +-
 meta/lib/patchtest/tests/test_mbox_author.py| 14 +++---
 meta/lib/patchtest/tests/test_mbox_bugzilla.py  | 14 +++---
 meta/lib/patchtest/tests/test_mbox_cve.py   | 17 ++---
 meta/lib/patchtest/tests/test_mbox_format.py|  3 +--
 .../patchtest/tests/test_mbox_mailinglist.py|  6 +++---
 .../patchtest/tests/test_mbox_signed_off_by.py  |  6 +++---
 .../tests/test_metadata_lic_files_chksum.py |  6 +++---
 .../patchtest/tests/test_metadata_max_length.py |  6 +++---
 .../patchtest/tests/test_metadata_src_uri.py|  4 ++--
 meta/lib/patchtest/tests/test_patch_cve.py  | 10 +-
 .../patchtest/tests/test_patch_signed_off_by.py |  1 -
 12 files changed, 45 insertions(+), 44 deletions(-)

diff --git a/meta/lib/patchtest/selftest/selftest 
b/meta/lib/patchtest/selftest/selftest
index d2b61e951ab..f8985314f5e 100755
--- a/meta/lib/patchtest/selftest/selftest
+++ b/meta/lib/patchtest/selftest/selftest
@@ -63,7 +63,7 @@ if __name__ == '__main__':
 
 for resultline in results.splitlines():
 if testid in resultline:
-result, _ = resultline.split(' ', 1)
+result, _ = resultline.split(':', 1)
 
 if expected_result.upper() == "FAIL" and result.upper() == 
"FAIL":
 xfailcount = xfailcount + 1
diff --git a/meta/lib/patchtest/tests/test_mbox_author.py 
b/meta/lib/patchtest/tests/test_mbox_author.py
index fb8f10e1fd6..e68e7a5ac4d 100644
--- a/meta/lib/patchtest/tests/test_mbox_author.py
+++ b/meta/lib/patchtest/tests/test_mbox_author.py
@@ -5,22 +5,22 @@
 # SPDX-License-Identifier: GPL-2.0
 
 import base
-import re
+import pyparsing
 
 class Author(base.Base):
 
-auh_email = ''
+auh_email = 'a...@auh.yoctoproject.org'
 
-invalids = [re.compile("^Upgrade Helper.+"),
-re.compile(re.escape(auh_email)),
-re.compile("uh@not\.set"),
-re.compile("\S+@example\.com")]
+invalids = [pyparsing.Regex("^Upgrade Helper.+"),
+pyparsing.Regex(auh_email),
+pyparsing.Regex("uh@not\.set"),
+pyparsing.Regex("\S+@example\.com")]
 
 
 def test_author_valid(self):
 for commit in self.commits:
 for invalid in self.invalids:
-if invalid.search(commit.author):
+if invalid.search_string(commit.author):
 self.fail('Invalid author %s. Resend the series with a 
valid patch author' % commit.author, commit=commit)
 
 def test_non_auh_upgrade(self):
diff --git a/meta/lib/patchtest/tests/test_mbox_bugzilla.py 
b/meta/lib/patchtest/tests/test_mbox_bugzilla.py
index aa53b77f87c..adf46b5d59b 100644
--- a/meta/lib/patchtest/tests/test_mbox_bugzilla.py
+++ b/meta/lib/patchtest/tests/test_mbox_bugzilla.py
@@ -4,17 +4,17 @@
 #
 # SPDX-License-Identifier: GPL-2.0
 
-import re
+import pyparsing
 import base
 
 class Bugzilla(base.Base):
-rexp_detect = re.compile("\[\s?YOCTO.*\]", re.IGNORECASE)
-rexp_validation = re.compile("\[(\s?YOCTO\s?#\s?(\d+)\s?,?)+\]", 
re.IGNORECASE)
+rexp_detect = pyparsing.Regex('\[\s?YOCTO.*\]')
+rexp_validation = pyparsing.Regex('\[(\s?YOCTO\s?#\s?(\d+)\s?,?)+\]')
 
 def test_bugzilla_entry_format(self):
 for commit in Bugzilla.commits:
-for line in commit.commit_message.splitlines():
-if self.rexp_detect.match(line):
-if not self.rexp_validation.match(line):
-self.fail('Bugzilla issue ID is not correctly 
formatted - specify it with format: "[YOCTO #]"', commit=commit)
+if not self.rexp_detect.search_string(commit.commit_message):
+self.skip("No bug ID found")
+elif not self.rexp_validation.search_string(commit.commit_message):
+self.fail('Bugzilla issue ID is not correctly formatted - 
specify it with format: "[YOCTO #]"', commit=commit)
 
diff --git a/meta/lib/patchtest/tests/test_mbox_cve.py 
b/meta/lib/patchtest/tests/test_mbox_cve.py
index 36548aa10c4..af3712c1928 100644
--- a/meta/lib/patchtest/tests/test_mbox_cve.py
+++ b/meta/lib/patchtest/tests/test_mbox_cve.py
@@ -20,12 +20,13 @@
 import base
 import os
 import parse_cve_tags
-import re
+impor

[OE-core][PATCH 1/2] patchtest: improve test issue messages

2023-10-12 Thread Trevor Gamblin
The patchtest tests provide vague feedback to the user, and many of them
also provide redundant 'fix' strings that could easily be incorporated
into the issue messages themselves. Simplify them so that it is more
clear what the errors are and how they can be addressed. No
recommendation is given when the issue string adequately conveys the
issue, e.g. with a missing "LICENSE" entry in a newly-created recipe.

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/tests/test_mbox_author.py   |  4 ++--
 meta/lib/patchtest/tests/test_mbox_bugzilla.py |  4 +---
 meta/lib/patchtest/tests/test_mbox_cve.py  |  5 ++---
 meta/lib/patchtest/tests/test_mbox_description.py  |  4 +---
 meta/lib/patchtest/tests/test_mbox_format.py   |  3 +--
 meta/lib/patchtest/tests/test_mbox_mailinglist.py  |  9 -
 meta/lib/patchtest/tests/test_mbox_merge.py|  3 +--
 meta/lib/patchtest/tests/test_mbox_shortlog.py | 10 --
 meta/lib/patchtest/tests/test_mbox_signed_off_by.py|  5 ++---
 .../patchtest/tests/test_metadata_lic_files_chksum.py  |  6 ++
 meta/lib/patchtest/tests/test_metadata_license.py  |  2 +-
 meta/lib/patchtest/tests/test_metadata_max_length.py   |  3 +--
 meta/lib/patchtest/tests/test_metadata_src_uri.py  |  3 +--
 meta/lib/patchtest/tests/test_metadata_summary.py  |  3 +--
 meta/lib/patchtest/tests/test_patch_cve.py |  5 ++---
 meta/lib/patchtest/tests/test_patch_signed_off_by.py   |  3 +--
 meta/lib/patchtest/tests/test_patch_upstream_status.py |  6 +-
 meta/lib/patchtest/tests/test_python_pylint.py |  3 +--
 18 files changed, 29 insertions(+), 52 deletions(-)

diff --git a/meta/lib/patchtest/tests/test_mbox_author.py 
b/meta/lib/patchtest/tests/test_mbox_author.py
index 6c79f164d48..fb8f10e1fd6 100644
--- a/meta/lib/patchtest/tests/test_mbox_author.py
+++ b/meta/lib/patchtest/tests/test_mbox_author.py
@@ -21,9 +21,9 @@ class Author(base.Base):
 for commit in self.commits:
 for invalid in self.invalids:
 if invalid.search(commit.author):
-self.fail('Invalid author %s' % commit.author, 'Resend the 
series with a valid patch\'s author', commit)
+self.fail('Invalid author %s. Resend the series with a 
valid patch author' % commit.author, commit=commit)
 
 def test_non_auh_upgrade(self):
 for commit in self.commits:
 if self.auh_email in commit.payload:
-self.fail('Invalid author %s in commit message' % 
self.auh_email, 'Resend the series with a valid patch\'s author', commit)
+self.fail('Invalid author %s. Resend the series with a valid 
patch author' % self.auh_email, commit=commit)
diff --git a/meta/lib/patchtest/tests/test_mbox_bugzilla.py 
b/meta/lib/patchtest/tests/test_mbox_bugzilla.py
index e8de48bb8da..aa53b77f87c 100644
--- a/meta/lib/patchtest/tests/test_mbox_bugzilla.py
+++ b/meta/lib/patchtest/tests/test_mbox_bugzilla.py
@@ -16,7 +16,5 @@ class Bugzilla(base.Base):
 for line in commit.commit_message.splitlines():
 if self.rexp_detect.match(line):
 if not self.rexp_validation.match(line):
-self.fail('Yocto Project bugzilla tag is not correctly 
formatted',
-  'Specify bugzilla ID in commit description 
with format: "[YOCTO #]"',
-  commit)
+self.fail('Bugzilla issue ID is not correctly 
formatted - specify it with format: "[YOCTO #]"', commit=commit)
 
diff --git a/meta/lib/patchtest/tests/test_mbox_cve.py 
b/meta/lib/patchtest/tests/test_mbox_cve.py
index f99194c094c..36548aa10c4 100644
--- a/meta/lib/patchtest/tests/test_mbox_cve.py
+++ b/meta/lib/patchtest/tests/test_mbox_cve.py
@@ -44,6 +44,5 @@ class CVE(base.Base):
 if self.revert_shortlog_regex.match(commit.shortlog):
 continue
 if not self.prog.search_string(commit.payload):
-self.fail('Missing or incorrectly formatted CVE tag in mbox',
-  'Correct or include the CVE tag in the mbox with 
format: "CVE: CVE--"',
-  commit)
+self.fail('Missing or incorrectly formatted CVE tag in mbox. 
Correct or include the CVE tag in the mbox with format: "CVE: CVE--"',
+  commit=commit)
diff --git a/meta/lib/patchtest/tests/test_mbox_description.py 
b/meta/lib/patchtest/tests/test_mbox_description.py
index 7addc6b5f77..46bedd46ce5 100644
--- a/meta/lib/patchtest/tests/test_mbox_description.py
+++ b/meta/lib/patchtest/tests/test_mbox_description.py
@@ -11,7 +11,5 @@ class CommitMessage(base.Base):
 def test_commit_message_presence(self):
 for commit in CommitMessage.commits:
 if not commit.commit_message.strip():
-  

Re: [OE-core] [PATCH v2] wayland: consider pkgconfig sysroot for pkgdatadir

2023-10-11 Thread Trevor Gamblin


On 2023-10-11 15:19, Andreas Cord-Landwehr wrote:

Fix pkgconfig find calls to find wayland protocol XML files, which are
installed into /usr/share/wayland/. This patch fixes specifically the
call `pkg-config --variable=pkgdatadir wayland-client` to locate the
folder containing wayland.xml. Without the patch, only the host system's
data dir /usr/share/wayland is reported (and that only when
wayland-protocols dev package is available) thus leaking a path from the
host system into the recipe build.

Access to wayland.xml is required by projects that generate wayland API
via waylandscanner like KDE's kwin or layer-shell-qt.

See further details of upstream discussion in:
https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/102

Signed-off-by: Andreas Cord-Landwehr 
---
  ...der-pkgconfig-sysroot-for-pkgdatadir.patch | 46 +++
  .../wayland/wayland_1.22.0.bb |  1 +
  2 files changed, 47 insertions(+)
  create mode 100644 
meta/recipes-graphics/wayland/wayland/0002-Consider-pkgconfig-sysroot-for-pkgdatadir.patch

diff --git 
a/meta/recipes-graphics/wayland/wayland/0002-Consider-pkgconfig-sysroot-for-pkgdatadir.patch
 
b/meta/recipes-graphics/wayland/wayland/0002-Consider-pkgconfig-sysroot-for-pkgdatadir.patch
new file mode 100644
index 00..4573bb635a
--- /dev/null
+++ 
b/meta/recipes-graphics/wayland/wayland/0002-Consider-pkgconfig-sysroot-for-pkgdatadir.patch
@@ -0,0 +1,46 @@
+From ff8ecbe8891d592e645927659318720f9e190054 Mon Sep 17 00:00:00 2001
+From: Andreas Cord-Landwehr 
+Date: Sun, 6 Feb 2022 17:23:46 +0100
+Subject: [PATCH] Consider pkgconfig sysroot for pkgdatadir
+
+For libs/cflags this is done automatically, but not for manually accessed
+variables. This matches what wayland-protocols does.
+
+Upstream-Status: Submitted 
[https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/272]
There should be a Signed-off-by tag here as well. Can you add one and 
resubmit?

+---
+ src/meson.build | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/meson.build b/src/meson.build
+index a8a1d2b..721e151 100644
+--- a/src/meson.build
 b/src/meson.build
+@@ -65,7 +65,7 @@ if get_option('scanner')
+   version: meson.project_version(),
+   variables: [
+   'datarootdir=' + join_paths('${prefix}', 
get_option('datadir')),
+-  'pkgdatadir=' + join_paths('${datarootdir}', 
meson.project_name()),
++  'pkgdatadir=' + 
join_paths('${pc_sysrootdir}${datarootdir}', meson.project_name()),
+   'bindir=' + join_paths('${prefix}', 
get_option('bindir')),
+   'wayland_scanner=${bindir}/wayland-scanner'
+   ],
+@@ -211,7 +211,7 @@ if get_option('libraries')
+   filebase: 'wayland-server',
+   variables: [
+   'datarootdir=' + join_paths('${prefix}', 
get_option('datadir')),
+-  'pkgdatadir=' + join_paths('${datarootdir}', 
meson.project_name())
++  'pkgdatadir=' + 
join_paths('${pc_sysrootdir}${datarootdir}', meson.project_name())
+   ]
+   )
+
+@@ -250,7 +250,7 @@ if get_option('libraries')
+   filebase: 'wayland-client',
+   variables: [
+   'datarootdir=' + join_paths('${prefix}', 
get_option('datadir')),
+-  'pkgdatadir=' + join_paths('${datarootdir}', 
meson.project_name())
++  'pkgdatadir=' + 
join_paths('${pc_sysrootdir}${datarootdir}', meson.project_name())
+   ]
+   )
+
+--
+2.37.2
diff --git a/meta/recipes-graphics/wayland/wayland_1.22.0.bb 
b/meta/recipes-graphics/wayland/wayland_1.22.0.bb
index 26bad580eb..17e4a0cd98 100644
--- a/meta/recipes-graphics/wayland/wayland_1.22.0.bb
+++ b/meta/recipes-graphics/wayland/wayland_1.22.0.bb
@@ -15,6 +15,7 @@ DEPENDS = "expat libffi wayland-native"
  SRC_URI = 
"https://gitlab.freedesktop.org/wayland/wayland/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz
 \
 file://run-ptest \
 file://0001-build-Fix-strndup-detection-on-MinGW.patch \
+   file://0002-Consider-pkgconfig-sysroot-for-pkgdatadir.patch \
 "
  SRC_URI[sha256sum] = 
"1540af1ea698a471c2d8e9d288332c7e0fd360c8f1d12936ebb7e7cbc2425842"
  





-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188971): 
https://lists.openembedded.org/g/openembedded-core/message/188971
Mute This Topic: https://lists.openembedded.org/mt/101904034/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] python3-ptest: skip test_storlines

2023-10-06 Thread Trevor Gamblin
[YOCTO #14933]

test_storlines is yet another Python ptest that fails intermittently on
the Yocto AB, so disable it during ptests for now.

Signed-off-by: Trevor Gamblin 
---
 ...orlines-skip-due-to-load-variability.patch | 32 +++
 .../recipes-devtools/python/python3_3.11.5.bb |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 
meta/recipes-devtools/python/python3/0001-test_storlines-skip-due-to-load-variability.patch

diff --git 
a/meta/recipes-devtools/python/python3/0001-test_storlines-skip-due-to-load-variability.patch
 
b/meta/recipes-devtools/python/python3/0001-test_storlines-skip-due-to-load-variability.patch
new file mode 100644
index 000..199031d42aa
--- /dev/null
+++ 
b/meta/recipes-devtools/python/python3/0001-test_storlines-skip-due-to-load-variability.patch
@@ -0,0 +1,32 @@
+From 013ff01fdf2aa6ca69a7c80a2a2996630877e4ea Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin 
+Date: Fri, 6 Oct 2023 10:59:44 -0400
+Subject: [PATCH] test_storlines: skip due to load variability
+
+This is yet another test that intermittently fails on the Yocto AB when
+a worker is under heavy load, so skip it during testing.
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+[YOCTO #14933]
+
+Signed-off-by: Trevor Gamblin 
+---
+ Lib/test/test_ftplib.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py
+index 082a90d46b..508814d56a 100644
+--- a/Lib/test/test_ftplib.py
 b/Lib/test/test_ftplib.py
+@@ -629,6 +629,7 @@ def test_storbinary_rest(self):
+ self.client.storbinary('stor', f, rest=r)
+ self.assertEqual(self.server.handler_instance.rest, str(r))
+ 
++@unittest.skip('timing related test, dependent on load')
+ def test_storlines(self):
+ data = RETR_DATA.replace('\r\n', '\n').encode(self.client.encoding)
+ f = io.BytesIO(data)
+-- 
+2.41.0
+
diff --git a/meta/recipes-devtools/python/python3_3.11.5.bb 
b/meta/recipes-devtools/python/python3_3.11.5.bb
index 8e023c7dfb8..d375de4b19c 100644
--- a/meta/recipes-devtools/python/python3_3.11.5.bb
+++ b/meta/recipes-devtools/python/python3_3.11.5.bb
@@ -33,6 +33,7 @@ SRC_URI = 
"http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
file://0001-Avoid-shebang-overflow-on-python-config.py.patch \
file://0001-Update-test_sysconfig-for-posix_user-purelib.patch \

file://0001-skip-no_stdout_fileno-test-due-to-load-variability.patch \
+   file://0001-test_storlines-skip-due-to-load-variability.patch \
"
 
 SRC_URI:append:class-native = " \
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188777): 
https://lists.openembedded.org/g/openembedded-core/message/188777
Mute This Topic: https://lists.openembedded.org/mt/101800998/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] patchtest/selftest: only split resultlines once

2023-09-21 Thread Trevor Gamblin
selftest assumes that the test result output lines will consist of two
tokens separated by whitespace, which are the actual result and the name
of the test run. As a result, the script fails if any verbosity is added
to the output of patchtest itself (e.g. by including a failure reason).
Make the call to split() only do so once in order to ensure that two
tokens are obtained.

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/selftest/selftest | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/patchtest/selftest/selftest 
b/meta/lib/patchtest/selftest/selftest
index ba8e1623ee..d2b61e951a 100755
--- a/meta/lib/patchtest/selftest/selftest
+++ b/meta/lib/patchtest/selftest/selftest
@@ -63,7 +63,7 @@ if __name__ == '__main__':
 
 for resultline in results.splitlines():
 if testid in resultline:
-result, _ = resultline.split()
+result, _ = resultline.split(' ', 1)
 
 if expected_result.upper() == "FAIL" and result.upper() == 
"FAIL":
 xfailcount = xfailcount + 1
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#187995): 
https://lists.openembedded.org/g/openembedded-core/message/187995
Mute This Topic: https://lists.openembedded.org/mt/101499550/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH v2] python3-ptest: skip test_input_no_stdout_fileno

2023-09-15 Thread Trevor Gamblin
[YOCTO #15210]

test_input_no_stdout_fileno has been seen failing on AB workers under
heavy load. Skip it while leaving the rest of the test_builtin suite
alone.

Signed-off-by: Trevor Gamblin 
---
v2 clarifies that this is a fix for python3-ptest, not python3.
 ..._fileno-test-due-to-load-variability.patch | 32 +++
 .../recipes-devtools/python/python3_3.11.5.bb |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 
meta/recipes-devtools/python/python3/0001-skip-no_stdout_fileno-test-due-to-load-variability.patch

diff --git 
a/meta/recipes-devtools/python/python3/0001-skip-no_stdout_fileno-test-due-to-load-variability.patch
 
b/meta/recipes-devtools/python/python3/0001-skip-no_stdout_fileno-test-due-to-load-variability.patch
new file mode 100644
index 00..ff695a4091
--- /dev/null
+++ 
b/meta/recipes-devtools/python/python3/0001-skip-no_stdout_fileno-test-due-to-load-variability.patch
@@ -0,0 +1,32 @@
+From 564d8f117fec7e573cbc10323655acefb12d143f Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin 
+Date: Fri, 15 Sep 2023 08:48:33 -0400
+Subject: [PATCH] skip no_stdout_fileno test due to load variability
+
+Skip test_input_no_stdout_fileno so that it doesn't fail on systems
+under heavy load.
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+[YOCTO #15210]
+
+Signed-off-by: Trevor Gamblin 
+---
+ Lib/test/test_builtin.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py
+index 9078c409cc..615955c057 100644
+--- a/Lib/test/test_builtin.py
 b/Lib/test/test_builtin.py
+@@ -2247,6 +2247,7 @@ def test_input_tty_non_ascii_unicode_errors(self):
+ # Check stdin/stdout error handler is used when invoking 
PyOS_Readline()
+ self.check_input_tty("prompté", b"quux\xe9", "ascii")
+ 
++@unittest.skip("Test may fail under heavy load")
+ def test_input_no_stdout_fileno(self):
+ # Issue #24402: If stdin is the original terminal but stdout.fileno()
+ # fails, do not use the original stdout file descriptor
+-- 
+2.41.0
+
diff --git a/meta/recipes-devtools/python/python3_3.11.5.bb 
b/meta/recipes-devtools/python/python3_3.11.5.bb
index f5d97311d7..6c624c9d3d 100644
--- a/meta/recipes-devtools/python/python3_3.11.5.bb
+++ b/meta/recipes-devtools/python/python3_3.11.5.bb
@@ -32,6 +32,7 @@ SRC_URI = 
"http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
file://deterministic_imports.patch \
file://0001-Avoid-shebang-overflow-on-python-config.py.patch \
file://0001-Update-test_sysconfig-for-posix_user-purelib.patch \
+   
file://0001-skip-no_stdout_fileno-test-due-to-load-variability.patch \
"
 
 SRC_URI:append:class-native = " \
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#187667): 
https://lists.openembedded.org/g/openembedded-core/message/187667
Mute This Topic: https://lists.openembedded.org/mt/101381632/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] python3: skip test_input_no_stdout_fileno

2023-09-15 Thread Trevor Gamblin
[YOCTO #15210]

test_input_no_stdout_fileno has been seen failing on AB workers under
heavy load. Skip it while leaving the rest of the test_builtin suite
alone.

Signed-off-by: Trevor Gamblin 
---
 ..._fileno-test-due-to-load-variability.patch | 32 +++
 .../recipes-devtools/python/python3_3.11.5.bb |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 
meta/recipes-devtools/python/python3/0001-skip-no_stdout_fileno-test-due-to-load-variability.patch

diff --git 
a/meta/recipes-devtools/python/python3/0001-skip-no_stdout_fileno-test-due-to-load-variability.patch
 
b/meta/recipes-devtools/python/python3/0001-skip-no_stdout_fileno-test-due-to-load-variability.patch
new file mode 100644
index 00..ff695a4091
--- /dev/null
+++ 
b/meta/recipes-devtools/python/python3/0001-skip-no_stdout_fileno-test-due-to-load-variability.patch
@@ -0,0 +1,32 @@
+From 564d8f117fec7e573cbc10323655acefb12d143f Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin 
+Date: Fri, 15 Sep 2023 08:48:33 -0400
+Subject: [PATCH] skip no_stdout_fileno test due to load variability
+
+Skip test_input_no_stdout_fileno so that it doesn't fail on systems
+under heavy load.
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+[YOCTO #15210]
+
+Signed-off-by: Trevor Gamblin 
+---
+ Lib/test/test_builtin.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py
+index 9078c409cc..615955c057 100644
+--- a/Lib/test/test_builtin.py
 b/Lib/test/test_builtin.py
+@@ -2247,6 +2247,7 @@ def test_input_tty_non_ascii_unicode_errors(self):
+ # Check stdin/stdout error handler is used when invoking 
PyOS_Readline()
+ self.check_input_tty("prompté", b"quux\xe9", "ascii")
+ 
++@unittest.skip("Test may fail under heavy load")
+ def test_input_no_stdout_fileno(self):
+ # Issue #24402: If stdin is the original terminal but stdout.fileno()
+ # fails, do not use the original stdout file descriptor
+-- 
+2.41.0
+
diff --git a/meta/recipes-devtools/python/python3_3.11.5.bb 
b/meta/recipes-devtools/python/python3_3.11.5.bb
index f5d97311d7..6c624c9d3d 100644
--- a/meta/recipes-devtools/python/python3_3.11.5.bb
+++ b/meta/recipes-devtools/python/python3_3.11.5.bb
@@ -32,6 +32,7 @@ SRC_URI = 
"http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
file://deterministic_imports.patch \
file://0001-Avoid-shebang-overflow-on-python-config.py.patch \
file://0001-Update-test_sysconfig-for-posix_user-purelib.patch \
+   
file://0001-skip-no_stdout_fileno-test-due-to-load-variability.patch \
"
 
 SRC_URI:append:class-native = " \
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#187666): 
https://lists.openembedded.org/g/openembedded-core/message/187666
Mute This Topic: https://lists.openembedded.org/mt/101381532/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2 1/4] patchtest: Add tests from patchtest oe repo

2023-09-13 Thread Trevor Gamblin
Copy the core components of the patchtest-oe repo into
meta/lib/patchtest in oe-core.

Signed-off-by: Trevor Gamblin 
---
v2 incorporates the new syntax for invoking patchtest in the selftest
script.

 ...-selftest-remove-configurable-target.patch |  64 +
 .../files/Author.test_author_valid.1.fail |  32 +++
 .../files/Author.test_author_valid.1.pass |  31 +++
 .../files/Author.test_author_valid.2.fail |  31 +++
 .../files/Author.test_author_valid.2.pass |  31 +++
 .../Bugzilla.test_bugzilla_entry_format.fail  |  25 ++
 .../Bugzilla.test_bugzilla_entry_format.pass  |  25 ++
 ...E.test_cve_presence_in_commit_message.fail |  72 ++
 ...E.test_cve_presence_in_commit_message.pass |  74 ++
 .../files/CVE.test_cve_tag_format.fail|  73 ++
 .../files/CVE.test_cve_tag_format.pass|  73 ++
 ...tMessage.test_commit_message_presence.fail |  22 ++
 ...tMessage.test_commit_message_presence.pass |  24 ++
 ...c_files_chksum_modified_not_mentioned.fail |  37 +++
 ...c_files_chksum_modified_not_mentioned.pass |  39 +++
 ...ChkSum.test_lic_files_chksum_presence.fail |  53 
 ...ChkSum.test_lic_files_chksum_presence.pass |  54 
 .../files/MboxFormat.test_mbox_format.1.fail  |  36 +++
 .../files/MboxFormat.test_mbox_format.2.fail  |  35 +++
 .../files/MboxFormat.test_mbox_format.pass|  33 +++
 .../Merge.test_series_merge_on_head.fail  |  41 +++
 .../Merge.test_series_merge_on_head.pass  |  35 +++
 ...gnedOffBy.test_signed_off_by_presence.fail |  71 ++
 ...gnedOffBy.test_signed_off_by_presence.pass |  72 ++
 .../files/Shortlog.test_shortlog_format.fail  |  73 ++
 .../files/Shortlog.test_shortlog_format.pass  |  73 ++
 .../files/Shortlog.test_shortlog_length.fail  |  73 ++
 .../files/Shortlog.test_shortlog_length.pass  |  73 ++
 ...edOffBy.test_signed_off_by_presence.1.fail |  71 ++
 ...edOffBy.test_signed_off_by_presence.2.fail |  72 ++
 ...gnedOffBy.test_signed_off_by_presence.pass |  72 ++
 .../files/SrcUri.test_src_uri_left_files.fail |  35 +++
 .../files/SrcUri.test_src_uri_left_files.pass |  51 
 .../files/Summary.test_summary_presence.fail  |  46 
 .../files/Summary.test_summary_presence.pass  |  49 
 meta/lib/patchtest/selftest/selftest  |  91 +++
 meta/lib/patchtest/tests/__init__.py  |   0
 meta/lib/patchtest/tests/base.py  | 239 ++
 meta/lib/patchtest/tests/pyparsing/common.py  |  26 ++
 .../tests/pyparsing/parse_cve_tags.py |  18 ++
 .../tests/pyparsing/parse_shortlog.py |  14 +
 .../tests/pyparsing/parse_signed_off_by.py|  22 ++
 .../tests/pyparsing/parse_upstream_status.py  |  24 ++
 meta/lib/patchtest/tests/test_mbox_author.py  |  29 +++
 .../lib/patchtest/tests/test_mbox_bugzilla.py |  22 ++
 meta/lib/patchtest/tests/test_mbox_cve.py |  49 
 .../patchtest/tests/test_mbox_description.py  |  17 ++
 meta/lib/patchtest/tests/test_mbox_format.py  |  16 ++
 .../patchtest/tests/test_mbox_mailinglist.py  |  64 +
 meta/lib/patchtest/tests/test_mbox_merge.py   |  25 ++
 .../lib/patchtest/tests/test_mbox_shortlog.py |  41 +++
 .../tests/test_mbox_signed_off_by.py  |  28 ++
 .../tests/test_metadata_lic_files_chksum.py   |  82 ++
 .../patchtest/tests/test_metadata_license.py  |  55 
 .../tests/test_metadata_max_length.py |  26 ++
 .../patchtest/tests/test_metadata_src_uri.py  |  75 ++
 .../patchtest/tests/test_metadata_summary.py  |  32 +++
 meta/lib/patchtest/tests/test_patch_cve.py|  51 
 .../tests/test_patch_signed_off_by.py |  43 
 .../tests/test_patch_upstream_status.py   |  64 +
 .../lib/patchtest/tests/test_python_pylint.py |  61 +
 61 files changed, 2985 insertions(+)
 create mode 100644 
meta/lib/patchtest/selftest/0001-selftest-remove-configurable-target.patch
 create mode 100644 
meta/lib/patchtest/selftest/files/Author.test_author_valid.1.fail
 create mode 100644 
meta/lib/patchtest/selftest/files/Author.test_author_valid.1.pass
 create mode 100644 
meta/lib/patchtest/selftest/files/Author.test_author_valid.2.fail
 create mode 100644 
meta/lib/patchtest/selftest/files/Author.test_author_valid.2.pass
 create mode 100644 
meta/lib/patchtest/selftest/files/Bugzilla.test_bugzilla_entry_format.fail
 create mode 100644 
meta/lib/patchtest/selftest/files/Bugzilla.test_bugzilla_entry_format.pass
 create mode 100644 
meta/lib/patchtest/selftest/files/CVE.test_cve_presence_in_commit_message.fail
 create mode 100644 
meta/lib/patchtest/selftest/files/CVE.test_cve_presence_in_commit_message.pass
 create mode 100644 
meta/lib/patchtest/selftest/files/CVE.test_cve_tag_format.fail
 create mode 100644 
meta/lib/patchtest/selftest/files/CVE.test_cve_tag_format.pass
 create mode 100644 
meta/lib/patchtest/selftest/files/CommitMessage.test_commit_message_presence.fail
 create mode 100644 
meta/lib/patchtest/selftest/files/CommitMessage.test_commit_message_presence.pass
 create

[OE-core] [PATCH v2 4/4] patchtest: Add README.md for selftests

2023-09-13 Thread Trevor Gamblin
Add a short README describing how to setup patchtest's selftests for
oe-core.

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/README.md | 20 
 1 file changed, 20 insertions(+)
 create mode 100644 meta/lib/patchtest/README.md

diff --git a/meta/lib/patchtest/README.md b/meta/lib/patchtest/README.md
new file mode 100644
index 00..f66613c0c1
--- /dev/null
+++ b/meta/lib/patchtest/README.md
@@ -0,0 +1,20 @@
+# patchtest selftests for openembedded-core
+
+This directory provides a test suite and selftest script for use with the
+patchtest repository: https://git.yoctoproject.org/patchtest/
+
+To setup for use:
+
+1. Clone https://git.openembedded.org/openembedded-core (this repo) and 
https://git.openembedded.org/bitbake/
+2. Clone https://git.yoctoproject.org/patchtest
+3. Install the necessary Python modules: in meta/lib/patchtest or the patchtest
+   repo, do `pip install -r requirements.txt`
+4. Add patchtest to PATH: `export PATH=/path/to/patchtest/repo:$PATH`
+5. Initialize the environment: `source oe-init-build-env`
+6. Add meta-selftest to bblayers.conf: `bitbake-layers add-layer
+   /path/to/meta-selftest/` (the selftests use this layer's recipes as test
+   targets)
+7. Finally, run the selftest script: `./meta/lib/patchtest/selftest/selftest`
+
+For more information on using patchtest, see the patchtest repo at
+https://git.yoctoproject.org/patchtest/.
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#187616): 
https://lists.openembedded.org/g/openembedded-core/message/187616
Mute This Topic: https://lists.openembedded.org/mt/101341527/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 3/4] patchtest: add requirements.txt

2023-09-13 Thread Trevor Gamblin
Add a requirements.txt file with the Python modules needed for Patchtest
to run.

Signed-off-by: Trevor Gamblin 
---
 meta/lib/patchtest/requirements.txt | 4 
 1 file changed, 4 insertions(+)
 create mode 100644 meta/lib/patchtest/requirements.txt

diff --git a/meta/lib/patchtest/requirements.txt 
b/meta/lib/patchtest/requirements.txt
new file mode 100644
index 00..785aa469f6
--- /dev/null
+++ b/meta/lib/patchtest/requirements.txt
@@ -0,0 +1,4 @@
+jinja2
+pylint
+pyparsing>=3.0.9
+unidiff
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#187615): 
https://lists.openembedded.org/g/openembedded-core/message/187615
Mute This Topic: https://lists.openembedded.org/mt/101341526/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH v2 0/4] patchtest: Add test suite for oe-core

2023-09-13 Thread Trevor Gamblin
v2 is a resend after a refactor to the patchtest CLI. Patch 3 is
unchanged, while patch 4 only fixes a typo. Patchtest change:
https://git.yoctoproject.org/patchtest/commit/?id=28fa31f48de960ccba9e6d410dc41dbed3355b29

As part of the patchtest revitalization project, the patchtest-oe
repository (https://git.yoctoproject.org/patchtest-oe/) has been updated
with fixes to tests, patch files used for testing, and the selftest
script. Since it is designed specifically as a test suite for
openembedded-core, it makes sense to include it in that repository to
reduce overall setup complexity and simplify further development of
patchtest itself. Additionally, it can be used as a baseline for tests
in other layers and/or new requirements for patch submissions.

This effort does not include migration of the actual patchtest tool or
related scripts, which remain in their own repository at
https://git.yoctoproject.org/patchtest/. What this series includes:

- Tests for validating patch format and metadata
- Sample patch files that target meta-selftest recipes 
- A selftest script for testing the sample patches against oe-core
- A requirements.txt file listing the modules that patchtest needs to
  run correctly
- A README describing how to properly setup the selftest run

Example output from selftest:

[tgamblin@megalith patchtest]$ ./selftest/selftest
XPASS: PatchSignedOffBy.test_signed_off_by_presence (file: 
PatchSignedOffBy.test_signed_off_by_presence.pass)
XFAIL: Shortlog.test_shortlog_format (file: Shortlog.test_shortlog_format.fail)
XFAIL: MboxFormat.test_mbox_format (file: MboxFormat.test_mbox_format.1.fail)
XPASS: Shortlog.test_shortlog_length (file: Shortlog.test_shortlog_length.pass)
XFAIL: CommitMessage.test_commit_message_presence (file: 
CommitMessage.test_commit_message_presence.fail)
XFAIL: SrcUri.test_src_uri_left_files (file: 
SrcUri.test_src_uri_left_files.fail)
XPASS: Author.test_author_valid (file: Author.test_author_valid.1.pass)
XFAIL: LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned (file: 
LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned.fail)
XPASS: CVE.test_cve_tag_format (file: CVE.test_cve_tag_format.pass)
XPASS: CVE.test_cve_presence_in_commit_message (file: 
CVE.test_cve_presence_in_commit_message.pass)
XFAIL: CVE.test_cve_tag_format (file: CVE.test_cve_tag_format.fail)
XFAIL: Author.test_author_valid (file: Author.test_author_valid.1.fail)
XFAIL: LicFilesChkSum.test_lic_files_chksum_presence (file: 
LicFilesChkSum.test_lic_files_chksum_presence.fail)
XPASS: MboxFormat.test_mbox_format (file: MboxFormat.test_mbox_format.pass)
XFAIL: SignedOffBy.test_signed_off_by_presence (file: 
SignedOffBy.test_signed_off_by_presence.1.fail)
XPASS: Shortlog.test_shortlog_format (file: Shortlog.test_shortlog_format.pass)
XFAIL: SignedOffBy.test_signed_off_by_presence (file: 
SignedOffBy.test_signed_off_by_presence.2.fail)
XFAIL: MboxFormat.test_mbox_format (file: MboxFormat.test_mbox_format.2.fail)
XFAIL: Summary.test_summary_presence (file: Summary.test_summary_presence.fail)
XPASS: Author.test_author_valid (file: Author.test_author_valid.2.pass)
XPASS: Bugzilla.test_bugzilla_entry_format (file: 
Bugzilla.test_bugzilla_entry_format.pass)
XFAIL: CVE.test_cve_presence_in_commit_message (file: 
CVE.test_cve_presence_in_commit_message.fail)
XPASS: SignedOffBy.test_signed_off_by_presence (file: 
SignedOffBy.test_signed_off_by_presence.pass)
XPASS: LicFilesChkSum.test_lic_files_chksum_presence (file: 
LicFilesChkSum.test_lic_files_chksum_presence.pass)
XPASS: Merge.test_series_merge_on_head (file: 
Merge.test_series_merge_on_head.pass)
XPASS: CommitMessage.test_commit_message_presence (file: 
CommitMessage.test_commit_message_presence.pass)
XFAIL: Merge.test_series_merge_on_head (file: 
Merge.test_series_merge_on_head.fail)
XPASS: Summary.test_summary_presence (file: Summary.test_summary_presence.pass)
XPASS: LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned (file: 
LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned.pass)
XFAIL: Shortlog.test_shortlog_length (file: Shortlog.test_shortlog_length.fail)
XFAIL: PatchSignedOffBy.test_signed_off_by_presence (file: 
PatchSignedOffBy.test_signed_off_by_presence.fail)
XFAIL: Bugzilla.test_bugzilla_entry_format (file: 
Bugzilla.test_bugzilla_entry_format.fail)
XPASS: SrcUri.test_src_uri_left_files (file: 
SrcUri.test_src_uri_left_files.pass)
XFAIL: Author.test_author_valid (file: Author.test_author_valid.2.fail)

Testsuite summary for patchtest

# TOTAL: 34
# XPASS: 16
# XFAIL: 18
# PASS: 0
# FAIL: 0
# SKIP: 0
# ERROR: 0


Trevor Gamblin (4):
  patchtest: Add tests from patchtest-oe repo
  selftest: remove configurable target
  patchtest: add requirements.txt
  patchtest: Add README.md for selftests

 meta

[OE-core] [PATCH v2 2/4] patchtest/selftest: remove configurable target

2023-09-13 Thread Trevor Gamblin
The ability to pass the target (i.e. oe-core) as an argument was a
testing mechanism and isn't needed when the tests are part of the repo,
so remove it and use os.path.dirname to get it instead.

Signed-off-by: Trevor Gamblin 
---
v2 is a simple update to the patch diff reflecting the other changes to
the selftest script.

 meta/lib/patchtest/selftest/selftest | 14 ++
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/meta/lib/patchtest/selftest/selftest 
b/meta/lib/patchtest/selftest/selftest
index c2e6b4863d..ba8e1623ee 100755
--- a/meta/lib/patchtest/selftest/selftest
+++ b/meta/lib/patchtest/selftest/selftest
@@ -15,6 +15,9 @@ patchesdir = os.path.join(currentdir, 'files')
 topdir = os.path.dirname(currentdir)
 parentdir  = os.path.dirname(topdir)
 
+# path to the repo root
+repodir = os.path.dirname(os.path.dirname(parentdir))
+
 def print_results(passcount, skipcount, failcount, xpasscount, xfailcount, 
errorcount):
 total = passcount + skipcount + failcount + xpasscount + xfailcount + 
errorcount
 
print("")
@@ -30,21 +33,16 @@ def print_results(passcount, skipcount, failcount, 
xpasscount, xfailcount, error
 
print("")
 
 # Once the tests are in oe-core, we can remove the testdir param and use 
os.path.dirname to get relative paths
-def test(root, patch, testdir):
+def test(root, patch):
 res = True
 patchpath = os.path.abspath(os.path.join(root, patch))
-
 
-cmd = 'patchtest %s %s/tests --patch %s' % (testdir, topdir, patchpath)
+cmd = 'patchtest %s %s/tests --patch %s' % (repodir, topdir, patchpath)
 results = subprocess.check_output(cmd, stderr=subprocess.STDOUT, 
universal_newlines=True, shell=True)
 
 return results
 
 if __name__ == '__main__':
-# sys.argv[1] should be the repo to target for selftest, i.e. oe-core
-if len(sys.argv) == 1:
-sys.exit("Error: Must provide the path to openembedded-core, e.g. 
\"selftest /workspace/yocto/openembedded-core\"")
-
 passcount = 0
 failcount = 0
 skipcount = 0
@@ -56,7 +54,7 @@ if __name__ == '__main__':
 
 for root, dirs, patches in os.walk(patchesdir):
 for patch in patches:
-results = test(root, patch, sys.argv[1])
+results = test(root, patch)
 
 a = patch.split('.')
 klass, testname = a[0], a[1]
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#187614): 
https://lists.openembedded.org/g/openembedded-core/message/187614
Mute This Topic: https://lists.openembedded.org/mt/101341525/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



  1   2   3   4   >