blob: 34ff44ccae6be41d2496b4fa1d8fb1611f1fe246 [file] [log] [blame]
Okash Khawaja671bed22022-11-10 15:51:19 +00001This directory contains code related to long-term support management of TF-A.
2
3lts-triage.py
4=============
5
6Purpose of this script is to check a patch and determine if that patch qualifies
7as a candidate for one of the LTS branches.
8
9Currently it focuses on cpu errata while it contains basic support for security
10patches. It computes a crude score:
11
121 point if subject line matches tokens for cpu errata or security
131 point for "report_errata ERRATA" in a lib/cpus/aarch{32,64}/*.S file
141 point for "- ``ERRATA_" in docs/design/cpu-specific-build-macros.rst file
15
16Note that the script only looks at commits which are not merge commits.
17
Okash Khawaja66a3a7e2023-01-24 11:06:16 +000018The script expects two branches: 'integration' and 'to_check'. 'integration' is
19the actual integration branch of the TF-A project while 'to_check' points to the
20tip of latest patch in the patchset that was submitted.
21
22The script needs to work out how many commits are in the current patchset which
23will be the ones it needs to triage. In order to do that the script looks at two
24parameters which are currently fixed in code. We can turn them into args if needed.
25First is REBASE_DEPTH which is the number of commits in integration branch to look
26for the common commit between patchset and integration branch. Second parameter is
27MAX_PATCHSET_DEPTH which is the maximum number of commits we expect in the patchset
28submitted.
29
Okash Khawaja68751502023-02-03 18:53:14 +000030At the end, if any commit has non-zero score, the script will create a file named at
31the path provided by --email_path argument.
32
Okash Khawaja671bed22022-11-10 15:51:19 +000033Running it:
34-----------
35
36To run it, provide it a path to a TF-A git repo. Here's help output for convenience:
37
Okash Khawaja68751502023-02-03 18:53:14 +000038$ python lts-triage.py -h
39usage: lts-triage.py [-h] --repo REPO --email_path EMAIL_PATH [--debug]
Okash Khawaja671bed22022-11-10 15:51:19 +000040
41check patches for LTS candidacy
42
43options:
44 -h, --help show this help message and exit
45 --repo REPO path to tf-a git repo
Okash Khawaja68751502023-02-03 18:53:14 +000046 --email_path EMAIL_PATH
47 path including the filename for email file
Okash Khawaja671bed22022-11-10 15:51:19 +000048 --debug print debug logs
49
Okash Khawaja671bed22022-11-10 15:51:19 +000050Below is an example output. On left is commit hash of each of the commits
51observed by this script and on right is score assigned to it.
52
53$ python lts/lts-triage.py --repo ../trusted-firmware-a/
54888eafa00b99aa06b4ff688407336811a7ff439a: 3
5579544126943a90d31d81177655be11f75330ffed: 3
5643438ad1ad6651964e9ae75d35f40aed8d86d088: 3
57028c4e42d8f632d40081b88f66d0d05c7d7c9b23: 0
5820155112c5d2fb296fef40a12b1c6ce12f49b1c8: 0
594090ac33f44bd24d73161032faa817eb03f2e41d: 0
60cf58b2d41cb0d24239b98de98264b31690711549: 0
61e74d658181e5e69b6b5e16b40adc1ffef4c1efb9: 1
62ad6eb1951b986f30635025bbdf29e257b6b1e362: 0
638a6a9560b5dcccfb68064c0c8c9b4b47981c6ac7: 0
6493cec697deb654303379cae8f25a31dc8b90cd31: 0
65a194255d75ed9e2ef56bd6e14349a3e7d86af934: 0
6698a43d9f6c22498d9e1a6e7ace1bc6d23ac58d5a: 0
6707dc8ba93b319de2bf0be0c287373db74019878e: 0
68c6877763cd3a286983df160c8207368174c1b820: 0
6903ebf409c711e9f2006cedded7dc415dfe566975: 1
70de7e9b562afccd6d71df1abf1907f48d164a3a7e: 0
71720e7b66f2353ef7ed32a8f85f8396fbc0766ffc: 0
7262a93aa7afcd022f06d322c36979f0aa02713beb: 0
73b5f06d3dfad8c27bdf528b083ef919ce4022c52d: 0