Skip to contentSkip to conversation

devtools: report the incorrect section when complaining

PATCH Superseded David Marchand 3 participants 10 messages Nov 28, 2018 – Nov 30, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 devtools: report the incorrect section when complaining

It does not hurt reporting the incriminated section.

Before:
ERROR: symbol rte_meter_trtcm_rfc4115_color_aware_check is added in a section other than the EXPERIMENTAL section of the version map

After:
ERROR: symbol rte_meter_trtcm_rfc4115_color_aware_check is added in +EXPERIMENTAL section other than the EXPERIMENTAL section of the version map

---

Used http://patchwork.dpdk.org/patch/48354/ to test.

---
 devtools/check-symbol-change.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
devtools/check-symbol-change.sh +1 -1
index 1d21e91..66741be 100755
@@ -115,7 +115,7 @@ check_for_rule_violations()
 				if [ $? -ne 0 ]
 				then
 					echo -n "ERROR: symbol $symname "
-					echo -n "is added in a section "
+					echo -n "is added in $secname section "
 					echo -n "other than the EXPERIMENTAL "
 					echo "section of the version map"
 					ret=1
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 2/2 devtools: drop '+' from the section name

The incriminated commit did relax the condition to catch all sections but dropped the + removal which can trigger false detection of the special EXPERIMENTAL section when adding symbols and the section in the same patch.

Fixes 7281cf520f89 ("devtools: relax rule for identifying symbol section")

---

Used http://patchwork.dpdk.org/patch/48354/ to test.

---
 devtools/check-symbol-change.sh | 1 +
 1 file changed, 1 insertion(+)
