scripts: Configure and update tools to allow basic b4 usage
Subsystems (2)
v2 cover scripts: Configure and update tools to allow basic b4 usage
Provide some basic configuration for checkpatch.pl so that use on the command line is less confusing and actually useful.
Checking new patches with i.e. 'b4 prep --check' will now not just give you dummy errors.
Modify get_maintainer.pl to work when called from 'b4 prep --auto-to-cc'.
---
The second patch also copies the current codespell config from the kernel. I think this would be nice to have but I would also understand if nobody wants to add that dead weight here. In that case I would also agree drop that second patch.
---
Changes in v2:
- corrected variable name to match kernel script
- replace codespell dict with minimal and kvm-unit-tests specific version instead of copy form the kernel
- add virtio_config_ops as initial content for const_structs.checkpatch
- add a patch to configure the default b4 prefix
---
Christoph Schlameuss (4):
scripts/checkpatch.pl: Add empty codespell and const_structs configs scripts/checkpatch.pl: Create a project specific codespell config scripts/get_maintainer.pl: Ignore --nogit-chief-penguins option
b4: Add b4 config with default prefix
.b4-config | 2 ++ scripts/const_structs.checkpatch | 1 + scripts/get_maintainer.pl | 2 ++ scripts/spelling.txt | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 39 insertions(+)
---
base-commit: ea91ac1763561b23e7eba3f7c1fa3d45f29b89be
change-id: 20260423-b4-cmdline-a812ed022659
Best regards,
Signature · 1 line
Christoph Schlameuss <[email protected]>
PATCH v2 1/4 scripts/checkpatch.pl: Add empty codespell and const_structs configs
Without these files each patch is flagged with these errors providing no value and swamping actually found warnings and errors:
● xxxxxxxxxxxx: commit title
● checkpatch.pl: No typos will be found - file '.../kvm-unit-tests/scripts/spelling.txt': No such file or directory
● checkpatch.pl: No structs that should be const will be found - file '.../kvm-unit-tests/scripts/const_structs.checkpatch': No such file or directory
--- scripts/const_structs.checkpatch | 1 + 1 file changed, 1 insertion(+)
scripts/const_structs.checkpatch new file +1 -0
@@ -0,0 +1 @@ +virtio_config_ops
Signature · 1 line
2.53.0
PATCH v2 2/4 scripts/checkpatch.pl: Create a project specific codespell config
In reply to Christoph SchlameussProvide a codespell config to actually let it do something. Obviously codespell is not happy about the addition of these misspellings here.
--- scripts/spelling.txt | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)
scripts/spelling.txt new file +34 -0
@@ -0,0 +1,34 @@ +# The format of each line is: +# mistake||correction +cpuuid||cpuid +daig||diag +epws||epsw +hcal||hcall +hypercal||hypercall +kmv||kvm +locore||lowcore +lowcor||lowcore +mmmu||mmu +pagetabl||pagetable +pgtabl||pgtable +pmcww||pmcw +qemsystem||qemusystem +quemu||qemu +rdsmr||rdmsr +sapr||spapr +schipp||schib +scsww||scsw +sipg||sigp +slcp||sclp +sppar||spapr +stiss||stsi +subchanell||subchannel +subchanel||subchannel +syscal||syscall +timbase||timebase +timeabse||timebase +tlbb||tlb +virito||virtio +vmbc||vmcb +vmsc||vmcs +wrsmr||wrmsr
Signature · 1 line
2.53.0
Re: [kvm-unit-tests PATCH v2 2/4] scripts/checkpatch.pl: Create a project specific codespell config
Quoted 8 lines · Christoph Schlameuss
Provide a codespell config to actually let it do something. Obviously codespell is not happy about the addition of these misspellings here.
Signed-off-by Christoph Schlameuss <[email protected]>--- scripts/spelling.txt | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)
PATCH v2 3/4 scripts/get_maintainer.pl: Ignore --nogit-chief-penguins option
In reply to Christoph Schlameussb4 by default calls the get_maintainer.pl script with the '--nogit-chief-penguins' option letting the 'b4 prep --auto-to-cc' fail.
Adding parsing of that option without any related functionality to allow simple usage of b4 in the development workflow.
---
Sorry, I am not too versed with perl, so if there are better ways to fix this please comment.
--- scripts/get_maintainer.pl | 2 ++ 1 file changed, 2 insertions(+)
scripts/get_maintainer.pl +2 -0
@@ -31,6 +31,7 @@ my $email_fixes = 1; my $email_list = 1; my $email_moderated_list = 1; my $email_subscriber_list = 0; +my $email_git_penguin_chiefs = 0; my $email_git = 0; my $email_git_all_signature_types = 0; my $email_git_blame = 0;
@@ -228,6 +229,7 @@ if (!GetOptions( 'git-blame!' => \$email_git_blame, 'git-blame-signatures!' => \$email_git_blame_signatures, 'git-fallback!' => \$email_git_fallback, + 'git-chief-penguins!' => \$email_git_penguin_chiefs, 'git-min-signatures=i' => \$email_git_min_signatures, 'git-max-maintainers=i' => \$email_git_max_maintainers, 'git-min-percent=i' => \$email_git_min_percent,
Signature · 1 line
2.53.0
Re: [kvm-unit-tests PATCH v2 3/4] scripts/get_maintainer.pl: Ignore --nogit-chief-penguins option
Quoted 30 lines · Christoph Schlameuss
b4 by default calls the get_maintainer.pl script with the '--nogit-chief-penguins' option letting the 'b4 prep --auto-to-cc' fail.
Adding parsing of that option without any related functionality to allow simple usage of b4 in the development workflow.
Signed-off-by Christoph Schlameuss <[email protected]>---
Sorry, I am not too versed with perl, so if there are better ways to fix this please comment.
--- scripts/get_maintainer.pl | 2 ++ 1 file changed, 2 insertions(+)scripts/get_maintainer.pl +1
-0@@ -31,6 +31,7 @@ my $email_fixes = 1; my $email_list = 1; my $email_moderated_list = 1; my $email_subscriber_list = 0; +my $email_git_penguin_chiefs = 0; my $email_git = 0; my $email_git_all_signature_types = 0; my $email_git_blame = 0;
scripts/get_maintainer.pl if (!GetOptions( · line 235
Quoted 7 lines
scripts/get_maintainer.pl +1
-0@@ -228,6 +229,7 @@ if (!GetOptions( 'git-blame!' => \$email_git_blame, 'git-blame-signatures!' => \$email_git_blame_signatures, 'git-fallback!' => \$email_git_fallback, + 'git-chief-penguins!' => \$email_git_penguin_chiefs, 'git-min-signatures=i' => \$email_git_min_signatures, 'git-max-maintainers=i' => \$email_git_max_maintainers, 'git-min-percent=i' => \$email_git_min_percent,
PATCH v2 4/4 b4: Add b4 config with default prefix
In reply to Christoph Schlameussb4.send-prefixes adds the prefixes when creating a new patch series.
--- .b4-config | 2 ++ 1 file changed, 2 insertions(+)
.b4-config new file +2 -0
@@ -0,0 +1,2 @@ +[b4] +send-prefixes = kvm-unit-tests
Signature · 1 line
2.53.0
Re: [kvm-unit-tests PATCH v2 4/4] b4: Add b4 config with default prefix
Quoted 13 lines · Christoph Schlameuss
b4.send-prefixes adds the prefixes when creating a new patch series.
Signed-off-by Christoph Schlameuss <[email protected]>--- .b4-config | 2 ++ 1 file changed, 2 insertions(+).b4-config new file +0
-0
.b4-config line 2
Quoted 2 lines
.b4-config new file +2
-0@@ -0,0 +1,2 @@ +[b4] +send-prefixes = kvm-unit-tests
Thomas Huth
AppliedQuoted 6 lines · Christoph Schlameuss
Provide some basic configuration for checkpatch.pl so that use on the command line is less confusing and actually useful.
Checking new patches with i.e. 'b4 prep --check' will now not just give you dummy errors.Modify get_maintainer.pl to work when called from 'b4 prep --auto-to-cc'.
Thanks, applied now!
Thomas