Skip to contentSkip to conversation

devtools: give some hints for ABI errors

PATCH Superseded David Marchand 5 participants 12 messages Jul 8, 2020 – Jul 16, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 devtools: give some hints for ABI errors

abidiff can provide some more information about the ABI difference it detected.
In all cases, a discussion on the mailing must happen but we can give some hints to know if this is a problem with the script calling abidiff, a potential ABI breakage or an unambiguous ABI breakage.

---
 devtools/check-abi.sh | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
devtools/check-abi.sh +14 -2
index e17fedbd9f..521e2cce7c 100755
@@ -50,10 +50,22 @@ for dump in $(find $refdir -name "*.dump"); do
 		error=1
 		continue
 	fi
-	if ! abidiff $ABIDIFF_OPTIONS $dump $dump2; then
+	abidiff $ABIDIFF_OPTIONS $dump $dump2 || {
+		abiret=$?
 		echo "Error: ABI issue reported for 'abidiff $ABIDIFF_OPTIONS $dump $dump2'"
 		error=1
-	fi
+		echo
+		if [ $(($abiret & 3)) != 0 ]; then
+			echo "ABIDIFF_ERROR|ABIDIFF_USAGE_ERROR, please report this to [email protected]."
+		fi
+		if [ $(($abiret & 4)) != 0 ]; then
+			echo "ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged this as a potential issue)."
+		fi
+		if [ $(($abiret & 8)) != 0 ]; then
+			echo "ABIDIFF_ABI_INCOMPATIBLE_CHANGE, this change breaks the ABI."
+		fi
+		echo
+	}
 done
 
 [ -z "$error" ] || [ -n "$warnonly" ]
Signature · 1 line
2.23.0
#1 lore raw

+ Aaron

Quoted 31 lines · David Marchand

abidiff can provide some more information about the ABI difference it detected.
In all cases, a discussion on the mailing must happen but we can give some hints to know if this is a problem with the script calling abidiff, a potential ABI breakage or an unambiguous ABI breakage.

---
 devtools/check-abi.sh | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
devtools/check-abi.sh +7 -2
index e17fedbd9f..521e2cce7c 100755
@@ -50,10 +50,22 @@ for dump in $(find $refdir -name "*.dump"); do
 		error=1
 		continue
 	fi
-	if ! abidiff $ABIDIFF_OPTIONS $dump $dump2; then
+	abidiff $ABIDIFF_OPTIONS $dump $dump2 || {
+		abiret=$?
 		echo "Error: ABI issue reported for 'abidiff $ABIDIFF_OPTIONS $dump $dump2'"
 		error=1
-	fi
+		echo
+		if [ $(($abiret & 3)) != 0 ]; then
+			echo "ABIDIFF_ERROR|ABIDIFF_USAGE_ERROR, please report this to [email protected]."
+		fi
+		if [ $(($abiret & 4)) != 0 ]; then

devtools/check-abi.sh for dump in $(find $refdir -name "*.dump"); do · line 71

Quoted 10 lines
devtools/check-abi.sh +7 -0
+			echo "ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged this as a potential issue)."
+		fi
+		if [ $(($abiret & 8)) != 0 ]; then
+			echo "ABIDIFF_ABI_INCOMPATIBLE_CHANGE, this change breaks the ABI."
+		fi
+		echo
+	}
 done
 
 [ -z "$error" ] || [ -n "$warnonly" ]

This look good to me, my only thought was can we do anything to help the ABI checks play nice with Travis. At the moment it takes time to find the failure reason in the Travis log.

Ray K

#2 lore raw
Quoted 24 lines · Ray

+ Aaron

Quoted 20 lines · David Marchand

abidiff can provide some more information about the ABI difference it detected.
In all cases, a discussion on the mailing must happen but we can give some hints to know if this is a problem with the script calling abidiff, a potential ABI breakage or an unambiguous ABI breakage.

---
 devtools/check-abi.sh | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
devtools/check-abi.sh +0 -1
index e17fedbd9f..521e2cce7c 100755
@@ -50,10 +50,22 @@ for dump in $(find $refdir -name "*.dump"); do
              error=1
              continue
      fi
-     if ! abidiff $ABIDIFF_OPTIONS $dump $dump2; then
Quoted 8 lines

devtools/check-abi.sh for dump in $(find $refdir -name "*.dump"); do · line 59