devtools/check-symbol-change.sh +1 -0
index 66741be..8b36ccd 100755
@@ -31,6 +31,7 @@ build_map_changes()
 		# Triggering this rule sets in_sec to 1, which actives the
 		# symbol rule below
 		/^.*{/ {
+			gsub("+", "");
 			if (in_map == 1) {
 				sec=$(NF-1); in_sec=1;
 			}
Signature · 1 line
1.8.3.1
#2 lore raw
In reply to David Marchand
Quoted 11 lines · David Marchand

It does not hurt reporting the incriminated section.

Before:
ERROR: symbol rte_meter_trtcm_rfc4115_color_aware_check is added in a section other than the EXPERIMENTAL section of the version map

After:
ERROR: symbol rte_meter_trtcm_rfc4115_color_aware_check is added in +EXPERIMENTAL section other than the EXPERIMENTAL section of the version map

nit: Its a bit odd in the changelog to have an example in which the incorect section being reported matches the expected section. I.e. its confusing to read "... is added in +EXPERIMENTAL section other than the EXPERIMENTAL section". Might be better to change the language of the report below and the example to be something like:

ERROR: symbol <SYMBOL> is added in the <VERSION> section, but is expected to be added in the EXPERIMENTAL section

ACK to the notion of reporting the offending section though. Thats a good idea.

Neil

Quoted 26 lines

---

Used http://patchwork.dpdk.org/patch/48354/ to test.

---
 devtools/check-symbol-change.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
devtools/check-symbol-change.sh +1 -1
index 1d21e91..66741be 100755
@@ -115,7 +115,7 @@ check_for_rule_violations()
 				if [ $? -ne 0 ]
 				then
 					echo -n "ERROR: symbol $symname "
-					echo -n "is added in a section "
+					echo -n "is added in $secname section "
 					echo -n "other than the EXPERIMENTAL "
 					echo "section of the version map"
 					ret=1
Signature · 1 line
1.8.3.1
#3 lore raw
Quoted 22 lines · Neil Horman
Quoted 11 lines · David Marchand

It does not hurt reporting the incriminated section.

Before:
ERROR: symbol rte_meter_trtcm_rfc4115_color_aware_check is added in a section other than the EXPERIMENTAL section of the version map

After:
ERROR: symbol rte_meter_trtcm_rfc4115_color_aware_check is added in +EXPERIMENTAL section other than the EXPERIMENTAL section of the version map

nit: Its a bit odd in the changelog to have an example in which the incorect
section being reported matches the expected section. I.e. its confusing to read
"... is added in +EXPERIMENTAL section other than the EXPERIMENTAL section".
Might be better to change the language of the report below and the example to be
something like:

Quoted 7 lines

ERROR: symbol <SYMBOL> is added in the <VERSION> section, but is expected to be
added in the EXPERIMENTAL section

ACK to the notion of reporting the offending section though. Thats a good idea.

Ok, updated for v2.

Signature · 1 line
David Marchand
#4 lore raw
Quoted 28 lines · David Marchand
Quoted 26 lines · Neil Horman
Quoted 11 lines · David Marchand

It does not hurt reporting the incriminated section.

Before:
ERROR: symbol rte_meter_trtcm_rfc4115_color_aware_check is added in a section other than the EXPERIMENTAL section of the version map

After:
ERROR: symbol rte_meter_trtcm_rfc4115_color_aware_check is added in +EXPERIMENTAL section other than the EXPERIMENTAL section of the version map

nit: Its a bit odd in the changelog to have an example in which the incorect
section being reported matches the expected section. I.e. its confusing to read
"... is added in +EXPERIMENTAL section other than the EXPERIMENTAL section".
Might be better to change the language of the report below and the example to be
something like:

ERROR: symbol <SYMBOL> is added in the <VERSION> section, but is expected to be
added in the EXPERIMENTAL section

Quoted 6 lines
Quoted 3 lines

ACK to the notion of reporting the offending section though. Thats a good idea.

Ok, updated for v2.

Thanks!
Neil

Quoted 2 lines
Signature · 1 line
David Marchand
#5 lore raw

PATCH v2 1/2 devtools: report the incorrect section when complaining

In reply to David Marchand

It does not hurt reporting the incriminated section.

Before:
ERROR: symbol rte_plop is added in a section other than the EXPERIMENTAL section of the version map

After:
ERROR: symbol rte_plop is added in the DPDK_19.02 section, but is expected to be added in the EXPERIMENTAL section of the version map

---
 devtools/check-symbol-change.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
devtools/check-symbol-change.sh +3 -2
index 1d21e91..4b8d9f3 100755
@@ -115,8 +115,9 @@ check_for_rule_violations()
 				if [ $? -ne 0 ]
 				then
 					echo -n "ERROR: symbol $symname "
-					echo -n "is added in a section "
-					echo -n "other than the EXPERIMENTAL "
+					echo -n "is added in the $secname "
+					echo -n "section, but is expected to "
+					echo -n "be added in the EXPERIMENTAL "
 					echo "section of the version map"
 					ret=1
 				fi
Signature · 1 line
1.8.3.1
#6 lore raw

PATCH v2 2/2 devtools: drop '+' from the section name

The incriminated commit did relax the condition to catch all sections but dropped the + removal which can triggers false detection of the special EXPERIMENTAL section when adding symbols and the section in the same patch.

Fixes 7281cf520f89 ("devtools: relax rule for identifying symbol section")
---
 devtools/check-symbol-change.sh | 1 +
 1 file changed, 1 insertion(+)
devtools/check-symbol-change.sh +1 -0
index 4b8d9f3..020da7e 100755
@@ -31,6 +31,7 @@ build_map_changes()
 		# Triggering this rule sets in_sec to 1, which actives the
 		# symbol rule below
 		/^.*{/ {
+			gsub("+", "");
 			if (in_map == 1) {
 				sec=$(NF-1); in_sec=1;
 			}
Signature · 1 line
1.8.3.1
Acked-by on v2 2/2
#7 lore raw

Re: [PATCH v2 2/2] devtools: drop '+' from the section name

Quoted 27 lines · David Marchand

The incriminated commit did relax the condition to catch all sections but dropped the + removal which can triggers false detection of the special EXPERIMENTAL section when adding symbols and the section in the same patch.

Fixes 7281cf520f89 ("devtools: relax rule for identifying symbol section")
---
 devtools/check-symbol-change.sh | 1 +
 1 file changed, 1 insertion(+)
devtools/check-symbol-change.sh +1 -0
index 4b8d9f3..020da7e 100755
@@ -31,6 +31,7 @@ build_map_changes()
 		# Triggering this rule sets in_sec to 1, which actives the
 		# symbol rule below
 		/^.*{/ {
+			gsub("+", "");
 			if (in_map == 1) {
 				sec=$(NF-1); in_sec=1;
 			}
Signature · 1 line
1.8.3.1

Thanks!
Neil

#8 lore raw

Re: [PATCH v2 2/2] devtools: drop '+' from the section name

Thomas,

Quoted 11 lines · Neil Horman
Quoted 6 lines · David Marchand

The incriminated commit did relax the condition to catch all sections but dropped the + removal which can triggers false detection of the special EXPERIMENTAL section when adding symbols and the section in the same patch.

Fixes 7281cf520f89 ("devtools: relax rule for identifying symbol

section")

Quoted 1 line

Can you take the two little patches from this patchset ?
I am pretty sure people will hit this issue with all these new apis coming :-).

Thanks.

Signature · 1 line
David Marchand
#9 lore raw

Re: [PATCH v2 2/2] devtools: drop '+' from the section name

In reply to Neil Horman
Quoted 10 lines · Neil Horman
Quoted 8 lines · David Marchand

The incriminated commit did relax the condition to catch all sections but dropped the + removal which can triggers false detection of the special EXPERIMENTAL section when adding symbols and the section in the same patch.

Fixes 7281cf520f89 ("devtools: relax rule for identifying symbol section")

Series applied, thanks.