kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [kvm-unit-tests PATCH v2] Switch the order of the parameters in report() and report_xfail()
       [not found] <20191128071453.15114-1-thuth@redhat.com>
@ 2019-11-28 15:45 ` Andrew Jones
  0 siblings, 0 replies; only message in thread
From: Andrew Jones @ 2019-11-28 15:45 UTC (permalink / raw)
  To: Thomas Huth
  Cc: kvm, Paolo Bonzini, David Hildenbrand, Bill Wendling, kvm-ppc,
	kvmarm, Laurent Vivier

On Thu, Nov 28, 2019 at 08:14:53AM +0100, Thomas Huth wrote:
> Commit c09c54c66b1df ("lib: use an argument which doesn't require
> default argument promotion") fixed a warning that occurs with Clang,
> but introduced a regression: If the "pass" parameter is a value
> which has only set the condition bits in the upper 32 bits of a
> 64 bit value, the condition is now false since the value is truncated
> to "unsigned int" so that the upper bits are simply discarded.
> 
> We fixed it by reverting the commit, but that of course also means
> trouble with Clang again. We can not use "bool" if it is the last
> parameter before the variable argument list. The proper fix is to
> swap the parameters around and make the format string the last
> parameter.
> 
> This patch (except the changes in lib/libcflat.h and lib/report.c
> and some rebase conflicts along the way) has basically been created
> with following coccinelle script (with some additional manual tweaking
> of long and disabled lines afterwards):
> 
> @@
> expression fmt;
> expression pass;
> expression list args;
> @@
>  report(
> -fmt, pass
> +pass, fmt
>  , args);
> 
> @@
> expression fmt;
> expression pass;
> expression list args;
> @@
>  report_xfail(
> -fmt, xfail, pass
> +xfail, pass, fmt
>  , args);
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  v2: Rebase the patch to the current master branch
>

Tested on arm and arm64.

Tested-by: Andrew Jones <drjones@redhat.com>

Thanks,
drew


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-11-28 15:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20191128071453.15114-1-thuth@redhat.com>
2019-11-28 15:45 ` [kvm-unit-tests PATCH v2] Switch the order of the parameters in report() and report_xfail() Andrew Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).