]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Use virHashForEachSorted in tested code
authorPeter Krempa <pkrempa@redhat.com>
Fri, 23 Oct 2020 07:07:02 +0000 (09:07 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 6 Nov 2020 09:31:57 +0000 (10:31 +0100)
commit947d2db31b1eed76dac390f75a1fbc068eae64e0
treedefe6e7ced37f07c09e956f2989de79d7eb34a3b
parent280a6d8330fabcc31713e2fb0c24386a51a58004
Use virHashForEachSorted in tested code

The simplest way to write tests is to check the output against expected
output, but we must ensure that the output is stable. We can use
virHashForEachSorted as a hash iterator to ensure stable ordering.

This patch fixes 3 instances of hash iteration which is tested in
various parts, including test output changes in appropriate places.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Matt Coleman <matt@datto.com>
src/qemu/qemu_domain.c
src/util/virmacmap.c
tests/qemumonitorjsontest.c
tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml