mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
8a743a598b
Currently we only append a newline to 'actual' if 'expected' (as loaded from file) already ends in a newline, but that results in inconsistent behavior. For example, some of the test files used by virhostcputest are newline-terminated and some aren't. If we were to remove existing newlines from those files or add them where they aren't present, the test would still pass, and even using VIR_TEST_REGENERATE_OUTPUT=1 wouldn't change them back. Make things consistent by ensuring that 'actual' is always newline-terminated. The only exception is when 'actual' is completely empty: in that case, we want the file to be actually empty, not contain a single empty line. query-jobs-empty.result in qemumonitorjsondata/ is an example of this being used. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com> |
||
---|---|---|
.. | ||
mdev_cc000052_9b13_9b13_9b13_cc23009b1326-create.argv | ||
mdev_cc000052_9b13_9b13_9b13_cc23009b1326-create.json | ||
mdev_cc000052_9b13_9b13_9b13_cc23009b1326-define.argv | ||
mdev_cc000052_9b13_9b13_9b13_cc23009b1326-define.json | ||
mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-create.argv | ||
mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-create.json | ||
mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-define.argv | ||
mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-define.json | ||
mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-start.argv | ||
mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-stop.argv | ||
mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-undefine.argv | ||
mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-create.argv | ||
mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-create.json | ||
mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-define.argv | ||
mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-define.json | ||
mdev_fedc4916_1ca8_49ac_b176_871d16c13076-create.argv | ||
mdev_fedc4916_1ca8_49ac_b176_871d16c13076-create.json | ||
mdev_fedc4916_1ca8_49ac_b176_871d16c13076-define.argv | ||
mdev_fedc4916_1ca8_49ac_b176_871d16c13076-define.json | ||
mdevctl-autostart.argv | ||
mdevctl-list-defined.argv | ||
mdevctl-list-empty-array.json | ||
mdevctl-list-empty-array.out.xml | ||
mdevctl-list-empty.json | ||
mdevctl-list-empty.out.xml | ||
mdevctl-list-multiple.json | ||
mdevctl-list-multiple.out.xml |