All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
Cc: "Julien Grall" <julien@xen.org>,
	"Michal Prívozník" <mprivozn@redhat.com>,
	"Oleksandr Tyshchenko" <olekstysh@gmail.com>,
	xen-devel@lists.xenproject.org, libvir-list@redhat.com,
	"Anthony PERARD" <anthony.perard@citrix.com>,
	"Oleksandr Tyshchenko" <oleksandr_tyshchenko@epam.com>
Subject: Re: [libvirt PATCH] libxl: Fix build with recent Xen that introduces new disk backend type
Date: Tue, 2 Aug 2022 14:39:25 +0100	[thread overview]
Message-ID: <YukpDR2frtExoke+@redhat.com> (raw)
In-Reply-To: <YukM85j+Q+w0YLCu@mail-itl>

On Tue, Aug 02, 2022 at 01:39:31PM +0200, Marek Marczykowski-Górecki wrote:
> On Mon, Aug 01, 2022 at 10:36:07AM +0100, Daniel P. Berrangé wrote:
> > Generally we want to see errors triggered from new enums arriving,
> > as it can be a sign that libvirt code needs a semantic change in
> > order to continue operating correctly.  It isn't always correct
> > to assume that the 'default' case gives the correct behaviour.
> 
> Isn't that the exact purpose of 'default' label? If use of 'default'
> means "any of the other 5 specific values, but lets save some characters
> to not name them explicitly", then IMHO better to name them
> explicitly...
> 
> I can see a value of -Werror=switch-enum when adding new (internal) enum
> value, to find all the cases where code needs to be adjusted, but even
> then a grep is probably sufficient enough. On the other hand, if there
> are cases where indeed all the values of (internal API) enum needs to be
> handled explicitly, maybe simply omit 'default' label and use
> -Werror=switch?
> 
> Anyway, if tracking all the enums values of all the used 3rd-party APIs
> is desirable (like, noticing when libxl adds new disk type), then it
> probably should be a separate CI job, not the default devel build.
> Otherwise breakages like this will happen from time to time, and will
> be annoyed for people on involved in specific code part at all.
> 
> As a short term fix, maybe Xen's CI can build libvirt with
> -Wno-error=switch-enum?

I think makes sense for a 3rd party CI todo that, since these warnings
are primarily targetted at libvirt upstream maintainers, so that we
catch problems before code is committed.

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 :|



  reply	other threads:[~2022-08-02 13:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-29 15:50 [libvirt PATCH] libxl: Fix build with recent Xen that introduces new disk backend type Oleksandr Tyshchenko
2022-08-01  8:23 ` Michal Prívozník
2022-08-01  8:51   ` Julien Grall
2022-08-01  9:36     ` Daniel P. Berrangé
2022-08-02 11:39       ` Marek Marczykowski-Górecki
2022-08-02 13:39         ` Daniel P. Berrangé [this message]
2022-08-01 10:08     ` Michal Prívozník
2022-08-01 11:33       ` Oleksandr Tyshchenko
2022-08-01 17:04       ` Julien Grall
2022-08-02 13:20         ` Anthony PERARD
2022-08-19  9:57   ` Anthony PERARD
2022-08-22 14:07     ` Michal Prívozník
2022-08-22 14:06 ` Michal Prívozník

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YukpDR2frtExoke+@redhat.com \
    --to=berrange@redhat.com \
    --cc=anthony.perard@citrix.com \
    --cc=julien@xen.org \
    --cc=libvir-list@redhat.com \
    --cc=marmarek@invisiblethingslab.com \
    --cc=mprivozn@redhat.com \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=olekstysh@gmail.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.