<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/lib/patchtest/tests, 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-10-23T16:35:23+00:00</updated>
<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>
<entry>
<title>patchtest: test_metadata: fix invalid escape sequences</title>
<updated>2024-04-23T12:40:24+00:00</updated>
<author>
<name>Trevor Gamblin</name>
<email>tgamblin@baylibre.com</email>
</author>
<published>2024-04-09T12:03:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f15ea3ad06e411537168e8a4b1d900de4549a65d'/>
<id>urn:sha1:f15ea3ad06e411537168e8a4b1d900de4549a65d</id>
<content type='text'>
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\:\/\/.*')

(From OE-Core rev: 2d64317835a768898aac592b24fcbdfaf6c8357a)

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: Skip test for CVE_CHECK_IGNORE for older branches</title>
<updated>2024-02-24T16:10:23+00:00</updated>
<author>
<name>Simone Weiß</name>
<email>simone.p.weiss@posteo.com</email>
</author>
<published>2024-02-23T21:07:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e8ea8695e12daddd3f973a23fa804c2a818b3c6d'/>
<id>urn:sha1:e8ea8695e12daddd3f973a23fa804c2a818b3c6d</id>
<content type='text'>
Skip the test for checking if CVE_CHECK_IGNORE is not used.
It is deprecated now, but was not deprecated for kirkstone and dunfell.
Skip it therefore if a patch is intended for those branches.

(From OE-Core rev: e9b04664b1b2ba6aa1fa7318e3d4174b9cdb19da)

Signed-off-by: Simone Weiß &lt;simone.p.weiss@posteo.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
