[libvirt PATCH 0/5] rpcgen: Fix test coverage

Andrea Bolognani posted 5 patches 5 months ago
Failed in applying to current master (apply log)
ci/buildenv/almalinux-8.sh                    |  1 +
ci/buildenv/alpine-317.sh                     |  1 +
ci/buildenv/alpine-edge.sh                    |  1 +
ci/buildenv/centos-stream-8.sh                |  1 +
ci/buildenv/centos-stream-9.sh                |  1 +
ci/buildenv/debian-11-cross-aarch64.sh        |  1 +
ci/buildenv/debian-11-cross-armv6l.sh         |  1 +
ci/buildenv/debian-11-cross-armv7l.sh         |  1 +
ci/buildenv/debian-11-cross-i686.sh           |  1 +
ci/buildenv/debian-11-cross-mips64el.sh       |  1 +
ci/buildenv/debian-11-cross-mipsel.sh         |  1 +
ci/buildenv/debian-11-cross-ppc64le.sh        |  1 +
ci/buildenv/debian-11-cross-s390x.sh          |  1 +
ci/buildenv/debian-11.sh                      |  1 +
ci/buildenv/debian-12-cross-aarch64.sh        |  1 +
ci/buildenv/debian-12-cross-armv6l.sh         |  1 +
ci/buildenv/debian-12-cross-armv7l.sh         |  1 +
ci/buildenv/debian-12-cross-i686.sh           |  1 +
ci/buildenv/debian-12-cross-mips64el.sh       |  1 +
ci/buildenv/debian-12-cross-mipsel.sh         |  1 +
ci/buildenv/debian-12-cross-ppc64le.sh        |  1 +
ci/buildenv/debian-12-cross-s390x.sh          |  1 +
ci/buildenv/debian-12.sh                      |  1 +
ci/buildenv/debian-sid-cross-aarch64.sh       |  1 +
ci/buildenv/debian-sid-cross-armv6l.sh        |  1 +
ci/buildenv/debian-sid-cross-armv7l.sh        |  1 +
ci/buildenv/debian-sid-cross-i686.sh          |  1 +
ci/buildenv/debian-sid-cross-mips64el.sh      |  1 +
ci/buildenv/debian-sid-cross-ppc64le.sh       |  1 +
ci/buildenv/debian-sid-cross-s390x.sh         |  1 +
ci/buildenv/debian-sid.sh                     |  1 +
ci/buildenv/fedora-37.sh                      |  1 +
ci/buildenv/fedora-38-cross-mingw32.sh        |  1 +
ci/buildenv/fedora-38-cross-mingw64.sh        |  1 +
ci/buildenv/fedora-38.sh                      |  1 +
ci/buildenv/fedora-rawhide-cross-mingw32.sh   |  1 +
ci/buildenv/fedora-rawhide-cross-mingw64.sh   |  1 +
ci/buildenv/fedora-rawhide.sh                 |  1 +
ci/buildenv/opensuse-leap-15.sh               |  1 +
ci/buildenv/opensuse-tumbleweed.sh            |  1 +
ci/buildenv/ubuntu-2004.sh                    |  1 +
ci/buildenv/ubuntu-2204.sh                    |  1 +
ci/cirrus/freebsd-12.vars                     |  2 +-
ci/cirrus/freebsd-13.vars                     |  2 +-
ci/cirrus/macos-13.vars                       |  2 +-
ci/cirrus/macos-14.vars                       |  2 +-
ci/containers/almalinux-8.Dockerfile          |  1 +
ci/containers/alpine-317.Dockerfile           |  1 +
ci/containers/alpine-edge.Dockerfile          |  1 +
ci/containers/centos-stream-8.Dockerfile      |  1 +
ci/containers/centos-stream-9.Dockerfile      |  1 +
.../debian-11-cross-aarch64.Dockerfile        |  1 +
.../debian-11-cross-armv6l.Dockerfile         |  1 +
.../debian-11-cross-armv7l.Dockerfile         |  1 +
ci/containers/debian-11-cross-i686.Dockerfile |  1 +
.../debian-11-cross-mips64el.Dockerfile       |  1 +
.../debian-11-cross-mipsel.Dockerfile         |  1 +
.../debian-11-cross-ppc64le.Dockerfile        |  1 +
.../debian-11-cross-s390x.Dockerfile          |  1 +
ci/containers/debian-11.Dockerfile            |  1 +
.../debian-12-cross-aarch64.Dockerfile        |  1 +
.../debian-12-cross-armv6l.Dockerfile         |  1 +
.../debian-12-cross-armv7l.Dockerfile         |  1 +
ci/containers/debian-12-cross-i686.Dockerfile |  1 +
.../debian-12-cross-mips64el.Dockerfile       |  1 +
.../debian-12-cross-mipsel.Dockerfile         |  1 +
.../debian-12-cross-ppc64le.Dockerfile        |  1 +
.../debian-12-cross-s390x.Dockerfile          |  1 +
ci/containers/debian-12.Dockerfile            |  1 +
.../debian-sid-cross-aarch64.Dockerfile       |  1 +
.../debian-sid-cross-armv6l.Dockerfile        |  1 +
.../debian-sid-cross-armv7l.Dockerfile        |  1 +
.../debian-sid-cross-i686.Dockerfile          |  1 +
.../debian-sid-cross-mips64el.Dockerfile      |  1 +
.../debian-sid-cross-ppc64le.Dockerfile       |  1 +
.../debian-sid-cross-s390x.Dockerfile         |  1 +
ci/containers/debian-sid.Dockerfile           |  1 +
ci/containers/fedora-37.Dockerfile            |  1 +
.../fedora-38-cross-mingw32.Dockerfile        |  1 +
.../fedora-38-cross-mingw64.Dockerfile        |  1 +
ci/containers/fedora-38.Dockerfile            |  1 +
.../fedora-rawhide-cross-mingw32.Dockerfile   |  1 +
.../fedora-rawhide-cross-mingw64.Dockerfile   |  1 +
ci/containers/fedora-rawhide.Dockerfile       |  1 +
ci/containers/opensuse-leap-15.Dockerfile     |  1 +
ci/containers/opensuse-tumbleweed.Dockerfile  |  1 +
ci/containers/ubuntu-2004.Dockerfile          |  1 +
ci/containers/ubuntu-2204.Dockerfile          |  1 +
scripts/rpcgen/meson.build                    | 17 ++++++-----
scripts/rpcgen/rpcgen/meson.build             | 10 +++----
scripts/rpcgen/tests/meson.build              | 29 ++++++++++---------
91 files changed, 118 insertions(+), 30 deletions(-)
[libvirt PATCH 0/5] rpcgen: Fix test coverage
Posted by Andrea Bolognani 5 months ago
Right now we don't have pytest installed in any of the CI build
environments, and tests are only executed when pytest is present, so
the test coverage is exactly zero.

