Skip to content

scripts: add basic python version library and use it

Luis R. Rodriguez cocci lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 22 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4coccicheck: propagate error and stop processing after first errorscripts/coccicheck+5 -00 replies
2/4scripts: add reqs python libraryMAINTAINERS scripts/lib/__init__.py scripts/lib/reqs.py+213 -09 replies
3/4coccicheck: enable use of the kernel's python libraryscripts/coccicheck+2 -02 replies
4/4scripts/coccinelle: require coccinelle >= 1.0.4 on device_node_continue.cocciscripts/coccinelle/iterators/device_node_continue.cocci+13 -011 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] scripts: add basic python version library and use it

This series depends on the last set of coccicheck enhancements which add parmap support and indexing heuristics.

Coccinelle SmPL files may often require advanced grammar techniques not available in older versions of Coccinelle. We can use --parse-cocci and bail if a file does not parse, however this doesn't tell us anything about requirements. An alternative approach is to specifically do a check for a version of coccinelle.

Since checking for versions can be generic we can just write a python library to do these sorts of checks for us, this allows us to provide a generic kernel library for version checks for any binary. This adds that and then makes use of it as an example within a coccinelle SmPL file which require a later version of coccinelle.

Luis R. Rodriguez (4):
coccicheck: propagate error and stop processing after first error
scripts: add reqs python library
coccicheck: enable use of the kernel's python library scripts/coccinelle: require coccinelle >= 1.0.4 on
device_node_continue.cocci

 MAINTAINERS                                        |   1 +
 scripts/coccicheck                                 |   7 +
 .../iterators/device_node_continue.cocci           |  13 ++
 scripts/lib/__init__.py                            |   1 +
 scripts/lib/reqs.py                                | 211 +++++++++++++++++++++
 5 files changed, 233 insertions(+)
 create mode 100644 scripts/lib/__init__.py
 create mode 100644 scripts/lib/reqs.py
Signature · 1 line
2.8.2