From: Johannes Berg <johannes@sipsolutions.net>
To: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Cc: backports@vger.kernel.org, cocci@systeme.lip6.fr
Subject: Re: [PATCH 3/4] gentree.py: add SmPL patch equivalence proof support
Date: Sat, 06 Jun 2015 14:12:23 +0200 [thread overview]
Message-ID: <1433592743.2467.7.camel@sipsolutions.net> (raw)
In-Reply-To: <1433549401-17006-4-git-send-email-mcgrof@do-not-panic.com> (sfid-20150606_021855_421040_8CC03CC0)
On Fri, 2015-06-05 at 17:10 -0700, Luis R. Rodriguez wrote:
> If you have an SmPL patch that you think is ready to replace
> a series of unified diff patches you can pass as an argument
> to gentree.py '--prove-cocci' with the cocci file as the
> an extra argument and gentree.py will try to prove equivalence
> between the unified diff series and your Coccinelle SmPL patch.
>
> You can use this as a guide when trying to replace an existing
> unified diff series carried within backports with a respective
> Coccinelle SmPL patch. You can use this to get a warm fuzzy or
> to provide backports maintainers with a warm fuzzy of comfort
> that your SmPL patch is sufficient.
I don't like this at all.
gentree.py is supposed to be a tool to generate a new backport tree.
You're (ab)using it for (s)patch development purposes that it was never
intended for.
It's already grown to be a spaghetti mess of different options, some of
which cause partial tree creation (or no proper tree creation at all,
iirc) and I think adding more to this will make it unmaintainable.
Additionally, there's no real reason why this needs to be part of
gentree. In theory, you can just apply both patches to any kind of tree
(doesn't have to be a backport) and see the difference.
In practice, I understand that it might make sense to apply them to a
backport tree because that's where the original patch (non-spatch) came
from, since presumably you want to use it for development. However, I
still think this is far enough from the original purpose just like
test_cocci and profile_cocci that it shouldn't be there.
I'd support changing gentree to support a "up to this patch" mode, in
which it stops processing at a certain patch and other scripts can then
do remaining work like cocci profiling (which IMHO really shouldn't be
here at all) or this comparison testing.
I can also see how adding more to this script is convenient, since it's
just a few lines of code in the right place in the script, but this has
already made it complicated to follow all the different code paths and
change them appropriately for any changes.
As a consequence, I cannot support this change and would much rather
remove more of the cocci test options from here - really something like
profiling and equivalence testing should be part of a script provided by
upstream coccinelle anyway, instead of in the backports project.
johannes
WARNING: multiple messages have this Message-ID (diff)
From: johannes@sipsolutions.net (Johannes Berg)
To: cocci@systeme.lip6.fr
Subject: [Cocci] [PATCH 3/4] gentree.py: add SmPL patch equivalence proof support
Date: Sat, 06 Jun 2015 14:12:23 +0200 [thread overview]
Message-ID: <1433592743.2467.7.camel@sipsolutions.net> (raw)
In-Reply-To: <1433549401-17006-4-git-send-email-mcgrof@do-not-panic.com> (sfid-20150606_021855_421040_8CC03CC0)
On Fri, 2015-06-05 at 17:10 -0700, Luis R. Rodriguez wrote:
> If you have an SmPL patch that you think is ready to replace
> a series of unified diff patches you can pass as an argument
> to gentree.py '--prove-cocci' with the cocci file as the
> an extra argument and gentree.py will try to prove equivalence
> between the unified diff series and your Coccinelle SmPL patch.
>
> You can use this as a guide when trying to replace an existing
> unified diff series carried within backports with a respective
> Coccinelle SmPL patch. You can use this to get a warm fuzzy or
> to provide backports maintainers with a warm fuzzy of comfort
> that your SmPL patch is sufficient.
I don't like this at all.
gentree.py is supposed to be a tool to generate a new backport tree.
You're (ab)using it for (s)patch development purposes that it was never
intended for.
It's already grown to be a spaghetti mess of different options, some of
which cause partial tree creation (or no proper tree creation at all,
iirc) and I think adding more to this will make it unmaintainable.
Additionally, there's no real reason why this needs to be part of
gentree. In theory, you can just apply both patches to any kind of tree
(doesn't have to be a backport) and see the difference.
In practice, I understand that it might make sense to apply them to a
backport tree because that's where the original patch (non-spatch) came
from, since presumably you want to use it for development. However, I
still think this is far enough from the original purpose just like
test_cocci and profile_cocci that it shouldn't be there.
I'd support changing gentree to support a "up to this patch" mode, in
which it stops processing at a certain patch and other scripts can then
do remaining work like cocci profiling (which IMHO really shouldn't be
here at all) or this comparison testing.
I can also see how adding more to this script is convenient, since it's
just a few lines of code in the right place in the script, but this has
already made it complicated to follow all the different code paths and
change them appropriately for any changes.
As a consequence, I cannot support this change and would much rather
remove more of the cocci test options from here - really something like
profiling and equivalence testing should be part of a script provided by
upstream coccinelle anyway, instead of in the backports project.
johannes
next prev parent reply other threads:[~2015-06-06 12:12 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-06 0:09 [PATCH 0/4] backports: SmPL patch equivalence support Luis R. Rodriguez
2015-06-06 0:09 ` [Cocci] " Luis R. Rodriguez
2015-06-06 0:09 ` [PATCH 1/4] patches: remove bt_sock_stream_recvmsg() and bt_sock_recvmsg() from ifdefs Luis R. Rodriguez
2015-06-06 0:09 ` [Cocci] " Luis R. Rodriguez
2015-06-06 0:09 ` [PATCH 2/4] patches: change 0054-struct-proto_ops-sig backport strategy Luis R. Rodriguez
2015-06-06 0:09 ` [Cocci] " Luis R. Rodriguez
2015-06-06 0:10 ` [PATCH 3/4] gentree.py: add SmPL patch equivalence proof support Luis R. Rodriguez
2015-06-06 0:10 ` [Cocci] " Luis R. Rodriguez
2015-06-06 12:12 ` Johannes Berg [this message]
2015-06-06 12:12 ` Johannes Berg
2015-06-08 19:31 ` Luis R. Rodriguez
2015-06-08 19:31 ` [Cocci] " Luis R. Rodriguez
2015-06-08 19:45 ` Johannes Berg
2015-06-08 19:45 ` [Cocci] " Johannes Berg
2015-06-08 20:08 ` Luis R. Rodriguez
2015-06-08 20:08 ` [Cocci] " Luis R. Rodriguez
2015-06-08 20:29 ` Johannes Berg
2015-06-08 20:29 ` [Cocci] " Johannes Berg
2015-06-06 0:10 ` [PATCH 4/4] patches: provide 0054-struct-proto_ops-sig SmPL patch replacement Luis R. Rodriguez
2015-06-06 0:10 ` [Cocci] " Luis R. Rodriguez
2015-06-06 5:33 ` Julia Lawall
2015-06-06 5:33 ` Julia Lawall
2015-06-08 21:00 ` Luis R. Rodriguez
2015-06-08 21:00 ` Luis R. Rodriguez
2015-06-09 22:18 ` [PATCH 0/4] backports: SmPL patch equivalence support Luis R. Rodriguez
2015-06-09 22:18 ` [Cocci] " Luis R. Rodriguez
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=1433592743.2467.7.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=backports@vger.kernel.org \
--cc=cocci@systeme.lip6.fr \
--cc=mcgrof@do-not-panic.com \
/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.