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?
Regardless, what's here works:
Reviewed-by: Peter Krempa <pkrempa(a)redhat.com>