This series changes things so that we actually run the test suite as
part of the CI pipeline, which immediately triggers a build failure
on macOS:

  In file included from ../scripts/rpcgen/tests/test_demo.c:7:
  ../scripts/rpcgen/tests/demo.c:402:10: error: call to undeclared function 'xdr_uint64_t'; ISO C99 and later
  do not support implicit function declarations [-Wimplicit-function-declaration]
      if (!xdr_uint64_t(xdrs, &objp->suh))
           ^
  ../scripts/rpcgen/tests/test_demo.c:25:29: error: too few arguments to function call, expected 3, have 2
      ret = !!proc(&xdr, vorig);
              ~~~~            ^
  ../scripts/rpcgen/tests/test_demo.c:52:28: error: too few arguments to function call, expected 3, have 2
      ret = !!proc(&xdr, vnew);
              ~~~~           ^
  ../scripts/rpcgen/tests/test_demo.c:66:28: error: too few arguments to function call, expected 3, have 2
      ret = !!proc(&xdr, vnew);
              ~~~~           ^
  4 errors generated.

I haven't looked into that failure at all, but it looks like
something that we might want to fix before 9.10.0 is released?
libvirt itself seems to build fine, so perhaps it's just the test
suite that needs fixing. I leave the call to people who are more
familiar with the rpcgen situation.

Andrea Bolognani (5):
  rpcgen: Don't skip all tests when pytest is missing
  rpcgen: Organize meson tests into suites
  rpcgen: Skip tests if tests are disabled
  rpcgen: Reformat meson files
  ci: Refresh generated files

 ci/buildenv/almalinux-8.sh                    |  1 +
 ci/buildenv/alpine-317.sh                     |  1 +
 ci/buildenv/alpine-edge.sh                    |  1 +
 ci/buildenv/centos-stream-8.sh                |  1 +
 ci/buildenv/centos-stream-9.sh                |  1 +
 ci/buildenv/debian-11-cross-aarch64.sh        |  1 +
 ci/buildenv/debian-11-cross-armv6l.sh         |  1 +
 ci/buildenv/debian-11-cross-armv7l.sh         |  1 +
 ci/buildenv/debian-11-cross-i686.sh           |  1 +
 ci/buildenv/debian-11-cross-mips64el.sh       |  1 +
 ci/buildenv/debian-11-cross-mipsel.sh         |  1 +
 ci/buildenv/debian-11-cross-ppc64le.sh        |  1 +
 ci/buildenv/debian-11-cross-s390x.sh          |  1 +
 ci/buildenv/debian-11.sh                      |  1 +
 ci/buildenv/debian-12-cross-aarch64.sh        |  1 +
 ci/buildenv/debian-12-cross-armv6l.sh         |  1 +
 ci/buildenv/debian-12-cross-armv7l.sh         |  1 +
 ci/buildenv/debian-12-cross-i686.sh           |  1 +
 ci/buildenv/debian-12-cross-mips64el.sh       |  1 +
 ci/buildenv/debian-12-cross-mipsel.sh         |  1 +
 ci/buildenv/debian-12-cross-ppc64le.sh        |  1 +
 ci/buildenv/debian-12-cross-s390x.sh          |  1 +
 ci/buildenv/debian-12.sh                      |  1 +
 ci/buildenv/debian-sid-cross-aarch64.sh       |  1 +
 ci/buildenv/debian-sid-cross-armv6l.sh        |  1 +
 ci/buildenv/debian-sid-cross-armv7l.sh        |  1 +
 ci/buildenv/debian-sid-cross-i686.sh          |  1 +
 ci/buildenv/debian-sid-cross-mips64el.sh      |  1 +
 ci/buildenv/debian-sid-cross-ppc64le.sh       |  1 +
 ci/buildenv/debian-sid-cross-s390x.sh         |  1 +
 ci/buildenv/debian-sid.sh                     |  1 +
 ci/buildenv/fedora-37.sh                      |  1 +
 ci/buildenv/fedora-38-cross-mingw32.sh        |  1 +
 ci/buildenv/fedora-38-cross-mingw64.sh        |  1 +
 ci/buildenv/fedora-38.sh                      |  1 +
 ci/buildenv/fedora-rawhide-cross-mingw32.sh   |  1 +
 ci/buildenv/fedora-rawhide-cross-mingw64.sh   |  1 +
 ci/buildenv/fedora-rawhide.sh                 |  1 +
 ci/buildenv/opensuse-leap-15.sh               |  1 +
 ci/buildenv/opensuse-tumbleweed.sh            |  1 +
 ci/buildenv/ubuntu-2004.sh                    |  1 +
 ci/buildenv/ubuntu-2204.sh                    |  1 +
 ci/cirrus/freebsd-12.vars                     |  2 +-
 ci/cirrus/freebsd-13.vars                     |  2 +-
 ci/cirrus/macos-13.vars                       |  2 +-
 ci/cirrus/macos-14.vars                       |  2 +-
 ci/containers/almalinux-8.Dockerfile          |  1 +
 ci/containers/alpine-317.Dockerfile           |  1 +
 ci/containers/alpine-edge.Dockerfile          |  1 +
 ci/containers/centos-stream-8.Dockerfile      |  1 +
 ci/containers/centos-stream-9.Dockerfile      |  1 +
 .../debian-11-cross-aarch64.Dockerfile        |  1 +
 .../debian-11-cross-armv6l.Dockerfile         |  1 +
 .../debian-11-cross-armv7l.Dockerfile         |  1 +
 ci/containers/debian-11-cross-i686.Dockerfile |  1 +
 .../debian-11-cross-mips64el.Dockerfile       |  1 +
 .../debian-11-cross-mipsel.Dockerfile         |  1 +
 .../debian-11-cross-ppc64le.Dockerfile        |  1 +
 .../debian-11-cross-s390x.Dockerfile          |  1 +
 ci/containers/debian-11.Dockerfile            |  1 +
 .../debian-12-cross-aarch64.Dockerfile        |  1 +
 .../debian-12-cross-armv6l.Dockerfile         |  1 +
 .../debian-12-cross-armv7l.Dockerfile         |  1 +
 ci/containers/debian-12-cross-i686.Dockerfile |  1 +
 .../debian-12-cross-mips64el.Dockerfile       |  1 +
 .../debian-12-cross-mipsel.Dockerfile         |  1 +
 .../debian-12-cross-ppc64le.Dockerfile        |  1 +
 .../debian-12-cross-s390x.Dockerfile          |  1 +
 ci/containers/debian-12.Dockerfile            |  1 +
 .../debian-sid-cross-aarch64.Dockerfile       |  1 +
 .../debian-sid-cross-armv6l.Dockerfile        |  1 +
 .../debian-sid-cross-armv7l.Dockerfile        |  1 +
 .../debian-sid-cross-i686.Dockerfile          |  1 +
 .../debian-sid-cross-mips64el.Dockerfile      |  1 +
 .../debian-sid-cross-ppc64le.Dockerfile       |  1 +
 .../debian-sid-cross-s390x.Dockerfile         |  1 +
 ci/containers/debian-sid.Dockerfile           |  1 +
 ci/containers/fedora-37.Dockerfile            |  1 +
 .../fedora-38-cross-mingw32.Dockerfile        |  1 +
 .../fedora-38-cross-mingw64.Dockerfile        |  1 +
 ci/containers/fedora-38.Dockerfile            |  1 +
 .../fedora-rawhide-cross-mingw32.Dockerfile   |  1 +
 .../fedora-rawhide-cross-mingw64.Dockerfile   |  1 +
 ci/containers/fedora-rawhide.Dockerfile       |  1 +
 ci/containers/opensuse-leap-15.Dockerfile     |  1 +
 ci/containers/opensuse-tumbleweed.Dockerfile  |  1 +
 ci/containers/ubuntu-2004.Dockerfile          |  1 +
 ci/containers/ubuntu-2204.Dockerfile          |  1 +
 scripts/rpcgen/meson.build                    | 17 ++++++-----
 scripts/rpcgen/rpcgen/meson.build             | 10 +++----
 scripts/rpcgen/tests/meson.build              | 29 ++++++++++---------
 91 files changed, 118 insertions(+), 30 deletions(-)

