<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/lib/patchtest, branch 5.2_M2</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=5.2_M2</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=5.2_M2'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2024-11-19T12:54:32+00:00</updated>
<entry>
<title>patchtest: use HEAD commit as base for the selftest and not master</title>
<updated>2024-11-19T12:54:32+00:00</updated>
<author>
<name>Alexander Kanavin</name>
<email>alex@linutronix.de</email>
</author>
<published>2024-11-18T16:26:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4ed3c83240b3a761af71a3d10e295b4e5e356f00'/>
<id>urn:sha1:4ed3c83240b3a761af71a3d10e295b4e5e356f00</id>
<content type='text'>
Patchtest applies patches on top of poky master branch by default;
this means selftest does the same, and any commits from the branch-under-test
are then discarded.

This can cause issues for example, if bitbake-server process started by selftest
from the master branch tries to parse bitbake.conf from the branch under test:
https://valkyrie.yoctoproject.org/#/builders/71/builds/460

(From OE-Core rev: 03c6b2e0277c00faf55c12c4d0b4b5e3a4898f8c)

Signed-off-by: Alexander Kanavin &lt;alex@linutronix.de&gt;
Signed-off-by: Mathieu Dubois-Briand &lt;mathieu.dubois-briand@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>patchtest: add "Inactive-Upstream"</title>
<updated>2024-11-01T12:58:19+00:00</updated>
<author>
<name>Katariina Lounento</name>
<email>katariina.lounento@vaisala.com</email>
</author>
<published>2024-10-08T06:33:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f023756ef880a61aa2f744f228882861f392b16b'/>
<id>urn:sha1:f023756ef880a61aa2f744f228882861f392b16b</id>
<content type='text'>
The list of valid statuses (`upstream_status_literal_valid_status`) was
missing "Inactive-Upstream", which caused patchtest to fail the test
test_patch.TestPatch.test_upstream_status_presence_format for patches
containing lines like:

    +Upstream-Status: Inactive-Upstream [lastrelease: 2013 lastcommit: 2013]

with the error:

    FAIL: test Upstream-Status presence: Upstream-Status is in incorrect format (test_patch.TestPatch.test_upstream_status_presence_format)

"Inactive-Upstream" is documented in the Yocto Project and OpenEmbedded
Contributor Guide [1]:

    Inactive-Upstream [lastcommit: when (and/or) lastrelease: when]

        The upstream is no longer available. This typically means a
        defunct project where no activity has happened for a long time —
        measured in years. To make that judgement, it is recommended to
        look at not only when the last release happened, but also when
        the last commit happened, and whether newly made bug reports and
        merge requests since that time receive no reaction. It is also
        recommended to add to the patch description any relevant links
        where the inactivity can be clearly seen.

`upstream_status_nonliteral_valid_status` only seems to be used in
logging and the value was copied verbatim from the aforementioned
documentation.

After this change all upstream status options documented in [1] are
covered.

[1] https://docs.yoctoproject.org/5.0.3/contributor-guide/recipe-style-guide.html#patch-upstream-status

(From OE-Core rev: a39e6e6854b60fd10f21c6c3f1e7d676e12ba9ee)

Signed-off-by: Katariina Lounento &lt;katariina.lounento@vaisala.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>patchtest: add test_commit_message_user_tags</title>
<updated>2024-10-23T16:35:23+00:00</updated>
<author>
<name>Trevor Gamblin</name>
<email>tgamblin@baylibre.com</email>
</author>
<published>2024-10-04T13:39:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=dab2dcae89d349366edc3cfa09c312fab8cf14b8'/>
<id>urn:sha1:dab2dcae89d349366edc3cfa09c312fab8cf14b8</id>
<content type='text'>
This test makes patchtest check to ensure that there aren't any
GitHub-style user account names being tagged in the commit message, e.g.
it should catch lines like:

"fix added by @threexc"

This is desired so that if (for example) we add upstream changelogs in
recipe upgrade commit messages verbatim, we don't end up subscribing any
associated maintainers to our repo mirrors' updates by accident.

There is a small possibility of a false positive with this test, where
if someone is mentioning Python decorators in their commit message (or
similar syntax from other languages), it will fail when it should pass.
However, having this test in place to guard against username inclusion
is more important that the occasional false positive for that reason.

With this addition, a failure will look like:

|FAIL: test commit message user tags: Mbox includes one or more GitHub-style username tags. Ensure that any "@" symbols are stripped out of usernames (test_mbox.TestMbox.test_commit_message_user_tags)

(From OE-Core rev: 8278d82d8203212bb159eb3805d4a5617c5370df)

Signed-off-by: Trevor Gamblin &lt;tgamblin@baylibre.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>patchtest: simplify, rename modules</title>
<updated>2024-09-30T16:00:50+00:00</updated>
<author>
<name>Trevor Gamblin</name>
<email>tgamblin@baylibre.com</email>
</author>
<published>2024-09-24T11:55:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4c378fc89566a329d0974bbcfefc7405779bc919'/>
<id>urn:sha1:4c378fc89566a329d0974bbcfefc7405779bc919</id>
<content type='text'>
- simplify base.py, data.py
- move some leftover regex patterns to patterns.py
- remove pyparsing path logic, since this is no longer needed
- rename PatchTestInput class to PatchtestParser
- data.py: rename to patchtest_parser.py
- patterns.py: rename to patchtest_patterns.py
- move PatchTestDataStore to test_metadata.py since that's the only
  place it's used
- remove unused logger code

(From OE-Core rev: 1e971b05b036b0b1eb0bdbd9b26b54d06e74294c)

