From: Lourdes Pedrajas <lu@pplo.net>
To: Stefano Brivio <sbrivio@redhat.com>,
Julia Lawall <julia.lawall@inria.fr>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] Trying to use Coccinelle
Date: Thu, 19 Mar 2020 21:15:53 +0100 [thread overview]
Message-ID: <20200319201553.GA10911@supernova> (raw)
In-Reply-To: <20200316164440.54fe16a8@elisabeth>
Julia, Stefano,
I would like to move to coccinelle instead of continue using checkpatch. So
after the problem I explained in my last email, I have been trying various
combinations of commands and modifications in some makefiles, as Stefano
suggested. In order to see what is happening or to see why I can't use
coccinelle.
This is long, so I ask for forgiveness for that :(
Lines preceded with $ are the commands I have run. Lines inside braces () are
some modifications I have done that is not reflected in the console's output or
clarifications. The majority of the output is stripped in the sake of brevity,
only the obvious errors are here.
I don't know if this will be useful or not :( But I'll be glad if as least my
problem helps to find any error or bug, or helps coccinelle itself.
Thank you,
Lourdes
====
$ make coccicheck MODE=patch J=8 M=drivers/staging/android/ --debug
--(stripped output)
File 'coccicheck' does not exist.
Must remake target 'coccicheck'.
Please check for false positives in the output before submitting a patch.
When using "patch" mode, carefully review the patch before submitting it.
coccicheck failed
Makefile:1740: recipe for target 'coccicheck' failed
make: *** [coccicheck] Error 255
====
$ make coccicheck MODE=patch J=8 M=drivers/staging/android/ --debug
(showing $(BASH) and $(srctree) variables from 1740 line of the main Makefile,
and DIR and SPATCH from scripts/coccicheck lines 10-11)
--(stripped output)
File 'coccicheck' does not exist.
Must remake target 'coccicheck'.
Please check for false positives in the output before submitting a patch.
When using "patch" mode, carefully review the patch before submitting it.
BASH = bash
srctree = .
DIR = /mnt/btrfsimg/gregkh/staging/scripts/..
SPATCH = /usr/local/bin/spatch
coccicheck failed
Makefile:1740: recipe for target 'coccicheck' failed
make: *** [coccicheck] Error 255
====
$ make /mnt/btrfsimg/gregkh/staging/scripts/coccicheck MODE=patch J=8
M=drivers/staging/android/ --debug
(but x86_64 binutils are installed!! It don't repeat the error of last command
about not finding coccicheck file here)
--(stripped output)
arch/x86/Makefile:147: CONFIG_X86_X32 enabled but no binutils support
====
$ make /mnt/btrfsimg/gregkh/staging/scripts/coccicheck MODE=patch J=8
M=drivers/staging/android/ --debug
(w/o CONFIG_X86_X32 or commenting-out the ifdef CONFIG_X86_X32 section of
arch/x86/Makefile)
--(stripped output)
make: Nothing to be done for '/mnt/btrfsimg/gregkh/staging/scripts/coccicheck'.
====
$ make coccicheck C=2 MODE=patch J=8 drivers/staging/android/ashmem.c --debug
--(stripped output)
File 'coccicheck' does not exist.
Must remake target 'coccicheck'.
./scripts/coccicheck: line 65: shift: -1: shift count out of range
Successfully remade target file 'coccicheck'.
make: Nothing to be done for 'drivers/staging/android/ashmem.c'.
====
$ make coccicheck C=2 MODE=patch J=8 --debug drivers/staging/*/*.c
--(stripped output)
File 'coccicheck' does not exist.
Must remake target 'coccicheck'.
./scripts/coccicheck: line 65: shift: -1: shift count out of range
Successfully remade target file 'coccicheck'.
make: Nothing to be done for 'drivers/staging/android/ashmem.c'.
make: Nothing to be done for 'drivers/staging/axis-fifo/axis-fifo.c'.
--(stripped output: it repeats the same line for all C files inside staging
drivers)
====
$ make coccicheck C=1 MODE=patch J=8 --debug drivers/staging/*/*.c
--(stripped output)
File 'coccicheck' does not exist.
Must remake target 'coccicheck'.
./scripts/coccicheck: line 65: shift: -1: shift count out of range
Successfully remade target file 'coccicheck'.
make: Nothing to be done for 'drivers/staging/android/ashmem.c'.
make: Nothing to be done for 'drivers/staging/axis-fifo/axis-fifo.c'.
--(stripped output: it repeats the same line for all C files inside staging
drivers)
====
$ make coccicheck MODE=patch J=8 drivers/staging/android/ --debug
Reading makefiles...
Updating goal targets....
File 'coccicheck' does not exist.
File '__build_one_by_one' does not exist.
Must remake target '__build_one_by_one'.
GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating goal targets....
File 'coccicheck' does not exist.
Must remake target 'coccicheck'.
--(stripped output: after a while it produces some patches in drivers/ but not
drivers/staging/. And then the same error:)
coccicheck failed
Makefile:1740: recipe for target 'coccicheck' failed
make: *** [coccicheck] Error 255
====
$ make coccicheck MODE=patch V=1 J=8 --debug
(it works, but doesn't descend into drivers/staging/ before giving this error:)
coccicheck failed
Makefile:1740: recipe for target 'coccicheck' failed
make: *** [coccicheck] Error 255
====
$ make coccicheck MODE=patch V=1 J=8 --debug
(with variable KBUILD_EXTMOD set to drivers/staging/ in scripts/coccicheck)
--(stripped output)
File 'coccicheck' does not exist.
Must remake target 'coccicheck'.
bash ./scripts/coccicheck
--(stripped output)
Processing alloc_cast.cocci
with option(s) " --no-includes --include-headers"
--(stripped output)
Running (8 in parallel): /usr/local/bin/spatch -D patch --very-quiet
--cocci-file ./scripts/coccinelle/api/alloc/alloc_cast.cocci --no-includes
--include-headers --patch . --dir ./drivers/staging/. -I ./arch/x86/include
-I ./arch/x86/include/generated -I ./include -I ./arch/x86/include/uapi
-I ./arch/x86/include/generated/uapi -I ./include/uapi
-I ./include/generated/uapi --include ./include/linux/kconfig.h --jobs 8
--chunksize 1
Processing pool_zalloc-simple.cocci
with option(s) " --no-includes --include-headers"
--(stripped output)
Running (8 in parallel): /usr/local/bin/spatch -D patch --very-quiet
--cocci-file ./scripts/coccinelle/api/alloc/pool_zalloc-simple.cocci
--no-includes --include-headers --patch . --dir ./drivers/staging/.
-I ./arch/x86/include -I ./arch/x86/include/generated -I ./include
-I ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi
-I ./include/uapi -I ./include/generated/uapi
--include ./include/linux/kconfig.h --jobs 8 --chunksize 1
Processing zalloc-simple.cocci
with option(s) " --no-includes --include-headers
--(stripped output)
Running (8 in parallel): /usr/local/bin/spatch -D patch --very-quiet
--cocci-file ./scripts/coccinelle/api/alloc/zalloc-simple.cocci
--no-includes --include-headers --patch . --dir ./drivers/staging/.
-I ./arch/x86/include -I ./arch/x86/include/generated -I ./include
-I ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi
-I ./include/uapi -I ./include/generated/uapi
--include ./include/linux/kconfig.h --jobs 8 --chunksize 1
Processing atomic_as_refcounter.cocci
with option(s) " --include-headers --very-quiet"
--(stripped output)
Running (8 in parallel): /usr/local/bin/spatch -D patch --very-quiet
--cocci-file ./scripts/coccinelle/api/atomic_as_refcounter.cocci
--include-headers --very-quiet --patch . --dir ./drivers/staging/.
-I ./arch/x86/include -I ./arch/x86/include/generated -I ./include
-I ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi
-I ./include/uapi -I ./include/generated/uapi
--include ./include/linux/kconfig.h --jobs 8 --chunksize 1
coccicheck failed
Makefile:1740: recipe for target 'coccicheck' failed
make: *** [coccicheck] Error 255
next prev parent reply other threads:[~2020-03-19 20:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-11 18:11 Trying to use Coccinelle Lourdes Pedrajas
2020-03-11 23:23 ` [Outreachy kernel] " Stefano Brivio
2020-03-13 9:40 ` Lourdes Pedrajas
2020-03-16 14:08 ` Stefano Brivio
2020-03-16 14:27 ` Julia Lawall
2020-03-16 14:36 ` Stefano Brivio
2020-03-16 14:44 ` Julia Lawall
2020-03-16 15:23 ` Stefano Brivio
2020-03-16 15:32 ` Julia Lawall
2020-03-16 15:44 ` Stefano Brivio
2020-03-19 20:15 ` Lourdes Pedrajas [this message]
2020-03-19 20:25 ` Julia Lawall
2020-03-19 20:43 ` Stefano Brivio
2020-03-19 21:30 ` Lourdes Pedrajas
2020-03-19 21:38 ` Julia Lawall
2020-03-19 21:47 ` Lourdes Pedrajas
2020-03-19 21:50 ` Julia Lawall
2020-03-19 22:06 ` Lourdes Pedrajas
2020-03-23 0:00 ` Stefano Brivio
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=20200319201553.GA10911@supernova \
--to=lu@pplo.net \
--cc=julia.lawall@inria.fr \
--cc=outreachy-kernel@googlegroups.com \
--cc=sbrivio@redhat.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.