* [PATCH] devtools: fix regex matching literal plus in patches
@ 2026-05-05 14:03 Thomas Monjalon
2026-05-18 11:55 ` David Marchand
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2026-05-05 14:03 UTC (permalink / raw)
To: dev; +Cc: David Marchand, Haiyue Wang, stable
In Extended Regular Expressions (ERE) as used in awk,
'+' is a quantifier, not a literal character.
The pattern /^+/ matches the start of any line
instead of only lines beginning with a literal '+'.
As a result, check_experimental_tags and check_internal_tags
were matching context and removed lines in diffs, causing false positives.
Use [+] character class to unambiguously match a literal '+'.
Fixes: cfe3aeb170b2 ("remove experimental tags from all symbol definitions")
Fixes: fba5af82adc8 ("eal: add internal ABI tag definition")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
devtools/checkpatches.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 1c6099ac82..f5dd77443f 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -321,10 +321,10 @@ check_experimental_tags() { # <patch>
current_file = "";
ret = 0;
}
- /^+++ b\// {
+ /^[+][+][+] b\// {
current_file = $2;
}
- /^+.*__rte_experimental/ {
+ /^[+].*__rte_experimental/ {
if (current_file ~ ".c$" ) {
print "Please only put __rte_experimental tags in " \
"headers ("current_file")";
@@ -351,10 +351,10 @@ check_internal_tags() { # <patch>
current_file = "";
ret = 0;
}
- /^+++ b\// {
+ /^[+][+][+] b\// {
current_file = $2;
}
- /^+.*__rte_internal/ {
+ /^[+].*__rte_internal/ {
if (current_file ~ ".c$" ) {
print "Please only put __rte_internal tags in " \
"headers ("current_file")";
--
2.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] devtools: fix regex matching literal plus in patches
2026-05-05 14:03 [PATCH] devtools: fix regex matching literal plus in patches Thomas Monjalon
@ 2026-05-18 11:55 ` David Marchand
2026-05-18 13:18 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: David Marchand @ 2026-05-18 11:55 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev, Haiyue Wang, stable
On Tue, 5 May 2026 at 16:04, Thomas Monjalon <thomas@monjalon.net> wrote:
>
> In Extended Regular Expressions (ERE) as used in awk,
> '+' is a quantifier, not a literal character.
> The pattern /^+/ matches the start of any line
> instead of only lines beginning with a literal '+'.
> As a result, check_experimental_tags and check_internal_tags
> were matching context and removed lines in diffs, causing false positives.
>
> Use [+] character class to unambiguously match a literal '+'.
>
> Fixes: cfe3aeb170b2 ("remove experimental tags from all symbol definitions")
> Fixes: fba5af82adc8 ("eal: add internal ABI tag definition")
> Cc: stable@dpdk.org
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
--
David Marchand
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] devtools: fix regex matching literal plus in patches
2026-05-18 11:55 ` David Marchand
@ 2026-05-18 13:18 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2026-05-18 13:18 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Haiyue Wang, stable
18/05/2026 13:55, David Marchand:
> On Tue, 5 May 2026 at 16:04, Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > In Extended Regular Expressions (ERE) as used in awk,
> > '+' is a quantifier, not a literal character.
> > The pattern /^+/ matches the start of any line
> > instead of only lines beginning with a literal '+'.
> > As a result, check_experimental_tags and check_internal_tags
> > were matching context and removed lines in diffs, causing false positives.
> >
> > Use [+] character class to unambiguously match a literal '+'.
> >
> > Fixes: cfe3aeb170b2 ("remove experimental tags from all symbol definitions")
> > Fixes: fba5af82adc8 ("eal: add internal ABI tag definition")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
>
> Reviewed-by: David Marchand <david.marchand@redhat.com>
Applied
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-18 13:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-05 14:03 [PATCH] devtools: fix regex matching literal plus in patches Thomas Monjalon
2026-05-18 11:55 ` David Marchand
2026-05-18 13:18 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox