Skip to content

RFC coccinelle: extend test coverage

Luis R. Rodriguez cocci 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2pycocci: add missing new linetools/pycocci+1 -11 reply
2/2tests: convert sp.cocci test to pycocci proofMakefile scripts/test.sh tests/0001-sp.cocci +3 more+18 -40 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchJulia Lawall
1/2A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Cocci] [RFC 0/2] coccinelle: extend test coverage

I wanted to extend tests coverage for coccinelle but noticed that tests are limited to single c file, these are attached to respective .res files, but this also means that you have a direct relationship and requirement between tests from a single C file and a respective cocci file.

To go wild we want to be able to support really complex types of examples. Fortunatley the backports project has been using Coccinelle extensively daily, when a backports developers needed to replace a series of patches with a Coccinelle patch pycocci was extended to provide SmPL <--> Patch equivalence support. We can easily take advantage of this to extend Coccinelle test cases way beyond a single C file, but to more complex real life style projects.

I don't think we should convert all test cases to this new mechanism but, I'd like to see what are folks' thoughts over using pycocci SmPL <--> Patch equivalence proof support to help expand the tests cases for Coccinelle.

Luis R. Rodriguez (2):
pycocci: add missing new line
tests: convert sp.cocci test to pycocci proof

 Makefile                            | 1 +
 scripts/test.sh                     | 8 ++++++++
 tests/{sp.cocci => 0001-sp.cocci}   | 0
 tests/0001-sp/replace-typedef.patch | 9 +++++++++
 tests/{ => code/0001-sp}/sp.c       | 0
 tests/sp.res                        | 4 ----
 tools/pycocci                       | 2 +-
 7 files changed, 19 insertions(+), 5 deletions(-)
 create mode 100755 scripts/test.sh
 rename tests/{sp.cocci => 0001-sp.cocci} (100%)
 create mode 100644 tests/0001-sp/replace-typedef.patch
 rename tests/{ => code/0001-sp}/sp.c (100%)
 delete mode 100644 tests/sp.res
Signature · 1 line
2.7.2