-- 
2.43.0
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [libvirt PATCH 0/5] rpcgen: Fix test coverage
Posted by Michal Prívozník 5 months ago
On 11/29/23 18:18, Andrea Bolognani wrote:
> Right now we don't have pytest installed in any of the CI build
> environments, and tests are only executed when pytest is present, so
> the test coverage is exactly zero.
> 
> This series changes things so that we actually run the test suite as
> part of the CI pipeline, which immediately triggers a build failure
> on macOS:
> 
>   In file included from ../scripts/rpcgen/tests/test_demo.c:7:
>   ../scripts/rpcgen/tests/demo.c:402:10: error: call to undeclared function 'xdr_uint64_t'; ISO C99 and later
>   do not support implicit function declarations [-Wimplicit-function-declaration]
>       if (!xdr_uint64_t(xdrs, &objp->suh))
>            ^
>   ../scripts/rpcgen/tests/test_demo.c:25:29: error: too few arguments to function call, expected 3, have 2
>       ret = !!proc(&xdr, vorig);
>               ~~~~            ^
>   ../scripts/rpcgen/tests/test_demo.c:52:28: error: too few arguments to function call, expected 3, have 2
>       ret = !!proc(&xdr, vnew);
>               ~~~~           ^
>   ../scripts/rpcgen/tests/test_demo.c:66:28: error: too few arguments to function call, expected 3, have 2
>       ret = !!proc(&xdr, vnew);
>               ~~~~           ^
>   4 errors generated.

