mbox series

[0/6] patchtest: cleanups and fixes, part 2

Message ID 20260702152213.1439717-1-tgamblin@baylibre.com
Headers show
Series patchtest: cleanups and fixes, part 2 | expand

Message

Trevor Gamblin July 2, 2026, 3:22 p.m. UTC
This is the second split of patches coming from a previous series[1] I
submitted. 

Changes are mostly to the existing test suites to clean minor issues up
(duplicated code, inconsistent Python syntax). The most significant differences:

- Clean up test_patch.py so that it doesn't print misleading CVE-related
  messages for carried patches which aren't actually targeting CVEs - the
  original code was written under this assumption, but it's incorrect.
- Add some new logic in the patchtest script so that when someone uses the
  --directory option to test an entire directory of patches, but then aborts the
  run with CTRL+C, the whole test suite is properly cancelled rather than a
  buggy skip forward into the next set of tests.

Note that this was driven partially by Claude Code (Sonnet 4.6 and 4.7), but
I've gone back and reworked some of its changes before submission.

Selftests still look OK:

|============================================================================
|Testsuite summary for patchtest
|============================================================================
|# TOTAL: 38
|# XPASS: 18
|# XFAIL: 18
|# XSKIP: 2
|# PASS: 0
|# FAIL: 0
|# SKIP: 0
|# ERROR: 0
|============================================================================

[1]: https://lists.openembedded.org/g/openembedded-core/message/237047

Trevor Gamblin (6):
  patchtest: tests: base.py: remove duplicate Commit object
  patchtest: tests: test_mbox.py: improve variable and message clarity,
    fix whitespace
  patchtest: tests: test_metadata.py: simplify SRC_URI collection,
    remove unneeded import
  patchtest: tests: test_patch.py: simplify source patch and upstream
    status checking
  patchtest: tests: test_python_pylint.py: use more Pythonic comparison,
    fix indent
  patchtest: correctly abort --directory test

 meta/lib/patchtest/patchtest_parser.py        |  2 +-
 meta/lib/patchtest/repo.py                    |  4 ++
 meta/lib/patchtest/tests/base.py              |  4 --
 meta/lib/patchtest/tests/test_mbox.py         | 10 ++---
 meta/lib/patchtest/tests/test_metadata.py     | 32 +++++-----------
 meta/lib/patchtest/tests/test_patch.py        | 37 +++++++------------
 .../lib/patchtest/tests/test_python_pylint.py |  8 ++--
 scripts/patchtest                             | 32 ++++++++++++++--
 8 files changed, 65 insertions(+), 64 deletions(-)