summaryrefslogtreecommitdiff
path: root/scripts/check-remote-protocol.py
Commit message (Collapse)AuthorAgeFilesLines
* scripts: ignore whitespace in pdwtags outputDaniel P. Berrangé2020-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The pdwtags program changed its whitespace formatting for enum values in release 1.19: @@ -145,22 +145,22 @@ u_int flags; }; enum admin_procedure { - ADMIN_PROC_CONNECT_OPEN = 1, - ADMIN_PROC_CONNECT_CLOSE = 2, - ADMIN_PROC_CONNECT_GET_LIB_VERSION = 3, - ADMIN_PROC_CONNECT_LIST_SERVERS = 4, - ADMIN_PROC_CONNECT_LOOKUP_SERVER = 5, + ADMIN_PROC_CONNECT_OPEN = 1, + ADMIN_PROC_CONNECT_CLOSE = 2, + ADMIN_PROC_CONNECT_GET_LIB_VERSION = 3, + ADMIN_PROC_CONNECT_LIST_SERVERS = 4, + ADMIN_PROC_CONNECT_LOOKUP_SERVER = 5, Workaround this by telling diff to ignore whitespace changes. Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* scripts: trim "__attribute__((packed))" in RPC struct diffDaniel P. Berrangé2020-11-111-0/+6
| | | | | | | | | | | i686 builds on x86_64 host on Debian 10 result in the RPC structs getting "__attribute__((packed))" annotations added to them. This is harmless since we know the XDR protocol aligns and pads struct fields suitably on the wire. Thus we can safely cull the attribute before doing the diff comparison. Reviewed-by: Erik Skultety <eskultet@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* meson: src: add check*protocol testsPavel Hrdina2020-08-031-40/+31
| | | | | | Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
* scripts: check-remote-protocol: remove unused OBJEXT argumentPavel Hrdina2020-07-101-3/+2
| | | | | | Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
* scripts: Fix E741 that pycodesyle is pointing out during syntax-checkErik Skultety2020-05-261-2/+2
| | | | | | | | | | | | | | | With newer pycodestyle 2.6.0 (which is part of flake8-3.8.2) reports the following pep violation during syntax-check: ../scripts/check-remote-protocol.py:95:9: E741 ambiguous variable name 'l' for l in err.strip().split("\n") On all the distros we test on, this hasn't occurred yet, but with the future update of flake8 it likely would. The fix is easy, just name the variable appropriately. Signed-off-by: Erik Skultety <eskultet@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
* scripts: ignore remote protocol checks if pdwtags crashesDaniel P. Berrangé2019-12-061-2/+6
| | | | | | | | | | | 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>
* src: rewrite remote protocol checker in PythonDaniel P. Berrangé2019-12-041-0/+134
As part of a goal to eliminate Perl from libvirt build tools, rewrite the pdwtags processing script in Python. The original inline shell and perl code was completely unintelligible. The new python code is a manual conversion that attempts todo basically the same thing. Tested-by: Cole Robinson <crobinso@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>