Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1428092 > unrolled thread
| Started by | "Luis R. Rodriguez" <mcgrof@kernel.org> |
|---|---|
| First post | 2016-06-21 21:30 +0200 |
| Last post | 2016-06-21 23:40 +0200 |
| Articles | 15 on this page of 35 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH v3 0/8] coccicheck: modernize "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-06-21 21:30 +0200
[PATCH v3 3/8] coccicheck: enable parmap support "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-06-21 21:30 +0200
Re: [PATCH v3 3/8] coccicheck: enable parmap support Julia Lawall <julia.lawall@lip6.fr> - 2016-06-21 22:20 +0200
Re: [PATCH v3 3/8] coccicheck: enable parmap support "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-06-21 22:50 +0200
Re: [PATCH v3 3/8] coccicheck: enable parmap support "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-06-21 23:00 +0200
Re: [PATCH v3 3/8] coccicheck: enable parmap support Julia Lawall <julia.lawall@lip6.fr> - 2016-06-21 23:20 +0200
Re: [PATCH v3 3/8] coccicheck: enable parmap support "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-06-21 23:30 +0200
Re: [PATCH v3 3/8] coccicheck: enable parmap support Julia Lawall <julia.lawall@lip6.fr> - 2016-06-21 23:40 +0200
Re: [PATCH v3 3/8] coccicheck: enable parmap support "Nicolas Palix (LIG)" <Nicolas.Palix@imag.fr> - 2016-06-21 23:10 +0200
Re: [PATCH v3 3/8] coccicheck: enable parmap support "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-06-21 23:30 +0200
Re: [PATCH v3 3/8] coccicheck: enable parmap support Julia Lawall <julia.lawall@lip6.fr> - 2016-06-21 23:40 +0200
Re: [PATCH v3 3/8] coccicheck: enable parmap support Julia Lawall <julia.lawall@lip6.fr> - 2016-06-21 23:50 +0200
Re: [PATCH v3 3/8] coccicheck: enable parmap support "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-06-22 00:40 +0200
Re: [PATCH v3 3/8] coccicheck: enable parmap support Julia Lawall <julia.lawall@lip6.fr> - 2016-06-22 07:30 +0200
Re: [Cocci] [PATCH v3 3/8] coccicheck: enable parmap support "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-06-22 17:20 +0200
Re: [Cocci] [PATCH v3 3/8] coccicheck: enable parmap support Julia Lawall <julia.lawall@lip6.fr> - 2016-06-22 21:50 +0200
Re: [PATCH v3 3/8] coccicheck: enable parmap support "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-06-22 00:00 +0200
Re: [PATCH v3 3/8] coccicheck: enable parmap support Julia Lawall <julia.lawall@lip6.fr> - 2016-06-21 23:30 +0200
[PATCH v3 8/8] scripts/coccinelle: require coccinelle >= 1.0.4 on device_node_continue.cocci "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-06-21 21:30 +0200
Re: [PATCH v3 8/8] scripts/coccinelle: require coccinelle >= 1.0.4 on device_node_continue.cocci Julia Lawall <julia.lawall@lip6.fr> - 2016-06-21 22:40 +0200
Re: [PATCH v3 8/8] scripts/coccinelle: require coccinelle >= 1.0.4 on device_node_continue.cocci "Nicolas Palix (LIG)" <Nicolas.Palix@imag.fr> - 2016-06-21 23:50 +0200
[PATCH v3 4/8] coccicheck: replace --very-quiet with --quit when debugging "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-06-21 21:30 +0200
[PATCH v3 1/8] coccicheck: move spatch binary check up "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-06-21 21:30 +0200
Re: [PATCH v3 1/8] coccicheck: move spatch binary check up "Nicolas Palix (LIG)" <Nicolas.Palix@imag.fr> - 2016-06-21 22:40 +0200
[PATCH v3 7/8] coccicheck: refer to coccicheck bottest wiki for documentation "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-06-21 21:30 +0200
Re: [PATCH v3 7/8] coccicheck: refer to coccicheck bottest wiki for documentation "Nicolas Palix (LIG)" <Nicolas.Palix@imag.fr> - 2016-06-21 23:20 +0200
Re: [PATCH v3 7/8] coccicheck: refer to coccicheck bottest wiki for documentation Julia Lawall <julia.lawall@lip6.fr> - 2016-06-21 23:20 +0200
Re: [PATCH v3 7/8] coccicheck: refer to coccicheck bottest wiki for documentation "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-06-22 02:10 +0200
Re: [PATCH v3 7/8] coccicheck: refer to coccicheck bottest wiki for documentation Julia Lawall <julia.lawall@lip6.fr> - 2016-06-22 08:10 +0200
Re: [PATCH v3 0/8] coccicheck: modernize Julia Lawall <julia.lawall@lip6.fr> - 2016-06-21 22:30 +0200
Re: [Cocci] [PATCH v3 0/8] coccicheck: modernize "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-06-21 23:00 +0200
Re: [Cocci] [PATCH v3 0/8] coccicheck: modernize Julia Lawall <julia.lawall@lip6.fr> - 2016-06-21 23:10 +0200
Re: [Cocci] [PATCH v3 0/8] coccicheck: modernize "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-06-21 23:30 +0200
Re: [Cocci] [PATCH v3 0/8] coccicheck: modernize "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-06-21 23:40 +0200
Re: [Cocci] [PATCH v3 0/8] coccicheck: modernize Julia Lawall <julia.lawall@lip6.fr> - 2016-06-21 23:40 +0200
Page 2 of 2 — ← Prev page 1 [2]
| From | "Nicolas Palix (LIG)" <Nicolas.Palix@imag.fr> |
|---|---|
| Date | 2016-06-21 23:50 +0200 |
| Subject | Re: [PATCH v3 8/8] scripts/coccinelle: require coccinelle >= 1.0.4 on device_node_continue.cocci |
| Message-ID | <rMBIu-2Rm-23@gated-at.bofh.it> |
| In reply to | #1428136 |
[Multipart message — attachments visible in raw view] — view raw
Le 21/06/16 à 22:36, Julia Lawall a écrit : > > > On Tue, 21 Jun 2016, Luis R. Rodriguez wrote: > >> Make use of the new Requires: tag to be able to specify coccinelle binary >> version requirements. The cocci file device_node_continue.cocci requires at >> least coccinelle 1.0.4. >> >> Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org> > > Acked-by: Julia Lawall <julia.lawall@lip6.fr> Acked-by: Nicolas Palix <nicolas.palix@imag.fr> > >> --- >> scripts/coccinelle/iterators/device_node_continue.cocci | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/scripts/coccinelle/iterators/device_node_continue.cocci b/scripts/coccinelle/iterators/device_node_continue.cocci >> index 38ab744a4037..a36c16db171b 100644 >> --- a/scripts/coccinelle/iterators/device_node_continue.cocci >> +++ b/scripts/coccinelle/iterators/device_node_continue.cocci >> @@ -5,8 +5,11 @@ >> // Copyright: (C) 2015 Julia Lawall, Inria. GPLv2. >> // URL: http://coccinelle.lip6.fr/ >> // Options: --no-includes --include-headers >> +// Requires: 1.0.4 >> // Keywords: for_each_child_of_node, etc. >> >> +// This uses a conjunction, which requires at least coccinelle >= 1.0.4 >> + >> virtual patch >> virtual context >> virtual org >> -- >> 2.8.2 >> >> -- Nicolas Palix http://lig-membres.imag.fr/palix/
[toc] | [prev] | [next] | [standalone]
| From | "Luis R. Rodriguez" <mcgrof@kernel.org> |
|---|---|
| Date | 2016-06-21 21:30 +0200 |
| Subject | [PATCH v3 4/8] coccicheck: replace --very-quiet with --quit when debugging |
| Message-ID | <rMzx0-1xY-33@gated-at.bofh.it> |
| In reply to | #1428092 |
When debugging (using --profile or --show-trying) you want to
avoid supressing output, use --quiet instead. While at it, extend
documentation for SPFLAGS use.
For instance one can use:
$ export COCCI=scripts/coccinelle/misc/irqf_oneshot.cocci
$ make coccicheck DEBUG_FILE="poo.err" MODE=report SPFLAGS="--profile --show-trying" M=./drivers/mfd/arizona-irq.c
v3: rebased, resolve conflicts
v2: use egrep instead of the *"=--option"* check, this doesn't work for
disjunctions.
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
---
scripts/coccicheck | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/scripts/coccicheck b/scripts/coccicheck
index a77f0f246405..998d764636e0 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -32,6 +32,29 @@ fi
FLAGS="--very-quiet"
+# You can use SPFLAGS to append extra arguments to coccicheck or override any
+# heuristics done in this file as Coccinelle accepts the last options when
+# options conflict.
+#
+# A good example for use of SPFLAGS is if you want to debug your cocci script,
+# you can for instance use the following:
+#
+# $ export COCCI=scripts/coccinelle/misc/irqf_oneshot.cocci
+# $ make coccicheck MODE=report DEBUG_FILE="all.err" SPFLAGS="--profile --show-trying" M=./drivers/mfd/arizona-irq.c
+#
+# "--show-trying" should show you what rule is being processed as it goes to
+# stdout, you do not need a debug file for that. The profile output will be
+# be sent to stdout, if you provide a DEBUG_FILE the profiling data can be
+# inspected there.
+#
+# --profile will not output if --very-quiet is used, so avoid it.
+echo $SPFLAGS | egrep -e "--profile|--show-trying" 2>&1 > /dev/null
+if [ $? -eq 0 ]; then
+ FLAGS="--quiet"
+else
+ FLAGS="--very-quiet"
+fi
+
# spatch only allows include directories with the syntax "-I include"
# while gcc also allows "-Iinclude" and "-include include"
COCCIINCLUDE=${LINUXINCLUDE//-I/-I }
--
2.8.2
[toc] | [prev] | [next] | [standalone]
| From | "Luis R. Rodriguez" <mcgrof@kernel.org> |
|---|---|
| Date | 2016-06-21 21:30 +0200 |
| Subject | [PATCH v3 1/8] coccicheck: move spatch binary check up |
| Message-ID | <rMzx0-1xY-31@gated-at.bofh.it> |
| In reply to | #1428092 |
This has no functional changes. This is being done
to enable us to later use spatch binary for some
flag checking for certain features early on.
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
---
scripts/coccicheck | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/scripts/coccicheck b/scripts/coccicheck
index f6627863fdc3..f137b04dfdd3 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -7,6 +7,11 @@
SPATCH="`which ${SPATCH:=spatch}`"
+if [ ! -x "$SPATCH" ]; then
+ echo 'spatch is part of the Coccinelle project and is available at http://coccinelle.lip6.fr/'
+ exit 1
+fi
+
trap kill_running SIGTERM SIGINT
declare -a SPATCH_PID
@@ -51,11 +56,6 @@ if [ "$KBUILD_EXTMOD" != "" ] ; then
OPTIONS="--patch $srctree $OPTIONS"
fi
-if [ ! -x "$SPATCH" ]; then
- echo 'spatch is part of the Coccinelle project and is available at http://coccinelle.lip6.fr/'
- exit 1
-fi
-
if [ "$MODE" = "" ] ; then
if [ "$ONLINE" = "0" ] ; then
echo 'You have not explicitly specified the mode to use. Using default "report" mode.'
--
2.8.2
[toc] | [prev] | [next] | [standalone]
| From | "Nicolas Palix (LIG)" <Nicolas.Palix@imag.fr> |
|---|---|
| Date | 2016-06-21 22:40 +0200 |
| Subject | Re: [PATCH v3 1/8] coccicheck: move spatch binary check up |
| Message-ID | <rMACJ-2cL-3@gated-at.bofh.it> |
| In reply to | #1428097 |
[Multipart message — attachments visible in raw view] — view raw
Le 21/06/16 à 21:21, Luis R. Rodriguez a écrit :
> This has no functional changes. This is being done
> to enable us to later use spatch binary for some
> flag checking for certain features early on.
>
> Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
Acked-by: Nicolas Palix <nicolas.palix@imag.fr>
> ---
> scripts/coccicheck | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/scripts/coccicheck b/scripts/coccicheck
> index f6627863fdc3..f137b04dfdd3 100755
> --- a/scripts/coccicheck
> +++ b/scripts/coccicheck
> @@ -7,6 +7,11 @@
>
> SPATCH="`which ${SPATCH:=spatch}`"
>
> +if [ ! -x "$SPATCH" ]; then
> + echo 'spatch is part of the Coccinelle project and is available at http://coccinelle.lip6.fr/'
> + exit 1
> +fi
> +
> trap kill_running SIGTERM SIGINT
> declare -a SPATCH_PID
>
> @@ -51,11 +56,6 @@ if [ "$KBUILD_EXTMOD" != "" ] ; then
> OPTIONS="--patch $srctree $OPTIONS"
> fi
>
> -if [ ! -x "$SPATCH" ]; then
> - echo 'spatch is part of the Coccinelle project and is available at http://coccinelle.lip6.fr/'
> - exit 1
> -fi
> -
> if [ "$MODE" = "" ] ; then
> if [ "$ONLINE" = "0" ] ; then
> echo 'You have not explicitly specified the mode to use. Using default "report" mode.'
>
--
Nicolas Palix
http://lig-membres.imag.fr/palix/
[toc] | [prev] | [next] | [standalone]
| From | "Luis R. Rodriguez" <mcgrof@kernel.org> |
|---|---|
| Date | 2016-06-21 21:30 +0200 |
| Subject | [PATCH v3 7/8] coccicheck: refer to coccicheck bottest wiki for documentation |
| Message-ID | <rMzx0-1xY-35@gated-at.bofh.it> |
| In reply to | #1428092 |
Sprinkling *tons* of documentation on the script is not a good
idea, instead refer to a wiki for further coccicheck documentation:
https://bottest.wiki.kernel.org/coccicheck
This page shall always refer to the linux-next iteration of
scripts/coccicheck.
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
---
scripts/coccicheck | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/scripts/coccicheck b/scripts/coccicheck
index 01b6716ea931..adbcbbd1aad6 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -1,9 +1,14 @@
#!/bin/bash
-
+# Linux kernel coccicheck
+#
+# For more detailed documentation refer to:
+#
+# https://bottest.wiki.kernel.org/coccicheck
+#
+# This documentation always refers to the linux-next version of the script.
#
# This script requires at least spatch
# version 1.0.0-rc11.
-#
DIR="$(dirname $(readlink -f $0))/.."
SPATCH="`which ${SPATCH:=spatch}`"
--
2.8.2
[toc] | [prev] | [next] | [standalone]
| From | "Nicolas Palix (LIG)" <Nicolas.Palix@imag.fr> |
|---|---|
| Date | 2016-06-21 23:20 +0200 |
| Subject | Re: [PATCH v3 7/8] coccicheck: refer to coccicheck bottest wiki for documentation |
| Message-ID | <rMBfs-2Hb-17@gated-at.bofh.it> |
| In reply to | #1428098 |
[Multipart message — attachments visible in raw view] — view raw
Hi,
Le 21/06/16 à 21:21, Luis R. Rodriguez a écrit :
> Sprinkling *tons* of documentation on the script is not a good
> idea, instead refer to a wiki for further coccicheck documentation:
>
> https://bottest.wiki.kernel.org/coccicheck
>
> This page shall always refer to the linux-next iteration of
> scripts/coccicheck.
Can you say a word about Documentation/coccinelle.txt too ?
And update it according to the script changes.
>
> Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
> ---
> scripts/coccicheck | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/coccicheck b/scripts/coccicheck
> index 01b6716ea931..adbcbbd1aad6 100755
> --- a/scripts/coccicheck
> +++ b/scripts/coccicheck
> @@ -1,9 +1,14 @@
> #!/bin/bash
> -
> +# Linux kernel coccicheck
> +#
> +# For more detailed documentation refer to:
> +#
> +# https://bottest.wiki.kernel.org/coccicheck
> +#
> +# This documentation always refers to the linux-next version of the script.
> #
> # This script requires at least spatch
> # version 1.0.0-rc11.
> -#
>
> DIR="$(dirname $(readlink -f $0))/.."
> SPATCH="`which ${SPATCH:=spatch}`"
>
--
Nicolas Palix
http://lig-membres.imag.fr/palix/
[toc] | [prev] | [next] | [standalone]
| From | Julia Lawall <julia.lawall@lip6.fr> |
|---|---|
| Date | 2016-06-21 23:20 +0200 |
| Subject | Re: [PATCH v3 7/8] coccicheck: refer to coccicheck bottest wiki for documentation |
| Message-ID | <rMBfs-2Hb-23@gated-at.bofh.it> |
| In reply to | #1428171 |
[Multipart message — attachments visible in raw view] — view raw
On Tue, 21 Jun 2016, Nicolas Palix (LIG) wrote:
> Hi,
>
> Le 21/06/16 à 21:21, Luis R. Rodriguez a écrit :
> > Sprinkling *tons* of documentation on the script is not a good
> > idea, instead refer to a wiki for further coccicheck documentation:
> >
> > https://bottest.wiki.kernel.org/coccicheck
> >
> > This page shall always refer to the linux-next iteration of
> > scripts/coccicheck.
>
> Can you say a word about Documentation/coccinelle.txt too ?
> And update it according to the script changes.
I think this would be a good idea.
julia
>
> >
> > Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
> > ---
> > scripts/coccicheck | 9 +++++++--
> > 1 file changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/scripts/coccicheck b/scripts/coccicheck
> > index 01b6716ea931..adbcbbd1aad6 100755
> > --- a/scripts/coccicheck
> > +++ b/scripts/coccicheck
> > @@ -1,9 +1,14 @@
> > #!/bin/bash
> > -
> > +# Linux kernel coccicheck
> > +#
> > +# For more detailed documentation refer to:
> > +#
> > +# https://bottest.wiki.kernel.org/coccicheck
> > +#
> > +# This documentation always refers to the linux-next version of the script.
> > #
> > # This script requires at least spatch
> > # version 1.0.0-rc11.
> > -#
> >
> > DIR="$(dirname $(readlink -f $0))/.."
> > SPATCH="`which ${SPATCH:=spatch}`"
> >
>
>
> --
> Nicolas Palix
> http://lig-membres.imag.fr/palix/
>
>
[toc] | [prev] | [next] | [standalone]
| From | "Luis R. Rodriguez" <mcgrof@kernel.org> |
|---|---|
| Date | 2016-06-22 02:10 +0200 |
| Subject | Re: [PATCH v3 7/8] coccicheck: refer to coccicheck bottest wiki for documentation |
| Message-ID | <rMDTX-4qu-11@gated-at.bofh.it> |
| In reply to | #1428174 |
On Tue, Jun 21, 2016 at 11:18:41PM +0200, Julia Lawall wrote: > > > On Tue, 21 Jun 2016, Nicolas Palix (LIG) wrote: > > > Hi, > > > > Le 21/06/16 à 21:21, Luis R. Rodriguez a écrit : > > > Sprinkling *tons* of documentation on the script is not a good > > > idea, instead refer to a wiki for further coccicheck documentation: > > > > > > https://bottest.wiki.kernel.org/coccicheck > > > > > > This page shall always refer to the linux-next iteration of > > > scripts/coccicheck. > > > > Can you say a word about Documentation/coccinelle.txt too ? > > And update it according to the script changes. > > I think this would be a good idea. I'd much prefer to just keep docs in a wiki, and we nuke this outdated doc or refer in the Documentation/coccinelle.txt to the wiki. This lets us document things much faster and lets us add more information in a much nicer format. But that's just me... The existing file Documentation/coccinelle.txt even provides documentation on how to build coccinelle --we're way passed that point. Note, I havne't updated the docs on the wiki to refer to any of this, and would not unless these changes get merged at least to linux-next. Luis
[toc] | [prev] | [next] | [standalone]
| From | Julia Lawall <julia.lawall@lip6.fr> |
|---|---|
| Date | 2016-06-22 08:10 +0200 |
| Subject | Re: [PATCH v3 7/8] coccicheck: refer to coccicheck bottest wiki for documentation |
| Message-ID | <rMJwm-88Y-23@gated-at.bofh.it> |
| In reply to | #1428273 |
[Multipart message — attachments visible in raw view] — view raw
On Wed, 22 Jun 2016, Luis R. Rodriguez wrote: > On Tue, Jun 21, 2016 at 11:18:41PM +0200, Julia Lawall wrote: > > > > > > On Tue, 21 Jun 2016, Nicolas Palix (LIG) wrote: > > > > > Hi, > > > > > > Le 21/06/16 à 21:21, Luis R. Rodriguez a écrit : > > > > Sprinkling *tons* of documentation on the script is not a good > > > > idea, instead refer to a wiki for further coccicheck documentation: > > > > > > > > https://bottest.wiki.kernel.org/coccicheck > > > > > > > > This page shall always refer to the linux-next iteration of > > > > scripts/coccicheck. > > > > > > Can you say a word about Documentation/coccinelle.txt too ? > > > And update it according to the script changes. > > > > I think this would be a good idea. > > I'd much prefer to just keep docs in a wiki, and we nuke this outdated doc or > refer in the Documentation/coccinelle.txt to the wiki. This lets us document > things much faster and lets us add more information in a much nicer format. But > that's just me... External links have a surprising way of disappearing. They also require internet access. julia > The existing file Documentation/coccinelle.txt even provides documentation on > how to build coccinelle --we're way passed that point. Note, I havne't > updated the docs on the wiki to refer to any of this, and would not unless > these changes get merged at least to linux-next. > > Luis >
[toc] | [prev] | [next] | [standalone]
| From | Julia Lawall <julia.lawall@lip6.fr> |
|---|---|
| Date | 2016-06-21 22:30 +0200 |
| Message-ID | <rMAt3-29u-7@gated-at.bofh.it> |
| In reply to | #1428092 |
On Tue, 21 Jun 2016, Luis R. Rodriguez wrote: > This v3 series addresses the feedback from the last v2 series > on the coccicheck enhancements [0], namely: > > o it drops the indexing heuristics in favor for a .cocciconfig use > o drops glimpse support as its simply not well maintained, recommends > idutils instead. > o adds a Linux .cocciconfig -- the assumption is you'd run spatch when > you're at the top level of the kernel. This has not only the side effect > of picking up .cocciconfig, but also that the coccicheck use of the > make variables passed on are assumed to be correct given the base > directory as the current directory. I don't understand this point. Coccinelle picks up the .cocciconfig, if any, of the directory on which you want to work, not of the current one. julia > o makes SPFLAGS more useful by ensuring it is always at the end of options > o rebases on top of Deepa Dinamani's patch > "coccicheck: Allow for overriding spatch flags", under the assumption this > is already merged. I don't see it on linux-next but I do think Michal > has merged already onto his tree. This is also rebased on to linux-next > next-20160621 > > These changes are also visible on kernel.org, on a branch based on linux-next > next-20160621 with Deepa's commit merged first. > > [0] http://lkml.kernel.org/r/1466116292-21843-1-git-send-email-mcgrof@kernel.org > [1] https://git.kernel.org/cgit/linux/kernel/git/mcgrof/linux-next.git/log/?h=20160621-cocciconfig-v3 > > Luis R. Rodriguez (8): > coccicheck: move spatch binary check up > coccicheck: make SPFLAGS more useful > coccicheck: enable parmap support > coccicheck: replace --very-quiet with --quit when debugging > scripts: add Linux .cocciconfig for coccinelle > coccicheck: add support for requring a coccinelle version > coccicheck: refer to coccicheck bottest wiki for documentation > scripts/coccinelle: require coccinelle >= 1.0.4 on > device_node_continue.cocci > > .cocciconfig | 3 + > .gitignore | 1 + > scripts/coccicheck | 98 ++++++++++++++++++++-- > .../iterators/device_node_continue.cocci | 3 + > 4 files changed, 96 insertions(+), 9 deletions(-) > create mode 100644 .cocciconfig > > -- > 2.8.2 > >
[toc] | [prev] | [next] | [standalone]
| From | "Luis R. Rodriguez" <mcgrof@kernel.org> |
|---|---|
| Date | 2016-06-21 23:00 +0200 |
| Subject | Re: [Cocci] [PATCH v3 0/8] coccicheck: modernize |
| Message-ID | <rMAW5-2lh-15@gated-at.bofh.it> |
| In reply to | #1428134 |
On Tue, Jun 21, 2016 at 10:13:31PM +0200, Julia Lawall wrote:
>
>
> On Tue, 21 Jun 2016, Luis R. Rodriguez wrote:
>
> > This v3 series addresses the feedback from the last v2 series
> > on the coccicheck enhancements [0], namely:
> >
> > o it drops the indexing heuristics in favor for a .cocciconfig use
> > o drops glimpse support as its simply not well maintained, recommends
> > idutils instead.
> > o adds a Linux .cocciconfig -- the assumption is you'd run spatch when
> > you're at the top level of the kernel. This has not only the side effect
> > of picking up .cocciconfig, but also that the coccicheck use of the
> > make variables passed on are assumed to be correct given the base
> > directory as the current directory.
>
> I don't understand this point. Coccinelle picks up the .cocciconfig, if
> any, of the directory on which you want to work, not of the current one.
The order of precedence for variables for .coccoconfig is as follows:
o Your current user's home directory is processed first
o Your directory from which spatch is called is processed next
o The directory provided with the --dir option is processed last, if used
Since coccicheck runs through make, it naturally runs from the kernel proper
dir, as such the second rule above would be implied for picking up a .cocciconfig.
That's part of the point I'm making.
Up next let us consider when M= is used or when it is not used, if used
it populates KBUILD_EXTMOD.
if [ "$KBUILD_EXTMOD" = "" ] ; then
OPTIONS="--dir $srctree $COCCIINCLUDE"
else
OPTIONS="--dir $KBUILD_EXTMOD $COCCIINCLUDE"
fi
Either way --dir is used, so the third rule applies and so your .cocciconfig
from there is also read if one is found. My other point was that $COCCIINCLUDE
has some useful tidbits of includes for coccinelle, and that also assumes
one is on the top level dir of the kernel.
That is sanitized as follows:
# spatch only allows include directories with the syntax "-I include"
# while gcc also allows "-Iinclude" and "-include include"
COCCIINCLUDE=${LINUXINCLUDE//-I/-I }
COCCIINCLUDE=${COCCIINCLUDE// -include/ --include}
So the point is to annotate that the .cocconfig is picked up first due
to the fact make is used and its issued from the top level makefile
and starts from the top level. The fact that --dir is used is important
but secondary to its introduction as well.
Luis
[toc] | [prev] | [next] | [standalone]
| From | Julia Lawall <julia.lawall@lip6.fr> |
|---|---|
| Date | 2016-06-21 23:10 +0200 |
| Subject | Re: [Cocci] [PATCH v3 0/8] coccicheck: modernize |
| Message-ID | <rMB5L-2DJ-15@gated-at.bofh.it> |
| In reply to | #1428159 |
On Tue, 21 Jun 2016, Luis R. Rodriguez wrote:
> On Tue, Jun 21, 2016 at 10:13:31PM +0200, Julia Lawall wrote:
> >
> >
> > On Tue, 21 Jun 2016, Luis R. Rodriguez wrote:
> >
> > > This v3 series addresses the feedback from the last v2 series
> > > on the coccicheck enhancements [0], namely:
> > >
> > > o it drops the indexing heuristics in favor for a .cocciconfig use
> > > o drops glimpse support as its simply not well maintained, recommends
> > > idutils instead.
> > > o adds a Linux .cocciconfig -- the assumption is you'd run spatch when
> > > you're at the top level of the kernel. This has not only the side effect
> > > of picking up .cocciconfig, but also that the coccicheck use of the
> > > make variables passed on are assumed to be correct given the base
> > > directory as the current directory.
> >
> > I don't understand this point. Coccinelle picks up the .cocciconfig, if
> > any, of the directory on which you want to work, not of the current one.
>
> The order of precedence for variables for .coccoconfig is as follows:
>
> o Your current user's home directory is processed first
> o Your directory from which spatch is called is processed next
> o The directory provided with the --dir option is processed last, if used
>
> Since coccicheck runs through make, it naturally runs from the kernel proper
> dir, as such the second rule above would be implied for picking up a .cocciconfig.
> That's part of the point I'm making.
OK
> Up next let us consider when M= is used or when it is not used, if used
> it populates KBUILD_EXTMOD.
>
> if [ "$KBUILD_EXTMOD" = "" ] ; then
> OPTIONS="--dir $srctree $COCCIINCLUDE"
> else
> OPTIONS="--dir $KBUILD_EXTMOD $COCCIINCLUDE"
> fi
>
> Either way --dir is used, so the third rule applies and so your .cocciconfig
> from there is also read if one is found. My other point was that $COCCIINCLUDE
> has some useful tidbits of includes for coccinelle, and that also assumes
> one is on the top level dir of the kernel.
OK.
> That is sanitized as follows:
>
> # spatch only allows include directories with the syntax "-I include"
> # while gcc also allows "-Iinclude" and "-include include"
> COCCIINCLUDE=${LINUXINCLUDE//-I/-I }
> COCCIINCLUDE=${COCCIINCLUDE// -include/ --include}
I don't get the second case. Is it to replace -include by --include?
Coccinelle actually supports both, although it doesn't advertise that.
Also, in LINUXINCLUDE, what is the meaning of -include? For Coccinelle,
it is not the same as -I. It is for files that should be included that
are not in the set of includes seen by whatever is the specified include
strategy (--all-includes, etc). The argument is a specific file name, not
a directory. It is a way of eg not bothering with --recursive-includes
when there is one or a few key header files that each file will need.
> So the point is to annotate that the .cocconfig is picked up first due
> to the fact make is used and its issued from the top level makefile
> and starts from the top level. The fact that --dir is used is important
> but secondary to its introduction as well.
OK, the original text seemed to me to imply that running from the kernel
directory was essential to getting the kernels .cocciconfig, so I wanted
to point out that this is not the case.
julia
[toc] | [prev] | [next] | [standalone]
| From | "Luis R. Rodriguez" <mcgrof@kernel.org> |
|---|---|
| Date | 2016-06-21 23:30 +0200 |
| Subject | Re: [Cocci] [PATCH v3 0/8] coccicheck: modernize |
| Message-ID | <rMBp7-2Kp-7@gated-at.bofh.it> |
| In reply to | #1428165 |
On Tue, Jun 21, 2016 at 11:02:49PM +0200, Julia Lawall wrote:
> On Tue, 21 Jun 2016, Luis R. Rodriguez wrote:
> > That is sanitized as follows:
> >
> > # spatch only allows include directories with the syntax "-I include"
> > # while gcc also allows "-Iinclude" and "-include include"
> > COCCIINCLUDE=${LINUXINCLUDE//-I/-I }
> > COCCIINCLUDE=${COCCIINCLUDE// -include/ --include}
>
> I don't get the second case. Is it to replace -include by --include?
> Coccinelle actually supports both, although it doesn't advertise that.
Oh neat, yeah. So a follow up patch later can be to remove that second line?
If so as of what version of coccinelle?
> Also, in LINUXINCLUDE, what is the meaning of -include? For Coccinelle,
> it is not the same as -I. It is for files that should be included that
> are not in the set of includes seen by whatever is the specified include
> strategy (--all-includes, etc). The argument is a specific file name, not
> a directory. It is a way of eg not bothering with --recursive-includes
> when there is one or a few key header files that each file will need.
Its used to force to include a single file, it is a file.
> > So the point is to annotate that the .cocconfig is picked up first due
> > to the fact make is used and its issued from the top level makefile
> > and starts from the top level. The fact that --dir is used is important
> > but secondary to its introduction as well.
>
> OK, the original text seemed to me to imply that running from the kernel
> directory was essential to getting the kernels .cocciconfig,
And what I meant to imply was that since coccicheck uses the kernel
makefiles it would kick off from kernel proper.
> so I wanted to point out that this is not the case.
I should have elaborated with all these details, its perhaps best to be
explicit about this so I can respin with a clearer commit log.
Luis
[toc] | [prev] | [next] | [standalone]
| From | "Luis R. Rodriguez" <mcgrof@kernel.org> |
|---|---|
| Date | 2016-06-21 23:40 +0200 |
| Subject | Re: [Cocci] [PATCH v3 0/8] coccicheck: modernize |
| Message-ID | <rMByN-2NM-5@gated-at.bofh.it> |
| In reply to | #1428181 |
On Tue, Jun 21, 2016 at 11:30:03PM +0200, Julia Lawall wrote:
>
>
> On Tue, 21 Jun 2016, Luis R. Rodriguez wrote:
>
> > On Tue, Jun 21, 2016 at 11:02:49PM +0200, Julia Lawall wrote:
> > > On Tue, 21 Jun 2016, Luis R. Rodriguez wrote:
> > > > That is sanitized as follows:
> > > >
> > > > # spatch only allows include directories with the syntax "-I include"
> > > > # while gcc also allows "-Iinclude" and "-include include"
> > > > COCCIINCLUDE=${LINUXINCLUDE//-I/-I }
> > > > COCCIINCLUDE=${COCCIINCLUDE// -include/ --include}
> > >
> > > I don't get the second case. Is it to replace -include by --include?
> > > Coccinelle actually supports both, although it doesn't advertise that.
> >
> > Oh neat, yeah. So a follow up patch later can be to remove that second line?
> > If so as of what version of coccinelle?
>
> Forever. Single - has always been supported. Double - was added at some
> point.
OK so indeed the second line above is indeed not needed for sure. After this
series settles we can nuke that line.
> > > Also, in LINUXINCLUDE, what is the meaning of -include? For Coccinelle,
> > > it is not the same as -I. It is for files that should be included that
> > > are not in the set of includes seen by whatever is the specified include
> > > strategy (--all-includes, etc). The argument is a specific file name, not
> > > a directory. It is a way of eg not bothering with --recursive-includes
> > > when there is one or a few key header files that each file will need.
> >
> > Its used to force to include a single file, it is a file.
>
> OK, close enough then.
Great thanks.
> > > > So the point is to annotate that the .cocconfig is picked up first due
> > > > to the fact make is used and its issued from the top level makefile
> > > > and starts from the top level. The fact that --dir is used is important
> > > > but secondary to its introduction as well.
> > >
> > > OK, the original text seemed to me to imply that running from the kernel
> > > directory was essential to getting the kernels .cocciconfig,
> >
> > And what I meant to imply was that since coccicheck uses the kernel
> > makefiles it would kick off from kernel proper.
> >
> > > so I wanted to point out that this is not the case.
> >
> > I should have elaborated with all these details, its perhaps best to be
> > explicit about this so I can respin with a clearer commit log.
>
> Thanks. People may come across this message, and it could be good for it
> to be as helpful as possible.
Indeed.
Luis
[toc] | [prev] | [next] | [standalone]
| From | Julia Lawall <julia.lawall@lip6.fr> |
|---|---|
| Date | 2016-06-21 23:40 +0200 |
| Subject | Re: [Cocci] [PATCH v3 0/8] coccicheck: modernize |
| Message-ID | <rMByN-2NM-7@gated-at.bofh.it> |
| In reply to | #1428181 |
On Tue, 21 Jun 2016, Luis R. Rodriguez wrote:
> On Tue, Jun 21, 2016 at 11:02:49PM +0200, Julia Lawall wrote:
> > On Tue, 21 Jun 2016, Luis R. Rodriguez wrote:
> > > That is sanitized as follows:
> > >
> > > # spatch only allows include directories with the syntax "-I include"
> > > # while gcc also allows "-Iinclude" and "-include include"
> > > COCCIINCLUDE=${LINUXINCLUDE//-I/-I }
> > > COCCIINCLUDE=${COCCIINCLUDE// -include/ --include}
> >
> > I don't get the second case. Is it to replace -include by --include?
> > Coccinelle actually supports both, although it doesn't advertise that.
>
> Oh neat, yeah. So a follow up patch later can be to remove that second line?
> If so as of what version of coccinelle?
Forever. Single - has always been supported. Double - was added at some
point.
> > Also, in LINUXINCLUDE, what is the meaning of -include? For Coccinelle,
> > it is not the same as -I. It is for files that should be included that
> > are not in the set of includes seen by whatever is the specified include
> > strategy (--all-includes, etc). The argument is a specific file name, not
> > a directory. It is a way of eg not bothering with --recursive-includes
> > when there is one or a few key header files that each file will need.
>
> Its used to force to include a single file, it is a file.
OK, close enough then.
> > > So the point is to annotate that the .cocconfig is picked up first due
> > > to the fact make is used and its issued from the top level makefile
> > > and starts from the top level. The fact that --dir is used is important
> > > but secondary to its introduction as well.
> >
> > OK, the original text seemed to me to imply that running from the kernel
> > directory was essential to getting the kernels .cocciconfig,
>
> And what I meant to imply was that since coccicheck uses the kernel
> makefiles it would kick off from kernel proper.
>
> > so I wanted to point out that this is not the case.
>
> I should have elaborated with all these details, its perhaps best to be
> explicit about this so I can respin with a clearer commit log.
Thanks. People may come across this message, and it could be good for it
to be as helpful as possible.
julia
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | linux.kernel
csiph-web