]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
scripts: ignore remote protocol checks if pdwtags crashes
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 6 Dec 2019 17:16:05 +0000 (17:16 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 6 Dec 2019 17:25:23 +0000 (17:25 +0000)
On Debian 10, pdwtags reliably segfaults when parsing the libvirt remote
protocol files. This crash was previously ignored by 'make check'
because of the way we piped the pdwtags output to the perl
post-processing scripts. When this was converted to use python it
mistakenly started being a fatal error. We need to explicitly ignore
pdwtags output if it exited with non-zero return code.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
scripts/check-remote-protocol.py

index 201166fd9e29add0a33109296b127d93df693633..25caa195636e5a7740c66a8f5dbb65f66f051d6b 100644 (file)
@@ -86,8 +86,12 @@ out, err = pdwtagsproc.communicate()
 out = out.decode("utf-8")
 err = err.decode("utf-8")
 
-if out == "" and err != "":
-    print("WARNING: no output, pdwtags appears broken:", file=sys.stderr)
+if out == "" or pdwtagsproc.returncode != 0:
+    if out == "":
+        print("WARNING: no output, pdwtags appears broken:", file=sys.stderr)
+    else:
+        print("WARNING: exit code %d, pdwtags appears broken:" %
+              pdwtagsproc.returncode, file=sys.stderr)
     for l in err.strip().split("\n"):
         print("WARNING: %s" % l, file=sys.stderr)
     print("WARNING: skipping the remote protocol test", file=sys.stderr)