All of lore.kernel.org
 help / color / mirror / Atom feed
From: mcgrof@kernel.org (Luis R. Rodriguez)
To: cocci@systeme.lip6.fr
Subject: [Cocci] [RFC 0/2] coccinelle: extend test coverage
Date: Wed,  4 May 2016 22:30:52 -0700	[thread overview]
Message-ID: <1462426254-22633-1-git-send-email-mcgrof@kernel.org> (raw)

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

-- 
2.7.2

             reply	other threads:[~2016-05-05  5:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-05  5:30 Luis R. Rodriguez [this message]
2016-05-05  5:30 ` [Cocci] [RFC 1/2] pycocci: add missing new line Luis R. Rodriguez
2016-05-05  6:26   ` Julia Lawall
2016-05-05  5:30 ` [Cocci] [RFC 2/2] tests: convert sp.cocci test to pycocci proof Luis R. Rodriguez
2016-05-05 11:10 ` [Cocci] [RFC 0/2] coccinelle: extend test coverage SF Markus Elfring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1462426254-22633-1-git-send-email-mcgrof@kernel.org \
    --to=mcgrof@kernel.org \
    --cc=cocci@systeme.lip6.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.