Quoted 8 lines
devtools/check-abi.sh +5 -1
+     abidiff $ABIDIFF_OPTIONS $dump $dump2 || {
+             abiret=$?
              echo "Error: ABI issue reported for 'abidiff $ABIDIFF_OPTIONS $dump $dump2'"
              error=1
-     fi
+             echo
+             if [ $(($abiret & 3)) != 0 ]; then
+                     echo "ABIDIFF_ERROR|ABIDIFF_USAGE_ERROR, please report this to [email protected]."

Forgot to --amend.
Hopefully yes, this will be reported to [email protected]... I wanted to highlight this could be a script or env issue.

Quoted 11 lines
Quoted 11 lines
devtools/check-abi.sh +9 -0
+             fi
+             if [ $(($abiret & 4)) != 0 ]; then
+                     echo "ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged this as a potential issue)."
+             fi
+             if [ $(($abiret & 8)) != 0 ]; then
+                     echo "ABIDIFF_ABI_INCOMPATIBLE_CHANGE, this change breaks the ABI."
+             fi
+             echo
+     }
 done
 
Quoted 5 lines

devtools/check-abi.sh for dump in $(find $refdir -name "*.dump"); do · line 71

Quoted 2 lines
devtools/check-abi.sh +0 -0
 [ -z "$error" ] || [ -n "$warnonly" ]

This look good to me, my only thought was can we do anything to help the ABI checks play nice with Travis. At the moment it takes time to find the failure reason in the Travis log.

I usually look for "FILES_TO" to get to the last error.

Signature · 1 line
David Marchand
#3 lore raw
Quoted 50 lines · David Marchand
Quoted 24 lines · Ray

+ Aaron

Quoted 20 lines · David Marchand

abidiff can provide some more information about the ABI difference it detected.
In all cases, a discussion on the mailing must happen but we can give some hints to know if this is a problem with the script calling abidiff, a potential ABI breakage or an unambiguous ABI breakage.

---
 devtools/check-abi.sh | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
devtools/check-abi.sh +0 -1
index e17fedbd9f..521e2cce7c 100755
@@ -50,10 +50,22 @@ for dump in $(find $refdir -name "*.dump"); do
              error=1
              continue
      fi
-     if ! abidiff $ABIDIFF_OPTIONS $dump $dump2; then
Quoted 8 lines

devtools/check-abi.sh for dump in $(find $refdir -name "*.dump"); do · line 59

Quoted 8 lines
devtools/check-abi.sh +5 -1
+     abidiff $ABIDIFF_OPTIONS $dump $dump2 || {
+             abiret=$?
              echo "Error: ABI issue reported for 'abidiff $ABIDIFF_OPTIONS $dump $dump2'"
              error=1
-     fi
+             echo
+             if [ $(($abiret & 3)) != 0 ]; then
+                     echo "ABIDIFF_ERROR|ABIDIFF_USAGE_ERROR, please report this to [email protected]."

Forgot to --amend.
Hopefully yes, this will be reported to [email protected]... I wanted to highlight this could be a script or env issue.

Quoted 11 lines
Quoted 11 lines
devtools/check-abi.sh +9 -0
+             fi
+             if [ $(($abiret & 4)) != 0 ]; then
+                     echo "ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged this as a potential issue)."
+             fi
+             if [ $(($abiret & 8)) != 0 ]; then
+                     echo "ABIDIFF_ABI_INCOMPATIBLE_CHANGE, this change breaks the ABI."
+             fi
+             echo
+     }
 done
 
Quoted 8 lines
Quoted 5 lines

devtools/check-abi.sh for dump in $(find $refdir -name "*.dump"); do · line 71

Quoted 2 lines
devtools/check-abi.sh +0 -0
 [ -z "$error" ] || [ -n "$warnonly" ]

This look good to me, my only thought was can we do anything to help the ABI checks play nice with Travis. At the moment it takes time to find the failure reason in the Travis log.

I usually look for "FILES_TO" to get to the last error.

Right, but there is hopefully a better way to give Travis some clues ...

#4 lore raw
In reply to Kinsella, Ray
Quoted 42 lines · Ray

+ Aaron

Quoted 39 lines · David Marchand

abidiff can provide some more information about the ABI difference it detected.
In all cases, a discussion on the mailing must happen but we can give some hints to know if this is a problem with the script calling abidiff, a potential ABI breakage or an unambiguous ABI breakage.

---
 devtools/check-abi.sh | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
devtools/check-abi.sh +14 -2
index e17fedbd9f..521e2cce7c 100755
@@ -50,10 +50,22 @@ for dump in $(find $refdir -name "*.dump"); do
 		error=1
 		continue
 	fi
-	if ! abidiff $ABIDIFF_OPTIONS $dump $dump2; then
+	abidiff $ABIDIFF_OPTIONS $dump $dump2 || {
+		abiret=$?
 		echo "Error: ABI issue reported for 'abidiff $ABIDIFF_OPTIONS $dump $dump2'"
 		error=1
-	fi
+		echo
+		if [ $(($abiret & 3)) != 0 ]; then
+			echo "ABIDIFF_ERROR|ABIDIFF_USAGE_ERROR, please report this to [email protected]."
+		fi
+		if [ $(($abiret & 4)) != 0 ]; then
+			echo "ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged this as a potential issue)."
+		fi
+		if [ $(($abiret & 8)) != 0 ]; then
+			echo "ABIDIFF_ABI_INCOMPATIBLE_CHANGE, this change breaks the ABI."
+		fi
+		echo
+	}
 done
 
