devtools: fix regex of cnxk skip files

Message ID 20250306152516.2594-1-pbhagavatula@marvell.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series devtools: fix regex of cnxk skip files |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/github-robot: build success github build: passed

Commit Message

Pavan Nikhilesh Bhagavatula March 6, 2025, 3:25 p.m. UTC
From: Pavan Nikhilesh <pbhagavatula@marvell.com>

SKIP_FILES should include the path of the file.
Update the regex to match the path.

Fixes: dd88f51a5725 ("devtools: forbid DPDK API in cnxk base driver")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 devtools/checkpatches.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Thomas Monjalon March 6, 2025, 4:13 p.m. UTC | #1
06/03/2025 16:25, pbhagavatula@marvell.com:
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> 
> SKIP_FILES should include the path of the file.
> Update the regex to match the path.
> 
> Fixes: dd88f51a5725 ("devtools: forbid DPDK API in cnxk base driver")
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---
> -		-v SKIP_FILES='roc_platform*' \
> +		-v SKIP_FILES='.*roc_platform*' \

I don't think it is what you want.
The last part should be .*
  
Thomas Monjalon March 6, 2025, 4:15 p.m. UTC | #2
06/03/2025 16:25, pbhagavatula@marvell.com:
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> 
> SKIP_FILES should include the path of the file.
> Update the regex to match the path.

Can you please also check this one:
	-v SKIP_FILES='osdep.h$'
Is it really working without the full path?
  
Pavan Nikhilesh Bhagavatula March 6, 2025, 4:22 p.m. UTC | #3
> 06/03/2025 16:25, pbhagavatula@marvell.com:
> > From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >
> > SKIP_FILES should include the path of the file.
> > Update the regex to match the path.
> >
> > Fixes: dd88f51a5725 ("devtools: forbid DPDK API in cnxk base driver")
> >
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> > ---
> > -		-v SKIP_FILES='roc_platform*' \
> > +		-v SKIP_FILES='.*roc_platform*' \
> 
> I don't think it is what you want.
> The last part should be .*
> 

I tested with 0001-common-cnxk-support-for-inline-inbound-queue.patch
with SKIP_FILES='roc_platform.*' and It doesn’t work.

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 63638bc7fa35..64f7b316ea0a 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -236,7 +236,7 @@ check_forbidden_additions() { # <patch>
 
        # forbid rte_ symbols in cnxk base driver
        awk -v FOLDERS='drivers/common/cnxk/roc_*' \
-               -v SKIP_FILES='.*roc_platform*' \
+               -v SKIP_FILES='roc_platform.*' \
                -v EXPRESSIONS="rte_ RTE_" \
                -v RET_ON_FAIL=1 \
                -v MESSAGE='Use plt_ symbols instead of rte_ API in cnxk base driver' \
(python-venv)  lab_pvn@lab-pvn  dpdk.org   main ±  ./devtools/checkpatches.sh 0001-common-cnxk-support-for-inline-inbound-queue.patch

### [PATCH] common/cnxk: support for inline inbound queue

total: 0 errors, 0 warnings, 1 checks, 1173 lines checked
Warning in drivers/common/cnxk/roc_platform.h:
Use plt_ symbols instead of rte_ API in cnxk base driver
  
Pavan Nikhilesh Bhagavatula March 6, 2025, 4:23 p.m. UTC | #4
> 06/03/2025 16:25, pbhagavatula@marvell.com:
> > From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >
> > SKIP_FILES should include the path of the file.
> > Update the regex to match the path.
> 
> Can you please also check this one:
> 	-v SKIP_FILES='osdep.h$'
> Is it really working without the full path?
> 

Sure, let me check.
  

Patch

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 003bb49e04..63638bc7fa 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -236,7 +236,7 @@  check_forbidden_additions() { # <patch>
 
 	# forbid rte_ symbols in cnxk base driver
 	awk -v FOLDERS='drivers/common/cnxk/roc_*' \
-		-v SKIP_FILES='roc_platform*' \
+		-v SKIP_FILES='.*roc_platform*' \
 		-v EXPRESSIONS="rte_ RTE_" \
 		-v RET_ON_FAIL=1 \
 		-v MESSAGE='Use plt_ symbols instead of rte_ API in cnxk base driver' \