I suspect this is because on macos there's a different rpc library from
libtirpc which compiles just fine.

> 
> I haven't looked into that failure at all, but it looks like
> something that we might want to fix before 9.10.0 is released?
> libvirt itself seems to build fine, so perhaps it's just the test
> suite that needs fixing. I leave the call to people who are more
> familiar with the rpcgen situation.
> 
> Andrea Bolognani (5):
>   rpcgen: Don't skip all tests when pytest is missing
>   rpcgen: Organize meson tests into suites
>   rpcgen: Skip tests if tests are disabled
>   rpcgen: Reformat meson files
>   ci: Refresh generated files
> 


>  91 files changed, 118 insertions(+), 30 deletions(-)
> 

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

And safe for freeze.

Michal
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [libvirt PATCH 0/5] rpcgen: Fix test coverage
Posted by Daniel P. Berrangé 5 months ago
On Wed, Nov 29, 2023 at 06:18:27PM +0100, Andrea Bolognani wrote:
> Right now we don't have pytest installed in any of the CI build
> environments, and tests are only executed when pytest is present, so
> the test coverage is exactly zero.
> 
> This series changes things so that we actually run the test suite as
> part of the CI pipeline, which immediately triggers a build failure
> on macOS:
> 
>   In file included from ../scripts/rpcgen/tests/test_demo.c:7:
>   ../scripts/rpcgen/tests/demo.c:402:10: error: call to undeclared function 'xdr_uint64_t'; ISO C99 and later
>   do not support implicit function declarations [-Wimplicit-function-declaration]
>       if (!xdr_uint64_t(xdrs, &objp->suh))
>            ^
>   ../scripts/rpcgen/tests/test_demo.c:25:29: error: too few arguments to function call, expected 3, have 2
>       ret = !!proc(&xdr, vorig);
>               ~~~~            ^
>   ../scripts/rpcgen/tests/test_demo.c:52:28: error: too few arguments to function call, expected 3, have 2
>       ret = !!proc(&xdr, vnew);
>               ~~~~           ^
>   ../scripts/rpcgen/tests/test_demo.c:66:28: error: too few arguments to function call, expected 3, have 2
>       ret = !!proc(&xdr, vnew);
>               ~~~~           ^
>   4 errors generated.
> 
> I haven't looked into that failure at all, but it looks like
> something that we might want to fix before 9.10.0 is released?
> libvirt itself seems to build fine, so perhaps it's just the test
> suite that needs fixing. I leave the call to people who are more
> familiar with the rpcgen situation.

I've just CC'd you on a possible patch. Could you test it with this
series applied to verify the test suite passes.