Quoted 5 lines

devtools/check-abi.sh for dump in $(find $refdir -name "*.dump"); do · line 71

Quoted 2 lines
devtools/check-abi.sh +0 -0
 [ -z "$error" ] || [ -n "$warnonly" ]

This look good to me, my only thought was can we do anything to help the ABI checks play nice with Travis. At the moment it takes time to find the failure reason in the Travis log.

That's a problem even for non-ABI failures. I was considering pulling the travis log for each failed build and attaching it, but even that isn't a great solution (very large emails aren't much easier to search).

I'm open to suggestions.

Quoted 1 line

Ray K

#5 lore raw
Quoted 50 lines · Aaron Conole
Quoted 42 lines · Ray

+ Aaron

Quoted 39 lines · David Marchand

abidiff can provide some more information about the ABI difference it detected.
In all cases, a discussion on the mailing must happen but we can give some hints to know if this is a problem with the script calling abidiff, a potential ABI breakage or an unambiguous ABI breakage.

---
 devtools/check-abi.sh | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
devtools/check-abi.sh +14 -2
index e17fedbd9f..521e2cce7c 100755
@@ -50,10 +50,22 @@ for dump in $(find $refdir -name "*.dump"); do
 		error=1
 		continue
 	fi
-	if ! abidiff $ABIDIFF_OPTIONS $dump $dump2; then
+	abidiff $ABIDIFF_OPTIONS $dump $dump2 || {
+		abiret=$?
 		echo "Error: ABI issue reported for 'abidiff $ABIDIFF_OPTIONS $dump $dump2'"
 		error=1
-	fi
+		echo
+		if [ $(($abiret & 3)) != 0 ]; then
+			echo "ABIDIFF_ERROR|ABIDIFF_USAGE_ERROR, please report this to [email protected]."
+		fi
+		if [ $(($abiret & 4)) != 0 ]; then
+			echo "ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged this as a potential issue)."
+		fi
+		if [ $(($abiret & 8)) != 0 ]; then
+			echo "ABIDIFF_ABI_INCOMPATIBLE_CHANGE, this change breaks the ABI."
+		fi
+		echo
+	}
 done
 
Quoted 5 lines

devtools/check-abi.sh for dump in $(find $refdir -name "*.dump"); do · line 71

Quoted 2 lines
devtools/check-abi.sh +0 -0
 [ -z "$error" ] || [ -n "$warnonly" ]

This look good to me, my only thought was can we do anything to help the ABI checks play nice with Travis. At the moment it takes time to find the failure reason in the Travis log.

Quoted 5 lines

That's a problem even for non-ABI failures. I was considering pulling the travis log for each failed build and attaching it, but even that isn't a great solution (very large emails aren't much easier to search).

I'm open to suggestions.

For me the problem arises when you log on to the Travis interface, you need to search for ERROR etc ... there must a better way.

Quoted 3 lines
Quoted 2 lines

Ray K

#6 lore raw
In reply to David Marchand

Hello,

Quoted 7 lines · David Marchand

abidiff can provide some more information about the ABI difference it detected.
In all cases, a discussion on the mailing must happen but we can give some hints to know if this is a problem with the script calling abidiff, a potential ABI breakage or an unambiguous ABI breakage.

For what it's worth, the change looks good to me, at least from an abidiff perspective.

Thanks.

Cheers.

Signature · 1 line
		Dodji
Acked-by on v1 1/1
#7 lore raw
In reply to David Marchand
Quoted 31 lines · David Marchand

abidiff can provide some more information about the ABI difference it detected.
In all cases, a discussion on the mailing must happen but we can give some hints to know if this is a problem with the script calling abidiff, a potential ABI breakage or an unambiguous ABI breakage.

---
 devtools/check-abi.sh | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
devtools/check-abi.sh +7 -2
index e17fedbd9f..521e2cce7c 100755
@@ -50,10 +50,22 @@ for dump in $(find $refdir -name "*.dump"); do
 		error=1
 		continue
 	fi
-	if ! abidiff $ABIDIFF_OPTIONS $dump $dump2; then
+	abidiff $ABIDIFF_OPTIONS $dump $dump2 || {
+		abiret=$?
 		echo "Error: ABI issue reported for 'abidiff $ABIDIFF_OPTIONS $dump $dump2'"
 		error=1
-	fi
+		echo
+		if [ $(($abiret & 3)) != 0 ]; then
+			echo "ABIDIFF_ERROR|ABIDIFF_USAGE_ERROR, please report this to [email protected]."
+		fi
+		if [ $(($abiret & 4)) != 0 ]; then

devtools/check-abi.sh for dump in $(find $refdir -name "*.dump"); do · line 71

Quoted 10 lines
devtools/check-abi.sh +7 -0
+			echo "ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged this as a potential issue)."
+		fi
+		if [ $(($abiret & 8)) != 0 ]; then
+			echo "ABIDIFF_ABI_INCOMPATIBLE_CHANGE, this change breaks the ABI."
+		fi
+		echo
+	}
 done
 
 [ -z "$error" ] || [ -n "$warnonly" ]
Acked-by on v1 1/1
#8 lore raw
In reply to David Marchand
Quoted 44 lines · David Marchand

abidiff can provide some more information about the ABI difference it detected.
In all cases, a discussion on the mailing must happen but we can give some hints to know if this is a problem with the script calling abidiff, a potential ABI breakage or an unambiguous ABI breakage.

---
 devtools/check-abi.sh | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
devtools/check-abi.sh +14 -2
index e17fedbd9f..521e2cce7c 100755
@@ -50,10 +50,22 @@ for dump in $(find $refdir -name "*.dump"); do
 		error=1
 		continue
 	fi
-	if ! abidiff $ABIDIFF_OPTIONS $dump $dump2; then
+	abidiff $ABIDIFF_OPTIONS $dump $dump2 || {
+		abiret=$?
 		echo "Error: ABI issue reported for 'abidiff $ABIDIFF_OPTIONS $dump $dump2'"
 		error=1
-	fi
+		echo
+		if [ $(($abiret & 3)) != 0 ]; then
+			echo "ABIDIFF_ERROR|ABIDIFF_USAGE_ERROR, please report this to [email protected]."
+		fi
+		if [ $(($abiret & 4)) != 0 ]; then
+			echo "ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged this as a potential issue)."
+		fi
+		if [ $(($abiret & 8)) != 0 ]; then
+			echo "ABIDIFF_ABI_INCOMPATIBLE_CHANGE, this change breaks the ABI."
+		fi
+		echo
+	}
 done
 
 [ -z "$error" ] || [ -n "$warnonly" ]
Signature · 1 line
2.23.0

this looks pretty reasonable to me, sure.

#9 lore raw

PATCH v2 1/1 devtools: give some hints for ABI errors

In reply to David Marchand

abidiff can provide some more information about the ABI difference it detected.
In all cases, a discussion on the mailing must happen but we can give some hints to know if this is a problem with the script calling abidiff, a potential ABI breakage or an unambiguous ABI breakage.

---
Changes since v1:
- used arithmetic test,
- updated error message for generic errors,

---
 devtools/check-abi.sh | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
devtools/check-abi.sh +14 -2
index e17fedbd9f..172e934382 100755
@@ -50,10 +50,22 @@ for dump in $(find $refdir -name "*.dump"); do
 		error=1
 		continue
 	fi
-	if ! abidiff $ABIDIFF_OPTIONS $dump $dump2; then
+	abidiff $ABIDIFF_OPTIONS $dump $dump2 || {
+		abiret=$?
 		echo "Error: ABI issue reported for 'abidiff $ABIDIFF_OPTIONS $dump $dump2'"
 		error=1
-	fi
+		echo
+		if [ $(($abiret & 3)) -ne 0 ]; then
+			echo "ABIDIFF_ERROR|ABIDIFF_USAGE_ERROR, this could be a script or environment issue."
+		fi
+		if [ $(($abiret & 4)) -ne 0 ]; then
+			echo "ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged this as a potential issue)."
+		fi
+		if [ $(($abiret & 8)) -ne 0 ]; then
+			echo "ABIDIFF_ABI_INCOMPATIBLE_CHANGE, this change breaks the ABI."
+		fi
+		echo
+	}
 done
 
 [ -z "$error" ] || [ -n "$warnonly" ]
Signature · 1 line
2.23.0
Acked-by on v2 1/1
#10 lore raw
Quoted 6 lines · David Marchand

abidiff can provide some more information about the ABI difference it detected.
In all cases, a discussion on the mailing must happen but we can give some hints to know if this is a problem with the script calling abidiff, a potential ABI breakage or an unambiguous ABI breakage.

Quoted 8 lines

---
Changes since v1:
- used arithmetic test,
- updated error message for generic errors,

author Applied
#11 lore raw
Quoted 8 lines · Aaron Conole
Quoted 6 lines · David Marchand

abidiff can provide some more information about the ABI difference it detected.
In all cases, a discussion on the mailing must happen but we can give some hints to know if this is a problem with the script calling abidiff, a potential ABI breakage or an unambiguous ABI breakage.

Quoted 4 lines
Quoted 3 lines

Applied.

Signature · 1 line
David Marchand