Signed-off-by: Trevor Gamblin &lt;tgamblin@baylibre.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>patchtest: test_mbox: change ismerged -&gt; canbemerged</title>
<updated>2024-09-30T16:00:50+00:00</updated>
<author>
<name>Trevor Gamblin</name>
<email>tgamblin@baylibre.com</email>
</author>
<published>2024-09-24T11:55:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=18a65c77c0e729dd1835852336e57ff4922f2674'/>
<id>urn:sha1:18a65c77c0e729dd1835852336e57ff4922f2674</id>
<content type='text'>
The merge logic is a bit weird as-is. Remove the ismerged() method and
replace it where appropriate with canbemerged().

(From OE-Core rev: c5f5686f20b13d635a461d4cc353563f9c886f5f)

Signed-off-by: Trevor Gamblin &lt;tgamblin@baylibre.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>patchtest: mbox.py: new data implementation</title>
<updated>2024-09-30T16:00:50+00:00</updated>
<author>
<name>Trevor Gamblin</name>
<email>tgamblin@baylibre.com</email>
</author>
<published>2024-09-24T11:54:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d6ede9c73b44062d8831a08f522d519591bf29c2'/>
<id>urn:sha1:d6ede9c73b44062d8831a08f522d519591bf29c2</id>
<content type='text'>
Consolidate and improve some objects:

- absorb utils.py functionality
- repo.py: use mbox.py
- repo.py: remove some cruft
- utils.py: replace with logs.py
- utils.py: delete
- patch.py: delete
- scripts/patchtest: use logging directly
- general cleanup

(From OE-Core rev: d4fbdb1d15f281b236137d63710c73bca8911a36)

Signed-off-by: Trevor Gamblin &lt;tgamblin@baylibre.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>patchtest: patterns: add module, refactor</title>
<updated>2024-09-30T16:00:50+00:00</updated>
<author>
<name>Trevor Gamblin</name>
<email>tgamblin@baylibre.com</email>
</author>
<published>2024-09-24T11:54:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=bb0f1625d7655d04c6df3c144e488f676ff2f762'/>
<id>urn:sha1:bb0f1625d7655d04c6df3c144e488f676ff2f762</id>
<content type='text'>
Currently, patchtest has a lot of spread-out definitions for patterns
used in various setup and test functions. Organize these by putting them
all into a new patterns.py module. This allows the tests/pyparsing
directory to be removed, as it is now redundant. Also remove some
definitions where they were duplicated or unused, and perform some
renames to improve readability and avoid collisions. Many of these
variables are composed from others, so the file is only partially
sorted.

(From OE-Core rev: 1ab55d495957918be532a36224b5598c9955a44d)

Signed-off-by: Trevor Gamblin &lt;tgamblin@baylibre.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>patchtest: test_non_auh_upgrade: improve parse logic</title>
<updated>2024-09-01T11:32:37+00:00</updated>
<author>
<name>Trevor Gamblin</name>
<email>tgamblin@baylibre.com</email>
</author>
<published>2024-09-01T00:51:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=bd2159719c08c101a25a5012fc684163135653e6'/>
<id>urn:sha1:bd2159719c08c101a25a5012fc684163135653e6</id>
<content type='text'>
The AUH email address used for matching was outdated. Fix it so that it
correctly identifies emails using the new one.

Also make sure to only scan the commit message and not the body, since
it's possible (like in this patch) that the user may be editing actual
code that checks for AUH-related strings.

Fixes [YOCTO #15390].

(From OE-Core rev: 557400648b6f4f31176847f8a068d2e199b7793d)

Signed-off-by: Trevor Gamblin &lt;tgamblin@baylibre.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>patchtest: test_shortlog_length: omit shortlog prefixes</title>
<updated>2024-09-01T11:28:10+00:00</updated>
<author>
<name>Trevor Gamblin</name>
<email>tgamblin@baylibre.com</email>
</author>
<published>2024-08-31T01:39:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=3802372a2a4ffdb0b56475c13229a43ae1c56703'/>
<id>urn:sha1:3802372a2a4ffdb0b56475c13229a43ae1c56703</id>
<content type='text'>
In certain cases, the shortlog for a patch would include branch and
'PATCH' tag information even after the repo tag got stripped out,
padding it with data that wouldn't actually be included with a merge.
This caused the patchtest test_shortlog_length test to erroneously
report a failure.

For example, a patch whose shortlog tags were:

[OE-core][master/scarthgap][PATCH]

would leave this behind in the shortlog, along with the actual content:

[master/scarthgap][PATCH]

Add a re.sub() call in the test to fix this by removing all square
bracket pairs that appear at the beginning of the string.

Fixes [YOCTO #15575].

(From OE-Core rev: 6e1ddadfe779291cf46fb88fb01769c022b733ac)

Signed-off-by: Trevor Gamblin &lt;tgamblin@baylibre.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>patchtest: test_mbox: remove duplicate regex definition</title>
<updated>2024-09-01T11:28:10+00:00</updated>
<author>
<name>Trevor Gamblin</name>
<email>tgamblin@baylibre.com</email>
</author>
<published>2024-08-31T01:39:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=6f66cf76941832fa3a7bfef4364ca385fdea6826'/>
<id>urn:sha1:6f66cf76941832fa3a7bfef4364ca385fdea6826</id>
<content type='text'>
(From OE-Core rev: b350239ce1350ed61410431d30e938365d406db1)

Signed-off-by: Trevor Gamblin &lt;tgamblin@baylibre.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