With 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 :|
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [libvirt PATCH 0/5] rpcgen: Fix test coverage
Posted by Andrea Bolognani 4 months, 4 weeks ago
On Thu, Nov 30, 2023 at 09:24:45AM +0000, Daniel P. Berrangé wrote:
> On Wed, Nov 29, 2023 at 06:18:27PM +0100, Andrea Bolognani wrote:
> > Right now we don't have pytest installed in any of the CI build
> > environments, and tests are only executed when pytest is present, so
> > the test coverage is exactly zero.
> >
> > This series changes things so that we actually run the test suite as
> > part of the CI pipeline, which immediately triggers a build failure
> > on macOS:
> >
> >   In file included from ../scripts/rpcgen/tests/test_demo.c:7:
> >   ../scripts/rpcgen/tests/demo.c:402:10: error: call to undeclared function 'xdr_uint64_t'; ISO C99 and later
> >   do not support implicit function declarations [-Wimplicit-function-declaration]
> >       if (!xdr_uint64_t(xdrs, &objp->suh))
> >            ^
> >   ../scripts/rpcgen/tests/test_demo.c:25:29: error: too few arguments to function call, expected 3, have 2
> >       ret = !!proc(&xdr, vorig);
> >               ~~~~            ^
> >   ../scripts/rpcgen/tests/test_demo.c:52:28: error: too few arguments to function call, expected 3, have 2
> >       ret = !!proc(&xdr, vnew);
> >               ~~~~           ^
> >   ../scripts/rpcgen/tests/test_demo.c:66:28: error: too few arguments to function call, expected 3, have 2
> >       ret = !!proc(&xdr, vnew);
> >               ~~~~           ^
> >   4 errors generated.
> >
> > I haven't looked into that failure at all, but it looks like
> > something that we might want to fix before 9.10.0 is released?
> > libvirt itself seems to build fine, so perhaps it's just the test
> > suite that needs fixing. I leave the call to people who are more
> > familiar with the rpcgen situation.
>
> I've just CC'd you on a possible patch. Could you test it with this
> series applied to verify the test suite passes.

Replied there.

Fix for the "too few arguments" error:

  https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/23XMES2PIVIUTW44P7FHZYAYVOUDSE42/

-- 
Andrea Bolognani / Red Hat / Virtualization
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [libvirt PATCH 0/5] rpcgen: Fix test coverage
Posted by Andrea Bolognani 5 months ago
On Wed, Nov 29, 2023 at 06:18:27PM +0100, Andrea Bolognani wrote:
> Right now we don't have pytest installed in any of the CI build
> environments, and tests are only executed when pytest is present, so
> the test coverage is exactly zero.
>
> This series changes things so that we actually run the test suite as
> part of the CI pipeline, which immediately triggers a build failure
> on macOS:
>
>   In file included from ../scripts/rpcgen/tests/test_demo.c:7:
>   ../scripts/rpcgen/tests/demo.c:402:10: error: call to undeclared function 'xdr_uint64_t'; ISO C99 and later
>   do not support implicit function declarations [-Wimplicit-function-declaration]
>       if (!xdr_uint64_t(xdrs, &objp->suh))
>            ^
>   ../scripts/rpcgen/tests/test_demo.c:25:29: error: too few arguments to function call, expected 3, have 2
>       ret = !!proc(&xdr, vorig);
>               ~~~~            ^
>   ../scripts/rpcgen/tests/test_demo.c:52:28: error: too few arguments to function call, expected 3, have 2
>       ret = !!proc(&xdr, vnew);
>               ~~~~           ^
>   ../scripts/rpcgen/tests/test_demo.c:66:28: error: too few arguments to function call, expected 3, have 2
>       ret = !!proc(&xdr, vnew);
>               ~~~~           ^
>   4 errors generated.
>
> I haven't looked into that failure at all, but it looks like
> something that we might want to fix before 9.10.0 is released?
> libvirt itself seems to build fine, so perhaps it's just the test
> suite that needs fixing. I leave the call to people who are more
> familiar with the rpcgen situation.
>
> Andrea Bolognani (5):
>   rpcgen: Don't skip all tests when pytest is missing
>   rpcgen: Organize meson tests into suites
>   rpcgen: Skip tests if tests are disabled
>   rpcgen: Reformat meson files
>   ci: Refresh generated files

I forgot to mention that this last commit is based on the following
pending lcitool MR:

  https://gitlab.com/libvirt/libvirt-ci/-/merge_requests/446

-- 
Andrea Bolognani / Red Hat / Virtualization
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org