spatch --use-patch-diff broken?
Hi!
I've been trying to run coccicheck with --use-patch-diff to try to limit the number of processed files. I _think_ it worked when I set it up early last month but recently I went back to check and make coccicheck stops after the first spatch call, all it prints is "hd"
https://netdev-3.bots.linux.dev/cocci/results/452585/new
spatch seems to work fine when run without --use-patch-diff cocci version is the latest from git as of $now
FWIW the git hashes are from this tree:
https://github.com/linux-netdev/testing.git
(probably best to clone that thing with --depth $number)
Example:
/usr/local/bin/spatch -D report --no-show-diff --very-quiet --cocci-file ./scripts/coccinelle/api/err_cast.cocci --no-includes --include-headers --dir . -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/compiler-version.h --include ./include/linux/kconfig.h --jobs 48 --chunksize 1 --use-patch-diff b9f2444cd114a7f9c44950dc850aa1753b3edd94..be5bf59888403413619dd74e0d5f5386ffafbc90
grep: warning: + at start of expression
grep: warning: + at start of expression
grep: warning: + at start of expression
hd
Quoted 8 lines · Jakub Kicinski
Hi!
I've been trying to run coccicheck with --use-patch-diff to try to limit the number of processed files. I _think_ it worked when I set it up early last month but recently I went back to check and make coccicheck stops after the first spatch call, all it prints is "hd"
Quoted 8 lines
https://netdev-3.bots.linux.dev/cocci/results/452585/new
spatch seems to work fine when run without --use-patch-diff cocci version is the latest from git as of $now
FWIW the git hashes are from this tree:
https://github.com/linux-netdev/testing.git
(probably best to clone that thing with --depth $number)
There has been no intent to change --use-patch-diff, and whe I tried it, everything was fine. It seems to be crashing ungracefully for some other reason. I don't have very reliable internet access at the moment. I'll try pulling your tree and check your command line soon.
julia
Quoted 10 lines
Example:
/usr/local/bin/spatch-D report --no-show-diff --very-quiet --cocci-file./scripts/coccinelle/api/err_cast.cocci--no-includes --include-headers --dir . -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/compiler-version.h--include./include/linux/kconfig.h--jobs 48 --chunksize 1 --use-patch-diffb9f2444cd114a7f9c44950dc850aa1753b3edd94..be5bf59888403413619dd74e0d5f5386ffafbc90
grep: warning: + at start of expression
grep: warning: + at start of expression
grep: warning: + at start of expression
hd
Quoted 8 lines · Jakub Kicinski
Hi!
I've been trying to run coccicheck with --use-patch-diff to try to limit the number of processed files. I _think_ it worked when I set it up early last month but recently I went back to check and make coccicheck stops after the first spatch call, all it prints is "hd"
Quoted 8 lines
https://netdev-3.bots.linux.dev/cocci/results/452585/new
spatch seems to work fine when run without --use-patch-diff cocci version is the latest from git as of $now
FWIW the git hashes are from this tree:
https://github.com/linux-netdev/testing.git
(probably best to clone that thing with --depth $number)
It might help to drop the --very-quiet argument. Then you might get more information about the source of the problem.
julia
Quoted 10 lines
Example:
/usr/local/bin/spatch-D report --no-show-diff --very-quiet --cocci-file./scripts/coccinelle/api/err_cast.cocci--no-includes --include-headers --dir . -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/compiler-version.h--include./include/linux/kconfig.h--jobs 48 --chunksize 1 --use-patch-diffb9f2444cd114a7f9c44950dc850aa1753b3edd94..be5bf59888403413619dd74e0d5f5386ffafbc90
grep: warning: + at start of expression
grep: warning: + at start of expression
grep: warning: + at start of expression
hd
Quoted 12 lines · On Mon, 5 Feb 2024 20:39:16 +0100 (CET) Julia Lawall wrote:
Quoted 11 lines · Jakub Kicinski
I've been trying to run coccicheck with --use-patch-diff to try to limit the number of processed files. I _think_ it worked when I set it up early last month but recently I went back to check and make coccicheck stops after the first spatch call, all it prints is "hd"
https://netdev-3.bots.linux.dev/cocci/results/452585/new
spatch seems to work fine when run without --use-patch-diff cocci version is the latest from git as of $now
Quoted 6 lines
Quoted 3 lines
FWIW the git hashes are from this tree:
https://github.com/linux-netdev/testing.git
(probably best to clone that thing with --depth $number)It might help to drop the --very-quiet argument. Then you might get more information about the source of the problem.
I was looking for a --verbose argument, I didn't spot the --very-quiet :) No luck, sadly:
$ /usr/local/bin/spatch -D report --cocci-file ./scripts/coccinelle/api/err_cast.cocci --no-includes --include-headers --dir . -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/compiler-version.h --include ./include/linux/kconfig.h --jobs 48 --chunksize 1 --use-patch-diff b9f2444cd114a7f9c44950dc850aa1753b3edd94..be5bf59888403413619dd74e0d5f5386ffafbc90 init_defs_builtins: /usr/local/lib/coccinelle/standard.h grep: warning: + at start of expression grep: warning: + at start of expression grep: warning: + at start of expression hd
FWIW:
$ ocaml --version The OCaml toplevel, version 4.13.1
Quoted 8 lines · Jakub Kicinski
Hi!
I've been trying to run coccicheck with --use-patch-diff to try to limit the number of processed files. I _think_ it worked when I set it up early last month but recently I went back to check and make coccicheck stops after the first spatch call, all it prints is "hd"
Quoted 8 lines
https://netdev-3.bots.linux.dev/cocci/results/452585/new
spatch seems to work fine when run without --use-patch-diff cocci version is the latest from git as of $now
FWIW the git hashes are from this tree:
https://github.com/linux-netdev/testing.git
(probably best to clone that thing with --depth $number)
What number do you suggest for the depth? I tried 1000 but I don't have these hashes,
thanks,
julia
Quoted 10 lines
Example:
/usr/local/bin/spatch-D report --no-show-diff --very-quiet --cocci-file./scripts/coccinelle/api/err_cast.cocci--no-includes --include-headers --dir . -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/compiler-version.h--include./include/linux/kconfig.h--jobs 48 --chunksize 1 --use-patch-diffb9f2444cd114a7f9c44950dc850aa1753b3edd94..be5bf59888403413619dd74e0d5f5386ffafbc90
grep: warning: + at start of expression
grep: warning: + at start of expression
grep: warning: + at start of expression
hd
Quoted 6 lines · On Mon, 5 Feb 2024 23:37:30 +0100 (CET) Julia Lawall wrote:
Quoted 3 lines
FWIW the git hashes are from this tree:
https://github.com/linux-netdev/testing.git
(probably best to clone that thing with --depth $number)What number do you suggest for the depth? I tried 1000 but I don't have these hashes,
1000 is enough, but the hashes don't exist on the main branch so you'll also have to specify --no-single-branch when cloning.
Quoted 7 lines · Jakub Kicinski
Hi!
I've been trying to run coccicheck with --use-patch-diff to try to limit the number of processed files. I _think_ it worked when I set it up early last month but recently I went back to check and make coccicheck stops after the first spatch call, all it prints is "hd"
There was a problem in parsing the added line range, in the case where there is just a single number (one line added). The fix will be avaialble shortly.
Thanks for the report.
julia
Quoted 19 lines
https://netdev-3.bots.linux.dev/cocci/results/452585/new
spatch seems to work fine when run without --use-patch-diff cocci version is the latest from git as of $now
FWIW the git hashes are from this tree:
https://github.com/linux-netdev/testing.git
(probably best to clone that thing with --depth $number)Example:
/usr/local/bin/spatch-D report --no-show-diff --very-quiet --cocci-file./scripts/coccinelle/api/err_cast.cocci--no-includes --include-headers --dir . -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/compiler-version.h--include./include/linux/kconfig.h--jobs 48 --chunksize 1 --use-patch-diffb9f2444cd114a7f9c44950dc850aa1753b3edd94..be5bf59888403413619dd74e0d5f5386ffafbc90
grep: warning: + at start of expression
grep: warning: + at start of expression
grep: warning: + at start of expression
hd
Quoted 7 lines · Jakub Kicinski
Hi!
I've been trying to run coccicheck with --use-patch-diff to try to limit the number of processed files. I _think_ it worked when I set it up early last month but recently I went back to check and make coccicheck stops after the first spatch call, all it prints is "hd"
The problem should be fixed in the github version.
julia
Quoted 19 lines
https://netdev-3.bots.linux.dev/cocci/results/452585/new
spatch seems to work fine when run without --use-patch-diff cocci version is the latest from git as of $now
FWIW the git hashes are from this tree:
https://github.com/linux-netdev/testing.git
(probably best to clone that thing with --depth $number)Example:
/usr/local/bin/spatch-D report --no-show-diff --very-quiet --cocci-file./scripts/coccinelle/api/err_cast.cocci--no-includes --include-headers --dir . -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/compiler-version.h--include./include/linux/kconfig.h--jobs 48 --chunksize 1 --use-patch-diffb9f2444cd114a7f9c44950dc850aa1753b3edd94..be5bf59888403413619dd74e0d5f5386ffafbc90
grep: warning: + at start of expression
grep: warning: + at start of expression
grep: warning: + at start of expression
hd
Quoted 7 lines · On Tue, 6 Feb 2024 14:58:43 +0100 (CET) Julia Lawall wrote:
Quoted 5 lines
I've been trying to run coccicheck with --use-patch-diff to try to limit the number of processed files. I _think_ it worked when I set it up early last month but recently I went back to check and make coccicheck stops after the first spatch call, all it prints is "hd"
The problem should be fixed in the github version.
Thank you! I pulled & rebuilt and it works now! :)