[libvirt] [PATCH] scripts: ignore remote protocol checks if pdwtags crashes

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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/check-remote-protocol.py b/scripts/check-remote-protocol.py index 201166fd9e..25caa19563 100644 --- a/scripts/check-remote-protocol.py +++ b/scripts/check-remote-protocol.py @@ -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) -- 2.23.0

On Wed, Dec 11, 2019 at 10:09:58AM +0100, Andrea Bolognani wrote:
On Fri, 2019-12-06 at 17:18 +0000, Daniel P. Berrangé wrote:
On Debian 10, pdwtags reliably segfaults when parsing the libvirt remote protocol files.
Have you reported this bug?
Nope, I asssumed it has already been reported since it has been affecting libvirt for ages. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Wed, 2019-12-11 at 11:00 +0000, Daniel P. Berrangé wrote:
On Wed, Dec 11, 2019 at 10:09:58AM +0100, Andrea Bolognani wrote:
On Fri, 2019-12-06 at 17:18 +0000, Daniel P. Berrangé wrote:
On Debian 10, pdwtags reliably segfaults when parsing the libvirt remote protocol files.
Have you reported this bug?
Nope, I asssumed it has already been reported since it has been affecting libvirt for ages.
Doesn't look like it: https://bugs.debian.org/dwarves -- Andrea Bolognani / Red Hat / Virtualization
participants (2)
-
Andrea Bolognani
-
Daniel P. Berrangé