Re: [libvirt PATCH 04/20] tests: switch to compact empty JSON object formatting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 20, 2024 at 17:04:19 +0200, Ján Tomko wrote:
> On a Thursday in 2024, Peter Krempa wrote:
> > On Wed, Aug 14, 2024 at 23:40:19 +0200, Ján Tomko wrote:
> > > Some earlier versions of json-c format empty elements differently.
> > > Run the tests who use the pretty formatting for readability and
> > > diffability through a function that unifies the output.
> > 
> > Hmm so for test/output stability IMO it'd be better to fix the output
> > inside virJSONValueToString(..., true) (so when we're prettifying).
> > 
> > This would cover all existing instances in the tests, but also all
> > future XMLs. Additionally it'd unify the output of prettified JSON we
> > have e.g. in 'virsh qemu-monitor-command --pretty'.
> > 
> > 
> > Too bad that it basically requires duplicating the output string which
> > makes me think twice whether it's really worth doing.
> > 
> > What do you think?
> > 
> 
> I don't think the duplication is worth it. And we don't really guarantee
> stability of the pretty formatting.

Hmm, yeah. This is mostly whether it makes sense to prevent potential
spurious CI failures in case we happen to add a JSON output file which
would break in any other output path.

Debugging that might not be obvious to people who didn't see the
function.

As said:

> > 
> > Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>
> > 




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux