Commit Graph

7 Commits

Author SHA1 Message Date
Daniel P. Berrangé
eeb0c9aef0 scripts: ignore whitespace in pdwtags output
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>
2020-12-02 10:30:01 +00:00
Daniel P. Berrangé
4152868620 scripts: trim "__attribute__((packed))" in RPC struct diff
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>
2020-11-11 11:13:25 +00:00
Pavel Hrdina
7fe0c586ab meson: src: add check*protocol tests
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:27:05 +02:00
Pavel Hrdina
18c0588298 scripts: check-remote-protocol: remove unused OBJEXT argument
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-07-10 09:40:32 +02:00
Erik Skultety
1da460bff0 scripts: Fix E741 that pycodesyle is pointing out during syntax-check
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>
2020-05-26 08:51:15 +02:00
Daniel P. Berrangé
fda14dd782 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>
2019-12-06 17:25:23 +00:00
Daniel P. Berrangé
e0314b6855 src: rewrite remote protocol checker in Python
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>
2019-12-04 13:44:15 +00:00